generated-configure.sh revision 2607:4cce9a9da53d
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
647BOOTCYCLE_JVM_ARGS_BIG
648JAVA_FLAGS_BIG
649JAVA_FLAGS
650TEST_JOBS
651JOBS
652MEMORY_SIZE
653NUM_CORES
654ENABLE_GENERATE_CLASSLIST
655BUILD_FAILURE_HANDLER
656ENABLE_INTREE_EC
657VALID_JVM_FEATURES
658JVM_FEATURES_custom
659JVM_FEATURES_zeroshark
660JVM_FEATURES_zero
661JVM_FEATURES_minimal
662JVM_FEATURES_core
663JVM_FEATURES_client
664JVM_FEATURES_server
665INCLUDE_GRAAL
666ELF_LIBS
667ELF_CFLAGS
668STLPORT_LIB
669LIBZIP_CAN_USE_MMAP
670LIBDL
671LIBM
672USE_EXTERNAL_LCMS
673LCMS_LIBS
674LCMS_CFLAGS
675USE_EXTERNAL_LIBZ
676USE_EXTERNAL_LIBPNG
677PNG_LIBS
678PNG_CFLAGS
679USE_EXTERNAL_LIBGIF
680USE_EXTERNAL_LIBJPEG
681LLVM_LIBS
682LLVM_LDFLAGS
683LLVM_CFLAGS
684LLVM_CONFIG
685LIBFFI_LIB_FILE
686ENABLE_LIBFFI_BUNDLING
687LIBFFI_LIBS
688LIBFFI_CFLAGS
689ALSA_LIBS
690ALSA_CFLAGS
691FREETYPE_BUNDLE_LIB_PATH
692FREETYPE_LIBS
693FREETYPE_CFLAGS
694CUPS_CFLAGS
695X_EXTRA_LIBS
696X_LIBS
697X_PRE_LIBS
698X_CFLAGS
699XMKMF
700MSVCP_DLL
701MSVCR_DLL
702LIBCXX
703FIXPATH_DETACH_FLAG
704FIXPATH
705BUILD_GTEST
706ENABLE_AOT
707GCOV_ENABLED
708ZIP_EXTERNAL_DEBUG_SYMBOLS
709COPY_DEBUG_SYMBOLS
710COMPILE_WITH_DEBUG_SYMBOLS
711CFLAGS_WARNINGS_ARE_ERRORS
712BUILD_CC_DISABLE_WARNING_PREFIX
713DISABLE_WARNING_PREFIX
714WARNINGS_AS_ERRORS
715COMPILER_SUPPORTS_TARGET_BITS_FLAG
716LDFLAGS_TESTEXE
717LDFLAGS_TESTLIB
718CXXFLAGS_TESTEXE
719CXXFLAGS_TESTLIB
720CFLAGS_TESTEXE
721CFLAGS_TESTLIB
722OPENJDK_BUILD_JVM_LIBS
723OPENJDK_BUILD_JVM_ASFLAGS
724OPENJDK_BUILD_JVM_LDFLAGS
725OPENJDK_BUILD_JVM_CFLAGS
726OPENJDK_BUILD_LDFLAGS_HASH_STYLE
727OPENJDK_BUILD_LDFLAGS_CXX_JDK
728OPENJDK_BUILD_JDKEXE_LIBS
729OPENJDK_BUILD_JDKLIB_LIBS
730OPENJDK_BUILD_LDFLAGS_JDKEXE
731OPENJDK_BUILD_LDFLAGS_JDKLIB
732OPENJDK_BUILD_CXXFLAGS_JDKEXE
733OPENJDK_BUILD_CXXFLAGS_JDKLIB
734OPENJDK_BUILD_CFLAGS_JDKEXE
735OPENJDK_BUILD_CFLAGS_JDKLIB
736OPENJDK_BUILD_CXXSTD_CXXFLAG
737JVM_LIBS
738JVM_ASFLAGS
739JVM_LDFLAGS
740JVM_CFLAGS
741LDFLAGS_HASH_STYLE
742LDFLAGS_CXX_JDK
743JDKEXE_LIBS
744JDKLIB_LIBS
745LDFLAGS_JDKEXE
746LDFLAGS_JDKLIB
747CXXFLAGS_JDKEXE
748CXXFLAGS_JDKLIB
749CFLAGS_JDKEXE
750CFLAGS_JDKLIB
751MACOSX_VERSION_MIN
752CXXSTD_CXXFLAG
753JDK_ARCH_ABI_PROP_NAME
754CXX_O_FLAG_SIZE
755CXX_O_FLAG_NONE
756CXX_O_FLAG_DEBUG
757CXX_O_FLAG_NORM
758CXX_O_FLAG_HI
759CXX_O_FLAG_HIGHEST
760CXX_O_FLAG_HIGHEST_JVM
761C_O_FLAG_SIZE
762C_O_FLAG_NONE
763C_O_FLAG_DEBUG
764C_O_FLAG_NORM
765C_O_FLAG_HI
766C_O_FLAG_HIGHEST
767C_O_FLAG_HIGHEST_JVM
768JVM_CFLAGS_SYMBOLS
769CXXFLAGS_DEBUG_SYMBOLS
770CFLAGS_DEBUG_SYMBOLS
771CXX_FLAG_DEPS
772C_FLAG_DEPS
773SHARED_LIBRARY_FLAGS
774SET_SHARED_LIBRARY_MAPFILE
775SET_SHARED_LIBRARY_NAME
776SET_SHARED_LIBRARY_ORIGIN
777SET_EXECUTABLE_ORIGIN
778CXX_FLAG_REORDER
779C_FLAG_REORDER
780JVM_RCFLAGS
781RC_FLAGS
782AR_OUT_OPTION
783LD_OUT_OPTION
784EXE_OUT_OPTION
785CC_OUT_OPTION
786STRIPFLAGS
787ARFLAGS
788COMPILER_BINDCMD_FILE_FLAG
789COMPILER_COMMAND_FILE_FLAG
790COMPILER_TARGET_BITS_FLAG
791JT_HOME
792JTREGEXE
793HOTSPOT_TOOLCHAIN_TYPE
794USING_BROKEN_SUSE_LD
795PACKAGE_PATH
796BUILD_AS
797BUILD_LDCXX
798BUILD_LD
799BUILD_STRIP
800BUILD_OBJCOPY
801BUILD_AR
802BUILD_NM
803BUILD_CXX
804BUILD_CC
805BUILD_SYSROOT_LDFLAGS
806BUILD_SYSROOT_CFLAGS
807ac_ct_OBJDUMP
808OBJDUMP
809ac_ct_OBJCOPY
810OBJCOPY
811ac_ct_NM
812ac_ct_STRIP
813GNM
814NM
815STRIP
816MSBUILD
817DUMPBIN
818RC
819MT
820LIPO
821ac_ct_AR
822AR
823AS
824LDCXX
825LD
826CXXCPP
827CPP
828CXX_VERSION_NUMBER
829CC_VERSION_NUMBER
830ac_ct_CXX
831CXXFLAGS
832CXX
833TOOLCHAIN_PATH_CXX
834POTENTIAL_CXX
835OBJEXT
836EXEEXT
837ac_ct_CC
838CPPFLAGS
839LDFLAGS
840CFLAGS
841CC
842TOOLCHAIN_PATH_CC
843POTENTIAL_CC
844TOOLCHAIN_VERSION
845VS_LIB
846VS_INCLUDE
847VS_PATH
848CYGWIN_LINK
849SYSROOT_LDFLAGS
850SYSROOT_CFLAGS
851EXTRA_LDFLAGS
852EXTRA_CXXFLAGS
853EXTRA_CFLAGS
854EXE_SUFFIX
855OBJ_SUFFIX
856STATIC_LIBRARY
857SHARED_LIBRARY
858STATIC_LIBRARY_SUFFIX
859SHARED_LIBRARY_SUFFIX
860LIBRARY_PREFIX
861TOOLCHAIN_TYPE
862STATIC_BUILD
863IMPORT_MODULES_MAKE
864IMPORT_MODULES_SRC
865IMPORT_MODULES_MAN
866IMPORT_MODULES_LEGAL
867IMPORT_MODULES_CONF
868IMPORT_MODULES_LIBS
869IMPORT_MODULES_CMDS
870IMPORT_MODULES_CLASSES
871BUILD_OUTPUT
872JDK_TOPDIR
873NASHORN_TOPDIR
874HOTSPOT_TOPDIR
875JAXWS_TOPDIR
876JAXP_TOPDIR
877CORBA_TOPDIR
878LANGTOOLS_TOPDIR
879EXTERNAL_BUILDJDK
880BUILD_JDK
881CREATE_BUILDJDK
882JLINK
883JMOD
884JAVAC_FLAGS
885BOOT_JDK_MODULAR
886BOOT_JDK_SOURCETARGET
887JARSIGNER
888JAR
889JAVAH
890JAVAC
891JAVA
892BOOT_JDK
893JAVA_CHECK
894JAVAC_CHECK
895VERSION_IS_GA
896VERSION_SHORT
897VERSION_STRING
898VERSION_NUMBER_FOUR_POSITIONS
899VERSION_NUMBER
900VERSION_OPT
901VERSION_BUILD
902VERSION_PRE
903VERSION_PATCH
904VERSION_SECURITY
905VERSION_MINOR
906VERSION_MAJOR
907MACOSX_BUNDLE_ID_BASE
908MACOSX_BUNDLE_NAME_BASE
909HOTSPOT_VM_DISTRO
910COMPANY_NAME
911JDK_RC_PLATFORM_NAME
912PRODUCT_SUFFIX
913PRODUCT_NAME
914LAUNCHER_NAME
915JLINK_KEEP_PACKAGED_MODULES
916COPYRIGHT_YEAR
917COMPRESS_JARS
918INCLUDE_SA
919UNLIMITED_CRYPTO
920CACERTS_FILE
921ENABLE_FULL_DOCS
922ENABLE_HEADLESS_ONLY
923DEFAULT_MAKE_TARGET
924OS_VERSION_MICRO
925OS_VERSION_MINOR
926OS_VERSION_MAJOR
927PKG_CONFIG
928BASH_ARGS
929SETFILE
930CODESIGN
931XATTR
932DSYMUTIL
933IS_GNU_TIME
934PATCH
935DTRACE
936FLOCK
937TIME
938STAT
939HG
940DOT
941READELF
942OTOOL
943LDD
944ZIPEXE
945UNZIP
946TAR_SUPPORTS_TRANSFORM
947TAR_INCLUDE_PARAM
948TAR_CREATE_EXTRA_PARAM
949TAR_TYPE
950FIND_DELETE
951OUTPUT_SYNC
952OUTPUT_SYNC_SUPPORTED
953CHECK_TOOLSDIR_MAKE
954CHECK_TOOLSDIR_GMAKE
955CHECK_MAKE
956CHECK_GMAKE
957MAKE
958PKGHANDLER
959CONFIGURESUPPORT_OUTPUTDIR
960OUTPUT_ROOT
961CONF_NAME
962SPEC
963SDKROOT
964XCODEBUILD
965JVM_VARIANT_MAIN
966VALID_JVM_VARIANTS
967JVM_VARIANTS
968DEBUG_LEVEL
969HOTSPOT_DEBUG_LEVEL
970JDK_VARIANT
971USERNAME
972CANONICAL_TOPDIR
973ORIGINAL_TOPDIR
974TOPDIR
975PATH_SEP
976HOTSPOT_BUILD_CPU_DEFINE
977HOTSPOT_BUILD_CPU_ARCH
978HOTSPOT_BUILD_CPU
979HOTSPOT_BUILD_OS_TYPE
980HOTSPOT_BUILD_OS
981OPENJDK_BUILD_BUNDLE_PLATFORM
982OPENJDK_BUILD_OS_EXPORT_DIR
983OPENJDK_BUILD_CPU_OSARCH
984OPENJDK_BUILD_CPU_ISADIR
985OPENJDK_BUILD_CPU_LEGACY_LIB
986OPENJDK_BUILD_CPU_LEGACY
987HOTSPOT_TARGET_CPU_DEFINE
988HOTSPOT_TARGET_CPU_ARCH
989HOTSPOT_TARGET_CPU
990HOTSPOT_TARGET_OS_TYPE
991HOTSPOT_TARGET_OS
992DEFINE_CROSS_COMPILE_ARCH
993OPENJDK_TARGET_BUNDLE_PLATFORM
994OPENJDK_TARGET_OS_EXPORT_DIR
995OPENJDK_TARGET_CPU_OSARCH
996OPENJDK_TARGET_CPU_ISADIR
997OPENJDK_TARGET_CPU_LEGACY_LIB
998OPENJDK_TARGET_CPU_LEGACY
999RELEASE_FILE_OS_ARCH
1000RELEASE_FILE_OS_NAME
1001OPENJDK_MODULE_TARGET_PLATFORM
1002COMPILE_TYPE
1003OPENJDK_TARGET_CPU_ENDIAN
1004OPENJDK_TARGET_CPU_BITS
1005OPENJDK_TARGET_CPU_ARCH
1006OPENJDK_TARGET_CPU
1007OPENJDK_TARGET_OS_ENV
1008OPENJDK_TARGET_OS_TYPE
1009OPENJDK_TARGET_OS
1010OPENJDK_BUILD_CPU_ENDIAN
1011OPENJDK_BUILD_CPU_BITS
1012OPENJDK_BUILD_CPU_ARCH
1013OPENJDK_BUILD_CPU
1014OPENJDK_BUILD_OS_ENV
1015OPENJDK_BUILD_OS_TYPE
1016OPENJDK_BUILD_OS
1017OPENJDK_BUILD_AUTOCONF_NAME
1018OPENJDK_TARGET_AUTOCONF_NAME
1019target_os
1020target_vendor
1021target_cpu
1022target
1023host_os
1024host_vendor
1025host_cpu
1026host
1027build_os
1028build_vendor
1029build_cpu
1030build
1031PANDOC
1032NICE
1033CPIO
1034DF
1035READLINK
1036CYGPATH
1037SED
1038FGREP
1039EGREP
1040GREP
1041AWK
1042XARGS
1043WHICH
1044WC
1045UNIQ
1046UNAME
1047TR
1048TOUCH
1049TEE
1050TAR
1051TAIL
1052SORT
1053SH
1054RMDIR
1055RM
1056PRINTF
1057NAWK
1058MV
1059MKTEMP
1060MKDIR
1061LS
1062LN
1063GZIP
1064GUNZIP
1065HEAD
1066FIND
1067FILE
1068EXPR
1069ECHO
1070DIRNAME
1071DIFF
1072DATE
1073CUT
1074CP
1075COMM
1076CMP
1077CHMOD
1078CAT
1079BASH
1080BASENAME
1081DATE_WHEN_CONFIGURED
1082ORIGINAL_PATH
1083CONFIGURE_COMMAND_LINE
1084target_alias
1085host_alias
1086build_alias
1087LIBS
1088ECHO_T
1089ECHO_N
1090ECHO_C
1091DEFS
1092mandir
1093localedir
1094libdir
1095psdir
1096pdfdir
1097dvidir
1098htmldir
1099infodir
1100docdir
1101oldincludedir
1102includedir
1103localstatedir
1104sharedstatedir
1105sysconfdir
1106datadir
1107datarootdir
1108libexecdir
1109sbindir
1110bindir
1111program_transform_name
1112prefix
1113exec_prefix
1114PACKAGE_URL
1115PACKAGE_BUGREPORT
1116PACKAGE_STRING
1117PACKAGE_VERSION
1118PACKAGE_TARNAME
1119PACKAGE_NAME
1120PATH_SEPARATOR
1121SHELL'
1122ac_subst_files=''
1123ac_user_opts='
1124enable_option_checking
1125with_target_bits
1126enable_openjdk_only
1127with_custom_make_dir
1128with_jdk_variant
1129enable_debug
1130with_debug_level
1131with_jvm_variants
1132with_cpu_port
1133with_devkit
1134with_sys_root
1135with_sysroot
1136with_tools_dir
1137with_toolchain_path
1138with_extra_path
1139with_sdk_name
1140with_conf_name
1141with_output_sync
1142with_default_make_target
1143enable_headless_only
1144enable_full_docs
1145with_cacerts_file
1146enable_unlimited_crypto
1147with_copyright_year
1148enable_keep_packaged_modules
1149with_milestone
1150with_update_version
1151with_user_release_suffix
1152with_build_number
1153with_version_string
1154with_version_pre
1155with_version_opt
1156with_version_build
1157with_version_major
1158with_version_minor
1159with_version_security
1160with_version_patch
1161with_boot_jdk
1162with_build_jdk
1163with_add_source_root
1164with_override_source_root
1165with_adds_and_overrides
1166with_override_langtools
1167with_override_corba
1168with_override_jaxp
1169with_override_jaxws
1170with_override_hotspot
1171with_override_nashorn
1172with_override_jdk
1173with_import_hotspot
1174with_import_modules
1175enable_static_build
1176with_toolchain_type
1177with_extra_cflags
1178with_extra_cxxflags
1179with_extra_ldflags
1180with_toolchain_version
1181with_build_devkit
1182with_jtreg
1183with_abi_profile
1184enable_warnings_as_errors
1185with_native_debug_symbols
1186enable_debug_symbols
1187enable_zip_debug_info
1188enable_native_coverage
1189enable_dtrace
1190enable_aot
1191enable_hotspot_gtest
1192with_stdc__lib
1193with_msvcr_dll
1194with_msvcp_dll
1195with_x
1196with_cups
1197with_cups_include
1198with_freetype
1199with_freetype_include
1200with_freetype_lib
1201with_freetype_src
1202enable_freetype_bundling
1203with_alsa
1204with_alsa_include
1205with_alsa_lib
1206with_libffi
1207with_libffi_include
1208with_libffi_lib
1209enable_libffi_bundling
1210with_libjpeg
1211with_giflib
1212with_libpng
1213with_zlib
1214with_lcms
1215with_dxsdk
1216with_dxsdk_lib
1217with_dxsdk_include
1218with_libelf
1219with_libelf_include
1220with_libelf_lib
1221with_jvm_features
1222with_jvm_interpreter
1223enable_jtreg_failure_handler
1224enable_generate_classlist
1225with_num_cores
1226with_memory_size
1227with_jobs
1228with_test_jobs
1229with_boot_jdk_jvmargs
1230with_sjavac_server_java
1231enable_sjavac
1232enable_javac_server
1233enable_icecc
1234enable_precompiled_headers
1235enable_ccache
1236with_ccache_dir
1237'
1238      ac_precious_vars='build_alias
1239host_alias
1240target_alias
1241BASENAME
1242BASH
1243CAT
1244CHMOD
1245CMP
1246COMM
1247CP
1248CUT
1249DATE
1250DIFF
1251DIRNAME
1252ECHO
1253EXPR
1254FILE
1255FIND
1256HEAD
1257GUNZIP
1258GZIP
1259LN
1260LS
1261MKDIR
1262MKTEMP
1263MV
1264NAWK
1265PRINTF
1266RM
1267RMDIR
1268SH
1269SORT
1270TAIL
1271TAR
1272TEE
1273TOUCH
1274TR
1275UNAME
1276UNIQ
1277WC
1278WHICH
1279XARGS
1280AWK
1281GREP
1282EGREP
1283FGREP
1284SED
1285CYGPATH
1286READLINK
1287DF
1288CPIO
1289NICE
1290PANDOC
1291MAKE
1292UNZIP
1293ZIPEXE
1294LDD
1295OTOOL
1296READELF
1297DOT
1298HG
1299STAT
1300TIME
1301FLOCK
1302DTRACE
1303PATCH
1304DSYMUTIL
1305XATTR
1306CODESIGN
1307SETFILE
1308PKG_CONFIG
1309JAVA
1310JAVAC
1311JAVAH
1312JAR
1313JARSIGNER
1314CC
1315CFLAGS
1316LDFLAGS
1317LIBS
1318CPPFLAGS
1319CXX
1320CXXFLAGS
1321CCC
1322CPP
1323CXXCPP
1324AS
1325AR
1326LIPO
1327STRIP
1328NM
1329GNM
1330OBJCOPY
1331OBJDUMP
1332BUILD_CC
1333BUILD_CXX
1334BUILD_NM
1335BUILD_AR
1336BUILD_OBJCOPY
1337BUILD_STRIP
1338JTREGEXE
1339XMKMF
1340FREETYPE_CFLAGS
1341FREETYPE_LIBS
1342ALSA_CFLAGS
1343ALSA_LIBS
1344LIBFFI_CFLAGS
1345LIBFFI_LIBS
1346PNG_CFLAGS
1347PNG_LIBS
1348LCMS_CFLAGS
1349LCMS_LIBS
1350ELF_CFLAGS
1351ELF_LIBS
1352ICECC_CMD
1353ICECC_CREATE_ENV
1354ICECC_WRAPPER
1355CCACHE'
1356
1357
1358# Initialize some variables set by options.
1359ac_init_help=
1360ac_init_version=false
1361ac_unrecognized_opts=
1362ac_unrecognized_sep=
1363# The variables have the same names as the options, with
1364# dashes changed to underlines.
1365cache_file=/dev/null
1366exec_prefix=NONE
1367no_create=
1368no_recursion=
1369prefix=NONE
1370program_prefix=NONE
1371program_suffix=NONE
1372program_transform_name=s,x,x,
1373silent=
1374site=
1375srcdir=
1376verbose=
1377x_includes=NONE
1378x_libraries=NONE
1379
1380# Installation directory options.
1381# These are left unexpanded so users can "make install exec_prefix=/foo"
1382# and all the variables that are supposed to be based on exec_prefix
1383# by default will actually change.
1384# Use braces instead of parens because sh, perl, etc. also accept them.
1385# (The list follows the same order as the GNU Coding Standards.)
1386bindir='${exec_prefix}/bin'
1387sbindir='${exec_prefix}/sbin'
1388libexecdir='${exec_prefix}/libexec'
1389datarootdir='${prefix}/share'
1390datadir='${datarootdir}'
1391sysconfdir='${prefix}/etc'
1392sharedstatedir='${prefix}/com'
1393localstatedir='${prefix}/var'
1394includedir='${prefix}/include'
1395oldincludedir='/usr/include'
1396docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1397infodir='${datarootdir}/info'
1398htmldir='${docdir}'
1399dvidir='${docdir}'
1400pdfdir='${docdir}'
1401psdir='${docdir}'
1402libdir='${exec_prefix}/lib'
1403localedir='${datarootdir}/locale'
1404mandir='${datarootdir}/man'
1405
1406ac_prev=
1407ac_dashdash=
1408for ac_option
1409do
1410  # If the previous option needs an argument, assign it.
1411  if test -n "$ac_prev"; then
1412    eval $ac_prev=\$ac_option
1413    ac_prev=
1414    continue
1415  fi
1416
1417  case $ac_option in
1418  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1419  *=)   ac_optarg= ;;
1420  *)    ac_optarg=yes ;;
1421  esac
1422
1423  # Accept the important Cygnus configure options, so we can diagnose typos.
1424
1425  case $ac_dashdash$ac_option in
1426  --)
1427    ac_dashdash=yes ;;
1428
1429  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1430    ac_prev=bindir ;;
1431  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1432    bindir=$ac_optarg ;;
1433
1434  -build | --build | --buil | --bui | --bu)
1435    ac_prev=build_alias ;;
1436  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1437    build_alias=$ac_optarg ;;
1438
1439  -cache-file | --cache-file | --cache-fil | --cache-fi \
1440  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1441    ac_prev=cache_file ;;
1442  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1443  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1444    cache_file=$ac_optarg ;;
1445
1446  --config-cache | -C)
1447    cache_file=config.cache ;;
1448
1449  -datadir | --datadir | --datadi | --datad)
1450    ac_prev=datadir ;;
1451  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1452    datadir=$ac_optarg ;;
1453
1454  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1455  | --dataroo | --dataro | --datar)
1456    ac_prev=datarootdir ;;
1457  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1458  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1459    datarootdir=$ac_optarg ;;
1460
1461  -disable-* | --disable-*)
1462    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1463    # Reject names that are not valid shell variable names.
1464    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1465      as_fn_error $? "invalid feature name: $ac_useropt"
1466    ac_useropt_orig=$ac_useropt
1467    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1468    case $ac_user_opts in
1469      *"
1470"enable_$ac_useropt"
1471"*) ;;
1472      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1473	 ac_unrecognized_sep=', ';;
1474    esac
1475    eval enable_$ac_useropt=no ;;
1476
1477  -docdir | --docdir | --docdi | --doc | --do)
1478    ac_prev=docdir ;;
1479  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1480    docdir=$ac_optarg ;;
1481
1482  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1483    ac_prev=dvidir ;;
1484  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1485    dvidir=$ac_optarg ;;
1486
1487  -enable-* | --enable-*)
1488    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1489    # Reject names that are not valid shell variable names.
1490    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1491      as_fn_error $? "invalid feature name: $ac_useropt"
1492    ac_useropt_orig=$ac_useropt
1493    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1494    case $ac_user_opts in
1495      *"
1496"enable_$ac_useropt"
1497"*) ;;
1498      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1499	 ac_unrecognized_sep=', ';;
1500    esac
1501    eval enable_$ac_useropt=\$ac_optarg ;;
1502
1503  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1504  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1505  | --exec | --exe | --ex)
1506    ac_prev=exec_prefix ;;
1507  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1508  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1509  | --exec=* | --exe=* | --ex=*)
1510    exec_prefix=$ac_optarg ;;
1511
1512  -gas | --gas | --ga | --g)
1513    # Obsolete; use --with-gas.
1514    with_gas=yes ;;
1515
1516  -help | --help | --hel | --he | -h)
1517    ac_init_help=long ;;
1518  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1519    ac_init_help=recursive ;;
1520  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1521    ac_init_help=short ;;
1522
1523  -host | --host | --hos | --ho)
1524    ac_prev=host_alias ;;
1525  -host=* | --host=* | --hos=* | --ho=*)
1526    host_alias=$ac_optarg ;;
1527
1528  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1529    ac_prev=htmldir ;;
1530  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1531  | --ht=*)
1532    htmldir=$ac_optarg ;;
1533
1534  -includedir | --includedir | --includedi | --included | --include \
1535  | --includ | --inclu | --incl | --inc)
1536    ac_prev=includedir ;;
1537  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1538  | --includ=* | --inclu=* | --incl=* | --inc=*)
1539    includedir=$ac_optarg ;;
1540
1541  -infodir | --infodir | --infodi | --infod | --info | --inf)
1542    ac_prev=infodir ;;
1543  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1544    infodir=$ac_optarg ;;
1545
1546  -libdir | --libdir | --libdi | --libd)
1547    ac_prev=libdir ;;
1548  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1549    libdir=$ac_optarg ;;
1550
1551  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1552  | --libexe | --libex | --libe)
1553    ac_prev=libexecdir ;;
1554  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1555  | --libexe=* | --libex=* | --libe=*)
1556    libexecdir=$ac_optarg ;;
1557
1558  -localedir | --localedir | --localedi | --localed | --locale)
1559    ac_prev=localedir ;;
1560  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1561    localedir=$ac_optarg ;;
1562
1563  -localstatedir | --localstatedir | --localstatedi | --localstated \
1564  | --localstate | --localstat | --localsta | --localst | --locals)
1565    ac_prev=localstatedir ;;
1566  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1567  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1568    localstatedir=$ac_optarg ;;
1569
1570  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1571    ac_prev=mandir ;;
1572  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1573    mandir=$ac_optarg ;;
1574
1575  -nfp | --nfp | --nf)
1576    # Obsolete; use --without-fp.
1577    with_fp=no ;;
1578
1579  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1580  | --no-cr | --no-c | -n)
1581    no_create=yes ;;
1582
1583  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1584  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1585    no_recursion=yes ;;
1586
1587  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1588  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1589  | --oldin | --oldi | --old | --ol | --o)
1590    ac_prev=oldincludedir ;;
1591  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1592  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1593  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1594    oldincludedir=$ac_optarg ;;
1595
1596  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1597    ac_prev=prefix ;;
1598  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1599    prefix=$ac_optarg ;;
1600
1601  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1602  | --program-pre | --program-pr | --program-p)
1603    ac_prev=program_prefix ;;
1604  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1605  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1606    program_prefix=$ac_optarg ;;
1607
1608  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1609  | --program-suf | --program-su | --program-s)
1610    ac_prev=program_suffix ;;
1611  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1612  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1613    program_suffix=$ac_optarg ;;
1614
1615  -program-transform-name | --program-transform-name \
1616  | --program-transform-nam | --program-transform-na \
1617  | --program-transform-n | --program-transform- \
1618  | --program-transform | --program-transfor \
1619  | --program-transfo | --program-transf \
1620  | --program-trans | --program-tran \
1621  | --progr-tra | --program-tr | --program-t)
1622    ac_prev=program_transform_name ;;
1623  -program-transform-name=* | --program-transform-name=* \
1624  | --program-transform-nam=* | --program-transform-na=* \
1625  | --program-transform-n=* | --program-transform-=* \
1626  | --program-transform=* | --program-transfor=* \
1627  | --program-transfo=* | --program-transf=* \
1628  | --program-trans=* | --program-tran=* \
1629  | --progr-tra=* | --program-tr=* | --program-t=*)
1630    program_transform_name=$ac_optarg ;;
1631
1632  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1633    ac_prev=pdfdir ;;
1634  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1635    pdfdir=$ac_optarg ;;
1636
1637  -psdir | --psdir | --psdi | --psd | --ps)
1638    ac_prev=psdir ;;
1639  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1640    psdir=$ac_optarg ;;
1641
1642  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1643  | -silent | --silent | --silen | --sile | --sil)
1644    silent=yes ;;
1645
1646  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1647    ac_prev=sbindir ;;
1648  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1649  | --sbi=* | --sb=*)
1650    sbindir=$ac_optarg ;;
1651
1652  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1653  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1654  | --sharedst | --shareds | --shared | --share | --shar \
1655  | --sha | --sh)
1656    ac_prev=sharedstatedir ;;
1657  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1658  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1659  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1660  | --sha=* | --sh=*)
1661    sharedstatedir=$ac_optarg ;;
1662
1663  -site | --site | --sit)
1664    ac_prev=site ;;
1665  -site=* | --site=* | --sit=*)
1666    site=$ac_optarg ;;
1667
1668  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1669    ac_prev=srcdir ;;
1670  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1671    srcdir=$ac_optarg ;;
1672
1673  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1674  | --syscon | --sysco | --sysc | --sys | --sy)
1675    ac_prev=sysconfdir ;;
1676  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1677  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1678    sysconfdir=$ac_optarg ;;
1679
1680  -target | --target | --targe | --targ | --tar | --ta | --t)
1681    ac_prev=target_alias ;;
1682  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1683    target_alias=$ac_optarg ;;
1684
1685  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1686    verbose=yes ;;
1687
1688  -version | --version | --versio | --versi | --vers | -V)
1689    ac_init_version=: ;;
1690
1691  -with-* | --with-*)
1692    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1693    # Reject names that are not valid shell variable names.
1694    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1695      as_fn_error $? "invalid package name: $ac_useropt"
1696    ac_useropt_orig=$ac_useropt
1697    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1698    case $ac_user_opts in
1699      *"
1700"with_$ac_useropt"
1701"*) ;;
1702      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1703	 ac_unrecognized_sep=', ';;
1704    esac
1705    eval with_$ac_useropt=\$ac_optarg ;;
1706
1707  -without-* | --without-*)
1708    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1709    # Reject names that are not valid shell variable names.
1710    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1711      as_fn_error $? "invalid package name: $ac_useropt"
1712    ac_useropt_orig=$ac_useropt
1713    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1714    case $ac_user_opts in
1715      *"
1716"with_$ac_useropt"
1717"*) ;;
1718      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1719	 ac_unrecognized_sep=', ';;
1720    esac
1721    eval with_$ac_useropt=no ;;
1722
1723  --x)
1724    # Obsolete; use --with-x.
1725    with_x=yes ;;
1726
1727  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1728  | --x-incl | --x-inc | --x-in | --x-i)
1729    ac_prev=x_includes ;;
1730  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1731  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1732    x_includes=$ac_optarg ;;
1733
1734  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1735  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1736    ac_prev=x_libraries ;;
1737  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1738  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1739    x_libraries=$ac_optarg ;;
1740
1741  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1742Try \`$0 --help' for more information"
1743    ;;
1744
1745  *=*)
1746    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1747    # Reject names that are not valid shell variable names.
1748    case $ac_envvar in #(
1749      '' | [0-9]* | *[!_$as_cr_alnum]* )
1750      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1751    esac
1752    eval $ac_envvar=\$ac_optarg
1753    export $ac_envvar ;;
1754
1755  *)
1756    # FIXME: should be removed in autoconf 3.0.
1757    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1758    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1759      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1760    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1761    ;;
1762
1763  esac
1764done
1765
1766if test -n "$ac_prev"; then
1767  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1768  as_fn_error $? "missing argument to $ac_option"
1769fi
1770
1771if test -n "$ac_unrecognized_opts"; then
1772  case $enable_option_checking in
1773    no) ;;
1774    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1775    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1776  esac
1777fi
1778
1779# Check all directory arguments for consistency.
1780for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1781		datadir sysconfdir sharedstatedir localstatedir includedir \
1782		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1783		libdir localedir mandir
1784do
1785  eval ac_val=\$$ac_var
1786  # Remove trailing slashes.
1787  case $ac_val in
1788    */ )
1789      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1790      eval $ac_var=\$ac_val;;
1791  esac
1792  # Be sure to have absolute directory names.
1793  case $ac_val in
1794    [\\/$]* | ?:[\\/]* )  continue;;
1795    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1796  esac
1797  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1798done
1799
1800# There might be people who depend on the old broken behavior: `$host'
1801# used to hold the argument of --host etc.
1802# FIXME: To remove some day.
1803build=$build_alias
1804host=$host_alias
1805target=$target_alias
1806
1807# FIXME: To remove some day.
1808if test "x$host_alias" != x; then
1809  if test "x$build_alias" = x; then
1810    cross_compiling=maybe
1811  elif test "x$build_alias" != "x$host_alias"; then
1812    cross_compiling=yes
1813  fi
1814fi
1815
1816ac_tool_prefix=
1817test -n "$host_alias" && ac_tool_prefix=$host_alias-
1818
1819test "$silent" = yes && exec 6>/dev/null
1820
1821
1822ac_pwd=`pwd` && test -n "$ac_pwd" &&
1823ac_ls_di=`ls -di .` &&
1824ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1825  as_fn_error $? "working directory cannot be determined"
1826test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1827  as_fn_error $? "pwd does not report name of working directory"
1828
1829
1830# Find the source files, if location was not specified.
1831if test -z "$srcdir"; then
1832  ac_srcdir_defaulted=yes
1833  # Try the directory containing this script, then the parent directory.
1834  ac_confdir=`$as_dirname -- "$as_myself" ||
1835$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1836	 X"$as_myself" : 'X\(//\)[^/]' \| \
1837	 X"$as_myself" : 'X\(//\)$' \| \
1838	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1839$as_echo X"$as_myself" |
1840    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1841	    s//\1/
1842	    q
1843	  }
1844	  /^X\(\/\/\)[^/].*/{
1845	    s//\1/
1846	    q
1847	  }
1848	  /^X\(\/\/\)$/{
1849	    s//\1/
1850	    q
1851	  }
1852	  /^X\(\/\).*/{
1853	    s//\1/
1854	    q
1855	  }
1856	  s/.*/./; q'`
1857  srcdir=$ac_confdir
1858  if test ! -r "$srcdir/$ac_unique_file"; then
1859    srcdir=..
1860  fi
1861else
1862  ac_srcdir_defaulted=no
1863fi
1864if test ! -r "$srcdir/$ac_unique_file"; then
1865  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1866  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1867fi
1868ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1869ac_abs_confdir=`(
1870	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1871	pwd)`
1872# When building in place, set srcdir=.
1873if test "$ac_abs_confdir" = "$ac_pwd"; then
1874  srcdir=.
1875fi
1876# Remove unnecessary trailing slashes from srcdir.
1877# Double slashes in file names in object file debugging info
1878# mess up M-x gdb in Emacs.
1879case $srcdir in
1880*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1881esac
1882for ac_var in $ac_precious_vars; do
1883  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1884  eval ac_env_${ac_var}_value=\$${ac_var}
1885  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1886  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1887done
1888
1889#
1890# Report the --help message.
1891#
1892if test "$ac_init_help" = "long"; then
1893  # Omit some internal or obsolete options to make the list less imposing.
1894  # This message is too long to be a string in the A/UX 3.1 sh.
1895  cat <<_ACEOF
1896\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1897
1898Usage: $0 [OPTION]... [VAR=VALUE]...
1899
1900To assign environment variables (e.g., CC, CFLAGS...), specify them as
1901VAR=VALUE.  See below for descriptions of some of the useful variables.
1902
1903Defaults for the options are specified in brackets.
1904
1905Configuration:
1906  -h, --help              display this help and exit
1907      --help=short        display options specific to this package
1908      --help=recursive    display the short help of all the included packages
1909  -V, --version           display version information and exit
1910  -q, --quiet, --silent   do not print \`checking ...' messages
1911      --cache-file=FILE   cache test results in FILE [disabled]
1912  -C, --config-cache      alias for \`--cache-file=config.cache'
1913  -n, --no-create         do not create output files
1914      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1915
1916Installation directories:
1917  --prefix=PREFIX         install architecture-independent files in PREFIX
1918                          [$ac_default_prefix]
1919  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1920                          [PREFIX]
1921
1922By default, \`make install' will install all the files in
1923\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1924an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1925for instance \`--prefix=\$HOME'.
1926
1927For better control, use the options below.
1928
1929Fine tuning of the installation directories:
1930  --bindir=DIR            user executables [EPREFIX/bin]
1931  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1932  --libexecdir=DIR        program executables [EPREFIX/libexec]
1933  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1934  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1935  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1936  --libdir=DIR            object code libraries [EPREFIX/lib]
1937  --includedir=DIR        C header files [PREFIX/include]
1938  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1939  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1940  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1941  --infodir=DIR           info documentation [DATAROOTDIR/info]
1942  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1943  --mandir=DIR            man documentation [DATAROOTDIR/man]
1944  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1945  --htmldir=DIR           html documentation [DOCDIR]
1946  --dvidir=DIR            dvi documentation [DOCDIR]
1947  --pdfdir=DIR            pdf documentation [DOCDIR]
1948  --psdir=DIR             ps documentation [DOCDIR]
1949_ACEOF
1950
1951  cat <<\_ACEOF
1952
1953X features:
1954  --x-includes=DIR    X include files are in DIR
1955  --x-libraries=DIR   X library files are in DIR
1956
1957System types:
1958  --build=BUILD     configure for building on BUILD [guessed]
1959  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1960  --target=TARGET   configure for building compilers for TARGET [HOST]
1961_ACEOF
1962fi
1963
1964if test -n "$ac_init_help"; then
1965  case $ac_init_help in
1966     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1967   esac
1968  cat <<\_ACEOF
1969
1970Optional Features:
1971  --disable-option-checking  ignore unrecognized --enable/--with options
1972  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1973  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1974  --enable-openjdk-only   suppress building custom source even if present
1975                          [disabled]
1976  --enable-debug          set the debug level to fastdebug (shorthand for
1977                          --with-debug-level=fastdebug) [disabled]
1978  --enable-headless-only  only build headless (no GUI) support [disabled]
1979  --enable-full-docs      build complete documentation [enabled if all tools
1980                          found]
1981  --disable-unlimited-crypto
1982                          Disable unlimited crypto policy [enabled]
1983  --disable-keep-packaged-modules
1984                          Do not keep packaged modules in jdk image [enable]
1985  --enable-static-build   enable static library build [disabled]
1986  --disable-warnings-as-errors
1987                          do not consider native warnings to be an error
1988                          [enabled]
1989  --enable-debug-symbols  Deprecated. Option is kept for backwards
1990                          compatibility and is ignored
1991  --enable-zip-debug-info Deprecated. Option is kept for backwards
1992                          compatibility and is ignored
1993  --enable-native-coverage
1994                          enable native compilation with code coverage
1995                          data[disabled]
1996  --enable-dtrace[=yes/no/auto]
1997                          enable dtrace. Default is auto, where dtrace is
1998                          enabled if all dependencies are present.
1999  --enable-aot[=yes/no/auto]
2000                          enable ahead of time compilation feature. Default is
2001                          auto, where aot is enabled if all dependencies are
2002                          present.
2003  --disable-hotspot-gtest Disables building of the Hotspot unit tests
2004  --disable-freetype-bundling
2005                          disable bundling of the freetype library with the
2006                          build result [enabled on Windows or when using
2007                          --with-freetype, disabled otherwise]
2008  --enable-libffi-bundling
2009                          enable bundling of libffi.so to make the built JDK
2010                          runnable on more systems
2011  --enable-jtreg-failure-handler
2012                          forces build of the jtreg failure handler to be
2013                          enabled, missing dependencies become fatal errors.
2014                          Default is auto, where the failure handler is built
2015                          if all dependencies are present and otherwise just
2016                          disabled.
2017  --disable-generate-classlist
2018                          forces enabling or disabling of the generation of a
2019                          CDS classlist at build time. Default is to generate
2020                          it when either the server or client JVMs are built.
2021  --enable-sjavac         use sjavac to do fast incremental compiles
2022                          [disabled]
2023  --disable-javac-server  disable javac server [enabled]
2024  --enable-icecc          enable distribted compilation of native code using
2025                          icecc/icecream [disabled]
2026  --disable-precompiled-headers
2027                          disable using precompiled headers when compiling C++
2028                          [enabled]
2029  --enable-ccache         enable using ccache to speed up recompilations
2030                          [disabled]
2031
2032Optional Packages:
2033  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2034  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2035  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2036                          support it), e.g. --with-target-bits=32 [guessed]
2037  --with-custom-make-dir  Deprecated. Option is kept for backwards
2038                          compatibility and is ignored
2039  --with-jdk-variant      JDK variant to build (normal) [normal]
2040  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2041                          optimized) [release]
2042  --with-jvm-variants     JVM variants (separated by commas) to build
2043                          (server,client,minimal,core,zero,zeroshark,custom)
2044                          [server]
2045  --with-cpu-port         specify sources to use for Hotspot 64-bit ARM port
2046                          (arm64,aarch64) [aarch64]
2047  --with-devkit           use this devkit for compilers, tools and resources
2048  --with-sys-root         alias for --with-sysroot for backwards compatability
2049  --with-sysroot          use this directory as sysroot
2050  --with-tools-dir        alias for --with-toolchain-path for backwards
2051                          compatibility
2052  --with-toolchain-path   prepend these directories when searching for
2053                          toolchain binaries (compilers etc)
2054  --with-extra-path       prepend these directories to the default path
2055  --with-sdk-name         use the platform SDK of the given name. [macosx]
2056  --with-conf-name        use this as the name of the configuration [generated
2057                          from important configuration options]
2058  --with-output-sync      set make output sync type if supported by make.
2059                          [recurse]
2060  --with-default-make-target
2061                          set the default make target [exploded-image]
2062  --with-cacerts-file     specify alternative cacerts file
2063  --with-copyright-year   Set copyright year value for build [current year]
2064  --with-milestone        Deprecated. Option is kept for backwards
2065                          compatibility and is ignored
2066  --with-update-version   Deprecated. Option is kept for backwards
2067                          compatibility and is ignored
2068  --with-user-release-suffix
2069                          Deprecated. Option is kept for backwards
2070                          compatibility and is ignored
2071  --with-build-number     Deprecated. Option is kept for backwards
2072                          compatibility and is ignored
2073  --with-version-string   Set version string [calculated]
2074  --with-version-pre      Set the base part of the version 'PRE' field
2075                          (pre-release identifier) ['internal']
2076  --with-version-opt      Set version 'OPT' field (build metadata)
2077                          [<timestamp>.<user>.<dirname>]
2078  --with-version-build    Set version 'BUILD' field (build number) [not
2079                          specified]
2080  --with-version-major    Set version 'MAJOR' field (first number) [current
2081                          source value]
2082  --with-version-minor    Set version 'MINOR' field (second number) [current
2083                          source value]
2084  --with-version-security Set version 'SECURITY' field (third number) [current
2085                          source value]
2086  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2087                          specified]
2088  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2089  --with-build-jdk        path to JDK of same version as is being built[the
2090                          newly built JDK]
2091  --with-add-source-root  Deprecated. Option is kept for backwards
2092                          compatibility and is ignored
2093  --with-override-source-root
2094                          Deprecated. Option is kept for backwards
2095                          compatibility and is ignored
2096  --with-adds-and-overrides
2097                          Deprecated. Option is kept for backwards
2098                          compatibility and is ignored
2099  --with-override-langtools
2100                          Deprecated. Option is kept for backwards
2101                          compatibility and is ignored
2102  --with-override-corba   Deprecated. Option is kept for backwards
2103                          compatibility and is ignored
2104  --with-override-jaxp    Deprecated. Option is kept for backwards
2105                          compatibility and is ignored
2106  --with-override-jaxws   Deprecated. Option is kept for backwards
2107                          compatibility and is ignored
2108  --with-override-hotspot Deprecated. Option is kept for backwards
2109                          compatibility and is ignored
2110  --with-override-nashorn Deprecated. Option is kept for backwards
2111                          compatibility and is ignored
2112  --with-override-jdk     Deprecated. Option is kept for backwards
2113                          compatibility and is ignored
2114  --with-import_hotspot   Deprecated. Option is kept for backwards
2115                          compatibility and is ignored
2116  --with-import-modules   import a set of prebuilt modules either as a zip
2117                          file or an exploded directory
2118  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2119                          to show possible values [platform dependent]
2120  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2121  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2122  --with-extra-ldflags    extra flags to be used when linking jdk
2123  --with-toolchain-version
2124                          the version of the toolchain to look for, use
2125                          '--help' to show possible values [platform
2126                          dependent]
2127  --with-build-devkit     Devkit to use for the build platform toolchain
2128  --with-jtreg            Regression Test Harness [probed]
2129  --with-abi-profile      specify ABI profile for ARM builds
2130                          (arm-vfp-sflt,arm-vfp-hflt,arm-sflt,
2131                          armv5-vfp-sflt,armv6-vfp-hflt,arm64,aarch64)
2132                          [toolchain dependent]
2133  --with-native-debug-symbols
2134                          set the native debug symbol configuration (none,
2135                          internal, external, zipped) [varying]
2136  --with-stdc++lib=<static>,<dynamic>,<default>
2137                          force linking of the C++ runtime on Linux to either
2138                          static or dynamic, default is static with dynamic as
2139                          fallback
2140  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2141                          (Windows only) [probed]
2142  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2143                          (Windows only) [probed]
2144  --with-x                use the X Window System
2145  --with-cups             specify prefix directory for the cups package
2146                          (expecting the headers under PATH/include)
2147  --with-cups-include     specify directory for the cups include files
2148  --with-freetype         specify prefix directory for the freetype package
2149                          (expecting the libraries under PATH/lib and the
2150                          headers under PATH/include)
2151  --with-freetype-include specify directory for the freetype include files
2152  --with-freetype-lib     specify directory for the freetype library
2153  --with-freetype-src     specify directory with freetype sources to
2154                          automatically build the library (experimental,
2155                          Windows-only)
2156  --with-alsa             specify prefix directory for the alsa package
2157                          (expecting the libraries under PATH/lib and the
2158                          headers under PATH/include)
2159  --with-alsa-include     specify directory for the alsa include files
2160  --with-alsa-lib         specify directory for the alsa library
2161  --with-libffi           specify prefix directory for the libffi package
2162                          (expecting the libraries under PATH/lib and the
2163                          headers under PATH/include)
2164  --with-libffi-include   specify directory for the libffi include files
2165  --with-libffi-lib       specify directory for the libffi library
2166  --with-libjpeg          use libjpeg from build system or OpenJDK source
2167                          (system, bundled) [bundled]
2168  --with-giflib           use giflib from build system or OpenJDK source
2169                          (system, bundled) [bundled]
2170  --with-libpng           use libpng from build system or OpenJDK source
2171                          (system, bundled) [bundled]
2172  --with-zlib             use zlib from build system or OpenJDK source
2173                          (system, bundled) [bundled]
2174  --with-lcms             use lcms2 from build system or OpenJDK source
2175                          (system, bundled) [bundled]
2176  --with-dxsdk            Deprecated. Option is kept for backwards
2177                          compatibility and is ignored
2178  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2179                          compatibility and is ignored
2180  --with-dxsdk-include    Deprecated. Option is kept for backwards
2181                          compatibility and is ignored
2182  --with-libelf           specify prefix directory for the libelf package
2183                          (expecting the libraries under PATH/lib and the
2184                          headers under PATH/include)
2185  --with-libelf-include   specify directory for the libelf include files
2186  --with-libelf-lib       specify directory for the libelf library
2187  --with-jvm-features     additional JVM features to enable (separated by
2188                          comma), use '--help' to show possible values [none]
2189  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2190                          compatibility and is ignored
2191  --with-num-cores        number of cores in the build system, e.g.
2192                          --with-num-cores=8 [probed]
2193  --with-memory-size      memory (in MB) available in the build system, e.g.
2194                          --with-memory-size=1024 [probed]
2195  --with-jobs             number of parallel jobs to let make run [calculated
2196                          based on cores and memory]
2197  --with-test-jobs        number of parallel tests jobs to run [based on build
2198                          jobs]
2199  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2200                          invocations of boot JDK, overriding the default
2201                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2202                          -enableassertions"
2203  --with-sjavac-server-java
2204                          use this java binary for running the sjavac
2205                          background server [Boot JDK java]
2206  --with-ccache-dir       where to store ccache files [~/.ccache]
2207
2208Some influential environment variables:
2209  BASENAME    Override default value for BASENAME
2210  BASH        Override default value for BASH
2211  CAT         Override default value for CAT
2212  CHMOD       Override default value for CHMOD
2213  CMP         Override default value for CMP
2214  COMM        Override default value for COMM
2215  CP          Override default value for CP
2216  CUT         Override default value for CUT
2217  DATE        Override default value for DATE
2218  DIFF        Override default value for DIFF
2219  DIRNAME     Override default value for DIRNAME
2220  ECHO        Override default value for ECHO
2221  EXPR        Override default value for EXPR
2222  FILE        Override default value for FILE
2223  FIND        Override default value for FIND
2224  HEAD        Override default value for HEAD
2225  GUNZIP      Override default value for GUNZIP
2226  GZIP        Override default value for GZIP
2227  LN          Override default value for LN
2228  LS          Override default value for LS
2229  MKDIR       Override default value for MKDIR
2230  MKTEMP      Override default value for MKTEMP
2231  MV          Override default value for MV
2232  NAWK        Override default value for NAWK
2233  PRINTF      Override default value for PRINTF
2234  RM          Override default value for RM
2235  RMDIR       Override default value for RMDIR
2236  SH          Override default value for SH
2237  SORT        Override default value for SORT
2238  TAIL        Override default value for TAIL
2239  TAR         Override default value for TAR
2240  TEE         Override default value for TEE
2241  TOUCH       Override default value for TOUCH
2242  TR          Override default value for TR
2243  UNAME       Override default value for UNAME
2244  UNIQ        Override default value for UNIQ
2245  WC          Override default value for WC
2246  WHICH       Override default value for WHICH
2247  XARGS       Override default value for XARGS
2248  AWK         Override default value for AWK
2249  GREP        Override default value for GREP
2250  EGREP       Override default value for EGREP
2251  FGREP       Override default value for FGREP
2252  SED         Override default value for SED
2253  CYGPATH     Override default value for CYGPATH
2254  READLINK    Override default value for READLINK
2255  DF          Override default value for DF
2256  CPIO        Override default value for CPIO
2257  NICE        Override default value for NICE
2258  PANDOC      Override default value for PANDOC
2259  MAKE        Override default value for MAKE
2260  UNZIP       Override default value for UNZIP
2261  ZIPEXE      Override default value for ZIPEXE
2262  LDD         Override default value for LDD
2263  OTOOL       Override default value for OTOOL
2264  READELF     Override default value for READELF
2265  DOT         Override default value for DOT
2266  HG          Override default value for HG
2267  STAT        Override default value for STAT
2268  TIME        Override default value for TIME
2269  FLOCK       Override default value for FLOCK
2270  DTRACE      Override default value for DTRACE
2271  PATCH       Override default value for PATCH
2272  DSYMUTIL    Override default value for DSYMUTIL
2273  XATTR       Override default value for XATTR
2274  CODESIGN    Override default value for CODESIGN
2275  SETFILE     Override default value for SETFILE
2276  PKG_CONFIG  path to pkg-config utility
2277  JAVA        Override default value for JAVA
2278  JAVAC       Override default value for JAVAC
2279  JAVAH       Override default value for JAVAH
2280  JAR         Override default value for JAR
2281  JARSIGNER   Override default value for JARSIGNER
2282  CC          C compiler command
2283  CFLAGS      C compiler flags
2284  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2285              nonstandard directory <lib dir>
2286  LIBS        libraries to pass to the linker, e.g. -l<library>
2287  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2288              you have headers in a nonstandard directory <include dir>
2289  CXX         C++ compiler command
2290  CXXFLAGS    C++ compiler flags
2291  CPP         C preprocessor
2292  CXXCPP      C++ preprocessor
2293  AS          Override default value for AS
2294  AR          Override default value for AR
2295  LIPO        Override default value for LIPO
2296  STRIP       Override default value for STRIP
2297  NM          Override default value for NM
2298  GNM         Override default value for GNM
2299  OBJCOPY     Override default value for OBJCOPY
2300  OBJDUMP     Override default value for OBJDUMP
2301  BUILD_CC    Override default value for BUILD_CC
2302  BUILD_CXX   Override default value for BUILD_CXX
2303  BUILD_NM    Override default value for BUILD_NM
2304  BUILD_AR    Override default value for BUILD_AR
2305  BUILD_OBJCOPY
2306              Override default value for BUILD_OBJCOPY
2307  BUILD_STRIP Override default value for BUILD_STRIP
2308  JTREGEXE    Override default value for JTREGEXE
2309  XMKMF       Path to xmkmf, Makefile generator for X Window System
2310  FREETYPE_CFLAGS
2311              C compiler flags for FREETYPE, overriding pkg-config
2312  FREETYPE_LIBS
2313              linker flags for FREETYPE, overriding pkg-config
2314  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2315  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2316  LIBFFI_CFLAGS
2317              C compiler flags for LIBFFI, overriding pkg-config
2318  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2319  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2320  PNG_LIBS    linker flags for PNG, overriding pkg-config
2321  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2322  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2323  ELF_CFLAGS  C compiler flags for ELF, overriding pkg-config
2324  ELF_LIBS    linker flags for ELF, overriding pkg-config
2325  ICECC_CMD   Override default value for ICECC_CMD
2326  ICECC_CREATE_ENV
2327              Override default value for ICECC_CREATE_ENV
2328  ICECC_WRAPPER
2329              Override default value for ICECC_WRAPPER
2330  CCACHE      Override default value for CCACHE
2331
2332Use these variables to override the choices made by `configure' or to help
2333it to find libraries and programs with nonstandard names/locations.
2334
2335Report bugs to <build-dev@openjdk.java.net>.
2336OpenJDK home page: <http://openjdk.java.net>.
2337_ACEOF
2338ac_status=$?
2339fi
2340
2341if test "$ac_init_help" = "recursive"; then
2342  # If there are subdirs, report their specific --help.
2343  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2344    test -d "$ac_dir" ||
2345      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2346      continue
2347    ac_builddir=.
2348
2349case "$ac_dir" in
2350.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2351*)
2352  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2353  # A ".." for each directory in $ac_dir_suffix.
2354  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2355  case $ac_top_builddir_sub in
2356  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2357  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2358  esac ;;
2359esac
2360ac_abs_top_builddir=$ac_pwd
2361ac_abs_builddir=$ac_pwd$ac_dir_suffix
2362# for backward compatibility:
2363ac_top_builddir=$ac_top_build_prefix
2364
2365case $srcdir in
2366  .)  # We are building in place.
2367    ac_srcdir=.
2368    ac_top_srcdir=$ac_top_builddir_sub
2369    ac_abs_top_srcdir=$ac_pwd ;;
2370  [\\/]* | ?:[\\/]* )  # Absolute name.
2371    ac_srcdir=$srcdir$ac_dir_suffix;
2372    ac_top_srcdir=$srcdir
2373    ac_abs_top_srcdir=$srcdir ;;
2374  *) # Relative name.
2375    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2376    ac_top_srcdir=$ac_top_build_prefix$srcdir
2377    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2378esac
2379ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2380
2381    cd "$ac_dir" || { ac_status=$?; continue; }
2382    # Check for guested configure.
2383    if test -f "$ac_srcdir/configure.gnu"; then
2384      echo &&
2385      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2386    elif test -f "$ac_srcdir/configure"; then
2387      echo &&
2388      $SHELL "$ac_srcdir/configure" --help=recursive
2389    else
2390      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2391    fi || ac_status=$?
2392    cd "$ac_pwd" || { ac_status=$?; break; }
2393  done
2394fi
2395
2396test -n "$ac_init_help" && exit $ac_status
2397if $ac_init_version; then
2398  cat <<\_ACEOF
2399OpenJDK configure jdk9
2400generated by GNU Autoconf 2.69
2401
2402Copyright (C) 2012 Free Software Foundation, Inc.
2403This configure script is free software; the Free Software Foundation
2404gives unlimited permission to copy, distribute and modify it.
2405_ACEOF
2406  exit
2407fi
2408
2409## ------------------------ ##
2410## Autoconf initialization. ##
2411## ------------------------ ##
2412
2413# ac_fn_c_try_compile LINENO
2414# --------------------------
2415# Try to compile conftest.$ac_ext, and return whether this succeeded.
2416ac_fn_c_try_compile ()
2417{
2418  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2419  rm -f conftest.$ac_objext
2420  if { { ac_try="$ac_compile"
2421case "(($ac_try" in
2422  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2423  *) ac_try_echo=$ac_try;;
2424esac
2425eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2426$as_echo "$ac_try_echo"; } >&5
2427  (eval "$ac_compile") 2>conftest.err
2428  ac_status=$?
2429  if test -s conftest.err; then
2430    grep -v '^ *+' conftest.err >conftest.er1
2431    cat conftest.er1 >&5
2432    mv -f conftest.er1 conftest.err
2433  fi
2434  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2435  test $ac_status = 0; } && {
2436	 test -z "$ac_c_werror_flag" ||
2437	 test ! -s conftest.err
2438       } && test -s conftest.$ac_objext; then :
2439  ac_retval=0
2440else
2441  $as_echo "$as_me: failed program was:" >&5
2442sed 's/^/| /' conftest.$ac_ext >&5
2443
2444	ac_retval=1
2445fi
2446  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2447  as_fn_set_status $ac_retval
2448
2449} # ac_fn_c_try_compile
2450
2451# ac_fn_cxx_try_compile LINENO
2452# ----------------------------
2453# Try to compile conftest.$ac_ext, and return whether this succeeded.
2454ac_fn_cxx_try_compile ()
2455{
2456  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2457  rm -f conftest.$ac_objext
2458  if { { ac_try="$ac_compile"
2459case "(($ac_try" in
2460  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2461  *) ac_try_echo=$ac_try;;
2462esac
2463eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2464$as_echo "$ac_try_echo"; } >&5
2465  (eval "$ac_compile") 2>conftest.err
2466  ac_status=$?
2467  if test -s conftest.err; then
2468    grep -v '^ *+' conftest.err >conftest.er1
2469    cat conftest.er1 >&5
2470    mv -f conftest.er1 conftest.err
2471  fi
2472  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2473  test $ac_status = 0; } && {
2474	 test -z "$ac_cxx_werror_flag" ||
2475	 test ! -s conftest.err
2476       } && test -s conftest.$ac_objext; then :
2477  ac_retval=0
2478else
2479  $as_echo "$as_me: failed program was:" >&5
2480sed 's/^/| /' conftest.$ac_ext >&5
2481
2482	ac_retval=1
2483fi
2484  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2485  as_fn_set_status $ac_retval
2486
2487} # ac_fn_cxx_try_compile
2488
2489# ac_fn_c_try_cpp LINENO
2490# ----------------------
2491# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2492ac_fn_c_try_cpp ()
2493{
2494  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2495  if { { ac_try="$ac_cpp conftest.$ac_ext"
2496case "(($ac_try" in
2497  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2498  *) ac_try_echo=$ac_try;;
2499esac
2500eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2501$as_echo "$ac_try_echo"; } >&5
2502  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2503  ac_status=$?
2504  if test -s conftest.err; then
2505    grep -v '^ *+' conftest.err >conftest.er1
2506    cat conftest.er1 >&5
2507    mv -f conftest.er1 conftest.err
2508  fi
2509  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2510  test $ac_status = 0; } > conftest.i && {
2511	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2512	 test ! -s conftest.err
2513       }; then :
2514  ac_retval=0
2515else
2516  $as_echo "$as_me: failed program was:" >&5
2517sed 's/^/| /' conftest.$ac_ext >&5
2518
2519    ac_retval=1
2520fi
2521  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2522  as_fn_set_status $ac_retval
2523
2524} # ac_fn_c_try_cpp
2525
2526# ac_fn_cxx_try_cpp LINENO
2527# ------------------------
2528# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2529ac_fn_cxx_try_cpp ()
2530{
2531  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2532  if { { ac_try="$ac_cpp conftest.$ac_ext"
2533case "(($ac_try" in
2534  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2535  *) ac_try_echo=$ac_try;;
2536esac
2537eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2538$as_echo "$ac_try_echo"; } >&5
2539  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2540  ac_status=$?
2541  if test -s conftest.err; then
2542    grep -v '^ *+' conftest.err >conftest.er1
2543    cat conftest.er1 >&5
2544    mv -f conftest.er1 conftest.err
2545  fi
2546  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2547  test $ac_status = 0; } > conftest.i && {
2548	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2549	 test ! -s conftest.err
2550       }; then :
2551  ac_retval=0
2552else
2553  $as_echo "$as_me: failed program was:" >&5
2554sed 's/^/| /' conftest.$ac_ext >&5
2555
2556    ac_retval=1
2557fi
2558  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2559  as_fn_set_status $ac_retval
2560
2561} # ac_fn_cxx_try_cpp
2562
2563# ac_fn_c_try_link LINENO
2564# -----------------------
2565# Try to link conftest.$ac_ext, and return whether this succeeded.
2566ac_fn_c_try_link ()
2567{
2568  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2569  rm -f conftest.$ac_objext conftest$ac_exeext
2570  if { { ac_try="$ac_link"
2571case "(($ac_try" in
2572  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2573  *) ac_try_echo=$ac_try;;
2574esac
2575eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2576$as_echo "$ac_try_echo"; } >&5
2577  (eval "$ac_link") 2>conftest.err
2578  ac_status=$?
2579  if test -s conftest.err; then
2580    grep -v '^ *+' conftest.err >conftest.er1
2581    cat conftest.er1 >&5
2582    mv -f conftest.er1 conftest.err
2583  fi
2584  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2585  test $ac_status = 0; } && {
2586	 test -z "$ac_c_werror_flag" ||
2587	 test ! -s conftest.err
2588       } && test -s conftest$ac_exeext && {
2589	 test "$cross_compiling" = yes ||
2590	 test -x conftest$ac_exeext
2591       }; then :
2592  ac_retval=0
2593else
2594  $as_echo "$as_me: failed program was:" >&5
2595sed 's/^/| /' conftest.$ac_ext >&5
2596
2597	ac_retval=1
2598fi
2599  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2600  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2601  # interfere with the next link command; also delete a directory that is
2602  # left behind by Apple's compiler.  We do this before executing the actions.
2603  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2604  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2605  as_fn_set_status $ac_retval
2606
2607} # ac_fn_c_try_link
2608
2609# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2610# ---------------------------------------------------------
2611# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2612# the include files in INCLUDES and setting the cache variable VAR
2613# accordingly.
2614ac_fn_cxx_check_header_mongrel ()
2615{
2616  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2617  if eval \${$3+:} false; then :
2618  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2619$as_echo_n "checking for $2... " >&6; }
2620if eval \${$3+:} false; then :
2621  $as_echo_n "(cached) " >&6
2622fi
2623eval ac_res=\$$3
2624	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2625$as_echo "$ac_res" >&6; }
2626else
2627  # Is the header compilable?
2628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2629$as_echo_n "checking $2 usability... " >&6; }
2630cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2631/* end confdefs.h.  */
2632$4
2633#include <$2>
2634_ACEOF
2635if ac_fn_cxx_try_compile "$LINENO"; then :
2636  ac_header_compiler=yes
2637else
2638  ac_header_compiler=no
2639fi
2640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2642$as_echo "$ac_header_compiler" >&6; }
2643
2644# Is the header present?
2645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2646$as_echo_n "checking $2 presence... " >&6; }
2647cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2648/* end confdefs.h.  */
2649#include <$2>
2650_ACEOF
2651if ac_fn_cxx_try_cpp "$LINENO"; then :
2652  ac_header_preproc=yes
2653else
2654  ac_header_preproc=no
2655fi
2656rm -f conftest.err conftest.i conftest.$ac_ext
2657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2658$as_echo "$ac_header_preproc" >&6; }
2659
2660# So?  What about this header?
2661case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2662  yes:no: )
2663    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2664$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2665    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2666$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2667    ;;
2668  no:yes:* )
2669    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2670$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2671    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2672$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2673    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2674$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2675    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2676$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2677    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2678$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2679( $as_echo "## ----------------------------------------- ##
2680## Report this to build-dev@openjdk.java.net ##
2681## ----------------------------------------- ##"
2682     ) | sed "s/^/$as_me: WARNING:     /" >&2
2683    ;;
2684esac
2685  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2686$as_echo_n "checking for $2... " >&6; }
2687if eval \${$3+:} false; then :
2688  $as_echo_n "(cached) " >&6
2689else
2690  eval "$3=\$ac_header_compiler"
2691fi
2692eval ac_res=\$$3
2693	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2694$as_echo "$ac_res" >&6; }
2695fi
2696  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2697
2698} # ac_fn_cxx_check_header_mongrel
2699
2700# ac_fn_cxx_try_run LINENO
2701# ------------------------
2702# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2703# that executables *can* be run.
2704ac_fn_cxx_try_run ()
2705{
2706  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2707  if { { ac_try="$ac_link"
2708case "(($ac_try" in
2709  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2710  *) ac_try_echo=$ac_try;;
2711esac
2712eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2713$as_echo "$ac_try_echo"; } >&5
2714  (eval "$ac_link") 2>&5
2715  ac_status=$?
2716  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2717  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2718  { { case "(($ac_try" in
2719  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2720  *) ac_try_echo=$ac_try;;
2721esac
2722eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2723$as_echo "$ac_try_echo"; } >&5
2724  (eval "$ac_try") 2>&5
2725  ac_status=$?
2726  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2727  test $ac_status = 0; }; }; then :
2728  ac_retval=0
2729else
2730  $as_echo "$as_me: program exited with status $ac_status" >&5
2731       $as_echo "$as_me: failed program was:" >&5
2732sed 's/^/| /' conftest.$ac_ext >&5
2733
2734       ac_retval=$ac_status
2735fi
2736  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2737  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2738  as_fn_set_status $ac_retval
2739
2740} # ac_fn_cxx_try_run
2741
2742# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2743# ---------------------------------------------------------
2744# Tests whether HEADER exists and can be compiled using the include files in
2745# INCLUDES, setting the cache variable VAR accordingly.
2746ac_fn_cxx_check_header_compile ()
2747{
2748  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2749  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2750$as_echo_n "checking for $2... " >&6; }
2751if eval \${$3+:} false; then :
2752  $as_echo_n "(cached) " >&6
2753else
2754  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2755/* end confdefs.h.  */
2756$4
2757#include <$2>
2758_ACEOF
2759if ac_fn_cxx_try_compile "$LINENO"; then :
2760  eval "$3=yes"
2761else
2762  eval "$3=no"
2763fi
2764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2765fi
2766eval ac_res=\$$3
2767	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2768$as_echo "$ac_res" >&6; }
2769  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2770
2771} # ac_fn_cxx_check_header_compile
2772
2773# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2774# ----------------------------------------------
2775# Tries to find the compile-time value of EXPR in a program that includes
2776# INCLUDES, setting VAR accordingly. Returns whether the value could be
2777# computed
2778ac_fn_cxx_compute_int ()
2779{
2780  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2781  if test "$cross_compiling" = yes; then
2782    # Depending upon the size, compute the lo and hi bounds.
2783cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2784/* end confdefs.h.  */
2785$4
2786int
2787main ()
2788{
2789static int test_array [1 - 2 * !(($2) >= 0)];
2790test_array [0] = 0;
2791return test_array [0];
2792
2793  ;
2794  return 0;
2795}
2796_ACEOF
2797if ac_fn_cxx_try_compile "$LINENO"; then :
2798  ac_lo=0 ac_mid=0
2799  while :; do
2800    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2801/* end confdefs.h.  */
2802$4
2803int
2804main ()
2805{
2806static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2807test_array [0] = 0;
2808return test_array [0];
2809
2810  ;
2811  return 0;
2812}
2813_ACEOF
2814if ac_fn_cxx_try_compile "$LINENO"; then :
2815  ac_hi=$ac_mid; break
2816else
2817  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2818			if test $ac_lo -le $ac_mid; then
2819			  ac_lo= ac_hi=
2820			  break
2821			fi
2822			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2823fi
2824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2825  done
2826else
2827  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2828/* end confdefs.h.  */
2829$4
2830int
2831main ()
2832{
2833static int test_array [1 - 2 * !(($2) < 0)];
2834test_array [0] = 0;
2835return test_array [0];
2836
2837  ;
2838  return 0;
2839}
2840_ACEOF
2841if ac_fn_cxx_try_compile "$LINENO"; then :
2842  ac_hi=-1 ac_mid=-1
2843  while :; do
2844    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2845/* end confdefs.h.  */
2846$4
2847int
2848main ()
2849{
2850static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2851test_array [0] = 0;
2852return test_array [0];
2853
2854  ;
2855  return 0;
2856}
2857_ACEOF
2858if ac_fn_cxx_try_compile "$LINENO"; then :
2859  ac_lo=$ac_mid; break
2860else
2861  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2862			if test $ac_mid -le $ac_hi; then
2863			  ac_lo= ac_hi=
2864			  break
2865			fi
2866			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2867fi
2868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2869  done
2870else
2871  ac_lo= ac_hi=
2872fi
2873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2874fi
2875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2876# Binary search between lo and hi bounds.
2877while test "x$ac_lo" != "x$ac_hi"; do
2878  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2879  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2880/* end confdefs.h.  */
2881$4
2882int
2883main ()
2884{
2885static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2886test_array [0] = 0;
2887return test_array [0];
2888
2889  ;
2890  return 0;
2891}
2892_ACEOF
2893if ac_fn_cxx_try_compile "$LINENO"; then :
2894  ac_hi=$ac_mid
2895else
2896  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2897fi
2898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2899done
2900case $ac_lo in #((
2901?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2902'') ac_retval=1 ;;
2903esac
2904  else
2905    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2906/* end confdefs.h.  */
2907$4
2908static long int longval () { return $2; }
2909static unsigned long int ulongval () { return $2; }
2910#include <stdio.h>
2911#include <stdlib.h>
2912int
2913main ()
2914{
2915
2916  FILE *f = fopen ("conftest.val", "w");
2917  if (! f)
2918    return 1;
2919  if (($2) < 0)
2920    {
2921      long int i = longval ();
2922      if (i != ($2))
2923	return 1;
2924      fprintf (f, "%ld", i);
2925    }
2926  else
2927    {
2928      unsigned long int i = ulongval ();
2929      if (i != ($2))
2930	return 1;
2931      fprintf (f, "%lu", i);
2932    }
2933  /* Do not output a trailing newline, as this causes \r\n confusion
2934     on some platforms.  */
2935  return ferror (f) || fclose (f) != 0;
2936
2937  ;
2938  return 0;
2939}
2940_ACEOF
2941if ac_fn_cxx_try_run "$LINENO"; then :
2942  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2943else
2944  ac_retval=1
2945fi
2946rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2947  conftest.$ac_objext conftest.beam conftest.$ac_ext
2948rm -f conftest.val
2949
2950  fi
2951  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2952  as_fn_set_status $ac_retval
2953
2954} # ac_fn_cxx_compute_int
2955
2956# ac_fn_cxx_try_link LINENO
2957# -------------------------
2958# Try to link conftest.$ac_ext, and return whether this succeeded.
2959ac_fn_cxx_try_link ()
2960{
2961  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2962  rm -f conftest.$ac_objext conftest$ac_exeext
2963  if { { ac_try="$ac_link"
2964case "(($ac_try" in
2965  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2966  *) ac_try_echo=$ac_try;;
2967esac
2968eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2969$as_echo "$ac_try_echo"; } >&5
2970  (eval "$ac_link") 2>conftest.err
2971  ac_status=$?
2972  if test -s conftest.err; then
2973    grep -v '^ *+' conftest.err >conftest.er1
2974    cat conftest.er1 >&5
2975    mv -f conftest.er1 conftest.err
2976  fi
2977  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2978  test $ac_status = 0; } && {
2979	 test -z "$ac_cxx_werror_flag" ||
2980	 test ! -s conftest.err
2981       } && test -s conftest$ac_exeext && {
2982	 test "$cross_compiling" = yes ||
2983	 test -x conftest$ac_exeext
2984       }; then :
2985  ac_retval=0
2986else
2987  $as_echo "$as_me: failed program was:" >&5
2988sed 's/^/| /' conftest.$ac_ext >&5
2989
2990	ac_retval=1
2991fi
2992  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2993  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2994  # interfere with the next link command; also delete a directory that is
2995  # left behind by Apple's compiler.  We do this before executing the actions.
2996  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2997  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2998  as_fn_set_status $ac_retval
2999
3000} # ac_fn_cxx_try_link
3001
3002# ac_fn_cxx_check_func LINENO FUNC VAR
3003# ------------------------------------
3004# Tests whether FUNC exists, setting the cache variable VAR accordingly
3005ac_fn_cxx_check_func ()
3006{
3007  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3008  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3009$as_echo_n "checking for $2... " >&6; }
3010if eval \${$3+:} false; then :
3011  $as_echo_n "(cached) " >&6
3012else
3013  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3014/* end confdefs.h.  */
3015/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3016   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
3017#define $2 innocuous_$2
3018
3019/* System header to define __stub macros and hopefully few prototypes,
3020    which can conflict with char $2 (); below.
3021    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3022    <limits.h> exists even on freestanding compilers.  */
3023
3024#ifdef __STDC__
3025# include <limits.h>
3026#else
3027# include <assert.h>
3028#endif
3029
3030#undef $2
3031
3032/* Override any GCC internal prototype to avoid an error.
3033   Use char because int might match the return type of a GCC
3034   builtin and then its argument prototype would still apply.  */
3035#ifdef __cplusplus
3036extern "C"
3037#endif
3038char $2 ();
3039/* The GNU C library defines this for functions which it implements
3040    to always fail with ENOSYS.  Some functions are actually named
3041    something starting with __ and the normal name is an alias.  */
3042#if defined __stub_$2 || defined __stub___$2
3043choke me
3044#endif
3045
3046int
3047main ()
3048{
3049return $2 ();
3050  ;
3051  return 0;
3052}
3053_ACEOF
3054if ac_fn_cxx_try_link "$LINENO"; then :
3055  eval "$3=yes"
3056else
3057  eval "$3=no"
3058fi
3059rm -f core conftest.err conftest.$ac_objext \
3060    conftest$ac_exeext conftest.$ac_ext
3061fi
3062eval ac_res=\$$3
3063	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3064$as_echo "$ac_res" >&6; }
3065  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3066
3067} # ac_fn_cxx_check_func
3068
3069# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3070# -------------------------------------------------------
3071# Tests whether HEADER exists and can be compiled using the include files in
3072# INCLUDES, setting the cache variable VAR accordingly.
3073ac_fn_c_check_header_compile ()
3074{
3075  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3076  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3077$as_echo_n "checking for $2... " >&6; }
3078if eval \${$3+:} false; then :
3079  $as_echo_n "(cached) " >&6
3080else
3081  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3082/* end confdefs.h.  */
3083$4
3084#include <$2>
3085_ACEOF
3086if ac_fn_c_try_compile "$LINENO"; then :
3087  eval "$3=yes"
3088else
3089  eval "$3=no"
3090fi
3091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3092fi
3093eval ac_res=\$$3
3094	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3095$as_echo "$ac_res" >&6; }
3096  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3097
3098} # ac_fn_c_check_header_compile
3099cat >config.log <<_ACEOF
3100This file contains any messages produced by compilers while
3101running configure, to aid debugging if configure makes a mistake.
3102
3103It was created by OpenJDK $as_me jdk9, which was
3104generated by GNU Autoconf 2.69.  Invocation command line was
3105
3106  $ $0 $@
3107
3108_ACEOF
3109exec 5>>config.log
3110{
3111cat <<_ASUNAME
3112## --------- ##
3113## Platform. ##
3114## --------- ##
3115
3116hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3117uname -m = `(uname -m) 2>/dev/null || echo unknown`
3118uname -r = `(uname -r) 2>/dev/null || echo unknown`
3119uname -s = `(uname -s) 2>/dev/null || echo unknown`
3120uname -v = `(uname -v) 2>/dev/null || echo unknown`
3121
3122/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3123/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3124
3125/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3126/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3127/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3128/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3129/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3130/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3131/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3132
3133_ASUNAME
3134
3135as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3136for as_dir in $PATH
3137do
3138  IFS=$as_save_IFS
3139  test -z "$as_dir" && as_dir=.
3140    $as_echo "PATH: $as_dir"
3141  done
3142IFS=$as_save_IFS
3143
3144} >&5
3145
3146cat >&5 <<_ACEOF
3147
3148
3149## ----------- ##
3150## Core tests. ##
3151## ----------- ##
3152
3153_ACEOF
3154
3155
3156# Keep a trace of the command line.
3157# Strip out --no-create and --no-recursion so they do not pile up.
3158# Strip out --silent because we don't want to record it for future runs.
3159# Also quote any args containing shell meta-characters.
3160# Make two passes to allow for proper duplicate-argument suppression.
3161ac_configure_args=
3162ac_configure_args0=
3163ac_configure_args1=
3164ac_must_keep_next=false
3165for ac_pass in 1 2
3166do
3167  for ac_arg
3168  do
3169    case $ac_arg in
3170    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3171    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3172    | -silent | --silent | --silen | --sile | --sil)
3173      continue ;;
3174    *\'*)
3175      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3176    esac
3177    case $ac_pass in
3178    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3179    2)
3180      as_fn_append ac_configure_args1 " '$ac_arg'"
3181      if test $ac_must_keep_next = true; then
3182	ac_must_keep_next=false # Got value, back to normal.
3183      else
3184	case $ac_arg in
3185	  *=* | --config-cache | -C | -disable-* | --disable-* \
3186	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3187	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3188	  | -with-* | --with-* | -without-* | --without-* | --x)
3189	    case "$ac_configure_args0 " in
3190	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3191	    esac
3192	    ;;
3193	  -* ) ac_must_keep_next=true ;;
3194	esac
3195      fi
3196      as_fn_append ac_configure_args " '$ac_arg'"
3197      ;;
3198    esac
3199  done
3200done
3201{ ac_configure_args0=; unset ac_configure_args0;}
3202{ ac_configure_args1=; unset ac_configure_args1;}
3203
3204# When interrupted or exit'd, cleanup temporary files, and complete
3205# config.log.  We remove comments because anyway the quotes in there
3206# would cause problems or look ugly.
3207# WARNING: Use '\'' to represent an apostrophe within the trap.
3208# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3209trap 'exit_status=$?
3210  # Save into config.log some information that might help in debugging.
3211  {
3212    echo
3213
3214    $as_echo "## ---------------- ##
3215## Cache variables. ##
3216## ---------------- ##"
3217    echo
3218    # The following way of writing the cache mishandles newlines in values,
3219(
3220  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3221    eval ac_val=\$$ac_var
3222    case $ac_val in #(
3223    *${as_nl}*)
3224      case $ac_var in #(
3225      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3226$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3227      esac
3228      case $ac_var in #(
3229      _ | IFS | as_nl) ;; #(
3230      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3231      *) { eval $ac_var=; unset $ac_var;} ;;
3232      esac ;;
3233    esac
3234  done
3235  (set) 2>&1 |
3236    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3237    *${as_nl}ac_space=\ *)
3238      sed -n \
3239	"s/'\''/'\''\\\\'\'''\''/g;
3240	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3241      ;; #(
3242    *)
3243      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3244      ;;
3245    esac |
3246    sort
3247)
3248    echo
3249
3250    $as_echo "## ----------------- ##
3251## Output variables. ##
3252## ----------------- ##"
3253    echo
3254    for ac_var in $ac_subst_vars
3255    do
3256      eval ac_val=\$$ac_var
3257      case $ac_val in
3258      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3259      esac
3260      $as_echo "$ac_var='\''$ac_val'\''"
3261    done | sort
3262    echo
3263
3264    if test -n "$ac_subst_files"; then
3265      $as_echo "## ------------------- ##
3266## File substitutions. ##
3267## ------------------- ##"
3268      echo
3269      for ac_var in $ac_subst_files
3270      do
3271	eval ac_val=\$$ac_var
3272	case $ac_val in
3273	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3274	esac
3275	$as_echo "$ac_var='\''$ac_val'\''"
3276      done | sort
3277      echo
3278    fi
3279
3280    if test -s confdefs.h; then
3281      $as_echo "## ----------- ##
3282## confdefs.h. ##
3283## ----------- ##"
3284      echo
3285      cat confdefs.h
3286      echo
3287    fi
3288    test "$ac_signal" != 0 &&
3289      $as_echo "$as_me: caught signal $ac_signal"
3290    $as_echo "$as_me: exit $exit_status"
3291  } >&5
3292  rm -f core *.core core.conftest.* &&
3293    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3294    exit $exit_status
3295' 0
3296for ac_signal in 1 2 13 15; do
3297  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3298done
3299ac_signal=0
3300
3301# confdefs.h avoids OS command line length limits that DEFS can exceed.
3302rm -f -r conftest* confdefs.h
3303
3304$as_echo "/* confdefs.h */" > confdefs.h
3305
3306# Predefined preprocessor variables.
3307
3308cat >>confdefs.h <<_ACEOF
3309#define PACKAGE_NAME "$PACKAGE_NAME"
3310_ACEOF
3311
3312cat >>confdefs.h <<_ACEOF
3313#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3314_ACEOF
3315
3316cat >>confdefs.h <<_ACEOF
3317#define PACKAGE_VERSION "$PACKAGE_VERSION"
3318_ACEOF
3319
3320cat >>confdefs.h <<_ACEOF
3321#define PACKAGE_STRING "$PACKAGE_STRING"
3322_ACEOF
3323
3324cat >>confdefs.h <<_ACEOF
3325#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3326_ACEOF
3327
3328cat >>confdefs.h <<_ACEOF
3329#define PACKAGE_URL "$PACKAGE_URL"
3330_ACEOF
3331
3332
3333# Let the site file select an alternate cache file if it wants to.
3334# Prefer an explicitly selected file to automatically selected ones.
3335ac_site_file1=NONE
3336ac_site_file2=NONE
3337if test -n "$CONFIG_SITE"; then
3338  # We do not want a PATH search for config.site.
3339  case $CONFIG_SITE in #((
3340    -*)  ac_site_file1=./$CONFIG_SITE;;
3341    */*) ac_site_file1=$CONFIG_SITE;;
3342    *)   ac_site_file1=./$CONFIG_SITE;;
3343  esac
3344elif test "x$prefix" != xNONE; then
3345  ac_site_file1=$prefix/share/config.site
3346  ac_site_file2=$prefix/etc/config.site
3347else
3348  ac_site_file1=$ac_default_prefix/share/config.site
3349  ac_site_file2=$ac_default_prefix/etc/config.site
3350fi
3351for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3352do
3353  test "x$ac_site_file" = xNONE && continue
3354  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3355    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3356$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3357    sed 's/^/| /' "$ac_site_file" >&5
3358    . "$ac_site_file" \
3359      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3360$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3361as_fn_error $? "failed to load site script $ac_site_file
3362See \`config.log' for more details" "$LINENO" 5; }
3363  fi
3364done
3365
3366if test -r "$cache_file"; then
3367  # Some versions of bash will fail to source /dev/null (special files
3368  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3369  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3370    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3371$as_echo "$as_me: loading cache $cache_file" >&6;}
3372    case $cache_file in
3373      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3374      *)                      . "./$cache_file";;
3375    esac
3376  fi
3377else
3378  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3379$as_echo "$as_me: creating cache $cache_file" >&6;}
3380  >$cache_file
3381fi
3382
3383# Check that the precious variables saved in the cache have kept the same
3384# value.
3385ac_cache_corrupted=false
3386for ac_var in $ac_precious_vars; do
3387  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3388  eval ac_new_set=\$ac_env_${ac_var}_set
3389  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3390  eval ac_new_val=\$ac_env_${ac_var}_value
3391  case $ac_old_set,$ac_new_set in
3392    set,)
3393      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3394$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3395      ac_cache_corrupted=: ;;
3396    ,set)
3397      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3398$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3399      ac_cache_corrupted=: ;;
3400    ,);;
3401    *)
3402      if test "x$ac_old_val" != "x$ac_new_val"; then
3403	# differences in whitespace do not lead to failure.
3404	ac_old_val_w=`echo x $ac_old_val`
3405	ac_new_val_w=`echo x $ac_new_val`
3406	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3407	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3408$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3409	  ac_cache_corrupted=:
3410	else
3411	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3412$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3413	  eval $ac_var=\$ac_old_val
3414	fi
3415	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3416$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3417	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3418$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3419      fi;;
3420  esac
3421  # Pass precious variables to config.status.
3422  if test "$ac_new_set" = set; then
3423    case $ac_new_val in
3424    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3425    *) ac_arg=$ac_var=$ac_new_val ;;
3426    esac
3427    case " $ac_configure_args " in
3428      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3429      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3430    esac
3431  fi
3432done
3433if $ac_cache_corrupted; then
3434  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3435$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3436  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3437$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3438  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3439fi
3440## -------------------- ##
3441## Main body of script. ##
3442## -------------------- ##
3443
3444ac_ext=c
3445ac_cpp='$CPP $CPPFLAGS'
3446ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3447ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3448ac_compiler_gnu=$ac_cv_c_compiler_gnu
3449
3450
3451
3452ac_aux_dir=
3453for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3454  if test -f "$ac_dir/install-sh"; then
3455    ac_aux_dir=$ac_dir
3456    ac_install_sh="$ac_aux_dir/install-sh -c"
3457    break
3458  elif test -f "$ac_dir/install.sh"; then
3459    ac_aux_dir=$ac_dir
3460    ac_install_sh="$ac_aux_dir/install.sh -c"
3461    break
3462  elif test -f "$ac_dir/shtool"; then
3463    ac_aux_dir=$ac_dir
3464    ac_install_sh="$ac_aux_dir/shtool install -c"
3465    break
3466  fi
3467done
3468if test -z "$ac_aux_dir"; then
3469  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
3470fi
3471
3472# These three variables are undocumented and unsupported,
3473# and are intended to be withdrawn in a future Autoconf release.
3474# They can cause serious problems if a builder's source tree is in a directory
3475# whose full name contains unusual characters.
3476ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3477ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3478ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3479
3480
3481# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3482
3483#
3484# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3485# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3486#
3487# This code is free software; you can redistribute it and/or modify it
3488# under the terms of the GNU General Public License version 2 only, as
3489# published by the Free Software Foundation.  Oracle designates this
3490# particular file as subject to the "Classpath" exception as provided
3491# by Oracle in the LICENSE file that accompanied this code.
3492#
3493# This code is distributed in the hope that it will be useful, but WITHOUT
3494# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3495# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3496# version 2 for more details (a copy is included in the LICENSE file that
3497# accompanied this code).
3498#
3499# You should have received a copy of the GNU General Public License version
3500# 2 along with this work; if not, write to the Free Software Foundation,
3501# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3502#
3503# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3504# or visit www.oracle.com if you need additional information or have any
3505# questions.
3506#
3507
3508#
3509# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3510#
3511# This program is free software; you can redistribute it and/or modify
3512# it under the terms of the GNU General Public License as published by
3513# the Free Software Foundation; either version 2 of the License, or
3514# (at your option) any later version.
3515#
3516# This program is distributed in the hope that it will be useful, but
3517# WITHOUT ANY WARRANTY; without even the implied warranty of
3518# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3519# General Public License for more details.
3520#
3521# You should have received a copy of the GNU General Public License
3522# along with this program; if not, write to the Free Software
3523# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3524#
3525# As a special exception to the GNU General Public License, if you
3526# distribute this file as part of a program that contains a
3527# configuration script generated by Autoconf, you may include it under
3528# the same distribution terms that you use for the rest of that program.
3529
3530# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3531# ----------------------------------
3532# PKG_PROG_PKG_CONFIG
3533
3534# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3535#
3536# Check to see whether a particular set of modules exists.  Similar
3537# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3538#
3539#
3540# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3541# this or PKG_CHECK_MODULES is called, or make sure to call
3542# PKG_CHECK_EXISTS manually
3543# --------------------------------------------------------------
3544
3545
3546
3547# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3548# ---------------------------------------------
3549# _PKG_CONFIG
3550
3551# _PKG_SHORT_ERRORS_SUPPORTED
3552# -----------------------------
3553# _PKG_SHORT_ERRORS_SUPPORTED
3554
3555
3556# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3557# [ACTION-IF-NOT-FOUND])
3558#
3559#
3560# Note that if there is a possibility the first call to
3561# PKG_CHECK_MODULES might not happen, you should be sure to include an
3562# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3563#
3564#
3565# --------------------------------------------------------------
3566# PKG_CHECK_MODULES
3567
3568
3569# Include these first...
3570#
3571# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3572# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3573#
3574# This code is free software; you can redistribute it and/or modify it
3575# under the terms of the GNU General Public License version 2 only, as
3576# published by the Free Software Foundation.  Oracle designates this
3577# particular file as subject to the "Classpath" exception as provided
3578# by Oracle in the LICENSE file that accompanied this code.
3579#
3580# This code is distributed in the hope that it will be useful, but WITHOUT
3581# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3582# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3583# version 2 for more details (a copy is included in the LICENSE file that
3584# accompanied this code).
3585#
3586# You should have received a copy of the GNU General Public License version
3587# 2 along with this work; if not, write to the Free Software Foundation,
3588# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3589#
3590# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3591# or visit www.oracle.com if you need additional information or have any
3592# questions.
3593#
3594
3595# Create a function/macro that takes a series of named arguments. The call is
3596# similar to AC_DEFUN, but the setup of the function looks like this:
3597# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3598# ... do something
3599#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3600# ])
3601# A star (*) in front of a named argument means that it is required and it's
3602# presence will be verified. To pass e.g. the first value as a normal indexed
3603# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3604# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3605# "ARG_FOO".
3606#
3607# The generated function can be called like this:
3608# MYFUNC(FOO: [foo-val],
3609#     BAR: [
3610#         $ECHO hello world
3611#     ])
3612# Note that the argument value must start on the same line as the argument name.
3613#
3614# Argument 1: Name of the function to define
3615# Argument 2: List of legal named arguments, with a * prefix for required arguments
3616# Argument 3: Argument array to treat as named, typically $@
3617# Argument 4: The main function body
3618
3619
3620# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3621# If so, then append $1 to $2 \
3622# Also set JVM_ARG_OK to true/false depending on outcome.
3623
3624
3625# Appends a string to a path variable, only adding the : when needed.
3626
3627
3628# Prepends a string to a path variable, only adding the : when needed.
3629
3630
3631# This will make sure the given variable points to a full and proper
3632# path. This means:
3633# 1) There will be no spaces in the path. On unix platforms,
3634#    spaces in the path will result in an error. On Windows,
3635#    the path will be rewritten using short-style to be space-free.
3636# 2) The path will be absolute, and it will be in unix-style (on
3637#     cygwin).
3638# $1: The name of the variable to fix
3639
3640
3641# This will make sure the given variable points to a executable
3642# with a full and proper path. This means:
3643# 1) There will be no spaces in the path. On unix platforms,
3644#    spaces in the path will result in an error. On Windows,
3645#    the path will be rewritten using short-style to be space-free.
3646# 2) The path will be absolute, and it will be in unix-style (on
3647#     cygwin).
3648# Any arguments given to the executable is preserved.
3649# If the input variable does not have a directory specification, then
3650# it need to be in the PATH.
3651# $1: The name of the variable to fix
3652
3653
3654
3655
3656# Register a --with argument but mark it as deprecated
3657# $1: The name of the with argument to deprecate, not including --with-
3658
3659
3660# Register a --enable argument but mark it as deprecated
3661# $1: The name of the with argument to deprecate, not including --enable-
3662# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3663# $3: Messages to user.
3664
3665
3666
3667
3668# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3669# $1: variable to check
3670
3671
3672# Check that there are no unprocessed overridden variables left.
3673# If so, they are an incorrect argument and we will exit with an error.
3674
3675
3676# Setup a tool for the given variable. If correctly specified by the user,
3677# use that value, otherwise search for the tool using the supplied code snippet.
3678# $1: variable to set
3679# $2: code snippet to call to look for the tool
3680# $3: code snippet to call if variable was used to find tool
3681
3682
3683# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3684# $1: variable to set
3685# $2: executable name (or list of names) to look for
3686# $3: [path]
3687
3688
3689# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3690# $1: variable to set
3691# $2: executable name (or list of names) to look for
3692
3693
3694# Like BASIC_PATH_PROGS but fails if no tool was found.
3695# $1: variable to set
3696# $2: executable name (or list of names) to look for
3697# $3: [path]
3698
3699
3700# Like BASIC_SETUP_TOOL but fails if no tool was found.
3701# $1: variable to set
3702# $2: autoconf macro to call to look for the special tool
3703
3704
3705# Setup the most fundamental tools that relies on not much else to set up,
3706# but is used by much of the early bootstrap code.
3707
3708
3709# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3710
3711
3712# Evaluates platform specific overrides for devkit variables.
3713# $1: Name of variable
3714
3715
3716
3717
3718
3719
3720#%%% Simple tools %%%
3721
3722# Check if we have found a usable version of make
3723# $1: the path to a potential make binary (or empty)
3724# $2: the description on how we found this
3725
3726
3727
3728
3729# Goes looking for a usable version of GNU make.
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740# Check if build directory is on local disk. If not possible to determine,
3741# we prefer to claim it's local.
3742# Argument 1: directory to test
3743# Argument 2: what to do if it is on local disk
3744# Argument 3: what to do otherwise (remote disk or failure)
3745
3746
3747# Check that source files have basic read permissions set. This might
3748# not be the case in cygwin in certain conditions.
3749
3750
3751
3752
3753# Check for support for specific options in bash
3754
3755
3756################################################################################
3757#
3758# Default make target
3759#
3760
3761
3762# Code to run after AC_OUTPUT
3763
3764
3765#
3766# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3767# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3768#
3769# This code is free software; you can redistribute it and/or modify it
3770# under the terms of the GNU General Public License version 2 only, as
3771# published by the Free Software Foundation.  Oracle designates this
3772# particular file as subject to the "Classpath" exception as provided
3773# by Oracle in the LICENSE file that accompanied this code.
3774#
3775# This code is distributed in the hope that it will be useful, but WITHOUT
3776# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3777# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3778# version 2 for more details (a copy is included in the LICENSE file that
3779# accompanied this code).
3780#
3781# You should have received a copy of the GNU General Public License version
3782# 2 along with this work; if not, write to the Free Software Foundation,
3783# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3784#
3785# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3786# or visit www.oracle.com if you need additional information or have any
3787# questions.
3788#
3789
3790
3791
3792
3793
3794# Helper function which possibly converts a path using DOS-style short mode.
3795# If so, the updated path is stored in $new_path.
3796# $1: The path to check
3797
3798
3799# Helper function which possibly converts a path using DOS-style short mode.
3800# If so, the updated path is stored in $new_path.
3801# $1: The path to check
3802
3803
3804# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3805# and could probably be heavily simplified. However, all changes in this
3806# area tend to need lot of testing in different scenarios, and in lack of
3807# proper unit testing, cleaning this up has not been deemed worth the effort
3808# at the moment.
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3819
3820
3821
3822
3823# ... then the rest
3824#
3825# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3826# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3827#
3828# This code is free software; you can redistribute it and/or modify it
3829# under the terms of the GNU General Public License version 2 only, as
3830# published by the Free Software Foundation.  Oracle designates this
3831# particular file as subject to the "Classpath" exception as provided
3832# by Oracle in the LICENSE file that accompanied this code.
3833#
3834# This code is distributed in the hope that it will be useful, but WITHOUT
3835# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3836# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3837# version 2 for more details (a copy is included in the LICENSE file that
3838# accompanied this code).
3839#
3840# You should have received a copy of the GNU General Public License version
3841# 2 along with this work; if not, write to the Free Software Foundation,
3842# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3843#
3844# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3845# or visit www.oracle.com if you need additional information or have any
3846# questions.
3847#
3848
3849########################################################################
3850# This file handles detection of the Boot JDK. The Boot JDK detection
3851# process has been developed as a response to solve a complex real-world
3852# problem. Initially, it was simple, but it has grown as platform after
3853# platform, idiosyncracy after idiosyncracy has been supported.
3854#
3855# The basic idea is this:
3856# 1) You need an acceptable *) JDK to use as a Boot JDK
3857# 2) There are several ways to locate a JDK, that are mostly platform
3858#    dependent **)
3859# 3) You can have multiple JDKs installed
3860# 4) If possible, configure should try to dig out an acceptable JDK
3861#    automatically, without having to resort to command-line options
3862#
3863# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3864#     javac) and not a JRE, etc.
3865#
3866# **) On Windows we typically use a well-known path.
3867#     On MacOSX we typically use the tool java_home.
3868#     On Linux we typically find javac in the $PATH, and then follow a
3869#     chain of symlinks that often ends up in a real JDK.
3870#
3871# This leads to the code where we check in different ways to locate a
3872# JDK, and if one is found, check if it is acceptable. If not, we print
3873# our reasons for rejecting it (useful when debugging non-working
3874# configure situations) and continue checking the next one.
3875########################################################################
3876
3877# Execute the check given as argument, and verify the result
3878# If the Boot JDK was previously found, do nothing
3879# $1 A command line (typically autoconf macro) to execute
3880
3881
3882# Test: Is bootjdk explicitly set by command line arguments?
3883
3884
3885# Test: Is $JAVA_HOME set?
3886
3887
3888# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3889
3890
3891# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3892# $1: Argument to the java_home binary (optional)
3893
3894
3895# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3896
3897
3898# Look for a jdk in the given path. If there are multiple, try to select the newest.
3899# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3900# $1 = Path to directory containing jdk installations.
3901# $2 = String to append to the found JDK directory to get the proper JDK home
3902
3903
3904# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3905# environmental variable as base for where to look.
3906# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3907
3908
3909# Test: Is there a JDK installed in default, well-known locations?
3910
3911
3912# Check that a command-line tool in the Boot JDK is correct
3913# $1 = name of variable to assign
3914# $2 = name of binary
3915
3916
3917###############################################################################
3918#
3919# We need a Boot JDK to bootstrap the build.
3920#
3921
3922
3923
3924
3925
3926# BUILD_JDK: the location of the latest JDK that can run
3927#   on the host system and supports the target class file version
3928#   generated in this JDK build.  This variable should only be
3929#   used after the launchers are built.
3930#
3931
3932# Execute the check given as argument, and verify the result.
3933# If the JDK was previously found, do nothing.
3934# $1 A command line (typically autoconf macro) to execute
3935
3936
3937# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3938# is different than the host system doing the build (e.g. cross-compilation),
3939# a special BUILD_JDK is built as part of the build process.  An external
3940# prebuilt BUILD_JDK can also be supplied.
3941
3942
3943#
3944# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3945# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3946#
3947# This code is free software; you can redistribute it and/or modify it
3948# under the terms of the GNU General Public License version 2 only, as
3949# published by the Free Software Foundation.  Oracle designates this
3950# particular file as subject to the "Classpath" exception as provided
3951# by Oracle in the LICENSE file that accompanied this code.
3952#
3953# This code is distributed in the hope that it will be useful, but WITHOUT
3954# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3955# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3956# version 2 for more details (a copy is included in the LICENSE file that
3957# accompanied this code).
3958#
3959# You should have received a copy of the GNU General Public License version
3960# 2 along with this work; if not, write to the Free Software Foundation,
3961# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3962#
3963# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3964# or visit www.oracle.com if you need additional information or have any
3965# questions.
3966#
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984################################################################################
3985#
3986# Runs icecc-create-env once and prints the error if it fails
3987#
3988# $1: arguments to icecc-create-env
3989# $2: log file
3990#
3991
3992
3993################################################################################
3994#
3995# Optionally enable distributed compilation of native code using icecc/icecream
3996#
3997
3998
3999
4000
4001
4002
4003
4004#
4005# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4006# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4007#
4008# This code is free software; you can redistribute it and/or modify it
4009# under the terms of the GNU General Public License version 2 only, as
4010# published by the Free Software Foundation.  Oracle designates this
4011# particular file as subject to the "Classpath" exception as provided
4012# by Oracle in the LICENSE file that accompanied this code.
4013#
4014# This code is distributed in the hope that it will be useful, but WITHOUT
4015# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4016# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4017# version 2 for more details (a copy is included in the LICENSE file that
4018# accompanied this code).
4019#
4020# You should have received a copy of the GNU General Public License version
4021# 2 along with this work; if not, write to the Free Software Foundation,
4022# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4023#
4024# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4025# or visit www.oracle.com if you need additional information or have any
4026# questions.
4027#
4028
4029################################################################################
4030#
4031# Setup ABI profile (for arm)
4032#
4033
4034
4035# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4036# corresponding configure arguments instead
4037
4038
4039# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4040# that configure can use them while detecting compilers.
4041# TOOLCHAIN_TYPE is available here.
4042# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4043
4044
4045
4046
4047
4048
4049# Documentation on common flags used for solstudio in HIGHEST.
4050#
4051# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4052#          done with care, there are some assumptions below that need to
4053#          be understood about the use of pointers, and IEEE behavior.
4054#
4055# -fns: Use non-standard floating point mode (not IEEE 754)
4056# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4057# -fsingle: Use single precision floating point with 'float'
4058# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4059#   (Source with excessing pointer casting and data access with mixed
4060#    pointer types are not recommended)
4061# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4062#   (If you expect perfect errno behavior, do not use this)
4063# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4064# -xrestrict: Pointer parameters to functions do not overlap
4065#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4066#    If you pass in multiple pointers to the same data, do not use this)
4067# -xlibmil: Inline some library routines
4068#   (If you expect perfect errno behavior, do not use this)
4069# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4070#   (If you expect perfect errno behavior, do not use this)
4071#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4072
4073    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4074    # Bug?
4075    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4076    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4077    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4078    #fi
4079
4080
4081
4082
4083
4084
4085################################################################################
4086# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4087#      conditionals against.
4088# $2 - Optional prefix for each variable defined.
4089
4090
4091# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4092#                                  IF_FALSE: [RUN-IF-FALSE])
4093# ------------------------------------------------------------
4094# Check that the C compiler supports an argument
4095
4096
4097
4098
4099# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4100#                                    IF_FALSE: [RUN-IF-FALSE])
4101# ------------------------------------------------------------
4102# Check that the C++ compiler supports an argument
4103
4104
4105
4106
4107# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4108#                                IF_FALSE: [RUN-IF-FALSE])
4109# ------------------------------------------------------------
4110# Check that the C and C++ compilers support an argument
4111
4112
4113
4114
4115# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4116#                                   IF_FALSE: [RUN-IF-FALSE])
4117# ------------------------------------------------------------
4118# Check that the linker support an argument
4119
4120
4121
4122
4123
4124
4125# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4126# Arguments:
4127# $1 - Optional prefix for each variable defined.
4128
4129
4130#
4131# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4132# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4133#
4134# This code is free software; you can redistribute it and/or modify it
4135# under the terms of the GNU General Public License version 2 only, as
4136# published by the Free Software Foundation.  Oracle designates this
4137# particular file as subject to the "Classpath" exception as provided
4138# by Oracle in the LICENSE file that accompanied this code.
4139#
4140# This code is distributed in the hope that it will be useful, but WITHOUT
4141# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4142# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4143# version 2 for more details (a copy is included in the LICENSE file that
4144# accompanied this code).
4145#
4146# You should have received a copy of the GNU General Public License version
4147# 2 along with this work; if not, write to the Free Software Foundation,
4148# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4149#
4150# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4151# or visit www.oracle.com if you need additional information or have any
4152# questions.
4153#
4154
4155
4156
4157
4158
4159cygwin_help() {
4160  case $1 in
4161    unzip)
4162      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4163      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4164      ;;
4165    zip)
4166      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4167      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4168      ;;
4169    make)
4170      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4171      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4172      ;;
4173    freetype)
4174      HELP_MSG="
4175The freetype library can now be build during the configure process.
4176Download the freetype sources and unpack them into an arbitrary directory:
4177
4178wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4179tar -xzf freetype-2.5.3.tar.gz
4180
4181Then run configure with '--with-freetype-src=<freetype_src>'. This will
4182automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4183builds or into '<freetype_src>/lib32' for 32-bit builds.
4184Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4185and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4186
4187Alternatively you can unpack the sources like this to use the default directory:
4188
4189tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4190      ;;
4191  esac
4192}
4193
4194msys_help() {
4195  PKGHANDLER_COMMAND=""
4196}
4197
4198apt_help() {
4199  case $1 in
4200    reduced)
4201      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4202    devkit)
4203      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4204    openjdk)
4205      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4206    alsa)
4207      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4208    cups)
4209      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4210    freetype)
4211      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4212    ffi)
4213      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4214    x11)
4215      PKGHANDLER_COMMAND="sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4216    ccache)
4217      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4218    dtrace)
4219      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4220    elf)
4221      PKGHANDLER_COMMAND="sudo apt-get install libelf-dev" ;;
4222  esac
4223}
4224
4225yum_help() {
4226  case $1 in
4227    devkit)
4228      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4229    openjdk)
4230      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4231    alsa)
4232      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4233    cups)
4234      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4235    freetype)
4236      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4237    x11)
4238      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4239    ccache)
4240      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4241    elf)
4242      PKGHANDLER_COMMAND="sudo yum install elfutils-libelf-devel" ;;
4243  esac
4244}
4245
4246brew_help() {
4247  case $1 in
4248    openjdk)
4249      PKGHANDLER_COMMAND="brew cask install java" ;;
4250    freetype)
4251      PKGHANDLER_COMMAND="brew install freetype" ;;
4252    ccache)
4253      PKGHANDLER_COMMAND="brew install ccache" ;;
4254  esac
4255}
4256
4257port_help() {
4258  PKGHANDLER_COMMAND=""
4259}
4260
4261pkgutil_help() {
4262  PKGHANDLER_COMMAND=""
4263}
4264
4265pkgadd_help() {
4266  PKGHANDLER_COMMAND=""
4267}
4268
4269# This function will check if we're called from the "configure" wrapper while
4270# printing --help. If so, we will print out additional information that can
4271# only be extracted within the autoconf script, and then exit. This must be
4272# called at the very beginning in configure.ac.
4273
4274
4275
4276
4277
4278
4279#
4280# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4281# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4282#
4283# This code is free software; you can redistribute it and/or modify it
4284# under the terms of the GNU General Public License version 2 only, as
4285# published by the Free Software Foundation.  Oracle designates this
4286# particular file as subject to the "Classpath" exception as provided
4287# by Oracle in the LICENSE file that accompanied this code.
4288#
4289# This code is distributed in the hope that it will be useful, but WITHOUT
4290# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4291# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4292# version 2 for more details (a copy is included in the LICENSE file that
4293# accompanied this code).
4294#
4295# You should have received a copy of the GNU General Public License version
4296# 2 along with this work; if not, write to the Free Software Foundation,
4297# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4298#
4299# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4300# or visit www.oracle.com if you need additional information or have any
4301# questions.
4302#
4303
4304# All valid JVM features, regardless of platform
4305VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4306    graal fprof vm-structs jni-check services management all-gcs nmt cds \
4307    static-build link-time-opt aot"
4308
4309# All valid JVM variants
4310VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4311
4312###############################################################################
4313# Check if the specified JVM variant should be built. To be used in shell if
4314# constructs, like this:
4315# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4316#
4317# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4318
4319# Definition kept in one line to allow inlining in if statements.
4320# Additional [] needed to keep m4 from mangling shell constructs.
4321
4322
4323###############################################################################
4324# Check if the specified JVM features are explicitly enabled. To be used in
4325# shell if constructs, like this:
4326# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4327#
4328# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4329
4330# Definition kept in one line to allow inlining in if statements.
4331# Additional [] needed to keep m4 from mangling shell constructs.
4332
4333
4334###############################################################################
4335# Check which variants of the JVM that we want to build. Available variants are:
4336#   server: normal interpreter, and a tiered C1/C2 compiler
4337#   client: normal interpreter, and C1 (no C2 compiler)
4338#   minimal: reduced form of client with optional features stripped out
4339#   core: normal interpreter only, no compiler
4340#   zero: C++ based interpreter only, no compiler
4341#   zeroshark: C++ based interpreter, and a llvm-based compiler
4342#   custom: baseline JVM with no default features
4343#
4344
4345
4346###############################################################################
4347# Check if dtrace should be enabled and has all prerequisites present.
4348#
4349
4350
4351################################################################################
4352# Check if AOT should be enabled
4353#
4354
4355
4356###############################################################################
4357# Set up all JVM features for each JVM variant.
4358#
4359
4360
4361###############################################################################
4362# Validate JVM features once all setup is complete, including custom setup.
4363#
4364
4365
4366################################################################################
4367#
4368# Specify which sources will be used to build the 64-bit ARM port
4369#
4370# --with-cpu-port=arm64   will use hotspot/src/cpu/arm
4371# --with-cpu-port=aarch64 will use hotspot/src/cpu/aarch64
4372#
4373
4374
4375
4376################################################################################
4377# Check if gtest should be built
4378#
4379
4380
4381#
4382# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4383# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4384#
4385# This code is free software; you can redistribute it and/or modify it
4386# under the terms of the GNU General Public License version 2 only, as
4387# published by the Free Software Foundation.  Oracle designates this
4388# particular file as subject to the "Classpath" exception as provided
4389# by Oracle in the LICENSE file that accompanied this code.
4390#
4391# This code is distributed in the hope that it will be useful, but WITHOUT
4392# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4393# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4394# version 2 for more details (a copy is included in the LICENSE file that
4395# accompanied this code).
4396#
4397# You should have received a copy of the GNU General Public License version
4398# 2 along with this work; if not, write to the Free Software Foundation,
4399# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4400#
4401# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4402# or visit www.oracle.com if you need additional information or have any
4403# questions.
4404#
4405
4406###############################################################################
4407# Check which variant of the JDK that we want to build.
4408# Currently we have:
4409#    normal:   standard edition
4410# but the custom make system may add other variants
4411#
4412# Effectively the JDK variant gives a name to a specific set of
4413# modules to compile into the JDK.
4414
4415
4416###############################################################################
4417# Set the debug level
4418#    release: no debug information, all optimizations, no asserts.
4419#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4420#    fastdebug: debug information (-g), all optimizations, all asserts
4421#    slowdebug: debug information (-g), no optimizations, all asserts
4422
4423
4424###############################################################################
4425#
4426# Should we build only OpenJDK even if closed sources are present?
4427#
4428
4429
4430
4431
4432###############################################################################
4433#
4434# Enable or disable the elliptic curve crypto implementation
4435#
4436
4437
4438
4439
4440################################################################################
4441#
4442# Gcov coverage data for hotspot
4443#
4444
4445
4446################################################################################
4447#
4448# Static build support.  When enabled will generate static
4449# libraries instead of shared libraries for all JDK libs.
4450#
4451
4452
4453################################################################################
4454#
4455# jlink options.
4456# We always keep packaged modules in JDK image.
4457#
4458
4459
4460################################################################################
4461#
4462# Check if building of the jtreg failure handler should be enabled.
4463#
4464
4465
4466################################################################################
4467#
4468# Enable or disable generation of the classlist at build time
4469#
4470
4471
4472#
4473# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4474# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4475#
4476# This code is free software; you can redistribute it and/or modify it
4477# under the terms of the GNU General Public License version 2 only, as
4478# published by the Free Software Foundation.  Oracle designates this
4479# particular file as subject to the "Classpath" exception as provided
4480# by Oracle in the LICENSE file that accompanied this code.
4481#
4482# This code is distributed in the hope that it will be useful, but WITHOUT
4483# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4484# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4485# version 2 for more details (a copy is included in the LICENSE file that
4486# accompanied this code).
4487#
4488# You should have received a copy of the GNU General Public License version
4489# 2 along with this work; if not, write to the Free Software Foundation,
4490# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4491#
4492# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4493# or visit www.oracle.com if you need additional information or have any
4494# questions.
4495#
4496
4497###############################################################################
4498#
4499# Setup version numbers
4500#
4501
4502# Verify that a given string represents a valid version number, and assign it
4503# to a variable.
4504
4505# Argument 1: the variable to assign to
4506# Argument 2: the value given by the user
4507
4508
4509
4510
4511#
4512# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4513# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4514#
4515# This code is free software; you can redistribute it and/or modify it
4516# under the terms of the GNU General Public License version 2 only, as
4517# published by the Free Software Foundation.  Oracle designates this
4518# particular file as subject to the "Classpath" exception as provided
4519# by Oracle in the LICENSE file that accompanied this code.
4520#
4521# This code is distributed in the hope that it will be useful, but WITHOUT
4522# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4523# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4524# version 2 for more details (a copy is included in the LICENSE file that
4525# accompanied this code).
4526#
4527# You should have received a copy of the GNU General Public License version
4528# 2 along with this work; if not, write to the Free Software Foundation,
4529# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4530#
4531# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4532# or visit www.oracle.com if you need additional information or have any
4533# questions.
4534#
4535
4536# Major library component reside in separate files.
4537#
4538# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4539# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4540#
4541# This code is free software; you can redistribute it and/or modify it
4542# under the terms of the GNU General Public License version 2 only, as
4543# published by the Free Software Foundation.  Oracle designates this
4544# particular file as subject to the "Classpath" exception as provided
4545# by Oracle in the LICENSE file that accompanied this code.
4546#
4547# This code is distributed in the hope that it will be useful, but WITHOUT
4548# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4549# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4550# version 2 for more details (a copy is included in the LICENSE file that
4551# accompanied this code).
4552#
4553# You should have received a copy of the GNU General Public License version
4554# 2 along with this work; if not, write to the Free Software Foundation,
4555# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4556#
4557# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4558# or visit www.oracle.com if you need additional information or have any
4559# questions.
4560#
4561
4562################################################################################
4563# Setup alsa (Advanced Linux Sound Architecture)
4564################################################################################
4565
4566
4567#
4568# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4569# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4570#
4571# This code is free software; you can redistribute it and/or modify it
4572# under the terms of the GNU General Public License version 2 only, as
4573# published by the Free Software Foundation.  Oracle designates this
4574# particular file as subject to the "Classpath" exception as provided
4575# by Oracle in the LICENSE file that accompanied this code.
4576#
4577# This code is distributed in the hope that it will be useful, but WITHOUT
4578# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4579# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4580# version 2 for more details (a copy is included in the LICENSE file that
4581# accompanied this code).
4582#
4583# You should have received a copy of the GNU General Public License version
4584# 2 along with this work; if not, write to the Free Software Foundation,
4585# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4586#
4587# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4588# or visit www.oracle.com if you need additional information or have any
4589# questions.
4590#
4591
4592################################################################################
4593# Setup bundled libraries.
4594#
4595# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4596# OpenJDK repository. Default is to use these libraries as bundled, but they
4597# might be replaced by en external version by the user.
4598################################################################################
4599
4600
4601################################################################################
4602# Setup libjpeg
4603################################################################################
4604
4605
4606################################################################################
4607# Setup giflib
4608################################################################################
4609
4610
4611################################################################################
4612# Setup libpng
4613################################################################################
4614
4615
4616################################################################################
4617# Setup zlib
4618################################################################################
4619
4620
4621################################################################################
4622# Setup lcms (Little CMS)
4623################################################################################
4624
4625
4626#
4627# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4628# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4629#
4630# This code is free software; you can redistribute it and/or modify it
4631# under the terms of the GNU General Public License version 2 only, as
4632# published by the Free Software Foundation.  Oracle designates this
4633# particular file as subject to the "Classpath" exception as provided
4634# by Oracle in the LICENSE file that accompanied this code.
4635#
4636# This code is distributed in the hope that it will be useful, but WITHOUT
4637# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4638# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4639# version 2 for more details (a copy is included in the LICENSE file that
4640# accompanied this code).
4641#
4642# You should have received a copy of the GNU General Public License version
4643# 2 along with this work; if not, write to the Free Software Foundation,
4644# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4645#
4646# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4647# or visit www.oracle.com if you need additional information or have any
4648# questions.
4649#
4650
4651################################################################################
4652# Setup cups (Common Unix Printing System)
4653################################################################################
4654
4655
4656#
4657# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4658# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4659#
4660# This code is free software; you can redistribute it and/or modify it
4661# under the terms of the GNU General Public License version 2 only, as
4662# published by the Free Software Foundation.  Oracle designates this
4663# particular file as subject to the "Classpath" exception as provided
4664# by Oracle in the LICENSE file that accompanied this code.
4665#
4666# This code is distributed in the hope that it will be useful, but WITHOUT
4667# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4668# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4669# version 2 for more details (a copy is included in the LICENSE file that
4670# accompanied this code).
4671#
4672# You should have received a copy of the GNU General Public License version
4673# 2 along with this work; if not, write to the Free Software Foundation,
4674# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4675#
4676# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4677# or visit www.oracle.com if you need additional information or have any
4678# questions.
4679#
4680
4681################################################################################
4682# Setup libffi (Foreign Function Interface)
4683################################################################################
4684
4685
4686#
4687# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4688# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4689#
4690# This code is free software; you can redistribute it and/or modify it
4691# under the terms of the GNU General Public License version 2 only, as
4692# published by the Free Software Foundation.  Oracle designates this
4693# particular file as subject to the "Classpath" exception as provided
4694# by Oracle in the LICENSE file that accompanied this code.
4695#
4696# This code is distributed in the hope that it will be useful, but WITHOUT
4697# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4698# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4699# version 2 for more details (a copy is included in the LICENSE file that
4700# accompanied this code).
4701#
4702# You should have received a copy of the GNU General Public License version
4703# 2 along with this work; if not, write to the Free Software Foundation,
4704# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4705#
4706# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4707# or visit www.oracle.com if you need additional information or have any
4708# questions.
4709#
4710
4711################################################################################
4712# Build the freetype lib from source
4713################################################################################
4714
4715
4716################################################################################
4717# Check if a potential freeype library match is correct and usable
4718################################################################################
4719
4720
4721################################################################################
4722# Setup freetype (The FreeType2 font rendering library)
4723################################################################################
4724
4725
4726#
4727# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4728# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4729#
4730# This code is free software; you can redistribute it and/or modify it
4731# under the terms of the GNU General Public License version 2 only, as
4732# published by the Free Software Foundation.  Oracle designates this
4733# particular file as subject to the "Classpath" exception as provided
4734# by Oracle in the LICENSE file that accompanied this code.
4735#
4736# This code is distributed in the hope that it will be useful, but WITHOUT
4737# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4738# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4739# version 2 for more details (a copy is included in the LICENSE file that
4740# accompanied this code).
4741#
4742# You should have received a copy of the GNU General Public License version
4743# 2 along with this work; if not, write to the Free Software Foundation,
4744# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4745#
4746# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4747# or visit www.oracle.com if you need additional information or have any
4748# questions.
4749#
4750
4751################################################################################
4752# Setup the standard C/C++ runtime libraries.
4753#
4754# Most importantly, determine if stdc++ should be linked statically or
4755# dynamically.
4756################################################################################
4757
4758
4759#
4760# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4761# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4762#
4763# This code is free software; you can redistribute it and/or modify it
4764# under the terms of the GNU General Public License version 2 only, as
4765# published by the Free Software Foundation.  Oracle designates this
4766# particular file as subject to the "Classpath" exception as provided
4767# by Oracle in the LICENSE file that accompanied this code.
4768#
4769# This code is distributed in the hope that it will be useful, but WITHOUT
4770# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4771# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4772# version 2 for more details (a copy is included in the LICENSE file that
4773# accompanied this code).
4774#
4775# You should have received a copy of the GNU General Public License version
4776# 2 along with this work; if not, write to the Free Software Foundation,
4777# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4778#
4779# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4780# or visit www.oracle.com if you need additional information or have any
4781# questions.
4782#
4783
4784################################################################################
4785# Setup X11 Windows system
4786################################################################################
4787
4788
4789#
4790# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4791# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4792#
4793# This code is free software; you can redistribute it and/or modify it
4794# under the terms of the GNU General Public License version 2 only, as
4795# published by the Free Software Foundation.  Oracle designates this
4796# particular file as subject to the "Classpath" exception as provided
4797# by Oracle in the LICENSE file that accompanied this code.
4798#
4799# This code is distributed in the hope that it will be useful, but WITHOUT
4800# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4801# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4802# version 2 for more details (a copy is included in the LICENSE file that
4803# accompanied this code).
4804#
4805# You should have received a copy of the GNU General Public License version
4806# 2 along with this work; if not, write to the Free Software Foundation,
4807# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4808#
4809# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4810# or visit www.oracle.com if you need additional information or have any
4811# questions.
4812#
4813
4814################################################################################
4815# Setup libelf (ELF library)
4816################################################################################
4817
4818
4819
4820################################################################################
4821# Determine which libraries are needed for this configuration
4822################################################################################
4823
4824
4825################################################################################
4826# Parse library options, and setup needed libraries
4827################################################################################
4828
4829
4830################################################################################
4831# Setup llvm (Low-Level VM)
4832################################################################################
4833
4834
4835################################################################################
4836# Setup various libraries, typically small system libraries
4837################################################################################
4838
4839
4840################################################################################
4841# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4842# redistribute it in the test image.
4843################################################################################
4844
4845
4846
4847#
4848# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4849# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4850#
4851# This code is free software; you can redistribute it and/or modify it
4852# under the terms of the GNU General Public License version 2 only, as
4853# published by the Free Software Foundation.  Oracle designates this
4854# particular file as subject to the "Classpath" exception as provided
4855# by Oracle in the LICENSE file that accompanied this code.
4856#
4857# This code is distributed in the hope that it will be useful, but WITHOUT
4858# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4859# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4860# version 2 for more details (a copy is included in the LICENSE file that
4861# accompanied this code).
4862#
4863# You should have received a copy of the GNU General Public License version
4864# 2 along with this work; if not, write to the Free Software Foundation,
4865# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4866#
4867# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4868# or visit www.oracle.com if you need additional information or have any
4869# questions.
4870#
4871
4872# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4873# Converts autoconf style CPU name to OpenJDK style, into
4874# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4875
4876
4877# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4878# Converts autoconf style OS name to OpenJDK style, into
4879# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4880
4881
4882# Expects $host_os $host_cpu $build_os and $build_cpu
4883# and $with_target_bits to have been setup!
4884#
4885# Translate the standard triplet(quadruplet) definition
4886# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4887# OPENJDK_BUILD_OS, etc.
4888
4889
4890# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4891# accordingly. Must be done after setting up build and target system, but before
4892# doing anything else with these values.
4893
4894
4895# Setup the legacy variables, for controlling the old makefiles.
4896#
4897
4898
4899# $1 - Either TARGET or BUILD to setup the variables for.
4900
4901
4902
4903
4904
4905
4906#%%% Build and target systems %%%
4907
4908
4909
4910
4911# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4912# Add -mX to various FLAGS variables.
4913
4914
4915
4916
4917
4918
4919#
4920# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4921# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4922#
4923# This code is free software; you can redistribute it and/or modify it
4924# under the terms of the GNU General Public License version 2 only, as
4925# published by the Free Software Foundation.  Oracle designates this
4926# particular file as subject to the "Classpath" exception as provided
4927# by Oracle in the LICENSE file that accompanied this code.
4928#
4929# This code is distributed in the hope that it will be useful, but WITHOUT
4930# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4931# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4932# version 2 for more details (a copy is included in the LICENSE file that
4933# accompanied this code).
4934#
4935# You should have received a copy of the GNU General Public License version
4936# 2 along with this work; if not, write to the Free Software Foundation,
4937# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4938#
4939# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4940# or visit www.oracle.com if you need additional information or have any
4941# questions.
4942#
4943
4944
4945
4946
4947
4948
4949
4950################################################################################
4951# Define a mechanism for importing extra prebuilt modules
4952#
4953
4954
4955
4956#
4957# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4958# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4959#
4960# This code is free software; you can redistribute it and/or modify it
4961# under the terms of the GNU General Public License version 2 only, as
4962# published by the Free Software Foundation.  Oracle designates this
4963# particular file as subject to the "Classpath" exception as provided
4964# by Oracle in the LICENSE file that accompanied this code.
4965#
4966# This code is distributed in the hope that it will be useful, but WITHOUT
4967# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4968# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4969# version 2 for more details (a copy is included in the LICENSE file that
4970# accompanied this code).
4971#
4972# You should have received a copy of the GNU General Public License version
4973# 2 along with this work; if not, write to the Free Software Foundation,
4974# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4975#
4976# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4977# or visit www.oracle.com if you need additional information or have any
4978# questions.
4979#
4980
4981########################################################################
4982# This file is responsible for detecting, verifying and setting up the
4983# toolchain, i.e. the compiler, linker and related utilities. It will setup
4984# proper paths to the binaries, but it will not setup any flags.
4985#
4986# The binaries used is determined by the toolchain type, which is the family of
4987# compilers and related tools that are used.
4988########################################################################
4989
4990
4991# All valid toolchains, regardless of platform (used by help.m4)
4992VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4993
4994# These toolchains are valid on different platforms
4995VALID_TOOLCHAINS_linux="gcc clang"
4996VALID_TOOLCHAINS_solaris="solstudio"
4997VALID_TOOLCHAINS_macosx="gcc clang"
4998VALID_TOOLCHAINS_aix="xlc"
4999VALID_TOOLCHAINS_windows="microsoft"
5000
5001# Toolchain descriptions
5002TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
5003TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
5004TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
5005TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
5006TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
5007
5008# Minimum supported versions, empty means unspecified
5009TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
5010TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
5011TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
5012TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
5013TOOLCHAIN_MINIMUM_VERSION_xlc=""
5014
5015# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
5016# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
5017# $1 - optional variable prefix for compiler and version variables (BUILD_)
5018# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
5019
5020
5021# Check if the configured compiler (C and C++) is of a specific version or
5022# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
5023#
5024# Arguments:
5025#   VERSION:   The version string to check against the found version
5026#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
5027#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
5028#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
5029
5030
5031
5032
5033# Setup a number of variables describing how native output files are
5034# named on this platform/toolchain.
5035
5036
5037# Determine which toolchain type to use, and make sure it is valid for this
5038# platform. Setup various information about the selected toolchain.
5039
5040
5041# Before we start detecting the toolchain executables, we might need some
5042# special setup, e.g. additional paths etc.
5043
5044
5045# Restore path, etc
5046
5047
5048# Check if a compiler is of the toolchain type we expect, and save the version
5049# information from it. If the compiler does not match the expected type,
5050# this function will abort using AC_MSG_ERROR. If it matches, the version will
5051# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
5052# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
5053#
5054# $1 = compiler to test (CC or CXX)
5055# $2 = human readable name of compiler (C or C++)
5056
5057
5058# Try to locate the given C or C++ compiler in the path, or otherwise.
5059#
5060# $1 = compiler to test (CC or CXX)
5061# $2 = human readable name of compiler (C or C++)
5062# $3 = compiler name to search for
5063
5064
5065# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
5066# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
5067# archiver (AR). Verify that the compilers are correct according to the
5068# toolchain type.
5069
5070
5071# Setup additional tools that is considered a part of the toolchain, but not the
5072# core part. Many of these are highly platform-specific and do not exist,
5073# and/or are not needed on all platforms.
5074
5075
5076# Setup the build tools (i.e, the compiler and linker used to build programs
5077# that should be run on the build platform, not the target platform, as a build
5078# helper). Since the non-cross-compile case uses the normal, target compilers
5079# for this, we can only do this after these have been setup.
5080
5081
5082# Do some additional checks on the detected tools.
5083
5084
5085# Setup the JTReg Regression Test Harness.
5086
5087
5088#
5089# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
5090# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5091#
5092# This code is free software; you can redistribute it and/or modify it
5093# under the terms of the GNU General Public License version 2 only, as
5094# published by the Free Software Foundation.  Oracle designates this
5095# particular file as subject to the "Classpath" exception as provided
5096# by Oracle in the LICENSE file that accompanied this code.
5097#
5098# This code is distributed in the hope that it will be useful, but WITHOUT
5099# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5100# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5101# version 2 for more details (a copy is included in the LICENSE file that
5102# accompanied this code).
5103#
5104# You should have received a copy of the GNU General Public License version
5105# 2 along with this work; if not, write to the Free Software Foundation,
5106# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5107#
5108# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5109# or visit www.oracle.com if you need additional information or have any
5110# questions.
5111#
5112
5113################################################################################
5114# The order of these defines the priority by which we try to find them.
5115VALID_VS_VERSIONS="2013 2012 2010"
5116
5117VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5118VS_VERSION_INTERNAL_2010=100
5119VS_MSVCR_2010=msvcr100.dll
5120# We don't use msvcp on Visual Studio 2010
5121#VS_MSVCP_2010=msvcp100.dll
5122VS_ENVVAR_2010="VS100COMNTOOLS"
5123VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5124VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5125VS_VS_PLATFORM_NAME_2010="v100"
5126VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5127
5128VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5129VS_VERSION_INTERNAL_2012=110
5130VS_MSVCR_2012=msvcr110.dll
5131VS_MSVCP_2012=msvcp110.dll
5132VS_ENVVAR_2012="VS110COMNTOOLS"
5133VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5134VS_SDK_INSTALLDIR_2012=
5135VS_VS_PLATFORM_NAME_2012="v110"
5136VS_SDK_PLATFORM_NAME_2012=
5137
5138VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5139VS_VERSION_INTERNAL_2013=120
5140VS_MSVCR_2013=msvcr120.dll
5141VS_MSVCP_2013=msvcp120.dll
5142VS_ENVVAR_2013="VS120COMNTOOLS"
5143VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5144VS_SDK_INSTALLDIR_2013=
5145VS_VS_PLATFORM_NAME_2013="v120"
5146VS_SDK_PLATFORM_NAME_2013=
5147
5148################################################################################
5149
5150
5151
5152################################################################################
5153
5154
5155
5156################################################################################
5157# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5158# build environment and assigns it to VS_ENV_CMD
5159
5160
5161################################################################################
5162
5163
5164
5165################################################################################
5166# Check if the VS env variables were setup prior to running configure.
5167# If not, then find vcvarsall.bat and run it automatically, and integrate
5168# the set env variables into the spec file.
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183# This line needs to be here, verbatim, after all includes and the dummy hook
5184# definitions. It is replaced with custom functionality when building
5185# custom sources.
5186#CUSTOM_AUTOCONF_INCLUDE
5187
5188# Do not change or remove the following line, it is needed for consistency checks:
5189DATE_WHEN_GENERATED=1493884285
5190
5191###############################################################################
5192#
5193# Initialization / Boot-strapping
5194#
5195# The bootstrapping process needs to solve the "chicken or the egg" problem,
5196# thus it jumps back and forth, each time gaining something needed later on.
5197#
5198###############################################################################
5199
5200# If we are requested to print additional help, do that and then exit.
5201# This must be the very first call.
5202
5203  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5204
5205    # Print available toolchains
5206    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5207    $PRINTF "Which are valid to use depends on the build platform.\n"
5208    for toolchain in $VALID_TOOLCHAINS_all; do
5209      # Use indirect variable referencing
5210      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5211      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5212      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5213    done
5214    $PRINTF "\n"
5215
5216    # Print available jvm features
5217    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5218    $PRINTF "Which are valid to use depends on the target platform.\n  "
5219    $PRINTF "%s " $VALID_JVM_FEATURES
5220    $PRINTF "\n"
5221
5222    # And now exit directly
5223    exit 0
5224  fi
5225
5226
5227# Basic initialization that must happen first of all in the normal process.
5228
5229  # Save the original command line. This is passed to us by the wrapper configure script.
5230
5231  # Save the path variable before it gets changed
5232  ORIGINAL_PATH="$PATH"
5233
5234  DATE_WHEN_CONFIGURED=`LANG=C date`
5235
5236  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5237$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5238  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5239$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5240
5241
5242  # Start with tools that do not need have cross compilation support
5243  # and can be expected to be found in the default PATH. These tools are
5244  # used by configure.
5245
5246  # First are all the simple required tools.
5247
5248
5249
5250  # Publish this variable in the help.
5251
5252
5253  if [ -z "${BASENAME+x}" ]; then
5254    # The variable is not set by user, try to locate tool using the code snippet
5255    for ac_prog in basename
5256do
5257  # Extract the first word of "$ac_prog", so it can be a program name with args.
5258set dummy $ac_prog; ac_word=$2
5259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5260$as_echo_n "checking for $ac_word... " >&6; }
5261if ${ac_cv_path_BASENAME+:} false; then :
5262  $as_echo_n "(cached) " >&6
5263else
5264  case $BASENAME in
5265  [\\/]* | ?:[\\/]*)
5266  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5267  ;;
5268  *)
5269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5270for as_dir in $PATH
5271do
5272  IFS=$as_save_IFS
5273  test -z "$as_dir" && as_dir=.
5274    for ac_exec_ext in '' $ac_executable_extensions; do
5275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5276    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5278    break 2
5279  fi
5280done
5281  done
5282IFS=$as_save_IFS
5283
5284  ;;
5285esac
5286fi
5287BASENAME=$ac_cv_path_BASENAME
5288if test -n "$BASENAME"; then
5289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5290$as_echo "$BASENAME" >&6; }
5291else
5292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5293$as_echo "no" >&6; }
5294fi
5295
5296
5297  test -n "$BASENAME" && break
5298done
5299
5300  else
5301    # The variable is set, but is it from the command line or the environment?
5302
5303    # Try to remove the string !BASENAME! from our list.
5304    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5305    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5306      # If it failed, the variable was not from the command line. Ignore it,
5307      # but warn the user (except for BASH, which is always set by the calling BASH).
5308      if test "xBASENAME" != xBASH; then
5309        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5310$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5311      fi
5312      # Try to locate tool using the code snippet
5313      for ac_prog in basename
5314do
5315  # Extract the first word of "$ac_prog", so it can be a program name with args.
5316set dummy $ac_prog; ac_word=$2
5317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5318$as_echo_n "checking for $ac_word... " >&6; }
5319if ${ac_cv_path_BASENAME+:} false; then :
5320  $as_echo_n "(cached) " >&6
5321else
5322  case $BASENAME in
5323  [\\/]* | ?:[\\/]*)
5324  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5325  ;;
5326  *)
5327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5328for as_dir in $PATH
5329do
5330  IFS=$as_save_IFS
5331  test -z "$as_dir" && as_dir=.
5332    for ac_exec_ext in '' $ac_executable_extensions; do
5333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5334    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5336    break 2
5337  fi
5338done
5339  done
5340IFS=$as_save_IFS
5341
5342  ;;
5343esac
5344fi
5345BASENAME=$ac_cv_path_BASENAME
5346if test -n "$BASENAME"; then
5347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5348$as_echo "$BASENAME" >&6; }
5349else
5350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5351$as_echo "no" >&6; }
5352fi
5353
5354
5355  test -n "$BASENAME" && break
5356done
5357
5358    else
5359      # If it succeeded, then it was overridden by the user. We will use it
5360      # for the tool.
5361
5362      # First remove it from the list of overridden variables, so we can test
5363      # for unknown variables in the end.
5364      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5365
5366      # Check if we try to supply an empty value
5367      if test "x$BASENAME" = x; then
5368        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5369$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5370        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5371$as_echo_n "checking for BASENAME... " >&6; }
5372        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5373$as_echo "disabled" >&6; }
5374      else
5375        # Check if the provided tool contains a complete path.
5376        tool_specified="$BASENAME"
5377        tool_basename="${tool_specified##*/}"
5378        if test "x$tool_basename" = "x$tool_specified"; then
5379          # A command without a complete path is provided, search $PATH.
5380          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5381$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5382          # Extract the first word of "$tool_basename", so it can be a program name with args.
5383set dummy $tool_basename; ac_word=$2
5384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5385$as_echo_n "checking for $ac_word... " >&6; }
5386if ${ac_cv_path_BASENAME+:} false; then :
5387  $as_echo_n "(cached) " >&6
5388else
5389  case $BASENAME in
5390  [\\/]* | ?:[\\/]*)
5391  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5392  ;;
5393  *)
5394  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5395for as_dir in $PATH
5396do
5397  IFS=$as_save_IFS
5398  test -z "$as_dir" && as_dir=.
5399    for ac_exec_ext in '' $ac_executable_extensions; do
5400  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5401    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5402    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5403    break 2
5404  fi
5405done
5406  done
5407IFS=$as_save_IFS
5408
5409  ;;
5410esac
5411fi
5412BASENAME=$ac_cv_path_BASENAME
5413if test -n "$BASENAME"; then
5414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5415$as_echo "$BASENAME" >&6; }
5416else
5417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5418$as_echo "no" >&6; }
5419fi
5420
5421
5422          if test "x$BASENAME" = x; then
5423            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5424          fi
5425        else
5426          # Otherwise we believe it is a complete path. Use it as it is.
5427          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5428$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5429          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5430$as_echo_n "checking for BASENAME... " >&6; }
5431          if test ! -x "$tool_specified"; then
5432            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5433$as_echo "not found" >&6; }
5434            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5435          fi
5436          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5437$as_echo "$tool_specified" >&6; }
5438        fi
5439      fi
5440    fi
5441
5442  fi
5443
5444
5445
5446  if test "x$BASENAME" = x; then
5447    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5448  fi
5449
5450
5451
5452
5453
5454  # Publish this variable in the help.
5455
5456
5457  if [ -z "${BASH+x}" ]; then
5458    # The variable is not set by user, try to locate tool using the code snippet
5459    for ac_prog in bash
5460do
5461  # Extract the first word of "$ac_prog", so it can be a program name with args.
5462set dummy $ac_prog; ac_word=$2
5463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5464$as_echo_n "checking for $ac_word... " >&6; }
5465if ${ac_cv_path_BASH+:} false; then :
5466  $as_echo_n "(cached) " >&6
5467else
5468  case $BASH in
5469  [\\/]* | ?:[\\/]*)
5470  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5471  ;;
5472  *)
5473  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5474for as_dir in $PATH
5475do
5476  IFS=$as_save_IFS
5477  test -z "$as_dir" && as_dir=.
5478    for ac_exec_ext in '' $ac_executable_extensions; do
5479  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5480    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5481    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5482    break 2
5483  fi
5484done
5485  done
5486IFS=$as_save_IFS
5487
5488  ;;
5489esac
5490fi
5491BASH=$ac_cv_path_BASH
5492if test -n "$BASH"; then
5493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5494$as_echo "$BASH" >&6; }
5495else
5496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5497$as_echo "no" >&6; }
5498fi
5499
5500
5501  test -n "$BASH" && break
5502done
5503
5504  else
5505    # The variable is set, but is it from the command line or the environment?
5506
5507    # Try to remove the string !BASH! from our list.
5508    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5509    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5510      # If it failed, the variable was not from the command line. Ignore it,
5511      # but warn the user (except for BASH, which is always set by the calling BASH).
5512      if test "xBASH" != xBASH; then
5513        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5514$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5515      fi
5516      # Try to locate tool using the code snippet
5517      for ac_prog in bash
5518do
5519  # Extract the first word of "$ac_prog", so it can be a program name with args.
5520set dummy $ac_prog; ac_word=$2
5521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5522$as_echo_n "checking for $ac_word... " >&6; }
5523if ${ac_cv_path_BASH+:} false; then :
5524  $as_echo_n "(cached) " >&6
5525else
5526  case $BASH in
5527  [\\/]* | ?:[\\/]*)
5528  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5529  ;;
5530  *)
5531  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5532for as_dir in $PATH
5533do
5534  IFS=$as_save_IFS
5535  test -z "$as_dir" && as_dir=.
5536    for ac_exec_ext in '' $ac_executable_extensions; do
5537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5538    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5540    break 2
5541  fi
5542done
5543  done
5544IFS=$as_save_IFS
5545
5546  ;;
5547esac
5548fi
5549BASH=$ac_cv_path_BASH
5550if test -n "$BASH"; then
5551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5552$as_echo "$BASH" >&6; }
5553else
5554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5555$as_echo "no" >&6; }
5556fi
5557
5558
5559  test -n "$BASH" && break
5560done
5561
5562    else
5563      # If it succeeded, then it was overridden by the user. We will use it
5564      # for the tool.
5565
5566      # First remove it from the list of overridden variables, so we can test
5567      # for unknown variables in the end.
5568      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5569
5570      # Check if we try to supply an empty value
5571      if test "x$BASH" = x; then
5572        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5573$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5574        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5575$as_echo_n "checking for BASH... " >&6; }
5576        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5577$as_echo "disabled" >&6; }
5578      else
5579        # Check if the provided tool contains a complete path.
5580        tool_specified="$BASH"
5581        tool_basename="${tool_specified##*/}"
5582        if test "x$tool_basename" = "x$tool_specified"; then
5583          # A command without a complete path is provided, search $PATH.
5584          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5585$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5586          # Extract the first word of "$tool_basename", so it can be a program name with args.
5587set dummy $tool_basename; ac_word=$2
5588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5589$as_echo_n "checking for $ac_word... " >&6; }
5590if ${ac_cv_path_BASH+:} false; then :
5591  $as_echo_n "(cached) " >&6
5592else
5593  case $BASH in
5594  [\\/]* | ?:[\\/]*)
5595  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5596  ;;
5597  *)
5598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5599for as_dir in $PATH
5600do
5601  IFS=$as_save_IFS
5602  test -z "$as_dir" && as_dir=.
5603    for ac_exec_ext in '' $ac_executable_extensions; do
5604  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5605    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5607    break 2
5608  fi
5609done
5610  done
5611IFS=$as_save_IFS
5612
5613  ;;
5614esac
5615fi
5616BASH=$ac_cv_path_BASH
5617if test -n "$BASH"; then
5618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5619$as_echo "$BASH" >&6; }
5620else
5621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5622$as_echo "no" >&6; }
5623fi
5624
5625
5626          if test "x$BASH" = x; then
5627            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5628          fi
5629        else
5630          # Otherwise we believe it is a complete path. Use it as it is.
5631          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5632$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5633          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5634$as_echo_n "checking for BASH... " >&6; }
5635          if test ! -x "$tool_specified"; then
5636            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5637$as_echo "not found" >&6; }
5638            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5639          fi
5640          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5641$as_echo "$tool_specified" >&6; }
5642        fi
5643      fi
5644    fi
5645
5646  fi
5647
5648
5649
5650  if test "x$BASH" = x; then
5651    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5652  fi
5653
5654
5655
5656
5657
5658  # Publish this variable in the help.
5659
5660
5661  if [ -z "${CAT+x}" ]; then
5662    # The variable is not set by user, try to locate tool using the code snippet
5663    for ac_prog in cat
5664do
5665  # Extract the first word of "$ac_prog", so it can be a program name with args.
5666set dummy $ac_prog; ac_word=$2
5667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5668$as_echo_n "checking for $ac_word... " >&6; }
5669if ${ac_cv_path_CAT+:} false; then :
5670  $as_echo_n "(cached) " >&6
5671else
5672  case $CAT in
5673  [\\/]* | ?:[\\/]*)
5674  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5675  ;;
5676  *)
5677  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5678for as_dir in $PATH
5679do
5680  IFS=$as_save_IFS
5681  test -z "$as_dir" && as_dir=.
5682    for ac_exec_ext in '' $ac_executable_extensions; do
5683  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5684    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5685    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5686    break 2
5687  fi
5688done
5689  done
5690IFS=$as_save_IFS
5691
5692  ;;
5693esac
5694fi
5695CAT=$ac_cv_path_CAT
5696if test -n "$CAT"; then
5697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5698$as_echo "$CAT" >&6; }
5699else
5700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5701$as_echo "no" >&6; }
5702fi
5703
5704
5705  test -n "$CAT" && break
5706done
5707
5708  else
5709    # The variable is set, but is it from the command line or the environment?
5710
5711    # Try to remove the string !CAT! from our list.
5712    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5713    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5714      # If it failed, the variable was not from the command line. Ignore it,
5715      # but warn the user (except for BASH, which is always set by the calling BASH).
5716      if test "xCAT" != xBASH; then
5717        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5718$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5719      fi
5720      # Try to locate tool using the code snippet
5721      for ac_prog in cat
5722do
5723  # Extract the first word of "$ac_prog", so it can be a program name with args.
5724set dummy $ac_prog; ac_word=$2
5725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5726$as_echo_n "checking for $ac_word... " >&6; }
5727if ${ac_cv_path_CAT+:} false; then :
5728  $as_echo_n "(cached) " >&6
5729else
5730  case $CAT in
5731  [\\/]* | ?:[\\/]*)
5732  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5733  ;;
5734  *)
5735  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5736for as_dir in $PATH
5737do
5738  IFS=$as_save_IFS
5739  test -z "$as_dir" && as_dir=.
5740    for ac_exec_ext in '' $ac_executable_extensions; do
5741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5742    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5744    break 2
5745  fi
5746done
5747  done
5748IFS=$as_save_IFS
5749
5750  ;;
5751esac
5752fi
5753CAT=$ac_cv_path_CAT
5754if test -n "$CAT"; then
5755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5756$as_echo "$CAT" >&6; }
5757else
5758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5759$as_echo "no" >&6; }
5760fi
5761
5762
5763  test -n "$CAT" && break
5764done
5765
5766    else
5767      # If it succeeded, then it was overridden by the user. We will use it
5768      # for the tool.
5769
5770      # First remove it from the list of overridden variables, so we can test
5771      # for unknown variables in the end.
5772      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5773
5774      # Check if we try to supply an empty value
5775      if test "x$CAT" = x; then
5776        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5777$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5778        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5779$as_echo_n "checking for CAT... " >&6; }
5780        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5781$as_echo "disabled" >&6; }
5782      else
5783        # Check if the provided tool contains a complete path.
5784        tool_specified="$CAT"
5785        tool_basename="${tool_specified##*/}"
5786        if test "x$tool_basename" = "x$tool_specified"; then
5787          # A command without a complete path is provided, search $PATH.
5788          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5789$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5790          # Extract the first word of "$tool_basename", so it can be a program name with args.
5791set dummy $tool_basename; ac_word=$2
5792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5793$as_echo_n "checking for $ac_word... " >&6; }
5794if ${ac_cv_path_CAT+:} false; then :
5795  $as_echo_n "(cached) " >&6
5796else
5797  case $CAT in
5798  [\\/]* | ?:[\\/]*)
5799  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5800  ;;
5801  *)
5802  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5803for as_dir in $PATH
5804do
5805  IFS=$as_save_IFS
5806  test -z "$as_dir" && as_dir=.
5807    for ac_exec_ext in '' $ac_executable_extensions; do
5808  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5809    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5810    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5811    break 2
5812  fi
5813done
5814  done
5815IFS=$as_save_IFS
5816
5817  ;;
5818esac
5819fi
5820CAT=$ac_cv_path_CAT
5821if test -n "$CAT"; then
5822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5823$as_echo "$CAT" >&6; }
5824else
5825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5826$as_echo "no" >&6; }
5827fi
5828
5829
5830          if test "x$CAT" = x; then
5831            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5832          fi
5833        else
5834          # Otherwise we believe it is a complete path. Use it as it is.
5835          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5836$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5837          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5838$as_echo_n "checking for CAT... " >&6; }
5839          if test ! -x "$tool_specified"; then
5840            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5841$as_echo "not found" >&6; }
5842            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5843          fi
5844          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5845$as_echo "$tool_specified" >&6; }
5846        fi
5847      fi
5848    fi
5849
5850  fi
5851
5852
5853
5854  if test "x$CAT" = x; then
5855    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5856  fi
5857
5858
5859
5860
5861
5862  # Publish this variable in the help.
5863
5864
5865  if [ -z "${CHMOD+x}" ]; then
5866    # The variable is not set by user, try to locate tool using the code snippet
5867    for ac_prog in chmod
5868do
5869  # Extract the first word of "$ac_prog", so it can be a program name with args.
5870set dummy $ac_prog; ac_word=$2
5871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5872$as_echo_n "checking for $ac_word... " >&6; }
5873if ${ac_cv_path_CHMOD+:} false; then :
5874  $as_echo_n "(cached) " >&6
5875else
5876  case $CHMOD in
5877  [\\/]* | ?:[\\/]*)
5878  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5879  ;;
5880  *)
5881  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5882for as_dir in $PATH
5883do
5884  IFS=$as_save_IFS
5885  test -z "$as_dir" && as_dir=.
5886    for ac_exec_ext in '' $ac_executable_extensions; do
5887  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5888    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5889    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5890    break 2
5891  fi
5892done
5893  done
5894IFS=$as_save_IFS
5895
5896  ;;
5897esac
5898fi
5899CHMOD=$ac_cv_path_CHMOD
5900if test -n "$CHMOD"; then
5901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5902$as_echo "$CHMOD" >&6; }
5903else
5904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5905$as_echo "no" >&6; }
5906fi
5907
5908
5909  test -n "$CHMOD" && break
5910done
5911
5912  else
5913    # The variable is set, but is it from the command line or the environment?
5914
5915    # Try to remove the string !CHMOD! from our list.
5916    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5917    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5918      # If it failed, the variable was not from the command line. Ignore it,
5919      # but warn the user (except for BASH, which is always set by the calling BASH).
5920      if test "xCHMOD" != xBASH; then
5921        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5922$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5923      fi
5924      # Try to locate tool using the code snippet
5925      for ac_prog in chmod
5926do
5927  # Extract the first word of "$ac_prog", so it can be a program name with args.
5928set dummy $ac_prog; ac_word=$2
5929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5930$as_echo_n "checking for $ac_word... " >&6; }
5931if ${ac_cv_path_CHMOD+:} false; then :
5932  $as_echo_n "(cached) " >&6
5933else
5934  case $CHMOD in
5935  [\\/]* | ?:[\\/]*)
5936  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5937  ;;
5938  *)
5939  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5940for as_dir in $PATH
5941do
5942  IFS=$as_save_IFS
5943  test -z "$as_dir" && as_dir=.
5944    for ac_exec_ext in '' $ac_executable_extensions; do
5945  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5946    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5947    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5948    break 2
5949  fi
5950done
5951  done
5952IFS=$as_save_IFS
5953
5954  ;;
5955esac
5956fi
5957CHMOD=$ac_cv_path_CHMOD
5958if test -n "$CHMOD"; then
5959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5960$as_echo "$CHMOD" >&6; }
5961else
5962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5963$as_echo "no" >&6; }
5964fi
5965
5966
5967  test -n "$CHMOD" && break
5968done
5969
5970    else
5971      # If it succeeded, then it was overridden by the user. We will use it
5972      # for the tool.
5973
5974      # First remove it from the list of overridden variables, so we can test
5975      # for unknown variables in the end.
5976      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5977
5978      # Check if we try to supply an empty value
5979      if test "x$CHMOD" = x; then
5980        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5981$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5982        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5983$as_echo_n "checking for CHMOD... " >&6; }
5984        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5985$as_echo "disabled" >&6; }
5986      else
5987        # Check if the provided tool contains a complete path.
5988        tool_specified="$CHMOD"
5989        tool_basename="${tool_specified##*/}"
5990        if test "x$tool_basename" = "x$tool_specified"; then
5991          # A command without a complete path is provided, search $PATH.
5992          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5993$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5994          # Extract the first word of "$tool_basename", so it can be a program name with args.
5995set dummy $tool_basename; ac_word=$2
5996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5997$as_echo_n "checking for $ac_word... " >&6; }
5998if ${ac_cv_path_CHMOD+:} false; then :
5999  $as_echo_n "(cached) " >&6
6000else
6001  case $CHMOD in
6002  [\\/]* | ?:[\\/]*)
6003  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
6004  ;;
6005  *)
6006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6007for as_dir in $PATH
6008do
6009  IFS=$as_save_IFS
6010  test -z "$as_dir" && as_dir=.
6011    for ac_exec_ext in '' $ac_executable_extensions; do
6012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6013    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
6014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6015    break 2
6016  fi
6017done
6018  done
6019IFS=$as_save_IFS
6020
6021  ;;
6022esac
6023fi
6024CHMOD=$ac_cv_path_CHMOD
6025if test -n "$CHMOD"; then
6026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
6027$as_echo "$CHMOD" >&6; }
6028else
6029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6030$as_echo "no" >&6; }
6031fi
6032
6033
6034          if test "x$CHMOD" = x; then
6035            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6036          fi
6037        else
6038          # Otherwise we believe it is a complete path. Use it as it is.
6039          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
6040$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
6041          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
6042$as_echo_n "checking for CHMOD... " >&6; }
6043          if test ! -x "$tool_specified"; then
6044            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6045$as_echo "not found" >&6; }
6046            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
6047          fi
6048          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6049$as_echo "$tool_specified" >&6; }
6050        fi
6051      fi
6052    fi
6053
6054  fi
6055
6056
6057
6058  if test "x$CHMOD" = x; then
6059    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
6060  fi
6061
6062
6063
6064
6065
6066  # Publish this variable in the help.
6067
6068
6069  if [ -z "${CMP+x}" ]; then
6070    # The variable is not set by user, try to locate tool using the code snippet
6071    for ac_prog in cmp
6072do
6073  # Extract the first word of "$ac_prog", so it can be a program name with args.
6074set dummy $ac_prog; ac_word=$2
6075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6076$as_echo_n "checking for $ac_word... " >&6; }
6077if ${ac_cv_path_CMP+:} false; then :
6078  $as_echo_n "(cached) " >&6
6079else
6080  case $CMP in
6081  [\\/]* | ?:[\\/]*)
6082  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6083  ;;
6084  *)
6085  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6086for as_dir in $PATH
6087do
6088  IFS=$as_save_IFS
6089  test -z "$as_dir" && as_dir=.
6090    for ac_exec_ext in '' $ac_executable_extensions; do
6091  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6092    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6093    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6094    break 2
6095  fi
6096done
6097  done
6098IFS=$as_save_IFS
6099
6100  ;;
6101esac
6102fi
6103CMP=$ac_cv_path_CMP
6104if test -n "$CMP"; then
6105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6106$as_echo "$CMP" >&6; }
6107else
6108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6109$as_echo "no" >&6; }
6110fi
6111
6112
6113  test -n "$CMP" && break
6114done
6115
6116  else
6117    # The variable is set, but is it from the command line or the environment?
6118
6119    # Try to remove the string !CMP! from our list.
6120    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6121    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6122      # If it failed, the variable was not from the command line. Ignore it,
6123      # but warn the user (except for BASH, which is always set by the calling BASH).
6124      if test "xCMP" != xBASH; then
6125        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6126$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6127      fi
6128      # Try to locate tool using the code snippet
6129      for ac_prog in cmp
6130do
6131  # Extract the first word of "$ac_prog", so it can be a program name with args.
6132set dummy $ac_prog; ac_word=$2
6133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6134$as_echo_n "checking for $ac_word... " >&6; }
6135if ${ac_cv_path_CMP+:} false; then :
6136  $as_echo_n "(cached) " >&6
6137else
6138  case $CMP in
6139  [\\/]* | ?:[\\/]*)
6140  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6141  ;;
6142  *)
6143  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6144for as_dir in $PATH
6145do
6146  IFS=$as_save_IFS
6147  test -z "$as_dir" && as_dir=.
6148    for ac_exec_ext in '' $ac_executable_extensions; do
6149  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6150    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6151    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6152    break 2
6153  fi
6154done
6155  done
6156IFS=$as_save_IFS
6157
6158  ;;
6159esac
6160fi
6161CMP=$ac_cv_path_CMP
6162if test -n "$CMP"; then
6163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6164$as_echo "$CMP" >&6; }
6165else
6166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6167$as_echo "no" >&6; }
6168fi
6169
6170
6171  test -n "$CMP" && break
6172done
6173
6174    else
6175      # If it succeeded, then it was overridden by the user. We will use it
6176      # for the tool.
6177
6178      # First remove it from the list of overridden variables, so we can test
6179      # for unknown variables in the end.
6180      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6181
6182      # Check if we try to supply an empty value
6183      if test "x$CMP" = x; then
6184        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6185$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6186        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6187$as_echo_n "checking for CMP... " >&6; }
6188        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6189$as_echo "disabled" >&6; }
6190      else
6191        # Check if the provided tool contains a complete path.
6192        tool_specified="$CMP"
6193        tool_basename="${tool_specified##*/}"
6194        if test "x$tool_basename" = "x$tool_specified"; then
6195          # A command without a complete path is provided, search $PATH.
6196          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6197$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6198          # Extract the first word of "$tool_basename", so it can be a program name with args.
6199set dummy $tool_basename; ac_word=$2
6200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6201$as_echo_n "checking for $ac_word... " >&6; }
6202if ${ac_cv_path_CMP+:} false; then :
6203  $as_echo_n "(cached) " >&6
6204else
6205  case $CMP in
6206  [\\/]* | ?:[\\/]*)
6207  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6208  ;;
6209  *)
6210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6211for as_dir in $PATH
6212do
6213  IFS=$as_save_IFS
6214  test -z "$as_dir" && as_dir=.
6215    for ac_exec_ext in '' $ac_executable_extensions; do
6216  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6217    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6218    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6219    break 2
6220  fi
6221done
6222  done
6223IFS=$as_save_IFS
6224
6225  ;;
6226esac
6227fi
6228CMP=$ac_cv_path_CMP
6229if test -n "$CMP"; then
6230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6231$as_echo "$CMP" >&6; }
6232else
6233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6234$as_echo "no" >&6; }
6235fi
6236
6237
6238          if test "x$CMP" = x; then
6239            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6240          fi
6241        else
6242          # Otherwise we believe it is a complete path. Use it as it is.
6243          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6244$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6245          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6246$as_echo_n "checking for CMP... " >&6; }
6247          if test ! -x "$tool_specified"; then
6248            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6249$as_echo "not found" >&6; }
6250            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6251          fi
6252          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6253$as_echo "$tool_specified" >&6; }
6254        fi
6255      fi
6256    fi
6257
6258  fi
6259
6260
6261
6262  if test "x$CMP" = x; then
6263    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6264  fi
6265
6266
6267
6268
6269
6270  # Publish this variable in the help.
6271
6272
6273  if [ -z "${COMM+x}" ]; then
6274    # The variable is not set by user, try to locate tool using the code snippet
6275    for ac_prog in comm
6276do
6277  # Extract the first word of "$ac_prog", so it can be a program name with args.
6278set dummy $ac_prog; ac_word=$2
6279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6280$as_echo_n "checking for $ac_word... " >&6; }
6281if ${ac_cv_path_COMM+:} false; then :
6282  $as_echo_n "(cached) " >&6
6283else
6284  case $COMM in
6285  [\\/]* | ?:[\\/]*)
6286  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6287  ;;
6288  *)
6289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6290for as_dir in $PATH
6291do
6292  IFS=$as_save_IFS
6293  test -z "$as_dir" && as_dir=.
6294    for ac_exec_ext in '' $ac_executable_extensions; do
6295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6296    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6298    break 2
6299  fi
6300done
6301  done
6302IFS=$as_save_IFS
6303
6304  ;;
6305esac
6306fi
6307COMM=$ac_cv_path_COMM
6308if test -n "$COMM"; then
6309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6310$as_echo "$COMM" >&6; }
6311else
6312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6313$as_echo "no" >&6; }
6314fi
6315
6316
6317  test -n "$COMM" && break
6318done
6319
6320  else
6321    # The variable is set, but is it from the command line or the environment?
6322
6323    # Try to remove the string !COMM! from our list.
6324    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6325    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6326      # If it failed, the variable was not from the command line. Ignore it,
6327      # but warn the user (except for BASH, which is always set by the calling BASH).
6328      if test "xCOMM" != xBASH; then
6329        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6330$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6331      fi
6332      # Try to locate tool using the code snippet
6333      for ac_prog in comm
6334do
6335  # Extract the first word of "$ac_prog", so it can be a program name with args.
6336set dummy $ac_prog; ac_word=$2
6337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6338$as_echo_n "checking for $ac_word... " >&6; }
6339if ${ac_cv_path_COMM+:} false; then :
6340  $as_echo_n "(cached) " >&6
6341else
6342  case $COMM in
6343  [\\/]* | ?:[\\/]*)
6344  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6345  ;;
6346  *)
6347  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6348for as_dir in $PATH
6349do
6350  IFS=$as_save_IFS
6351  test -z "$as_dir" && as_dir=.
6352    for ac_exec_ext in '' $ac_executable_extensions; do
6353  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6354    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6356    break 2
6357  fi
6358done
6359  done
6360IFS=$as_save_IFS
6361
6362  ;;
6363esac
6364fi
6365COMM=$ac_cv_path_COMM
6366if test -n "$COMM"; then
6367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6368$as_echo "$COMM" >&6; }
6369else
6370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6371$as_echo "no" >&6; }
6372fi
6373
6374
6375  test -n "$COMM" && break
6376done
6377
6378    else
6379      # If it succeeded, then it was overridden by the user. We will use it
6380      # for the tool.
6381
6382      # First remove it from the list of overridden variables, so we can test
6383      # for unknown variables in the end.
6384      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6385
6386      # Check if we try to supply an empty value
6387      if test "x$COMM" = x; then
6388        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6389$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6390        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6391$as_echo_n "checking for COMM... " >&6; }
6392        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6393$as_echo "disabled" >&6; }
6394      else
6395        # Check if the provided tool contains a complete path.
6396        tool_specified="$COMM"
6397        tool_basename="${tool_specified##*/}"
6398        if test "x$tool_basename" = "x$tool_specified"; then
6399          # A command without a complete path is provided, search $PATH.
6400          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6401$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6402          # Extract the first word of "$tool_basename", so it can be a program name with args.
6403set dummy $tool_basename; ac_word=$2
6404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6405$as_echo_n "checking for $ac_word... " >&6; }
6406if ${ac_cv_path_COMM+:} false; then :
6407  $as_echo_n "(cached) " >&6
6408else
6409  case $COMM in
6410  [\\/]* | ?:[\\/]*)
6411  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6412  ;;
6413  *)
6414  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6415for as_dir in $PATH
6416do
6417  IFS=$as_save_IFS
6418  test -z "$as_dir" && as_dir=.
6419    for ac_exec_ext in '' $ac_executable_extensions; do
6420  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6421    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6422    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6423    break 2
6424  fi
6425done
6426  done
6427IFS=$as_save_IFS
6428
6429  ;;
6430esac
6431fi
6432COMM=$ac_cv_path_COMM
6433if test -n "$COMM"; then
6434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6435$as_echo "$COMM" >&6; }
6436else
6437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6438$as_echo "no" >&6; }
6439fi
6440
6441
6442          if test "x$COMM" = x; then
6443            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6444          fi
6445        else
6446          # Otherwise we believe it is a complete path. Use it as it is.
6447          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6448$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6449          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6450$as_echo_n "checking for COMM... " >&6; }
6451          if test ! -x "$tool_specified"; then
6452            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6453$as_echo "not found" >&6; }
6454            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6455          fi
6456          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6457$as_echo "$tool_specified" >&6; }
6458        fi
6459      fi
6460    fi
6461
6462  fi
6463
6464
6465
6466  if test "x$COMM" = x; then
6467    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6468  fi
6469
6470
6471
6472
6473
6474  # Publish this variable in the help.
6475
6476
6477  if [ -z "${CP+x}" ]; then
6478    # The variable is not set by user, try to locate tool using the code snippet
6479    for ac_prog in cp
6480do
6481  # Extract the first word of "$ac_prog", so it can be a program name with args.
6482set dummy $ac_prog; ac_word=$2
6483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6484$as_echo_n "checking for $ac_word... " >&6; }
6485if ${ac_cv_path_CP+:} false; then :
6486  $as_echo_n "(cached) " >&6
6487else
6488  case $CP in
6489  [\\/]* | ?:[\\/]*)
6490  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6491  ;;
6492  *)
6493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6494for as_dir in $PATH
6495do
6496  IFS=$as_save_IFS
6497  test -z "$as_dir" && as_dir=.
6498    for ac_exec_ext in '' $ac_executable_extensions; do
6499  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6500    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6502    break 2
6503  fi
6504done
6505  done
6506IFS=$as_save_IFS
6507
6508  ;;
6509esac
6510fi
6511CP=$ac_cv_path_CP
6512if test -n "$CP"; then
6513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6514$as_echo "$CP" >&6; }
6515else
6516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6517$as_echo "no" >&6; }
6518fi
6519
6520
6521  test -n "$CP" && break
6522done
6523
6524  else
6525    # The variable is set, but is it from the command line or the environment?
6526
6527    # Try to remove the string !CP! from our list.
6528    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6529    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6530      # If it failed, the variable was not from the command line. Ignore it,
6531      # but warn the user (except for BASH, which is always set by the calling BASH).
6532      if test "xCP" != xBASH; then
6533        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6534$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6535      fi
6536      # Try to locate tool using the code snippet
6537      for ac_prog in cp
6538do
6539  # Extract the first word of "$ac_prog", so it can be a program name with args.
6540set dummy $ac_prog; ac_word=$2
6541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6542$as_echo_n "checking for $ac_word... " >&6; }
6543if ${ac_cv_path_CP+:} false; then :
6544  $as_echo_n "(cached) " >&6
6545else
6546  case $CP in
6547  [\\/]* | ?:[\\/]*)
6548  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6549  ;;
6550  *)
6551  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6552for as_dir in $PATH
6553do
6554  IFS=$as_save_IFS
6555  test -z "$as_dir" && as_dir=.
6556    for ac_exec_ext in '' $ac_executable_extensions; do
6557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6558    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6560    break 2
6561  fi
6562done
6563  done
6564IFS=$as_save_IFS
6565
6566  ;;
6567esac
6568fi
6569CP=$ac_cv_path_CP
6570if test -n "$CP"; then
6571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6572$as_echo "$CP" >&6; }
6573else
6574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6575$as_echo "no" >&6; }
6576fi
6577
6578
6579  test -n "$CP" && break
6580done
6581
6582    else
6583      # If it succeeded, then it was overridden by the user. We will use it
6584      # for the tool.
6585
6586      # First remove it from the list of overridden variables, so we can test
6587      # for unknown variables in the end.
6588      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6589
6590      # Check if we try to supply an empty value
6591      if test "x$CP" = x; then
6592        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6593$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6594        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6595$as_echo_n "checking for CP... " >&6; }
6596        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6597$as_echo "disabled" >&6; }
6598      else
6599        # Check if the provided tool contains a complete path.
6600        tool_specified="$CP"
6601        tool_basename="${tool_specified##*/}"
6602        if test "x$tool_basename" = "x$tool_specified"; then
6603          # A command without a complete path is provided, search $PATH.
6604          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6605$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6606          # Extract the first word of "$tool_basename", so it can be a program name with args.
6607set dummy $tool_basename; ac_word=$2
6608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6609$as_echo_n "checking for $ac_word... " >&6; }
6610if ${ac_cv_path_CP+:} false; then :
6611  $as_echo_n "(cached) " >&6
6612else
6613  case $CP in
6614  [\\/]* | ?:[\\/]*)
6615  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6616  ;;
6617  *)
6618  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6619for as_dir in $PATH
6620do
6621  IFS=$as_save_IFS
6622  test -z "$as_dir" && as_dir=.
6623    for ac_exec_ext in '' $ac_executable_extensions; do
6624  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6625    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6626    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6627    break 2
6628  fi
6629done
6630  done
6631IFS=$as_save_IFS
6632
6633  ;;
6634esac
6635fi
6636CP=$ac_cv_path_CP
6637if test -n "$CP"; then
6638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6639$as_echo "$CP" >&6; }
6640else
6641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6642$as_echo "no" >&6; }
6643fi
6644
6645
6646          if test "x$CP" = x; then
6647            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6648          fi
6649        else
6650          # Otherwise we believe it is a complete path. Use it as it is.
6651          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6652$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6653          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6654$as_echo_n "checking for CP... " >&6; }
6655          if test ! -x "$tool_specified"; then
6656            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6657$as_echo "not found" >&6; }
6658            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6659          fi
6660          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6661$as_echo "$tool_specified" >&6; }
6662        fi
6663      fi
6664    fi
6665
6666  fi
6667
6668
6669
6670  if test "x$CP" = x; then
6671    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6672  fi
6673
6674
6675
6676
6677
6678  # Publish this variable in the help.
6679
6680
6681  if [ -z "${CUT+x}" ]; then
6682    # The variable is not set by user, try to locate tool using the code snippet
6683    for ac_prog in cut
6684do
6685  # Extract the first word of "$ac_prog", so it can be a program name with args.
6686set dummy $ac_prog; ac_word=$2
6687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6688$as_echo_n "checking for $ac_word... " >&6; }
6689if ${ac_cv_path_CUT+:} false; then :
6690  $as_echo_n "(cached) " >&6
6691else
6692  case $CUT in
6693  [\\/]* | ?:[\\/]*)
6694  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6695  ;;
6696  *)
6697  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6698for as_dir in $PATH
6699do
6700  IFS=$as_save_IFS
6701  test -z "$as_dir" && as_dir=.
6702    for ac_exec_ext in '' $ac_executable_extensions; do
6703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6704    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6706    break 2
6707  fi
6708done
6709  done
6710IFS=$as_save_IFS
6711
6712  ;;
6713esac
6714fi
6715CUT=$ac_cv_path_CUT
6716if test -n "$CUT"; then
6717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6718$as_echo "$CUT" >&6; }
6719else
6720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6721$as_echo "no" >&6; }
6722fi
6723
6724
6725  test -n "$CUT" && break
6726done
6727
6728  else
6729    # The variable is set, but is it from the command line or the environment?
6730
6731    # Try to remove the string !CUT! from our list.
6732    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6733    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6734      # If it failed, the variable was not from the command line. Ignore it,
6735      # but warn the user (except for BASH, which is always set by the calling BASH).
6736      if test "xCUT" != xBASH; then
6737        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6738$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6739      fi
6740      # Try to locate tool using the code snippet
6741      for ac_prog in cut
6742do
6743  # Extract the first word of "$ac_prog", so it can be a program name with args.
6744set dummy $ac_prog; ac_word=$2
6745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6746$as_echo_n "checking for $ac_word... " >&6; }
6747if ${ac_cv_path_CUT+:} false; then :
6748  $as_echo_n "(cached) " >&6
6749else
6750  case $CUT in
6751  [\\/]* | ?:[\\/]*)
6752  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6753  ;;
6754  *)
6755  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6756for as_dir in $PATH
6757do
6758  IFS=$as_save_IFS
6759  test -z "$as_dir" && as_dir=.
6760    for ac_exec_ext in '' $ac_executable_extensions; do
6761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6762    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6764    break 2
6765  fi
6766done
6767  done
6768IFS=$as_save_IFS
6769
6770  ;;
6771esac
6772fi
6773CUT=$ac_cv_path_CUT
6774if test -n "$CUT"; then
6775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6776$as_echo "$CUT" >&6; }
6777else
6778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6779$as_echo "no" >&6; }
6780fi
6781
6782
6783  test -n "$CUT" && break
6784done
6785
6786    else
6787      # If it succeeded, then it was overridden by the user. We will use it
6788      # for the tool.
6789
6790      # First remove it from the list of overridden variables, so we can test
6791      # for unknown variables in the end.
6792      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6793
6794      # Check if we try to supply an empty value
6795      if test "x$CUT" = x; then
6796        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6797$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6798        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6799$as_echo_n "checking for CUT... " >&6; }
6800        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6801$as_echo "disabled" >&6; }
6802      else
6803        # Check if the provided tool contains a complete path.
6804        tool_specified="$CUT"
6805        tool_basename="${tool_specified##*/}"
6806        if test "x$tool_basename" = "x$tool_specified"; then
6807          # A command without a complete path is provided, search $PATH.
6808          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6809$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6810          # Extract the first word of "$tool_basename", so it can be a program name with args.
6811set dummy $tool_basename; ac_word=$2
6812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6813$as_echo_n "checking for $ac_word... " >&6; }
6814if ${ac_cv_path_CUT+:} false; then :
6815  $as_echo_n "(cached) " >&6
6816else
6817  case $CUT in
6818  [\\/]* | ?:[\\/]*)
6819  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6820  ;;
6821  *)
6822  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6823for as_dir in $PATH
6824do
6825  IFS=$as_save_IFS
6826  test -z "$as_dir" && as_dir=.
6827    for ac_exec_ext in '' $ac_executable_extensions; do
6828  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6829    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6830    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6831    break 2
6832  fi
6833done
6834  done
6835IFS=$as_save_IFS
6836
6837  ;;
6838esac
6839fi
6840CUT=$ac_cv_path_CUT
6841if test -n "$CUT"; then
6842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6843$as_echo "$CUT" >&6; }
6844else
6845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6846$as_echo "no" >&6; }
6847fi
6848
6849
6850          if test "x$CUT" = x; then
6851            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6852          fi
6853        else
6854          # Otherwise we believe it is a complete path. Use it as it is.
6855          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6856$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6857          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6858$as_echo_n "checking for CUT... " >&6; }
6859          if test ! -x "$tool_specified"; then
6860            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6861$as_echo "not found" >&6; }
6862            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6863          fi
6864          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6865$as_echo "$tool_specified" >&6; }
6866        fi
6867      fi
6868    fi
6869
6870  fi
6871
6872
6873
6874  if test "x$CUT" = x; then
6875    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6876  fi
6877
6878
6879
6880
6881
6882  # Publish this variable in the help.
6883
6884
6885  if [ -z "${DATE+x}" ]; then
6886    # The variable is not set by user, try to locate tool using the code snippet
6887    for ac_prog in date
6888do
6889  # Extract the first word of "$ac_prog", so it can be a program name with args.
6890set dummy $ac_prog; ac_word=$2
6891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6892$as_echo_n "checking for $ac_word... " >&6; }
6893if ${ac_cv_path_DATE+:} false; then :
6894  $as_echo_n "(cached) " >&6
6895else
6896  case $DATE in
6897  [\\/]* | ?:[\\/]*)
6898  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6899  ;;
6900  *)
6901  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6902for as_dir in $PATH
6903do
6904  IFS=$as_save_IFS
6905  test -z "$as_dir" && as_dir=.
6906    for ac_exec_ext in '' $ac_executable_extensions; do
6907  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6908    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6910    break 2
6911  fi
6912done
6913  done
6914IFS=$as_save_IFS
6915
6916  ;;
6917esac
6918fi
6919DATE=$ac_cv_path_DATE
6920if test -n "$DATE"; then
6921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6922$as_echo "$DATE" >&6; }
6923else
6924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6925$as_echo "no" >&6; }
6926fi
6927
6928
6929  test -n "$DATE" && break
6930done
6931
6932  else
6933    # The variable is set, but is it from the command line or the environment?
6934
6935    # Try to remove the string !DATE! from our list.
6936    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6937    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6938      # If it failed, the variable was not from the command line. Ignore it,
6939      # but warn the user (except for BASH, which is always set by the calling BASH).
6940      if test "xDATE" != xBASH; then
6941        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6942$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6943      fi
6944      # Try to locate tool using the code snippet
6945      for ac_prog in date
6946do
6947  # Extract the first word of "$ac_prog", so it can be a program name with args.
6948set dummy $ac_prog; ac_word=$2
6949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6950$as_echo_n "checking for $ac_word... " >&6; }
6951if ${ac_cv_path_DATE+:} false; then :
6952  $as_echo_n "(cached) " >&6
6953else
6954  case $DATE in
6955  [\\/]* | ?:[\\/]*)
6956  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6957  ;;
6958  *)
6959  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6960for as_dir in $PATH
6961do
6962  IFS=$as_save_IFS
6963  test -z "$as_dir" && as_dir=.
6964    for ac_exec_ext in '' $ac_executable_extensions; do
6965  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6966    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6967    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6968    break 2
6969  fi
6970done
6971  done
6972IFS=$as_save_IFS
6973
6974  ;;
6975esac
6976fi
6977DATE=$ac_cv_path_DATE
6978if test -n "$DATE"; then
6979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6980$as_echo "$DATE" >&6; }
6981else
6982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6983$as_echo "no" >&6; }
6984fi
6985
6986
6987  test -n "$DATE" && break
6988done
6989
6990    else
6991      # If it succeeded, then it was overridden by the user. We will use it
6992      # for the tool.
6993
6994      # First remove it from the list of overridden variables, so we can test
6995      # for unknown variables in the end.
6996      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6997
6998      # Check if we try to supply an empty value
6999      if test "x$DATE" = x; then
7000        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
7001$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
7002        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
7003$as_echo_n "checking for DATE... " >&6; }
7004        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7005$as_echo "disabled" >&6; }
7006      else
7007        # Check if the provided tool contains a complete path.
7008        tool_specified="$DATE"
7009        tool_basename="${tool_specified##*/}"
7010        if test "x$tool_basename" = "x$tool_specified"; then
7011          # A command without a complete path is provided, search $PATH.
7012          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
7013$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
7014          # Extract the first word of "$tool_basename", so it can be a program name with args.
7015set dummy $tool_basename; ac_word=$2
7016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7017$as_echo_n "checking for $ac_word... " >&6; }
7018if ${ac_cv_path_DATE+:} false; then :
7019  $as_echo_n "(cached) " >&6
7020else
7021  case $DATE in
7022  [\\/]* | ?:[\\/]*)
7023  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
7024  ;;
7025  *)
7026  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7027for as_dir in $PATH
7028do
7029  IFS=$as_save_IFS
7030  test -z "$as_dir" && as_dir=.
7031    for ac_exec_ext in '' $ac_executable_extensions; do
7032  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7033    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
7034    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7035    break 2
7036  fi
7037done
7038  done
7039IFS=$as_save_IFS
7040
7041  ;;
7042esac
7043fi
7044DATE=$ac_cv_path_DATE
7045if test -n "$DATE"; then
7046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
7047$as_echo "$DATE" >&6; }
7048else
7049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7050$as_echo "no" >&6; }
7051fi
7052
7053
7054          if test "x$DATE" = x; then
7055            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7056          fi
7057        else
7058          # Otherwise we believe it is a complete path. Use it as it is.
7059          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
7060$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
7061          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
7062$as_echo_n "checking for DATE... " >&6; }
7063          if test ! -x "$tool_specified"; then
7064            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7065$as_echo "not found" >&6; }
7066            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
7067          fi
7068          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7069$as_echo "$tool_specified" >&6; }
7070        fi
7071      fi
7072    fi
7073
7074  fi
7075
7076
7077
7078  if test "x$DATE" = x; then
7079    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
7080  fi
7081
7082
7083
7084
7085
7086  # Publish this variable in the help.
7087
7088
7089  if [ -z "${DIFF+x}" ]; then
7090    # The variable is not set by user, try to locate tool using the code snippet
7091    for ac_prog in gdiff diff
7092do
7093  # Extract the first word of "$ac_prog", so it can be a program name with args.
7094set dummy $ac_prog; ac_word=$2
7095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7096$as_echo_n "checking for $ac_word... " >&6; }
7097if ${ac_cv_path_DIFF+:} false; then :
7098  $as_echo_n "(cached) " >&6
7099else
7100  case $DIFF in
7101  [\\/]* | ?:[\\/]*)
7102  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7103  ;;
7104  *)
7105  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7106for as_dir in $PATH
7107do
7108  IFS=$as_save_IFS
7109  test -z "$as_dir" && as_dir=.
7110    for ac_exec_ext in '' $ac_executable_extensions; do
7111  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7112    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7113    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7114    break 2
7115  fi
7116done
7117  done
7118IFS=$as_save_IFS
7119
7120  ;;
7121esac
7122fi
7123DIFF=$ac_cv_path_DIFF
7124if test -n "$DIFF"; then
7125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7126$as_echo "$DIFF" >&6; }
7127else
7128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7129$as_echo "no" >&6; }
7130fi
7131
7132
7133  test -n "$DIFF" && break
7134done
7135
7136  else
7137    # The variable is set, but is it from the command line or the environment?
7138
7139    # Try to remove the string !DIFF! from our list.
7140    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7141    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7142      # If it failed, the variable was not from the command line. Ignore it,
7143      # but warn the user (except for BASH, which is always set by the calling BASH).
7144      if test "xDIFF" != xBASH; then
7145        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7146$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7147      fi
7148      # Try to locate tool using the code snippet
7149      for ac_prog in gdiff diff
7150do
7151  # Extract the first word of "$ac_prog", so it can be a program name with args.
7152set dummy $ac_prog; ac_word=$2
7153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7154$as_echo_n "checking for $ac_word... " >&6; }
7155if ${ac_cv_path_DIFF+:} false; then :
7156  $as_echo_n "(cached) " >&6
7157else
7158  case $DIFF in
7159  [\\/]* | ?:[\\/]*)
7160  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7161  ;;
7162  *)
7163  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7164for as_dir in $PATH
7165do
7166  IFS=$as_save_IFS
7167  test -z "$as_dir" && as_dir=.
7168    for ac_exec_ext in '' $ac_executable_extensions; do
7169  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7170    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7172    break 2
7173  fi
7174done
7175  done
7176IFS=$as_save_IFS
7177
7178  ;;
7179esac
7180fi
7181DIFF=$ac_cv_path_DIFF
7182if test -n "$DIFF"; then
7183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7184$as_echo "$DIFF" >&6; }
7185else
7186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7187$as_echo "no" >&6; }
7188fi
7189
7190
7191  test -n "$DIFF" && break
7192done
7193
7194    else
7195      # If it succeeded, then it was overridden by the user. We will use it
7196      # for the tool.
7197
7198      # First remove it from the list of overridden variables, so we can test
7199      # for unknown variables in the end.
7200      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7201
7202      # Check if we try to supply an empty value
7203      if test "x$DIFF" = x; then
7204        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7205$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7206        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7207$as_echo_n "checking for DIFF... " >&6; }
7208        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7209$as_echo "disabled" >&6; }
7210      else
7211        # Check if the provided tool contains a complete path.
7212        tool_specified="$DIFF"
7213        tool_basename="${tool_specified##*/}"
7214        if test "x$tool_basename" = "x$tool_specified"; then
7215          # A command without a complete path is provided, search $PATH.
7216          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7217$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7218          # Extract the first word of "$tool_basename", so it can be a program name with args.
7219set dummy $tool_basename; ac_word=$2
7220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7221$as_echo_n "checking for $ac_word... " >&6; }
7222if ${ac_cv_path_DIFF+:} false; then :
7223  $as_echo_n "(cached) " >&6
7224else
7225  case $DIFF in
7226  [\\/]* | ?:[\\/]*)
7227  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7228  ;;
7229  *)
7230  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7231for as_dir in $PATH
7232do
7233  IFS=$as_save_IFS
7234  test -z "$as_dir" && as_dir=.
7235    for ac_exec_ext in '' $ac_executable_extensions; do
7236  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7237    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7239    break 2
7240  fi
7241done
7242  done
7243IFS=$as_save_IFS
7244
7245  ;;
7246esac
7247fi
7248DIFF=$ac_cv_path_DIFF
7249if test -n "$DIFF"; then
7250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7251$as_echo "$DIFF" >&6; }
7252else
7253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7254$as_echo "no" >&6; }
7255fi
7256
7257
7258          if test "x$DIFF" = x; then
7259            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7260          fi
7261        else
7262          # Otherwise we believe it is a complete path. Use it as it is.
7263          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7264$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7265          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7266$as_echo_n "checking for DIFF... " >&6; }
7267          if test ! -x "$tool_specified"; then
7268            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7269$as_echo "not found" >&6; }
7270            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7271          fi
7272          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7273$as_echo "$tool_specified" >&6; }
7274        fi
7275      fi
7276    fi
7277
7278  fi
7279
7280
7281
7282  if test "x$DIFF" = x; then
7283    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7284  fi
7285
7286
7287
7288
7289
7290  # Publish this variable in the help.
7291
7292
7293  if [ -z "${DIRNAME+x}" ]; then
7294    # The variable is not set by user, try to locate tool using the code snippet
7295    for ac_prog in dirname
7296do
7297  # Extract the first word of "$ac_prog", so it can be a program name with args.
7298set dummy $ac_prog; ac_word=$2
7299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7300$as_echo_n "checking for $ac_word... " >&6; }
7301if ${ac_cv_path_DIRNAME+:} false; then :
7302  $as_echo_n "(cached) " >&6
7303else
7304  case $DIRNAME in
7305  [\\/]* | ?:[\\/]*)
7306  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7307  ;;
7308  *)
7309  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7310for as_dir in $PATH
7311do
7312  IFS=$as_save_IFS
7313  test -z "$as_dir" && as_dir=.
7314    for ac_exec_ext in '' $ac_executable_extensions; do
7315  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7316    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7317    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7318    break 2
7319  fi
7320done
7321  done
7322IFS=$as_save_IFS
7323
7324  ;;
7325esac
7326fi
7327DIRNAME=$ac_cv_path_DIRNAME
7328if test -n "$DIRNAME"; then
7329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7330$as_echo "$DIRNAME" >&6; }
7331else
7332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7333$as_echo "no" >&6; }
7334fi
7335
7336
7337  test -n "$DIRNAME" && break
7338done
7339
7340  else
7341    # The variable is set, but is it from the command line or the environment?
7342
7343    # Try to remove the string !DIRNAME! from our list.
7344    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7345    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7346      # If it failed, the variable was not from the command line. Ignore it,
7347      # but warn the user (except for BASH, which is always set by the calling BASH).
7348      if test "xDIRNAME" != xBASH; then
7349        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7350$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7351      fi
7352      # Try to locate tool using the code snippet
7353      for ac_prog in dirname
7354do
7355  # Extract the first word of "$ac_prog", so it can be a program name with args.
7356set dummy $ac_prog; ac_word=$2
7357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7358$as_echo_n "checking for $ac_word... " >&6; }
7359if ${ac_cv_path_DIRNAME+:} false; then :
7360  $as_echo_n "(cached) " >&6
7361else
7362  case $DIRNAME in
7363  [\\/]* | ?:[\\/]*)
7364  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7365  ;;
7366  *)
7367  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7368for as_dir in $PATH
7369do
7370  IFS=$as_save_IFS
7371  test -z "$as_dir" && as_dir=.
7372    for ac_exec_ext in '' $ac_executable_extensions; do
7373  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7374    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7376    break 2
7377  fi
7378done
7379  done
7380IFS=$as_save_IFS
7381
7382  ;;
7383esac
7384fi
7385DIRNAME=$ac_cv_path_DIRNAME
7386if test -n "$DIRNAME"; then
7387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7388$as_echo "$DIRNAME" >&6; }
7389else
7390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7391$as_echo "no" >&6; }
7392fi
7393
7394
7395  test -n "$DIRNAME" && break
7396done
7397
7398    else
7399      # If it succeeded, then it was overridden by the user. We will use it
7400      # for the tool.
7401
7402      # First remove it from the list of overridden variables, so we can test
7403      # for unknown variables in the end.
7404      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7405
7406      # Check if we try to supply an empty value
7407      if test "x$DIRNAME" = x; then
7408        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7409$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7410        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7411$as_echo_n "checking for DIRNAME... " >&6; }
7412        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7413$as_echo "disabled" >&6; }
7414      else
7415        # Check if the provided tool contains a complete path.
7416        tool_specified="$DIRNAME"
7417        tool_basename="${tool_specified##*/}"
7418        if test "x$tool_basename" = "x$tool_specified"; then
7419          # A command without a complete path is provided, search $PATH.
7420          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7421$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7422          # Extract the first word of "$tool_basename", so it can be a program name with args.
7423set dummy $tool_basename; ac_word=$2
7424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7425$as_echo_n "checking for $ac_word... " >&6; }
7426if ${ac_cv_path_DIRNAME+:} false; then :
7427  $as_echo_n "(cached) " >&6
7428else
7429  case $DIRNAME in
7430  [\\/]* | ?:[\\/]*)
7431  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7432  ;;
7433  *)
7434  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7435for as_dir in $PATH
7436do
7437  IFS=$as_save_IFS
7438  test -z "$as_dir" && as_dir=.
7439    for ac_exec_ext in '' $ac_executable_extensions; do
7440  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7441    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7442    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7443    break 2
7444  fi
7445done
7446  done
7447IFS=$as_save_IFS
7448
7449  ;;
7450esac
7451fi
7452DIRNAME=$ac_cv_path_DIRNAME
7453if test -n "$DIRNAME"; then
7454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7455$as_echo "$DIRNAME" >&6; }
7456else
7457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7458$as_echo "no" >&6; }
7459fi
7460
7461
7462          if test "x$DIRNAME" = x; then
7463            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7464          fi
7465        else
7466          # Otherwise we believe it is a complete path. Use it as it is.
7467          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7468$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7469          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7470$as_echo_n "checking for DIRNAME... " >&6; }
7471          if test ! -x "$tool_specified"; then
7472            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7473$as_echo "not found" >&6; }
7474            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7475          fi
7476          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7477$as_echo "$tool_specified" >&6; }
7478        fi
7479      fi
7480    fi
7481
7482  fi
7483
7484
7485
7486  if test "x$DIRNAME" = x; then
7487    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7488  fi
7489
7490
7491
7492
7493
7494  # Publish this variable in the help.
7495
7496
7497  if [ -z "${ECHO+x}" ]; then
7498    # The variable is not set by user, try to locate tool using the code snippet
7499    for ac_prog in echo
7500do
7501  # Extract the first word of "$ac_prog", so it can be a program name with args.
7502set dummy $ac_prog; ac_word=$2
7503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7504$as_echo_n "checking for $ac_word... " >&6; }
7505if ${ac_cv_path_ECHO+:} false; then :
7506  $as_echo_n "(cached) " >&6
7507else
7508  case $ECHO in
7509  [\\/]* | ?:[\\/]*)
7510  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7511  ;;
7512  *)
7513  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7514for as_dir in $PATH
7515do
7516  IFS=$as_save_IFS
7517  test -z "$as_dir" && as_dir=.
7518    for ac_exec_ext in '' $ac_executable_extensions; do
7519  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7520    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7521    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7522    break 2
7523  fi
7524done
7525  done
7526IFS=$as_save_IFS
7527
7528  ;;
7529esac
7530fi
7531ECHO=$ac_cv_path_ECHO
7532if test -n "$ECHO"; then
7533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7534$as_echo "$ECHO" >&6; }
7535else
7536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7537$as_echo "no" >&6; }
7538fi
7539
7540
7541  test -n "$ECHO" && break
7542done
7543
7544  else
7545    # The variable is set, but is it from the command line or the environment?
7546
7547    # Try to remove the string !ECHO! from our list.
7548    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7549    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7550      # If it failed, the variable was not from the command line. Ignore it,
7551      # but warn the user (except for BASH, which is always set by the calling BASH).
7552      if test "xECHO" != xBASH; then
7553        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7554$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7555      fi
7556      # Try to locate tool using the code snippet
7557      for ac_prog in echo
7558do
7559  # Extract the first word of "$ac_prog", so it can be a program name with args.
7560set dummy $ac_prog; ac_word=$2
7561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7562$as_echo_n "checking for $ac_word... " >&6; }
7563if ${ac_cv_path_ECHO+:} false; then :
7564  $as_echo_n "(cached) " >&6
7565else
7566  case $ECHO in
7567  [\\/]* | ?:[\\/]*)
7568  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7569  ;;
7570  *)
7571  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7572for as_dir in $PATH
7573do
7574  IFS=$as_save_IFS
7575  test -z "$as_dir" && as_dir=.
7576    for ac_exec_ext in '' $ac_executable_extensions; do
7577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7578    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7580    break 2
7581  fi
7582done
7583  done
7584IFS=$as_save_IFS
7585
7586  ;;
7587esac
7588fi
7589ECHO=$ac_cv_path_ECHO
7590if test -n "$ECHO"; then
7591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7592$as_echo "$ECHO" >&6; }
7593else
7594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7595$as_echo "no" >&6; }
7596fi
7597
7598
7599  test -n "$ECHO" && break
7600done
7601
7602    else
7603      # If it succeeded, then it was overridden by the user. We will use it
7604      # for the tool.
7605
7606      # First remove it from the list of overridden variables, so we can test
7607      # for unknown variables in the end.
7608      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7609
7610      # Check if we try to supply an empty value
7611      if test "x$ECHO" = x; then
7612        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7613$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7614        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7615$as_echo_n "checking for ECHO... " >&6; }
7616        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7617$as_echo "disabled" >&6; }
7618      else
7619        # Check if the provided tool contains a complete path.
7620        tool_specified="$ECHO"
7621        tool_basename="${tool_specified##*/}"
7622        if test "x$tool_basename" = "x$tool_specified"; then
7623          # A command without a complete path is provided, search $PATH.
7624          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7625$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7626          # Extract the first word of "$tool_basename", so it can be a program name with args.
7627set dummy $tool_basename; ac_word=$2
7628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7629$as_echo_n "checking for $ac_word... " >&6; }
7630if ${ac_cv_path_ECHO+:} false; then :
7631  $as_echo_n "(cached) " >&6
7632else
7633  case $ECHO in
7634  [\\/]* | ?:[\\/]*)
7635  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7636  ;;
7637  *)
7638  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7639for as_dir in $PATH
7640do
7641  IFS=$as_save_IFS
7642  test -z "$as_dir" && as_dir=.
7643    for ac_exec_ext in '' $ac_executable_extensions; do
7644  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7645    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7646    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7647    break 2
7648  fi
7649done
7650  done
7651IFS=$as_save_IFS
7652
7653  ;;
7654esac
7655fi
7656ECHO=$ac_cv_path_ECHO
7657if test -n "$ECHO"; then
7658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7659$as_echo "$ECHO" >&6; }
7660else
7661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7662$as_echo "no" >&6; }
7663fi
7664
7665
7666          if test "x$ECHO" = x; then
7667            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7668          fi
7669        else
7670          # Otherwise we believe it is a complete path. Use it as it is.
7671          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7672$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7673          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7674$as_echo_n "checking for ECHO... " >&6; }
7675          if test ! -x "$tool_specified"; then
7676            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7677$as_echo "not found" >&6; }
7678            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7679          fi
7680          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7681$as_echo "$tool_specified" >&6; }
7682        fi
7683      fi
7684    fi
7685
7686  fi
7687
7688
7689
7690  if test "x$ECHO" = x; then
7691    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7692  fi
7693
7694
7695
7696
7697
7698  # Publish this variable in the help.
7699
7700
7701  if [ -z "${EXPR+x}" ]; then
7702    # The variable is not set by user, try to locate tool using the code snippet
7703    for ac_prog in expr
7704do
7705  # Extract the first word of "$ac_prog", so it can be a program name with args.
7706set dummy $ac_prog; ac_word=$2
7707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7708$as_echo_n "checking for $ac_word... " >&6; }
7709if ${ac_cv_path_EXPR+:} false; then :
7710  $as_echo_n "(cached) " >&6
7711else
7712  case $EXPR in
7713  [\\/]* | ?:[\\/]*)
7714  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7715  ;;
7716  *)
7717  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7718for as_dir in $PATH
7719do
7720  IFS=$as_save_IFS
7721  test -z "$as_dir" && as_dir=.
7722    for ac_exec_ext in '' $ac_executable_extensions; do
7723  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7724    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7726    break 2
7727  fi
7728done
7729  done
7730IFS=$as_save_IFS
7731
7732  ;;
7733esac
7734fi
7735EXPR=$ac_cv_path_EXPR
7736if test -n "$EXPR"; then
7737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7738$as_echo "$EXPR" >&6; }
7739else
7740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7741$as_echo "no" >&6; }
7742fi
7743
7744
7745  test -n "$EXPR" && break
7746done
7747
7748  else
7749    # The variable is set, but is it from the command line or the environment?
7750
7751    # Try to remove the string !EXPR! from our list.
7752    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7753    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7754      # If it failed, the variable was not from the command line. Ignore it,
7755      # but warn the user (except for BASH, which is always set by the calling BASH).
7756      if test "xEXPR" != xBASH; then
7757        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7758$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7759      fi
7760      # Try to locate tool using the code snippet
7761      for ac_prog in expr
7762do
7763  # Extract the first word of "$ac_prog", so it can be a program name with args.
7764set dummy $ac_prog; ac_word=$2
7765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7766$as_echo_n "checking for $ac_word... " >&6; }
7767if ${ac_cv_path_EXPR+:} false; then :
7768  $as_echo_n "(cached) " >&6
7769else
7770  case $EXPR in
7771  [\\/]* | ?:[\\/]*)
7772  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7773  ;;
7774  *)
7775  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7776for as_dir in $PATH
7777do
7778  IFS=$as_save_IFS
7779  test -z "$as_dir" && as_dir=.
7780    for ac_exec_ext in '' $ac_executable_extensions; do
7781  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7782    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7783    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7784    break 2
7785  fi
7786done
7787  done
7788IFS=$as_save_IFS
7789
7790  ;;
7791esac
7792fi
7793EXPR=$ac_cv_path_EXPR
7794if test -n "$EXPR"; then
7795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7796$as_echo "$EXPR" >&6; }
7797else
7798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7799$as_echo "no" >&6; }
7800fi
7801
7802
7803  test -n "$EXPR" && break
7804done
7805
7806    else
7807      # If it succeeded, then it was overridden by the user. We will use it
7808      # for the tool.
7809
7810      # First remove it from the list of overridden variables, so we can test
7811      # for unknown variables in the end.
7812      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7813
7814      # Check if we try to supply an empty value
7815      if test "x$EXPR" = x; then
7816        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7817$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7818        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7819$as_echo_n "checking for EXPR... " >&6; }
7820        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7821$as_echo "disabled" >&6; }
7822      else
7823        # Check if the provided tool contains a complete path.
7824        tool_specified="$EXPR"
7825        tool_basename="${tool_specified##*/}"
7826        if test "x$tool_basename" = "x$tool_specified"; then
7827          # A command without a complete path is provided, search $PATH.
7828          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7829$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7830          # Extract the first word of "$tool_basename", so it can be a program name with args.
7831set dummy $tool_basename; ac_word=$2
7832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7833$as_echo_n "checking for $ac_word... " >&6; }
7834if ${ac_cv_path_EXPR+:} false; then :
7835  $as_echo_n "(cached) " >&6
7836else
7837  case $EXPR in
7838  [\\/]* | ?:[\\/]*)
7839  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7840  ;;
7841  *)
7842  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7843for as_dir in $PATH
7844do
7845  IFS=$as_save_IFS
7846  test -z "$as_dir" && as_dir=.
7847    for ac_exec_ext in '' $ac_executable_extensions; do
7848  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7849    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7851    break 2
7852  fi
7853done
7854  done
7855IFS=$as_save_IFS
7856
7857  ;;
7858esac
7859fi
7860EXPR=$ac_cv_path_EXPR
7861if test -n "$EXPR"; then
7862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7863$as_echo "$EXPR" >&6; }
7864else
7865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7866$as_echo "no" >&6; }
7867fi
7868
7869
7870          if test "x$EXPR" = x; then
7871            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7872          fi
7873        else
7874          # Otherwise we believe it is a complete path. Use it as it is.
7875          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7876$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7877          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7878$as_echo_n "checking for EXPR... " >&6; }
7879          if test ! -x "$tool_specified"; then
7880            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7881$as_echo "not found" >&6; }
7882            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7883          fi
7884          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7885$as_echo "$tool_specified" >&6; }
7886        fi
7887      fi
7888    fi
7889
7890  fi
7891
7892
7893
7894  if test "x$EXPR" = x; then
7895    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7896  fi
7897
7898
7899
7900
7901
7902  # Publish this variable in the help.
7903
7904
7905  if [ -z "${FILE+x}" ]; then
7906    # The variable is not set by user, try to locate tool using the code snippet
7907    for ac_prog in file
7908do
7909  # Extract the first word of "$ac_prog", so it can be a program name with args.
7910set dummy $ac_prog; ac_word=$2
7911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7912$as_echo_n "checking for $ac_word... " >&6; }
7913if ${ac_cv_path_FILE+:} false; then :
7914  $as_echo_n "(cached) " >&6
7915else
7916  case $FILE in
7917  [\\/]* | ?:[\\/]*)
7918  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7919  ;;
7920  *)
7921  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7922for as_dir in $PATH
7923do
7924  IFS=$as_save_IFS
7925  test -z "$as_dir" && as_dir=.
7926    for ac_exec_ext in '' $ac_executable_extensions; do
7927  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7928    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7929    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7930    break 2
7931  fi
7932done
7933  done
7934IFS=$as_save_IFS
7935
7936  ;;
7937esac
7938fi
7939FILE=$ac_cv_path_FILE
7940if test -n "$FILE"; then
7941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7942$as_echo "$FILE" >&6; }
7943else
7944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7945$as_echo "no" >&6; }
7946fi
7947
7948
7949  test -n "$FILE" && break
7950done
7951
7952  else
7953    # The variable is set, but is it from the command line or the environment?
7954
7955    # Try to remove the string !FILE! from our list.
7956    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7957    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7958      # If it failed, the variable was not from the command line. Ignore it,
7959      # but warn the user (except for BASH, which is always set by the calling BASH).
7960      if test "xFILE" != xBASH; then
7961        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7962$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7963      fi
7964      # Try to locate tool using the code snippet
7965      for ac_prog in file
7966do
7967  # Extract the first word of "$ac_prog", so it can be a program name with args.
7968set dummy $ac_prog; ac_word=$2
7969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7970$as_echo_n "checking for $ac_word... " >&6; }
7971if ${ac_cv_path_FILE+:} false; then :
7972  $as_echo_n "(cached) " >&6
7973else
7974  case $FILE in
7975  [\\/]* | ?:[\\/]*)
7976  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7977  ;;
7978  *)
7979  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7980for as_dir in $PATH
7981do
7982  IFS=$as_save_IFS
7983  test -z "$as_dir" && as_dir=.
7984    for ac_exec_ext in '' $ac_executable_extensions; do
7985  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7986    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7987    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7988    break 2
7989  fi
7990done
7991  done
7992IFS=$as_save_IFS
7993
7994  ;;
7995esac
7996fi
7997FILE=$ac_cv_path_FILE
7998if test -n "$FILE"; then
7999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
8000$as_echo "$FILE" >&6; }
8001else
8002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8003$as_echo "no" >&6; }
8004fi
8005
8006
8007  test -n "$FILE" && break
8008done
8009
8010    else
8011      # If it succeeded, then it was overridden by the user. We will use it
8012      # for the tool.
8013
8014      # First remove it from the list of overridden variables, so we can test
8015      # for unknown variables in the end.
8016      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8017
8018      # Check if we try to supply an empty value
8019      if test "x$FILE" = x; then
8020        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
8021$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
8022        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8023$as_echo_n "checking for FILE... " >&6; }
8024        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8025$as_echo "disabled" >&6; }
8026      else
8027        # Check if the provided tool contains a complete path.
8028        tool_specified="$FILE"
8029        tool_basename="${tool_specified##*/}"
8030        if test "x$tool_basename" = "x$tool_specified"; then
8031          # A command without a complete path is provided, search $PATH.
8032          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
8033$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
8034          # Extract the first word of "$tool_basename", so it can be a program name with args.
8035set dummy $tool_basename; ac_word=$2
8036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8037$as_echo_n "checking for $ac_word... " >&6; }
8038if ${ac_cv_path_FILE+:} false; then :
8039  $as_echo_n "(cached) " >&6
8040else
8041  case $FILE in
8042  [\\/]* | ?:[\\/]*)
8043  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
8044  ;;
8045  *)
8046  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8047for as_dir in $PATH
8048do
8049  IFS=$as_save_IFS
8050  test -z "$as_dir" && as_dir=.
8051    for ac_exec_ext in '' $ac_executable_extensions; do
8052  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8053    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
8054    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8055    break 2
8056  fi
8057done
8058  done
8059IFS=$as_save_IFS
8060
8061  ;;
8062esac
8063fi
8064FILE=$ac_cv_path_FILE
8065if test -n "$FILE"; then
8066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
8067$as_echo "$FILE" >&6; }
8068else
8069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8070$as_echo "no" >&6; }
8071fi
8072
8073
8074          if test "x$FILE" = x; then
8075            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8076          fi
8077        else
8078          # Otherwise we believe it is a complete path. Use it as it is.
8079          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
8080$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
8081          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8082$as_echo_n "checking for FILE... " >&6; }
8083          if test ! -x "$tool_specified"; then
8084            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8085$as_echo "not found" >&6; }
8086            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
8087          fi
8088          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8089$as_echo "$tool_specified" >&6; }
8090        fi
8091      fi
8092    fi
8093
8094  fi
8095
8096
8097
8098  if test "x$FILE" = x; then
8099    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8100  fi
8101
8102
8103
8104
8105
8106  # Publish this variable in the help.
8107
8108
8109  if [ -z "${FIND+x}" ]; then
8110    # The variable is not set by user, try to locate tool using the code snippet
8111    for ac_prog in find
8112do
8113  # Extract the first word of "$ac_prog", so it can be a program name with args.
8114set dummy $ac_prog; ac_word=$2
8115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8116$as_echo_n "checking for $ac_word... " >&6; }
8117if ${ac_cv_path_FIND+:} false; then :
8118  $as_echo_n "(cached) " >&6
8119else
8120  case $FIND in
8121  [\\/]* | ?:[\\/]*)
8122  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8123  ;;
8124  *)
8125  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8126for as_dir in $PATH
8127do
8128  IFS=$as_save_IFS
8129  test -z "$as_dir" && as_dir=.
8130    for ac_exec_ext in '' $ac_executable_extensions; do
8131  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8132    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8133    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8134    break 2
8135  fi
8136done
8137  done
8138IFS=$as_save_IFS
8139
8140  ;;
8141esac
8142fi
8143FIND=$ac_cv_path_FIND
8144if test -n "$FIND"; then
8145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8146$as_echo "$FIND" >&6; }
8147else
8148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8149$as_echo "no" >&6; }
8150fi
8151
8152
8153  test -n "$FIND" && break
8154done
8155
8156  else
8157    # The variable is set, but is it from the command line or the environment?
8158
8159    # Try to remove the string !FIND! from our list.
8160    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8161    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8162      # If it failed, the variable was not from the command line. Ignore it,
8163      # but warn the user (except for BASH, which is always set by the calling BASH).
8164      if test "xFIND" != xBASH; then
8165        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8166$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8167      fi
8168      # Try to locate tool using the code snippet
8169      for ac_prog in find
8170do
8171  # Extract the first word of "$ac_prog", so it can be a program name with args.
8172set dummy $ac_prog; ac_word=$2
8173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8174$as_echo_n "checking for $ac_word... " >&6; }
8175if ${ac_cv_path_FIND+:} false; then :
8176  $as_echo_n "(cached) " >&6
8177else
8178  case $FIND in
8179  [\\/]* | ?:[\\/]*)
8180  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8181  ;;
8182  *)
8183  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8184for as_dir in $PATH
8185do
8186  IFS=$as_save_IFS
8187  test -z "$as_dir" && as_dir=.
8188    for ac_exec_ext in '' $ac_executable_extensions; do
8189  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8190    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8192    break 2
8193  fi
8194done
8195  done
8196IFS=$as_save_IFS
8197
8198  ;;
8199esac
8200fi
8201FIND=$ac_cv_path_FIND
8202if test -n "$FIND"; then
8203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8204$as_echo "$FIND" >&6; }
8205else
8206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8207$as_echo "no" >&6; }
8208fi
8209
8210
8211  test -n "$FIND" && break
8212done
8213
8214    else
8215      # If it succeeded, then it was overridden by the user. We will use it
8216      # for the tool.
8217
8218      # First remove it from the list of overridden variables, so we can test
8219      # for unknown variables in the end.
8220      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8221
8222      # Check if we try to supply an empty value
8223      if test "x$FIND" = x; then
8224        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8225$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8226        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8227$as_echo_n "checking for FIND... " >&6; }
8228        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8229$as_echo "disabled" >&6; }
8230      else
8231        # Check if the provided tool contains a complete path.
8232        tool_specified="$FIND"
8233        tool_basename="${tool_specified##*/}"
8234        if test "x$tool_basename" = "x$tool_specified"; then
8235          # A command without a complete path is provided, search $PATH.
8236          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8237$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8238          # Extract the first word of "$tool_basename", so it can be a program name with args.
8239set dummy $tool_basename; ac_word=$2
8240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8241$as_echo_n "checking for $ac_word... " >&6; }
8242if ${ac_cv_path_FIND+:} false; then :
8243  $as_echo_n "(cached) " >&6
8244else
8245  case $FIND in
8246  [\\/]* | ?:[\\/]*)
8247  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8248  ;;
8249  *)
8250  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8251for as_dir in $PATH
8252do
8253  IFS=$as_save_IFS
8254  test -z "$as_dir" && as_dir=.
8255    for ac_exec_ext in '' $ac_executable_extensions; do
8256  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8257    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8258    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8259    break 2
8260  fi
8261done
8262  done
8263IFS=$as_save_IFS
8264
8265  ;;
8266esac
8267fi
8268FIND=$ac_cv_path_FIND
8269if test -n "$FIND"; then
8270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8271$as_echo "$FIND" >&6; }
8272else
8273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8274$as_echo "no" >&6; }
8275fi
8276
8277
8278          if test "x$FIND" = x; then
8279            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8280          fi
8281        else
8282          # Otherwise we believe it is a complete path. Use it as it is.
8283          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8284$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8285          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8286$as_echo_n "checking for FIND... " >&6; }
8287          if test ! -x "$tool_specified"; then
8288            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8289$as_echo "not found" >&6; }
8290            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8291          fi
8292          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8293$as_echo "$tool_specified" >&6; }
8294        fi
8295      fi
8296    fi
8297
8298  fi
8299
8300
8301
8302  if test "x$FIND" = x; then
8303    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8304  fi
8305
8306
8307
8308
8309
8310  # Publish this variable in the help.
8311
8312
8313  if [ -z "${HEAD+x}" ]; then
8314    # The variable is not set by user, try to locate tool using the code snippet
8315    for ac_prog in head
8316do
8317  # Extract the first word of "$ac_prog", so it can be a program name with args.
8318set dummy $ac_prog; ac_word=$2
8319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8320$as_echo_n "checking for $ac_word... " >&6; }
8321if ${ac_cv_path_HEAD+:} false; then :
8322  $as_echo_n "(cached) " >&6
8323else
8324  case $HEAD in
8325  [\\/]* | ?:[\\/]*)
8326  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8327  ;;
8328  *)
8329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8330for as_dir in $PATH
8331do
8332  IFS=$as_save_IFS
8333  test -z "$as_dir" && as_dir=.
8334    for ac_exec_ext in '' $ac_executable_extensions; do
8335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8336    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8338    break 2
8339  fi
8340done
8341  done
8342IFS=$as_save_IFS
8343
8344  ;;
8345esac
8346fi
8347HEAD=$ac_cv_path_HEAD
8348if test -n "$HEAD"; then
8349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8350$as_echo "$HEAD" >&6; }
8351else
8352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8353$as_echo "no" >&6; }
8354fi
8355
8356
8357  test -n "$HEAD" && break
8358done
8359
8360  else
8361    # The variable is set, but is it from the command line or the environment?
8362
8363    # Try to remove the string !HEAD! from our list.
8364    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8365    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8366      # If it failed, the variable was not from the command line. Ignore it,
8367      # but warn the user (except for BASH, which is always set by the calling BASH).
8368      if test "xHEAD" != xBASH; then
8369        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8370$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8371      fi
8372      # Try to locate tool using the code snippet
8373      for ac_prog in head
8374do
8375  # Extract the first word of "$ac_prog", so it can be a program name with args.
8376set dummy $ac_prog; ac_word=$2
8377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8378$as_echo_n "checking for $ac_word... " >&6; }
8379if ${ac_cv_path_HEAD+:} false; then :
8380  $as_echo_n "(cached) " >&6
8381else
8382  case $HEAD in
8383  [\\/]* | ?:[\\/]*)
8384  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8385  ;;
8386  *)
8387  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8388for as_dir in $PATH
8389do
8390  IFS=$as_save_IFS
8391  test -z "$as_dir" && as_dir=.
8392    for ac_exec_ext in '' $ac_executable_extensions; do
8393  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8394    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8396    break 2
8397  fi
8398done
8399  done
8400IFS=$as_save_IFS
8401
8402  ;;
8403esac
8404fi
8405HEAD=$ac_cv_path_HEAD
8406if test -n "$HEAD"; then
8407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8408$as_echo "$HEAD" >&6; }
8409else
8410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8411$as_echo "no" >&6; }
8412fi
8413
8414
8415  test -n "$HEAD" && break
8416done
8417
8418    else
8419      # If it succeeded, then it was overridden by the user. We will use it
8420      # for the tool.
8421
8422      # First remove it from the list of overridden variables, so we can test
8423      # for unknown variables in the end.
8424      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8425
8426      # Check if we try to supply an empty value
8427      if test "x$HEAD" = x; then
8428        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8429$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8430        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8431$as_echo_n "checking for HEAD... " >&6; }
8432        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8433$as_echo "disabled" >&6; }
8434      else
8435        # Check if the provided tool contains a complete path.
8436        tool_specified="$HEAD"
8437        tool_basename="${tool_specified##*/}"
8438        if test "x$tool_basename" = "x$tool_specified"; then
8439          # A command without a complete path is provided, search $PATH.
8440          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8441$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8442          # Extract the first word of "$tool_basename", so it can be a program name with args.
8443set dummy $tool_basename; ac_word=$2
8444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8445$as_echo_n "checking for $ac_word... " >&6; }
8446if ${ac_cv_path_HEAD+:} false; then :
8447  $as_echo_n "(cached) " >&6
8448else
8449  case $HEAD in
8450  [\\/]* | ?:[\\/]*)
8451  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8452  ;;
8453  *)
8454  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8455for as_dir in $PATH
8456do
8457  IFS=$as_save_IFS
8458  test -z "$as_dir" && as_dir=.
8459    for ac_exec_ext in '' $ac_executable_extensions; do
8460  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8461    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8462    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8463    break 2
8464  fi
8465done
8466  done
8467IFS=$as_save_IFS
8468
8469  ;;
8470esac
8471fi
8472HEAD=$ac_cv_path_HEAD
8473if test -n "$HEAD"; then
8474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8475$as_echo "$HEAD" >&6; }
8476else
8477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8478$as_echo "no" >&6; }
8479fi
8480
8481
8482          if test "x$HEAD" = x; then
8483            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8484          fi
8485        else
8486          # Otherwise we believe it is a complete path. Use it as it is.
8487          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8488$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8489          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8490$as_echo_n "checking for HEAD... " >&6; }
8491          if test ! -x "$tool_specified"; then
8492            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8493$as_echo "not found" >&6; }
8494            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8495          fi
8496          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8497$as_echo "$tool_specified" >&6; }
8498        fi
8499      fi
8500    fi
8501
8502  fi
8503
8504
8505
8506  if test "x$HEAD" = x; then
8507    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8508  fi
8509
8510
8511
8512
8513
8514  # Publish this variable in the help.
8515
8516
8517  if [ -z "${GUNZIP+x}" ]; then
8518    # The variable is not set by user, try to locate tool using the code snippet
8519    for ac_prog in gunzip
8520do
8521  # Extract the first word of "$ac_prog", so it can be a program name with args.
8522set dummy $ac_prog; ac_word=$2
8523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8524$as_echo_n "checking for $ac_word... " >&6; }
8525if ${ac_cv_path_GUNZIP+:} false; then :
8526  $as_echo_n "(cached) " >&6
8527else
8528  case $GUNZIP in
8529  [\\/]* | ?:[\\/]*)
8530  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8531  ;;
8532  *)
8533  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8534for as_dir in $PATH
8535do
8536  IFS=$as_save_IFS
8537  test -z "$as_dir" && as_dir=.
8538    for ac_exec_ext in '' $ac_executable_extensions; do
8539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8540    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8542    break 2
8543  fi
8544done
8545  done
8546IFS=$as_save_IFS
8547
8548  ;;
8549esac
8550fi
8551GUNZIP=$ac_cv_path_GUNZIP
8552if test -n "$GUNZIP"; then
8553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8554$as_echo "$GUNZIP" >&6; }
8555else
8556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8557$as_echo "no" >&6; }
8558fi
8559
8560
8561  test -n "$GUNZIP" && break
8562done
8563
8564  else
8565    # The variable is set, but is it from the command line or the environment?
8566
8567    # Try to remove the string !GUNZIP! from our list.
8568    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8569    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8570      # If it failed, the variable was not from the command line. Ignore it,
8571      # but warn the user (except for BASH, which is always set by the calling BASH).
8572      if test "xGUNZIP" != xBASH; then
8573        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8574$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8575      fi
8576      # Try to locate tool using the code snippet
8577      for ac_prog in gunzip
8578do
8579  # Extract the first word of "$ac_prog", so it can be a program name with args.
8580set dummy $ac_prog; ac_word=$2
8581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8582$as_echo_n "checking for $ac_word... " >&6; }
8583if ${ac_cv_path_GUNZIP+:} false; then :
8584  $as_echo_n "(cached) " >&6
8585else
8586  case $GUNZIP in
8587  [\\/]* | ?:[\\/]*)
8588  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8589  ;;
8590  *)
8591  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8592for as_dir in $PATH
8593do
8594  IFS=$as_save_IFS
8595  test -z "$as_dir" && as_dir=.
8596    for ac_exec_ext in '' $ac_executable_extensions; do
8597  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8598    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8599    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8600    break 2
8601  fi
8602done
8603  done
8604IFS=$as_save_IFS
8605
8606  ;;
8607esac
8608fi
8609GUNZIP=$ac_cv_path_GUNZIP
8610if test -n "$GUNZIP"; then
8611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8612$as_echo "$GUNZIP" >&6; }
8613else
8614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8615$as_echo "no" >&6; }
8616fi
8617
8618
8619  test -n "$GUNZIP" && break
8620done
8621
8622    else
8623      # If it succeeded, then it was overridden by the user. We will use it
8624      # for the tool.
8625
8626      # First remove it from the list of overridden variables, so we can test
8627      # for unknown variables in the end.
8628      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8629
8630      # Check if we try to supply an empty value
8631      if test "x$GUNZIP" = x; then
8632        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8633$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8634        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8635$as_echo_n "checking for GUNZIP... " >&6; }
8636        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8637$as_echo "disabled" >&6; }
8638      else
8639        # Check if the provided tool contains a complete path.
8640        tool_specified="$GUNZIP"
8641        tool_basename="${tool_specified##*/}"
8642        if test "x$tool_basename" = "x$tool_specified"; then
8643          # A command without a complete path is provided, search $PATH.
8644          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8645$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8646          # Extract the first word of "$tool_basename", so it can be a program name with args.
8647set dummy $tool_basename; ac_word=$2
8648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8649$as_echo_n "checking for $ac_word... " >&6; }
8650if ${ac_cv_path_GUNZIP+:} false; then :
8651  $as_echo_n "(cached) " >&6
8652else
8653  case $GUNZIP in
8654  [\\/]* | ?:[\\/]*)
8655  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8656  ;;
8657  *)
8658  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8659for as_dir in $PATH
8660do
8661  IFS=$as_save_IFS
8662  test -z "$as_dir" && as_dir=.
8663    for ac_exec_ext in '' $ac_executable_extensions; do
8664  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8665    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8667    break 2
8668  fi
8669done
8670  done
8671IFS=$as_save_IFS
8672
8673  ;;
8674esac
8675fi
8676GUNZIP=$ac_cv_path_GUNZIP
8677if test -n "$GUNZIP"; then
8678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8679$as_echo "$GUNZIP" >&6; }
8680else
8681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8682$as_echo "no" >&6; }
8683fi
8684
8685
8686          if test "x$GUNZIP" = x; then
8687            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8688          fi
8689        else
8690          # Otherwise we believe it is a complete path. Use it as it is.
8691          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8692$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8693          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8694$as_echo_n "checking for GUNZIP... " >&6; }
8695          if test ! -x "$tool_specified"; then
8696            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8697$as_echo "not found" >&6; }
8698            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8699          fi
8700          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8701$as_echo "$tool_specified" >&6; }
8702        fi
8703      fi
8704    fi
8705
8706  fi
8707
8708
8709
8710  if test "x$GUNZIP" = x; then
8711    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8712  fi
8713
8714
8715
8716
8717
8718  # Publish this variable in the help.
8719
8720
8721  if [ -z "${GZIP+x}" ]; then
8722    # The variable is not set by user, try to locate tool using the code snippet
8723    for ac_prog in pigz gzip
8724do
8725  # Extract the first word of "$ac_prog", so it can be a program name with args.
8726set dummy $ac_prog; ac_word=$2
8727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8728$as_echo_n "checking for $ac_word... " >&6; }
8729if ${ac_cv_path_GZIP+:} false; then :
8730  $as_echo_n "(cached) " >&6
8731else
8732  case $GZIP in
8733  [\\/]* | ?:[\\/]*)
8734  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8735  ;;
8736  *)
8737  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8738for as_dir in $PATH
8739do
8740  IFS=$as_save_IFS
8741  test -z "$as_dir" && as_dir=.
8742    for ac_exec_ext in '' $ac_executable_extensions; do
8743  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8744    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8746    break 2
8747  fi
8748done
8749  done
8750IFS=$as_save_IFS
8751
8752  ;;
8753esac
8754fi
8755GZIP=$ac_cv_path_GZIP
8756if test -n "$GZIP"; then
8757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8758$as_echo "$GZIP" >&6; }
8759else
8760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8761$as_echo "no" >&6; }
8762fi
8763
8764
8765  test -n "$GZIP" && break
8766done
8767
8768  else
8769    # The variable is set, but is it from the command line or the environment?
8770
8771    # Try to remove the string !GZIP! from our list.
8772    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8773    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8774      # If it failed, the variable was not from the command line. Ignore it,
8775      # but warn the user (except for BASH, which is always set by the calling BASH).
8776      if test "xGZIP" != xBASH; then
8777        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8778$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8779      fi
8780      # Try to locate tool using the code snippet
8781      for ac_prog in pigz gzip
8782do
8783  # Extract the first word of "$ac_prog", so it can be a program name with args.
8784set dummy $ac_prog; ac_word=$2
8785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8786$as_echo_n "checking for $ac_word... " >&6; }
8787if ${ac_cv_path_GZIP+:} false; then :
8788  $as_echo_n "(cached) " >&6
8789else
8790  case $GZIP in
8791  [\\/]* | ?:[\\/]*)
8792  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8793  ;;
8794  *)
8795  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8796for as_dir in $PATH
8797do
8798  IFS=$as_save_IFS
8799  test -z "$as_dir" && as_dir=.
8800    for ac_exec_ext in '' $ac_executable_extensions; do
8801  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8802    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8803    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8804    break 2
8805  fi
8806done
8807  done
8808IFS=$as_save_IFS
8809
8810  ;;
8811esac
8812fi
8813GZIP=$ac_cv_path_GZIP
8814if test -n "$GZIP"; then
8815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8816$as_echo "$GZIP" >&6; }
8817else
8818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8819$as_echo "no" >&6; }
8820fi
8821
8822
8823  test -n "$GZIP" && break
8824done
8825
8826    else
8827      # If it succeeded, then it was overridden by the user. We will use it
8828      # for the tool.
8829
8830      # First remove it from the list of overridden variables, so we can test
8831      # for unknown variables in the end.
8832      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8833
8834      # Check if we try to supply an empty value
8835      if test "x$GZIP" = x; then
8836        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8837$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8838        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8839$as_echo_n "checking for GZIP... " >&6; }
8840        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8841$as_echo "disabled" >&6; }
8842      else
8843        # Check if the provided tool contains a complete path.
8844        tool_specified="$GZIP"
8845        tool_basename="${tool_specified##*/}"
8846        if test "x$tool_basename" = "x$tool_specified"; then
8847          # A command without a complete path is provided, search $PATH.
8848          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8849$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8850          # Extract the first word of "$tool_basename", so it can be a program name with args.
8851set dummy $tool_basename; ac_word=$2
8852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8853$as_echo_n "checking for $ac_word... " >&6; }
8854if ${ac_cv_path_GZIP+:} false; then :
8855  $as_echo_n "(cached) " >&6
8856else
8857  case $GZIP in
8858  [\\/]* | ?:[\\/]*)
8859  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8860  ;;
8861  *)
8862  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8863for as_dir in $PATH
8864do
8865  IFS=$as_save_IFS
8866  test -z "$as_dir" && as_dir=.
8867    for ac_exec_ext in '' $ac_executable_extensions; do
8868  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8869    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8870    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8871    break 2
8872  fi
8873done
8874  done
8875IFS=$as_save_IFS
8876
8877  ;;
8878esac
8879fi
8880GZIP=$ac_cv_path_GZIP
8881if test -n "$GZIP"; then
8882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8883$as_echo "$GZIP" >&6; }
8884else
8885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8886$as_echo "no" >&6; }
8887fi
8888
8889
8890          if test "x$GZIP" = x; then
8891            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8892          fi
8893        else
8894          # Otherwise we believe it is a complete path. Use it as it is.
8895          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8896$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8897          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8898$as_echo_n "checking for GZIP... " >&6; }
8899          if test ! -x "$tool_specified"; then
8900            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8901$as_echo "not found" >&6; }
8902            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8903          fi
8904          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8905$as_echo "$tool_specified" >&6; }
8906        fi
8907      fi
8908    fi
8909
8910  fi
8911
8912
8913
8914  if test "x$GZIP" = x; then
8915    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8916  fi
8917
8918
8919
8920
8921
8922  # Publish this variable in the help.
8923
8924
8925  if [ -z "${LN+x}" ]; then
8926    # The variable is not set by user, try to locate tool using the code snippet
8927    for ac_prog in ln
8928do
8929  # Extract the first word of "$ac_prog", so it can be a program name with args.
8930set dummy $ac_prog; ac_word=$2
8931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8932$as_echo_n "checking for $ac_word... " >&6; }
8933if ${ac_cv_path_LN+:} false; then :
8934  $as_echo_n "(cached) " >&6
8935else
8936  case $LN in
8937  [\\/]* | ?:[\\/]*)
8938  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8939  ;;
8940  *)
8941  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8942for as_dir in $PATH
8943do
8944  IFS=$as_save_IFS
8945  test -z "$as_dir" && as_dir=.
8946    for ac_exec_ext in '' $ac_executable_extensions; do
8947  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8948    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8950    break 2
8951  fi
8952done
8953  done
8954IFS=$as_save_IFS
8955
8956  ;;
8957esac
8958fi
8959LN=$ac_cv_path_LN
8960if test -n "$LN"; then
8961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8962$as_echo "$LN" >&6; }
8963else
8964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8965$as_echo "no" >&6; }
8966fi
8967
8968
8969  test -n "$LN" && break
8970done
8971
8972  else
8973    # The variable is set, but is it from the command line or the environment?
8974
8975    # Try to remove the string !LN! from our list.
8976    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8977    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8978      # If it failed, the variable was not from the command line. Ignore it,
8979      # but warn the user (except for BASH, which is always set by the calling BASH).
8980      if test "xLN" != xBASH; then
8981        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8982$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8983      fi
8984      # Try to locate tool using the code snippet
8985      for ac_prog in ln
8986do
8987  # Extract the first word of "$ac_prog", so it can be a program name with args.
8988set dummy $ac_prog; ac_word=$2
8989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8990$as_echo_n "checking for $ac_word... " >&6; }
8991if ${ac_cv_path_LN+:} false; then :
8992  $as_echo_n "(cached) " >&6
8993else
8994  case $LN in
8995  [\\/]* | ?:[\\/]*)
8996  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8997  ;;
8998  *)
8999  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9000for as_dir in $PATH
9001do
9002  IFS=$as_save_IFS
9003  test -z "$as_dir" && as_dir=.
9004    for ac_exec_ext in '' $ac_executable_extensions; do
9005  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9006    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
9007    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9008    break 2
9009  fi
9010done
9011  done
9012IFS=$as_save_IFS
9013
9014  ;;
9015esac
9016fi
9017LN=$ac_cv_path_LN
9018if test -n "$LN"; then
9019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9020$as_echo "$LN" >&6; }
9021else
9022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9023$as_echo "no" >&6; }
9024fi
9025
9026
9027  test -n "$LN" && break
9028done
9029
9030    else
9031      # If it succeeded, then it was overridden by the user. We will use it
9032      # for the tool.
9033
9034      # First remove it from the list of overridden variables, so we can test
9035      # for unknown variables in the end.
9036      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9037
9038      # Check if we try to supply an empty value
9039      if test "x$LN" = x; then
9040        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
9041$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
9042        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9043$as_echo_n "checking for LN... " >&6; }
9044        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9045$as_echo "disabled" >&6; }
9046      else
9047        # Check if the provided tool contains a complete path.
9048        tool_specified="$LN"
9049        tool_basename="${tool_specified##*/}"
9050        if test "x$tool_basename" = "x$tool_specified"; then
9051          # A command without a complete path is provided, search $PATH.
9052          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
9053$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
9054          # Extract the first word of "$tool_basename", so it can be a program name with args.
9055set dummy $tool_basename; ac_word=$2
9056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9057$as_echo_n "checking for $ac_word... " >&6; }
9058if ${ac_cv_path_LN+:} false; then :
9059  $as_echo_n "(cached) " >&6
9060else
9061  case $LN in
9062  [\\/]* | ?:[\\/]*)
9063  ac_cv_path_LN="$LN" # Let the user override the test with a path.
9064  ;;
9065  *)
9066  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9067for as_dir in $PATH
9068do
9069  IFS=$as_save_IFS
9070  test -z "$as_dir" && as_dir=.
9071    for ac_exec_ext in '' $ac_executable_extensions; do
9072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9073    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
9074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9075    break 2
9076  fi
9077done
9078  done
9079IFS=$as_save_IFS
9080
9081  ;;
9082esac
9083fi
9084LN=$ac_cv_path_LN
9085if test -n "$LN"; then
9086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9087$as_echo "$LN" >&6; }
9088else
9089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9090$as_echo "no" >&6; }
9091fi
9092
9093
9094          if test "x$LN" = x; then
9095            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9096          fi
9097        else
9098          # Otherwise we believe it is a complete path. Use it as it is.
9099          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9100$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9101          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9102$as_echo_n "checking for LN... " >&6; }
9103          if test ! -x "$tool_specified"; then
9104            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9105$as_echo "not found" >&6; }
9106            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9107          fi
9108          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9109$as_echo "$tool_specified" >&6; }
9110        fi
9111      fi
9112    fi
9113
9114  fi
9115
9116
9117
9118  if test "x$LN" = x; then
9119    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9120  fi
9121
9122
9123
9124
9125
9126  # Publish this variable in the help.
9127
9128
9129  if [ -z "${LS+x}" ]; then
9130    # The variable is not set by user, try to locate tool using the code snippet
9131    for ac_prog in ls
9132do
9133  # Extract the first word of "$ac_prog", so it can be a program name with args.
9134set dummy $ac_prog; ac_word=$2
9135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9136$as_echo_n "checking for $ac_word... " >&6; }
9137if ${ac_cv_path_LS+:} false; then :
9138  $as_echo_n "(cached) " >&6
9139else
9140  case $LS in
9141  [\\/]* | ?:[\\/]*)
9142  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9143  ;;
9144  *)
9145  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9146for as_dir in $PATH
9147do
9148  IFS=$as_save_IFS
9149  test -z "$as_dir" && as_dir=.
9150    for ac_exec_ext in '' $ac_executable_extensions; do
9151  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9152    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9153    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9154    break 2
9155  fi
9156done
9157  done
9158IFS=$as_save_IFS
9159
9160  ;;
9161esac
9162fi
9163LS=$ac_cv_path_LS
9164if test -n "$LS"; then
9165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9166$as_echo "$LS" >&6; }
9167else
9168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9169$as_echo "no" >&6; }
9170fi
9171
9172
9173  test -n "$LS" && break
9174done
9175
9176  else
9177    # The variable is set, but is it from the command line or the environment?
9178
9179    # Try to remove the string !LS! from our list.
9180    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9181    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9182      # If it failed, the variable was not from the command line. Ignore it,
9183      # but warn the user (except for BASH, which is always set by the calling BASH).
9184      if test "xLS" != xBASH; then
9185        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9186$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9187      fi
9188      # Try to locate tool using the code snippet
9189      for ac_prog in ls
9190do
9191  # Extract the first word of "$ac_prog", so it can be a program name with args.
9192set dummy $ac_prog; ac_word=$2
9193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9194$as_echo_n "checking for $ac_word... " >&6; }
9195if ${ac_cv_path_LS+:} false; then :
9196  $as_echo_n "(cached) " >&6
9197else
9198  case $LS in
9199  [\\/]* | ?:[\\/]*)
9200  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9201  ;;
9202  *)
9203  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9204for as_dir in $PATH
9205do
9206  IFS=$as_save_IFS
9207  test -z "$as_dir" && as_dir=.
9208    for ac_exec_ext in '' $ac_executable_extensions; do
9209  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9210    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9211    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9212    break 2
9213  fi
9214done
9215  done
9216IFS=$as_save_IFS
9217
9218  ;;
9219esac
9220fi
9221LS=$ac_cv_path_LS
9222if test -n "$LS"; then
9223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9224$as_echo "$LS" >&6; }
9225else
9226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9227$as_echo "no" >&6; }
9228fi
9229
9230
9231  test -n "$LS" && break
9232done
9233
9234    else
9235      # If it succeeded, then it was overridden by the user. We will use it
9236      # for the tool.
9237
9238      # First remove it from the list of overridden variables, so we can test
9239      # for unknown variables in the end.
9240      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9241
9242      # Check if we try to supply an empty value
9243      if test "x$LS" = x; then
9244        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9245$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9246        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9247$as_echo_n "checking for LS... " >&6; }
9248        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9249$as_echo "disabled" >&6; }
9250      else
9251        # Check if the provided tool contains a complete path.
9252        tool_specified="$LS"
9253        tool_basename="${tool_specified##*/}"
9254        if test "x$tool_basename" = "x$tool_specified"; then
9255          # A command without a complete path is provided, search $PATH.
9256          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9257$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9258          # Extract the first word of "$tool_basename", so it can be a program name with args.
9259set dummy $tool_basename; ac_word=$2
9260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9261$as_echo_n "checking for $ac_word... " >&6; }
9262if ${ac_cv_path_LS+:} false; then :
9263  $as_echo_n "(cached) " >&6
9264else
9265  case $LS in
9266  [\\/]* | ?:[\\/]*)
9267  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9268  ;;
9269  *)
9270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9271for as_dir in $PATH
9272do
9273  IFS=$as_save_IFS
9274  test -z "$as_dir" && as_dir=.
9275    for ac_exec_ext in '' $ac_executable_extensions; do
9276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9277    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9279    break 2
9280  fi
9281done
9282  done
9283IFS=$as_save_IFS
9284
9285  ;;
9286esac
9287fi
9288LS=$ac_cv_path_LS
9289if test -n "$LS"; then
9290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9291$as_echo "$LS" >&6; }
9292else
9293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9294$as_echo "no" >&6; }
9295fi
9296
9297
9298          if test "x$LS" = x; then
9299            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9300          fi
9301        else
9302          # Otherwise we believe it is a complete path. Use it as it is.
9303          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9304$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9305          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9306$as_echo_n "checking for LS... " >&6; }
9307          if test ! -x "$tool_specified"; then
9308            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9309$as_echo "not found" >&6; }
9310            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9311          fi
9312          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9313$as_echo "$tool_specified" >&6; }
9314        fi
9315      fi
9316    fi
9317
9318  fi
9319
9320
9321
9322  if test "x$LS" = x; then
9323    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9324  fi
9325
9326
9327
9328
9329
9330  # Publish this variable in the help.
9331
9332
9333  if [ -z "${MKDIR+x}" ]; then
9334    # The variable is not set by user, try to locate tool using the code snippet
9335    for ac_prog in mkdir
9336do
9337  # Extract the first word of "$ac_prog", so it can be a program name with args.
9338set dummy $ac_prog; ac_word=$2
9339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9340$as_echo_n "checking for $ac_word... " >&6; }
9341if ${ac_cv_path_MKDIR+:} false; then :
9342  $as_echo_n "(cached) " >&6
9343else
9344  case $MKDIR in
9345  [\\/]* | ?:[\\/]*)
9346  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9347  ;;
9348  *)
9349  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9350for as_dir in $PATH
9351do
9352  IFS=$as_save_IFS
9353  test -z "$as_dir" && as_dir=.
9354    for ac_exec_ext in '' $ac_executable_extensions; do
9355  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9356    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9357    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9358    break 2
9359  fi
9360done
9361  done
9362IFS=$as_save_IFS
9363
9364  ;;
9365esac
9366fi
9367MKDIR=$ac_cv_path_MKDIR
9368if test -n "$MKDIR"; then
9369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9370$as_echo "$MKDIR" >&6; }
9371else
9372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9373$as_echo "no" >&6; }
9374fi
9375
9376
9377  test -n "$MKDIR" && break
9378done
9379
9380  else
9381    # The variable is set, but is it from the command line or the environment?
9382
9383    # Try to remove the string !MKDIR! from our list.
9384    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9385    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9386      # If it failed, the variable was not from the command line. Ignore it,
9387      # but warn the user (except for BASH, which is always set by the calling BASH).
9388      if test "xMKDIR" != xBASH; then
9389        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9390$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9391      fi
9392      # Try to locate tool using the code snippet
9393      for ac_prog in mkdir
9394do
9395  # Extract the first word of "$ac_prog", so it can be a program name with args.
9396set dummy $ac_prog; ac_word=$2
9397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9398$as_echo_n "checking for $ac_word... " >&6; }
9399if ${ac_cv_path_MKDIR+:} false; then :
9400  $as_echo_n "(cached) " >&6
9401else
9402  case $MKDIR in
9403  [\\/]* | ?:[\\/]*)
9404  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9405  ;;
9406  *)
9407  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9408for as_dir in $PATH
9409do
9410  IFS=$as_save_IFS
9411  test -z "$as_dir" && as_dir=.
9412    for ac_exec_ext in '' $ac_executable_extensions; do
9413  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9414    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9415    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9416    break 2
9417  fi
9418done
9419  done
9420IFS=$as_save_IFS
9421
9422  ;;
9423esac
9424fi
9425MKDIR=$ac_cv_path_MKDIR
9426if test -n "$MKDIR"; then
9427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9428$as_echo "$MKDIR" >&6; }
9429else
9430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9431$as_echo "no" >&6; }
9432fi
9433
9434
9435  test -n "$MKDIR" && break
9436done
9437
9438    else
9439      # If it succeeded, then it was overridden by the user. We will use it
9440      # for the tool.
9441
9442      # First remove it from the list of overridden variables, so we can test
9443      # for unknown variables in the end.
9444      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9445
9446      # Check if we try to supply an empty value
9447      if test "x$MKDIR" = x; then
9448        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9449$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9450        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9451$as_echo_n "checking for MKDIR... " >&6; }
9452        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9453$as_echo "disabled" >&6; }
9454      else
9455        # Check if the provided tool contains a complete path.
9456        tool_specified="$MKDIR"
9457        tool_basename="${tool_specified##*/}"
9458        if test "x$tool_basename" = "x$tool_specified"; then
9459          # A command without a complete path is provided, search $PATH.
9460          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9461$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9462          # Extract the first word of "$tool_basename", so it can be a program name with args.
9463set dummy $tool_basename; ac_word=$2
9464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9465$as_echo_n "checking for $ac_word... " >&6; }
9466if ${ac_cv_path_MKDIR+:} false; then :
9467  $as_echo_n "(cached) " >&6
9468else
9469  case $MKDIR in
9470  [\\/]* | ?:[\\/]*)
9471  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9472  ;;
9473  *)
9474  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9475for as_dir in $PATH
9476do
9477  IFS=$as_save_IFS
9478  test -z "$as_dir" && as_dir=.
9479    for ac_exec_ext in '' $ac_executable_extensions; do
9480  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9481    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9482    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9483    break 2
9484  fi
9485done
9486  done
9487IFS=$as_save_IFS
9488
9489  ;;
9490esac
9491fi
9492MKDIR=$ac_cv_path_MKDIR
9493if test -n "$MKDIR"; then
9494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9495$as_echo "$MKDIR" >&6; }
9496else
9497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9498$as_echo "no" >&6; }
9499fi
9500
9501
9502          if test "x$MKDIR" = x; then
9503            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9504          fi
9505        else
9506          # Otherwise we believe it is a complete path. Use it as it is.
9507          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9508$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9509          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9510$as_echo_n "checking for MKDIR... " >&6; }
9511          if test ! -x "$tool_specified"; then
9512            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9513$as_echo "not found" >&6; }
9514            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9515          fi
9516          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9517$as_echo "$tool_specified" >&6; }
9518        fi
9519      fi
9520    fi
9521
9522  fi
9523
9524
9525
9526  if test "x$MKDIR" = x; then
9527    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9528  fi
9529
9530
9531
9532
9533
9534  # Publish this variable in the help.
9535
9536
9537  if [ -z "${MKTEMP+x}" ]; then
9538    # The variable is not set by user, try to locate tool using the code snippet
9539    for ac_prog in mktemp
9540do
9541  # Extract the first word of "$ac_prog", so it can be a program name with args.
9542set dummy $ac_prog; ac_word=$2
9543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9544$as_echo_n "checking for $ac_word... " >&6; }
9545if ${ac_cv_path_MKTEMP+:} false; then :
9546  $as_echo_n "(cached) " >&6
9547else
9548  case $MKTEMP in
9549  [\\/]* | ?:[\\/]*)
9550  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9551  ;;
9552  *)
9553  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9554for as_dir in $PATH
9555do
9556  IFS=$as_save_IFS
9557  test -z "$as_dir" && as_dir=.
9558    for ac_exec_ext in '' $ac_executable_extensions; do
9559  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9560    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9561    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9562    break 2
9563  fi
9564done
9565  done
9566IFS=$as_save_IFS
9567
9568  ;;
9569esac
9570fi
9571MKTEMP=$ac_cv_path_MKTEMP
9572if test -n "$MKTEMP"; then
9573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9574$as_echo "$MKTEMP" >&6; }
9575else
9576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9577$as_echo "no" >&6; }
9578fi
9579
9580
9581  test -n "$MKTEMP" && break
9582done
9583
9584  else
9585    # The variable is set, but is it from the command line or the environment?
9586
9587    # Try to remove the string !MKTEMP! from our list.
9588    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9589    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9590      # If it failed, the variable was not from the command line. Ignore it,
9591      # but warn the user (except for BASH, which is always set by the calling BASH).
9592      if test "xMKTEMP" != xBASH; then
9593        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9594$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9595      fi
9596      # Try to locate tool using the code snippet
9597      for ac_prog in mktemp
9598do
9599  # Extract the first word of "$ac_prog", so it can be a program name with args.
9600set dummy $ac_prog; ac_word=$2
9601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9602$as_echo_n "checking for $ac_word... " >&6; }
9603if ${ac_cv_path_MKTEMP+:} false; then :
9604  $as_echo_n "(cached) " >&6
9605else
9606  case $MKTEMP in
9607  [\\/]* | ?:[\\/]*)
9608  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9609  ;;
9610  *)
9611  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9612for as_dir in $PATH
9613do
9614  IFS=$as_save_IFS
9615  test -z "$as_dir" && as_dir=.
9616    for ac_exec_ext in '' $ac_executable_extensions; do
9617  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9618    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9619    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9620    break 2
9621  fi
9622done
9623  done
9624IFS=$as_save_IFS
9625
9626  ;;
9627esac
9628fi
9629MKTEMP=$ac_cv_path_MKTEMP
9630if test -n "$MKTEMP"; then
9631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9632$as_echo "$MKTEMP" >&6; }
9633else
9634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9635$as_echo "no" >&6; }
9636fi
9637
9638
9639  test -n "$MKTEMP" && break
9640done
9641
9642    else
9643      # If it succeeded, then it was overridden by the user. We will use it
9644      # for the tool.
9645
9646      # First remove it from the list of overridden variables, so we can test
9647      # for unknown variables in the end.
9648      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9649
9650      # Check if we try to supply an empty value
9651      if test "x$MKTEMP" = x; then
9652        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9653$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9654        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9655$as_echo_n "checking for MKTEMP... " >&6; }
9656        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9657$as_echo "disabled" >&6; }
9658      else
9659        # Check if the provided tool contains a complete path.
9660        tool_specified="$MKTEMP"
9661        tool_basename="${tool_specified##*/}"
9662        if test "x$tool_basename" = "x$tool_specified"; then
9663          # A command without a complete path is provided, search $PATH.
9664          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9665$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9666          # Extract the first word of "$tool_basename", so it can be a program name with args.
9667set dummy $tool_basename; ac_word=$2
9668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9669$as_echo_n "checking for $ac_word... " >&6; }
9670if ${ac_cv_path_MKTEMP+:} false; then :
9671  $as_echo_n "(cached) " >&6
9672else
9673  case $MKTEMP in
9674  [\\/]* | ?:[\\/]*)
9675  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9676  ;;
9677  *)
9678  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9679for as_dir in $PATH
9680do
9681  IFS=$as_save_IFS
9682  test -z "$as_dir" && as_dir=.
9683    for ac_exec_ext in '' $ac_executable_extensions; do
9684  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9685    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9686    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9687    break 2
9688  fi
9689done
9690  done
9691IFS=$as_save_IFS
9692
9693  ;;
9694esac
9695fi
9696MKTEMP=$ac_cv_path_MKTEMP
9697if test -n "$MKTEMP"; then
9698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9699$as_echo "$MKTEMP" >&6; }
9700else
9701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9702$as_echo "no" >&6; }
9703fi
9704
9705
9706          if test "x$MKTEMP" = x; then
9707            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9708          fi
9709        else
9710          # Otherwise we believe it is a complete path. Use it as it is.
9711          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9712$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9713          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9714$as_echo_n "checking for MKTEMP... " >&6; }
9715          if test ! -x "$tool_specified"; then
9716            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9717$as_echo "not found" >&6; }
9718            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9719          fi
9720          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9721$as_echo "$tool_specified" >&6; }
9722        fi
9723      fi
9724    fi
9725
9726  fi
9727
9728
9729
9730  if test "x$MKTEMP" = x; then
9731    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9732  fi
9733
9734
9735
9736
9737
9738  # Publish this variable in the help.
9739
9740
9741  if [ -z "${MV+x}" ]; then
9742    # The variable is not set by user, try to locate tool using the code snippet
9743    for ac_prog in mv
9744do
9745  # Extract the first word of "$ac_prog", so it can be a program name with args.
9746set dummy $ac_prog; ac_word=$2
9747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9748$as_echo_n "checking for $ac_word... " >&6; }
9749if ${ac_cv_path_MV+:} false; then :
9750  $as_echo_n "(cached) " >&6
9751else
9752  case $MV in
9753  [\\/]* | ?:[\\/]*)
9754  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9755  ;;
9756  *)
9757  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9758for as_dir in $PATH
9759do
9760  IFS=$as_save_IFS
9761  test -z "$as_dir" && as_dir=.
9762    for ac_exec_ext in '' $ac_executable_extensions; do
9763  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9764    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9765    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9766    break 2
9767  fi
9768done
9769  done
9770IFS=$as_save_IFS
9771
9772  ;;
9773esac
9774fi
9775MV=$ac_cv_path_MV
9776if test -n "$MV"; then
9777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9778$as_echo "$MV" >&6; }
9779else
9780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9781$as_echo "no" >&6; }
9782fi
9783
9784
9785  test -n "$MV" && break
9786done
9787
9788  else
9789    # The variable is set, but is it from the command line or the environment?
9790
9791    # Try to remove the string !MV! from our list.
9792    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9793    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9794      # If it failed, the variable was not from the command line. Ignore it,
9795      # but warn the user (except for BASH, which is always set by the calling BASH).
9796      if test "xMV" != xBASH; then
9797        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9798$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9799      fi
9800      # Try to locate tool using the code snippet
9801      for ac_prog in mv
9802do
9803  # Extract the first word of "$ac_prog", so it can be a program name with args.
9804set dummy $ac_prog; ac_word=$2
9805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9806$as_echo_n "checking for $ac_word... " >&6; }
9807if ${ac_cv_path_MV+:} false; then :
9808  $as_echo_n "(cached) " >&6
9809else
9810  case $MV in
9811  [\\/]* | ?:[\\/]*)
9812  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9813  ;;
9814  *)
9815  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9816for as_dir in $PATH
9817do
9818  IFS=$as_save_IFS
9819  test -z "$as_dir" && as_dir=.
9820    for ac_exec_ext in '' $ac_executable_extensions; do
9821  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9822    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9823    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9824    break 2
9825  fi
9826done
9827  done
9828IFS=$as_save_IFS
9829
9830  ;;
9831esac
9832fi
9833MV=$ac_cv_path_MV
9834if test -n "$MV"; then
9835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9836$as_echo "$MV" >&6; }
9837else
9838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9839$as_echo "no" >&6; }
9840fi
9841
9842
9843  test -n "$MV" && break
9844done
9845
9846    else
9847      # If it succeeded, then it was overridden by the user. We will use it
9848      # for the tool.
9849
9850      # First remove it from the list of overridden variables, so we can test
9851      # for unknown variables in the end.
9852      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9853
9854      # Check if we try to supply an empty value
9855      if test "x$MV" = x; then
9856        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9857$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9858        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9859$as_echo_n "checking for MV... " >&6; }
9860        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9861$as_echo "disabled" >&6; }
9862      else
9863        # Check if the provided tool contains a complete path.
9864        tool_specified="$MV"
9865        tool_basename="${tool_specified##*/}"
9866        if test "x$tool_basename" = "x$tool_specified"; then
9867          # A command without a complete path is provided, search $PATH.
9868          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9869$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9870          # Extract the first word of "$tool_basename", so it can be a program name with args.
9871set dummy $tool_basename; ac_word=$2
9872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9873$as_echo_n "checking for $ac_word... " >&6; }
9874if ${ac_cv_path_MV+:} false; then :
9875  $as_echo_n "(cached) " >&6
9876else
9877  case $MV in
9878  [\\/]* | ?:[\\/]*)
9879  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9880  ;;
9881  *)
9882  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9883for as_dir in $PATH
9884do
9885  IFS=$as_save_IFS
9886  test -z "$as_dir" && as_dir=.
9887    for ac_exec_ext in '' $ac_executable_extensions; do
9888  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9889    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9890    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9891    break 2
9892  fi
9893done
9894  done
9895IFS=$as_save_IFS
9896
9897  ;;
9898esac
9899fi
9900MV=$ac_cv_path_MV
9901if test -n "$MV"; then
9902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9903$as_echo "$MV" >&6; }
9904else
9905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9906$as_echo "no" >&6; }
9907fi
9908
9909
9910          if test "x$MV" = x; then
9911            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9912          fi
9913        else
9914          # Otherwise we believe it is a complete path. Use it as it is.
9915          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9916$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9917          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9918$as_echo_n "checking for MV... " >&6; }
9919          if test ! -x "$tool_specified"; then
9920            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9921$as_echo "not found" >&6; }
9922            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9923          fi
9924          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9925$as_echo "$tool_specified" >&6; }
9926        fi
9927      fi
9928    fi
9929
9930  fi
9931
9932
9933
9934  if test "x$MV" = x; then
9935    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9936  fi
9937
9938
9939
9940
9941
9942  # Publish this variable in the help.
9943
9944
9945  if [ -z "${NAWK+x}" ]; then
9946    # The variable is not set by user, try to locate tool using the code snippet
9947    for ac_prog in nawk gawk awk
9948do
9949  # Extract the first word of "$ac_prog", so it can be a program name with args.
9950set dummy $ac_prog; ac_word=$2
9951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9952$as_echo_n "checking for $ac_word... " >&6; }
9953if ${ac_cv_path_NAWK+:} false; then :
9954  $as_echo_n "(cached) " >&6
9955else
9956  case $NAWK in
9957  [\\/]* | ?:[\\/]*)
9958  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9959  ;;
9960  *)
9961  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9962for as_dir in $PATH
9963do
9964  IFS=$as_save_IFS
9965  test -z "$as_dir" && as_dir=.
9966    for ac_exec_ext in '' $ac_executable_extensions; do
9967  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9968    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9970    break 2
9971  fi
9972done
9973  done
9974IFS=$as_save_IFS
9975
9976  ;;
9977esac
9978fi
9979NAWK=$ac_cv_path_NAWK
9980if test -n "$NAWK"; then
9981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9982$as_echo "$NAWK" >&6; }
9983else
9984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9985$as_echo "no" >&6; }
9986fi
9987
9988
9989  test -n "$NAWK" && break
9990done
9991
9992  else
9993    # The variable is set, but is it from the command line or the environment?
9994
9995    # Try to remove the string !NAWK! from our list.
9996    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9997    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9998      # If it failed, the variable was not from the command line. Ignore it,
9999      # but warn the user (except for BASH, which is always set by the calling BASH).
10000      if test "xNAWK" != xBASH; then
10001        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
10002$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
10003      fi
10004      # Try to locate tool using the code snippet
10005      for ac_prog in nawk gawk awk
10006do
10007  # Extract the first word of "$ac_prog", so it can be a program name with args.
10008set dummy $ac_prog; ac_word=$2
10009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10010$as_echo_n "checking for $ac_word... " >&6; }
10011if ${ac_cv_path_NAWK+:} false; then :
10012  $as_echo_n "(cached) " >&6
10013else
10014  case $NAWK in
10015  [\\/]* | ?:[\\/]*)
10016  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10017  ;;
10018  *)
10019  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10020for as_dir in $PATH
10021do
10022  IFS=$as_save_IFS
10023  test -z "$as_dir" && as_dir=.
10024    for ac_exec_ext in '' $ac_executable_extensions; do
10025  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10026    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10028    break 2
10029  fi
10030done
10031  done
10032IFS=$as_save_IFS
10033
10034  ;;
10035esac
10036fi
10037NAWK=$ac_cv_path_NAWK
10038if test -n "$NAWK"; then
10039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10040$as_echo "$NAWK" >&6; }
10041else
10042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10043$as_echo "no" >&6; }
10044fi
10045
10046
10047  test -n "$NAWK" && break
10048done
10049
10050    else
10051      # If it succeeded, then it was overridden by the user. We will use it
10052      # for the tool.
10053
10054      # First remove it from the list of overridden variables, so we can test
10055      # for unknown variables in the end.
10056      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10057
10058      # Check if we try to supply an empty value
10059      if test "x$NAWK" = x; then
10060        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
10061$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
10062        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10063$as_echo_n "checking for NAWK... " >&6; }
10064        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10065$as_echo "disabled" >&6; }
10066      else
10067        # Check if the provided tool contains a complete path.
10068        tool_specified="$NAWK"
10069        tool_basename="${tool_specified##*/}"
10070        if test "x$tool_basename" = "x$tool_specified"; then
10071          # A command without a complete path is provided, search $PATH.
10072          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
10073$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
10074          # Extract the first word of "$tool_basename", so it can be a program name with args.
10075set dummy $tool_basename; ac_word=$2
10076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10077$as_echo_n "checking for $ac_word... " >&6; }
10078if ${ac_cv_path_NAWK+:} false; then :
10079  $as_echo_n "(cached) " >&6
10080else
10081  case $NAWK in
10082  [\\/]* | ?:[\\/]*)
10083  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10084  ;;
10085  *)
10086  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10087for as_dir in $PATH
10088do
10089  IFS=$as_save_IFS
10090  test -z "$as_dir" && as_dir=.
10091    for ac_exec_ext in '' $ac_executable_extensions; do
10092  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10093    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10094    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10095    break 2
10096  fi
10097done
10098  done
10099IFS=$as_save_IFS
10100
10101  ;;
10102esac
10103fi
10104NAWK=$ac_cv_path_NAWK
10105if test -n "$NAWK"; then
10106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10107$as_echo "$NAWK" >&6; }
10108else
10109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10110$as_echo "no" >&6; }
10111fi
10112
10113
10114          if test "x$NAWK" = x; then
10115            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10116          fi
10117        else
10118          # Otherwise we believe it is a complete path. Use it as it is.
10119          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10120$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10121          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10122$as_echo_n "checking for NAWK... " >&6; }
10123          if test ! -x "$tool_specified"; then
10124            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10125$as_echo "not found" >&6; }
10126            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10127          fi
10128          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10129$as_echo "$tool_specified" >&6; }
10130        fi
10131      fi
10132    fi
10133
10134  fi
10135
10136
10137
10138  if test "x$NAWK" = x; then
10139    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10140  fi
10141
10142
10143
10144
10145
10146  # Publish this variable in the help.
10147
10148
10149  if [ -z "${PRINTF+x}" ]; then
10150    # The variable is not set by user, try to locate tool using the code snippet
10151    for ac_prog in printf
10152do
10153  # Extract the first word of "$ac_prog", so it can be a program name with args.
10154set dummy $ac_prog; ac_word=$2
10155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10156$as_echo_n "checking for $ac_word... " >&6; }
10157if ${ac_cv_path_PRINTF+:} false; then :
10158  $as_echo_n "(cached) " >&6
10159else
10160  case $PRINTF in
10161  [\\/]* | ?:[\\/]*)
10162  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10163  ;;
10164  *)
10165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10166for as_dir in $PATH
10167do
10168  IFS=$as_save_IFS
10169  test -z "$as_dir" && as_dir=.
10170    for ac_exec_ext in '' $ac_executable_extensions; do
10171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10172    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10174    break 2
10175  fi
10176done
10177  done
10178IFS=$as_save_IFS
10179
10180  ;;
10181esac
10182fi
10183PRINTF=$ac_cv_path_PRINTF
10184if test -n "$PRINTF"; then
10185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10186$as_echo "$PRINTF" >&6; }
10187else
10188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10189$as_echo "no" >&6; }
10190fi
10191
10192
10193  test -n "$PRINTF" && break
10194done
10195
10196  else
10197    # The variable is set, but is it from the command line or the environment?
10198
10199    # Try to remove the string !PRINTF! from our list.
10200    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10201    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10202      # If it failed, the variable was not from the command line. Ignore it,
10203      # but warn the user (except for BASH, which is always set by the calling BASH).
10204      if test "xPRINTF" != xBASH; then
10205        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10206$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10207      fi
10208      # Try to locate tool using the code snippet
10209      for ac_prog in printf
10210do
10211  # Extract the first word of "$ac_prog", so it can be a program name with args.
10212set dummy $ac_prog; ac_word=$2
10213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10214$as_echo_n "checking for $ac_word... " >&6; }
10215if ${ac_cv_path_PRINTF+:} false; then :
10216  $as_echo_n "(cached) " >&6
10217else
10218  case $PRINTF in
10219  [\\/]* | ?:[\\/]*)
10220  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10221  ;;
10222  *)
10223  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10224for as_dir in $PATH
10225do
10226  IFS=$as_save_IFS
10227  test -z "$as_dir" && as_dir=.
10228    for ac_exec_ext in '' $ac_executable_extensions; do
10229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10230    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10232    break 2
10233  fi
10234done
10235  done
10236IFS=$as_save_IFS
10237
10238  ;;
10239esac
10240fi
10241PRINTF=$ac_cv_path_PRINTF
10242if test -n "$PRINTF"; then
10243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10244$as_echo "$PRINTF" >&6; }
10245else
10246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10247$as_echo "no" >&6; }
10248fi
10249
10250
10251  test -n "$PRINTF" && break
10252done
10253
10254    else
10255      # If it succeeded, then it was overridden by the user. We will use it
10256      # for the tool.
10257
10258      # First remove it from the list of overridden variables, so we can test
10259      # for unknown variables in the end.
10260      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10261
10262      # Check if we try to supply an empty value
10263      if test "x$PRINTF" = x; then
10264        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10265$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10266        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10267$as_echo_n "checking for PRINTF... " >&6; }
10268        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10269$as_echo "disabled" >&6; }
10270      else
10271        # Check if the provided tool contains a complete path.
10272        tool_specified="$PRINTF"
10273        tool_basename="${tool_specified##*/}"
10274        if test "x$tool_basename" = "x$tool_specified"; then
10275          # A command without a complete path is provided, search $PATH.
10276          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10277$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10278          # Extract the first word of "$tool_basename", so it can be a program name with args.
10279set dummy $tool_basename; ac_word=$2
10280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10281$as_echo_n "checking for $ac_word... " >&6; }
10282if ${ac_cv_path_PRINTF+:} false; then :
10283  $as_echo_n "(cached) " >&6
10284else
10285  case $PRINTF in
10286  [\\/]* | ?:[\\/]*)
10287  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10288  ;;
10289  *)
10290  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10291for as_dir in $PATH
10292do
10293  IFS=$as_save_IFS
10294  test -z "$as_dir" && as_dir=.
10295    for ac_exec_ext in '' $ac_executable_extensions; do
10296  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10297    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10298    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10299    break 2
10300  fi
10301done
10302  done
10303IFS=$as_save_IFS
10304
10305  ;;
10306esac
10307fi
10308PRINTF=$ac_cv_path_PRINTF
10309if test -n "$PRINTF"; then
10310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10311$as_echo "$PRINTF" >&6; }
10312else
10313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10314$as_echo "no" >&6; }
10315fi
10316
10317
10318          if test "x$PRINTF" = x; then
10319            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10320          fi
10321        else
10322          # Otherwise we believe it is a complete path. Use it as it is.
10323          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10324$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10325          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10326$as_echo_n "checking for PRINTF... " >&6; }
10327          if test ! -x "$tool_specified"; then
10328            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10329$as_echo "not found" >&6; }
10330            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10331          fi
10332          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10333$as_echo "$tool_specified" >&6; }
10334        fi
10335      fi
10336    fi
10337
10338  fi
10339
10340
10341
10342  if test "x$PRINTF" = x; then
10343    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10344  fi
10345
10346
10347
10348
10349
10350  # Publish this variable in the help.
10351
10352
10353  if [ -z "${RM+x}" ]; then
10354    # The variable is not set by user, try to locate tool using the code snippet
10355    for ac_prog in rm
10356do
10357  # Extract the first word of "$ac_prog", so it can be a program name with args.
10358set dummy $ac_prog; ac_word=$2
10359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10360$as_echo_n "checking for $ac_word... " >&6; }
10361if ${ac_cv_path_RM+:} false; then :
10362  $as_echo_n "(cached) " >&6
10363else
10364  case $RM in
10365  [\\/]* | ?:[\\/]*)
10366  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10367  ;;
10368  *)
10369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10370for as_dir in $PATH
10371do
10372  IFS=$as_save_IFS
10373  test -z "$as_dir" && as_dir=.
10374    for ac_exec_ext in '' $ac_executable_extensions; do
10375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10376    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10378    break 2
10379  fi
10380done
10381  done
10382IFS=$as_save_IFS
10383
10384  ;;
10385esac
10386fi
10387RM=$ac_cv_path_RM
10388if test -n "$RM"; then
10389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10390$as_echo "$RM" >&6; }
10391else
10392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10393$as_echo "no" >&6; }
10394fi
10395
10396
10397  test -n "$RM" && break
10398done
10399
10400  else
10401    # The variable is set, but is it from the command line or the environment?
10402
10403    # Try to remove the string !RM! from our list.
10404    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10405    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10406      # If it failed, the variable was not from the command line. Ignore it,
10407      # but warn the user (except for BASH, which is always set by the calling BASH).
10408      if test "xRM" != xBASH; then
10409        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10410$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10411      fi
10412      # Try to locate tool using the code snippet
10413      for ac_prog in rm
10414do
10415  # Extract the first word of "$ac_prog", so it can be a program name with args.
10416set dummy $ac_prog; ac_word=$2
10417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10418$as_echo_n "checking for $ac_word... " >&6; }
10419if ${ac_cv_path_RM+:} false; then :
10420  $as_echo_n "(cached) " >&6
10421else
10422  case $RM in
10423  [\\/]* | ?:[\\/]*)
10424  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10425  ;;
10426  *)
10427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10428for as_dir in $PATH
10429do
10430  IFS=$as_save_IFS
10431  test -z "$as_dir" && as_dir=.
10432    for ac_exec_ext in '' $ac_executable_extensions; do
10433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10434    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10436    break 2
10437  fi
10438done
10439  done
10440IFS=$as_save_IFS
10441
10442  ;;
10443esac
10444fi
10445RM=$ac_cv_path_RM
10446if test -n "$RM"; then
10447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10448$as_echo "$RM" >&6; }
10449else
10450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10451$as_echo "no" >&6; }
10452fi
10453
10454
10455  test -n "$RM" && break
10456done
10457
10458    else
10459      # If it succeeded, then it was overridden by the user. We will use it
10460      # for the tool.
10461
10462      # First remove it from the list of overridden variables, so we can test
10463      # for unknown variables in the end.
10464      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10465
10466      # Check if we try to supply an empty value
10467      if test "x$RM" = x; then
10468        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10469$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10470        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10471$as_echo_n "checking for RM... " >&6; }
10472        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10473$as_echo "disabled" >&6; }
10474      else
10475        # Check if the provided tool contains a complete path.
10476        tool_specified="$RM"
10477        tool_basename="${tool_specified##*/}"
10478        if test "x$tool_basename" = "x$tool_specified"; then
10479          # A command without a complete path is provided, search $PATH.
10480          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10481$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10482          # Extract the first word of "$tool_basename", so it can be a program name with args.
10483set dummy $tool_basename; ac_word=$2
10484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10485$as_echo_n "checking for $ac_word... " >&6; }
10486if ${ac_cv_path_RM+:} false; then :
10487  $as_echo_n "(cached) " >&6
10488else
10489  case $RM in
10490  [\\/]* | ?:[\\/]*)
10491  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10492  ;;
10493  *)
10494  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10495for as_dir in $PATH
10496do
10497  IFS=$as_save_IFS
10498  test -z "$as_dir" && as_dir=.
10499    for ac_exec_ext in '' $ac_executable_extensions; do
10500  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10501    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10502    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10503    break 2
10504  fi
10505done
10506  done
10507IFS=$as_save_IFS
10508
10509  ;;
10510esac
10511fi
10512RM=$ac_cv_path_RM
10513if test -n "$RM"; then
10514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10515$as_echo "$RM" >&6; }
10516else
10517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10518$as_echo "no" >&6; }
10519fi
10520
10521
10522          if test "x$RM" = x; then
10523            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10524          fi
10525        else
10526          # Otherwise we believe it is a complete path. Use it as it is.
10527          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10528$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10529          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10530$as_echo_n "checking for RM... " >&6; }
10531          if test ! -x "$tool_specified"; then
10532            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10533$as_echo "not found" >&6; }
10534            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10535          fi
10536          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10537$as_echo "$tool_specified" >&6; }
10538        fi
10539      fi
10540    fi
10541
10542  fi
10543
10544
10545
10546  if test "x$RM" = x; then
10547    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10548  fi
10549
10550
10551
10552
10553
10554  # Publish this variable in the help.
10555
10556
10557  if [ -z "${RMDIR+x}" ]; then
10558    # The variable is not set by user, try to locate tool using the code snippet
10559    for ac_prog in rmdir
10560do
10561  # Extract the first word of "$ac_prog", so it can be a program name with args.
10562set dummy $ac_prog; ac_word=$2
10563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10564$as_echo_n "checking for $ac_word... " >&6; }
10565if ${ac_cv_path_RMDIR+:} false; then :
10566  $as_echo_n "(cached) " >&6
10567else
10568  case $RMDIR in
10569  [\\/]* | ?:[\\/]*)
10570  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10571  ;;
10572  *)
10573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10574for as_dir in $PATH
10575do
10576  IFS=$as_save_IFS
10577  test -z "$as_dir" && as_dir=.
10578    for ac_exec_ext in '' $ac_executable_extensions; do
10579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10580    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10582    break 2
10583  fi
10584done
10585  done
10586IFS=$as_save_IFS
10587
10588  ;;
10589esac
10590fi
10591RMDIR=$ac_cv_path_RMDIR
10592if test -n "$RMDIR"; then
10593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10594$as_echo "$RMDIR" >&6; }
10595else
10596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10597$as_echo "no" >&6; }
10598fi
10599
10600
10601  test -n "$RMDIR" && break
10602done
10603
10604  else
10605    # The variable is set, but is it from the command line or the environment?
10606
10607    # Try to remove the string !RMDIR! from our list.
10608    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10609    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10610      # If it failed, the variable was not from the command line. Ignore it,
10611      # but warn the user (except for BASH, which is always set by the calling BASH).
10612      if test "xRMDIR" != xBASH; then
10613        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10614$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10615      fi
10616      # Try to locate tool using the code snippet
10617      for ac_prog in rmdir
10618do
10619  # Extract the first word of "$ac_prog", so it can be a program name with args.
10620set dummy $ac_prog; ac_word=$2
10621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10622$as_echo_n "checking for $ac_word... " >&6; }
10623if ${ac_cv_path_RMDIR+:} false; then :
10624  $as_echo_n "(cached) " >&6
10625else
10626  case $RMDIR in
10627  [\\/]* | ?:[\\/]*)
10628  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10629  ;;
10630  *)
10631  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10632for as_dir in $PATH
10633do
10634  IFS=$as_save_IFS
10635  test -z "$as_dir" && as_dir=.
10636    for ac_exec_ext in '' $ac_executable_extensions; do
10637  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10638    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10640    break 2
10641  fi
10642done
10643  done
10644IFS=$as_save_IFS
10645
10646  ;;
10647esac
10648fi
10649RMDIR=$ac_cv_path_RMDIR
10650if test -n "$RMDIR"; then
10651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10652$as_echo "$RMDIR" >&6; }
10653else
10654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10655$as_echo "no" >&6; }
10656fi
10657
10658
10659  test -n "$RMDIR" && break
10660done
10661
10662    else
10663      # If it succeeded, then it was overridden by the user. We will use it
10664      # for the tool.
10665
10666      # First remove it from the list of overridden variables, so we can test
10667      # for unknown variables in the end.
10668      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10669
10670      # Check if we try to supply an empty value
10671      if test "x$RMDIR" = x; then
10672        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10673$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10674        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10675$as_echo_n "checking for RMDIR... " >&6; }
10676        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10677$as_echo "disabled" >&6; }
10678      else
10679        # Check if the provided tool contains a complete path.
10680        tool_specified="$RMDIR"
10681        tool_basename="${tool_specified##*/}"
10682        if test "x$tool_basename" = "x$tool_specified"; then
10683          # A command without a complete path is provided, search $PATH.
10684          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10685$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10686          # Extract the first word of "$tool_basename", so it can be a program name with args.
10687set dummy $tool_basename; ac_word=$2
10688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10689$as_echo_n "checking for $ac_word... " >&6; }
10690if ${ac_cv_path_RMDIR+:} false; then :
10691  $as_echo_n "(cached) " >&6
10692else
10693  case $RMDIR in
10694  [\\/]* | ?:[\\/]*)
10695  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10696  ;;
10697  *)
10698  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10699for as_dir in $PATH
10700do
10701  IFS=$as_save_IFS
10702  test -z "$as_dir" && as_dir=.
10703    for ac_exec_ext in '' $ac_executable_extensions; do
10704  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10705    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10707    break 2
10708  fi
10709done
10710  done
10711IFS=$as_save_IFS
10712
10713  ;;
10714esac
10715fi
10716RMDIR=$ac_cv_path_RMDIR
10717if test -n "$RMDIR"; then
10718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10719$as_echo "$RMDIR" >&6; }
10720else
10721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10722$as_echo "no" >&6; }
10723fi
10724
10725
10726          if test "x$RMDIR" = x; then
10727            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10728          fi
10729        else
10730          # Otherwise we believe it is a complete path. Use it as it is.
10731          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10732$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10733          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10734$as_echo_n "checking for RMDIR... " >&6; }
10735          if test ! -x "$tool_specified"; then
10736            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10737$as_echo "not found" >&6; }
10738            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10739          fi
10740          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10741$as_echo "$tool_specified" >&6; }
10742        fi
10743      fi
10744    fi
10745
10746  fi
10747
10748
10749
10750  if test "x$RMDIR" = x; then
10751    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10752  fi
10753
10754
10755
10756
10757
10758  # Publish this variable in the help.
10759
10760
10761  if [ -z "${SH+x}" ]; then
10762    # The variable is not set by user, try to locate tool using the code snippet
10763    for ac_prog in sh
10764do
10765  # Extract the first word of "$ac_prog", so it can be a program name with args.
10766set dummy $ac_prog; ac_word=$2
10767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10768$as_echo_n "checking for $ac_word... " >&6; }
10769if ${ac_cv_path_SH+:} false; then :
10770  $as_echo_n "(cached) " >&6
10771else
10772  case $SH in
10773  [\\/]* | ?:[\\/]*)
10774  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10775  ;;
10776  *)
10777  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10778for as_dir in $PATH
10779do
10780  IFS=$as_save_IFS
10781  test -z "$as_dir" && as_dir=.
10782    for ac_exec_ext in '' $ac_executable_extensions; do
10783  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10784    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10786    break 2
10787  fi
10788done
10789  done
10790IFS=$as_save_IFS
10791
10792  ;;
10793esac
10794fi
10795SH=$ac_cv_path_SH
10796if test -n "$SH"; then
10797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10798$as_echo "$SH" >&6; }
10799else
10800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10801$as_echo "no" >&6; }
10802fi
10803
10804
10805  test -n "$SH" && break
10806done
10807
10808  else
10809    # The variable is set, but is it from the command line or the environment?
10810
10811    # Try to remove the string !SH! from our list.
10812    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10813    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10814      # If it failed, the variable was not from the command line. Ignore it,
10815      # but warn the user (except for BASH, which is always set by the calling BASH).
10816      if test "xSH" != xBASH; then
10817        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10818$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10819      fi
10820      # Try to locate tool using the code snippet
10821      for ac_prog in sh
10822do
10823  # Extract the first word of "$ac_prog", so it can be a program name with args.
10824set dummy $ac_prog; ac_word=$2
10825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10826$as_echo_n "checking for $ac_word... " >&6; }
10827if ${ac_cv_path_SH+:} false; then :
10828  $as_echo_n "(cached) " >&6
10829else
10830  case $SH in
10831  [\\/]* | ?:[\\/]*)
10832  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10833  ;;
10834  *)
10835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10836for as_dir in $PATH
10837do
10838  IFS=$as_save_IFS
10839  test -z "$as_dir" && as_dir=.
10840    for ac_exec_ext in '' $ac_executable_extensions; do
10841  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10842    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10844    break 2
10845  fi
10846done
10847  done
10848IFS=$as_save_IFS
10849
10850  ;;
10851esac
10852fi
10853SH=$ac_cv_path_SH
10854if test -n "$SH"; then
10855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10856$as_echo "$SH" >&6; }
10857else
10858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10859$as_echo "no" >&6; }
10860fi
10861
10862
10863  test -n "$SH" && break
10864done
10865
10866    else
10867      # If it succeeded, then it was overridden by the user. We will use it
10868      # for the tool.
10869
10870      # First remove it from the list of overridden variables, so we can test
10871      # for unknown variables in the end.
10872      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10873
10874      # Check if we try to supply an empty value
10875      if test "x$SH" = x; then
10876        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10877$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10878        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10879$as_echo_n "checking for SH... " >&6; }
10880        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10881$as_echo "disabled" >&6; }
10882      else
10883        # Check if the provided tool contains a complete path.
10884        tool_specified="$SH"
10885        tool_basename="${tool_specified##*/}"
10886        if test "x$tool_basename" = "x$tool_specified"; then
10887          # A command without a complete path is provided, search $PATH.
10888          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10889$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10890          # Extract the first word of "$tool_basename", so it can be a program name with args.
10891set dummy $tool_basename; ac_word=$2
10892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10893$as_echo_n "checking for $ac_word... " >&6; }
10894if ${ac_cv_path_SH+:} false; then :
10895  $as_echo_n "(cached) " >&6
10896else
10897  case $SH in
10898  [\\/]* | ?:[\\/]*)
10899  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10900  ;;
10901  *)
10902  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10903for as_dir in $PATH
10904do
10905  IFS=$as_save_IFS
10906  test -z "$as_dir" && as_dir=.
10907    for ac_exec_ext in '' $ac_executable_extensions; do
10908  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10909    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10910    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10911    break 2
10912  fi
10913done
10914  done
10915IFS=$as_save_IFS
10916
10917  ;;
10918esac
10919fi
10920SH=$ac_cv_path_SH
10921if test -n "$SH"; then
10922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10923$as_echo "$SH" >&6; }
10924else
10925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10926$as_echo "no" >&6; }
10927fi
10928
10929
10930          if test "x$SH" = x; then
10931            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10932          fi
10933        else
10934          # Otherwise we believe it is a complete path. Use it as it is.
10935          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10936$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10937          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10938$as_echo_n "checking for SH... " >&6; }
10939          if test ! -x "$tool_specified"; then
10940            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10941$as_echo "not found" >&6; }
10942            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10943          fi
10944          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10945$as_echo "$tool_specified" >&6; }
10946        fi
10947      fi
10948    fi
10949
10950  fi
10951
10952
10953
10954  if test "x$SH" = x; then
10955    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10956  fi
10957
10958
10959
10960
10961
10962  # Publish this variable in the help.
10963
10964
10965  if [ -z "${SORT+x}" ]; then
10966    # The variable is not set by user, try to locate tool using the code snippet
10967    for ac_prog in sort
10968do
10969  # Extract the first word of "$ac_prog", so it can be a program name with args.
10970set dummy $ac_prog; ac_word=$2
10971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10972$as_echo_n "checking for $ac_word... " >&6; }
10973if ${ac_cv_path_SORT+:} false; then :
10974  $as_echo_n "(cached) " >&6
10975else
10976  case $SORT in
10977  [\\/]* | ?:[\\/]*)
10978  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10979  ;;
10980  *)
10981  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10982for as_dir in $PATH
10983do
10984  IFS=$as_save_IFS
10985  test -z "$as_dir" && as_dir=.
10986    for ac_exec_ext in '' $ac_executable_extensions; do
10987  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10988    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10989    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10990    break 2
10991  fi
10992done
10993  done
10994IFS=$as_save_IFS
10995
10996  ;;
10997esac
10998fi
10999SORT=$ac_cv_path_SORT
11000if test -n "$SORT"; then
11001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11002$as_echo "$SORT" >&6; }
11003else
11004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11005$as_echo "no" >&6; }
11006fi
11007
11008
11009  test -n "$SORT" && break
11010done
11011
11012  else
11013    # The variable is set, but is it from the command line or the environment?
11014
11015    # Try to remove the string !SORT! from our list.
11016    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
11017    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11018      # If it failed, the variable was not from the command line. Ignore it,
11019      # but warn the user (except for BASH, which is always set by the calling BASH).
11020      if test "xSORT" != xBASH; then
11021        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
11022$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
11023      fi
11024      # Try to locate tool using the code snippet
11025      for ac_prog in sort
11026do
11027  # Extract the first word of "$ac_prog", so it can be a program name with args.
11028set dummy $ac_prog; ac_word=$2
11029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11030$as_echo_n "checking for $ac_word... " >&6; }
11031if ${ac_cv_path_SORT+:} false; then :
11032  $as_echo_n "(cached) " >&6
11033else
11034  case $SORT in
11035  [\\/]* | ?:[\\/]*)
11036  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11037  ;;
11038  *)
11039  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11040for as_dir in $PATH
11041do
11042  IFS=$as_save_IFS
11043  test -z "$as_dir" && as_dir=.
11044    for ac_exec_ext in '' $ac_executable_extensions; do
11045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11046    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11048    break 2
11049  fi
11050done
11051  done
11052IFS=$as_save_IFS
11053
11054  ;;
11055esac
11056fi
11057SORT=$ac_cv_path_SORT
11058if test -n "$SORT"; then
11059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11060$as_echo "$SORT" >&6; }
11061else
11062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11063$as_echo "no" >&6; }
11064fi
11065
11066
11067  test -n "$SORT" && break
11068done
11069
11070    else
11071      # If it succeeded, then it was overridden by the user. We will use it
11072      # for the tool.
11073
11074      # First remove it from the list of overridden variables, so we can test
11075      # for unknown variables in the end.
11076      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11077
11078      # Check if we try to supply an empty value
11079      if test "x$SORT" = x; then
11080        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
11081$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
11082        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11083$as_echo_n "checking for SORT... " >&6; }
11084        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11085$as_echo "disabled" >&6; }
11086      else
11087        # Check if the provided tool contains a complete path.
11088        tool_specified="$SORT"
11089        tool_basename="${tool_specified##*/}"
11090        if test "x$tool_basename" = "x$tool_specified"; then
11091          # A command without a complete path is provided, search $PATH.
11092          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11093$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11094          # Extract the first word of "$tool_basename", so it can be a program name with args.
11095set dummy $tool_basename; ac_word=$2
11096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11097$as_echo_n "checking for $ac_word... " >&6; }
11098if ${ac_cv_path_SORT+:} false; then :
11099  $as_echo_n "(cached) " >&6
11100else
11101  case $SORT in
11102  [\\/]* | ?:[\\/]*)
11103  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11104  ;;
11105  *)
11106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11107for as_dir in $PATH
11108do
11109  IFS=$as_save_IFS
11110  test -z "$as_dir" && as_dir=.
11111    for ac_exec_ext in '' $ac_executable_extensions; do
11112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11113    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11115    break 2
11116  fi
11117done
11118  done
11119IFS=$as_save_IFS
11120
11121  ;;
11122esac
11123fi
11124SORT=$ac_cv_path_SORT
11125if test -n "$SORT"; then
11126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11127$as_echo "$SORT" >&6; }
11128else
11129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11130$as_echo "no" >&6; }
11131fi
11132
11133
11134          if test "x$SORT" = x; then
11135            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11136          fi
11137        else
11138          # Otherwise we believe it is a complete path. Use it as it is.
11139          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11140$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11141          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11142$as_echo_n "checking for SORT... " >&6; }
11143          if test ! -x "$tool_specified"; then
11144            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11145$as_echo "not found" >&6; }
11146            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11147          fi
11148          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11149$as_echo "$tool_specified" >&6; }
11150        fi
11151      fi
11152    fi
11153
11154  fi
11155
11156
11157
11158  if test "x$SORT" = x; then
11159    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11160  fi
11161
11162
11163
11164
11165
11166  # Publish this variable in the help.
11167
11168
11169  if [ -z "${TAIL+x}" ]; then
11170    # The variable is not set by user, try to locate tool using the code snippet
11171    for ac_prog in tail
11172do
11173  # Extract the first word of "$ac_prog", so it can be a program name with args.
11174set dummy $ac_prog; ac_word=$2
11175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11176$as_echo_n "checking for $ac_word... " >&6; }
11177if ${ac_cv_path_TAIL+:} false; then :
11178  $as_echo_n "(cached) " >&6
11179else
11180  case $TAIL in
11181  [\\/]* | ?:[\\/]*)
11182  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11183  ;;
11184  *)
11185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11186for as_dir in $PATH
11187do
11188  IFS=$as_save_IFS
11189  test -z "$as_dir" && as_dir=.
11190    for ac_exec_ext in '' $ac_executable_extensions; do
11191  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11192    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11193    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11194    break 2
11195  fi
11196done
11197  done
11198IFS=$as_save_IFS
11199
11200  ;;
11201esac
11202fi
11203TAIL=$ac_cv_path_TAIL
11204if test -n "$TAIL"; then
11205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11206$as_echo "$TAIL" >&6; }
11207else
11208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11209$as_echo "no" >&6; }
11210fi
11211
11212
11213  test -n "$TAIL" && break
11214done
11215
11216  else
11217    # The variable is set, but is it from the command line or the environment?
11218
11219    # Try to remove the string !TAIL! from our list.
11220    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11221    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11222      # If it failed, the variable was not from the command line. Ignore it,
11223      # but warn the user (except for BASH, which is always set by the calling BASH).
11224      if test "xTAIL" != xBASH; then
11225        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11226$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11227      fi
11228      # Try to locate tool using the code snippet
11229      for ac_prog in tail
11230do
11231  # Extract the first word of "$ac_prog", so it can be a program name with args.
11232set dummy $ac_prog; ac_word=$2
11233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11234$as_echo_n "checking for $ac_word... " >&6; }
11235if ${ac_cv_path_TAIL+:} false; then :
11236  $as_echo_n "(cached) " >&6
11237else
11238  case $TAIL in
11239  [\\/]* | ?:[\\/]*)
11240  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11241  ;;
11242  *)
11243  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11244for as_dir in $PATH
11245do
11246  IFS=$as_save_IFS
11247  test -z "$as_dir" && as_dir=.
11248    for ac_exec_ext in '' $ac_executable_extensions; do
11249  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11250    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11251    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11252    break 2
11253  fi
11254done
11255  done
11256IFS=$as_save_IFS
11257
11258  ;;
11259esac
11260fi
11261TAIL=$ac_cv_path_TAIL
11262if test -n "$TAIL"; then
11263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11264$as_echo "$TAIL" >&6; }
11265else
11266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11267$as_echo "no" >&6; }
11268fi
11269
11270
11271  test -n "$TAIL" && break
11272done
11273
11274    else
11275      # If it succeeded, then it was overridden by the user. We will use it
11276      # for the tool.
11277
11278      # First remove it from the list of overridden variables, so we can test
11279      # for unknown variables in the end.
11280      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11281
11282      # Check if we try to supply an empty value
11283      if test "x$TAIL" = x; then
11284        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11285$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11286        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11287$as_echo_n "checking for TAIL... " >&6; }
11288        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11289$as_echo "disabled" >&6; }
11290      else
11291        # Check if the provided tool contains a complete path.
11292        tool_specified="$TAIL"
11293        tool_basename="${tool_specified##*/}"
11294        if test "x$tool_basename" = "x$tool_specified"; then
11295          # A command without a complete path is provided, search $PATH.
11296          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11297$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11298          # Extract the first word of "$tool_basename", so it can be a program name with args.
11299set dummy $tool_basename; ac_word=$2
11300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11301$as_echo_n "checking for $ac_word... " >&6; }
11302if ${ac_cv_path_TAIL+:} false; then :
11303  $as_echo_n "(cached) " >&6
11304else
11305  case $TAIL in
11306  [\\/]* | ?:[\\/]*)
11307  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11308  ;;
11309  *)
11310  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11311for as_dir in $PATH
11312do
11313  IFS=$as_save_IFS
11314  test -z "$as_dir" && as_dir=.
11315    for ac_exec_ext in '' $ac_executable_extensions; do
11316  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11317    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11319    break 2
11320  fi
11321done
11322  done
11323IFS=$as_save_IFS
11324
11325  ;;
11326esac
11327fi
11328TAIL=$ac_cv_path_TAIL
11329if test -n "$TAIL"; then
11330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11331$as_echo "$TAIL" >&6; }
11332else
11333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11334$as_echo "no" >&6; }
11335fi
11336
11337
11338          if test "x$TAIL" = x; then
11339            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11340          fi
11341        else
11342          # Otherwise we believe it is a complete path. Use it as it is.
11343          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11344$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11345          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11346$as_echo_n "checking for TAIL... " >&6; }
11347          if test ! -x "$tool_specified"; then
11348            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11349$as_echo "not found" >&6; }
11350            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11351          fi
11352          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11353$as_echo "$tool_specified" >&6; }
11354        fi
11355      fi
11356    fi
11357
11358  fi
11359
11360
11361
11362  if test "x$TAIL" = x; then
11363    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11364  fi
11365
11366
11367
11368
11369
11370  # Publish this variable in the help.
11371
11372
11373  if [ -z "${TAR+x}" ]; then
11374    # The variable is not set by user, try to locate tool using the code snippet
11375    for ac_prog in gtar tar
11376do
11377  # Extract the first word of "$ac_prog", so it can be a program name with args.
11378set dummy $ac_prog; ac_word=$2
11379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11380$as_echo_n "checking for $ac_word... " >&6; }
11381if ${ac_cv_path_TAR+:} false; then :
11382  $as_echo_n "(cached) " >&6
11383else
11384  case $TAR in
11385  [\\/]* | ?:[\\/]*)
11386  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11387  ;;
11388  *)
11389  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11390for as_dir in $PATH
11391do
11392  IFS=$as_save_IFS
11393  test -z "$as_dir" && as_dir=.
11394    for ac_exec_ext in '' $ac_executable_extensions; do
11395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11396    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11398    break 2
11399  fi
11400done
11401  done
11402IFS=$as_save_IFS
11403
11404  ;;
11405esac
11406fi
11407TAR=$ac_cv_path_TAR
11408if test -n "$TAR"; then
11409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11410$as_echo "$TAR" >&6; }
11411else
11412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11413$as_echo "no" >&6; }
11414fi
11415
11416
11417  test -n "$TAR" && break
11418done
11419
11420  else
11421    # The variable is set, but is it from the command line or the environment?
11422
11423    # Try to remove the string !TAR! from our list.
11424    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11425    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11426      # If it failed, the variable was not from the command line. Ignore it,
11427      # but warn the user (except for BASH, which is always set by the calling BASH).
11428      if test "xTAR" != xBASH; then
11429        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11430$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11431      fi
11432      # Try to locate tool using the code snippet
11433      for ac_prog in gtar tar
11434do
11435  # Extract the first word of "$ac_prog", so it can be a program name with args.
11436set dummy $ac_prog; ac_word=$2
11437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11438$as_echo_n "checking for $ac_word... " >&6; }
11439if ${ac_cv_path_TAR+:} false; then :
11440  $as_echo_n "(cached) " >&6
11441else
11442  case $TAR in
11443  [\\/]* | ?:[\\/]*)
11444  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11445  ;;
11446  *)
11447  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11448for as_dir in $PATH
11449do
11450  IFS=$as_save_IFS
11451  test -z "$as_dir" && as_dir=.
11452    for ac_exec_ext in '' $ac_executable_extensions; do
11453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11454    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11456    break 2
11457  fi
11458done
11459  done
11460IFS=$as_save_IFS
11461
11462  ;;
11463esac
11464fi
11465TAR=$ac_cv_path_TAR
11466if test -n "$TAR"; then
11467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11468$as_echo "$TAR" >&6; }
11469else
11470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11471$as_echo "no" >&6; }
11472fi
11473
11474
11475  test -n "$TAR" && break
11476done
11477
11478    else
11479      # If it succeeded, then it was overridden by the user. We will use it
11480      # for the tool.
11481
11482      # First remove it from the list of overridden variables, so we can test
11483      # for unknown variables in the end.
11484      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11485
11486      # Check if we try to supply an empty value
11487      if test "x$TAR" = x; then
11488        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11489$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11490        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11491$as_echo_n "checking for TAR... " >&6; }
11492        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11493$as_echo "disabled" >&6; }
11494      else
11495        # Check if the provided tool contains a complete path.
11496        tool_specified="$TAR"
11497        tool_basename="${tool_specified##*/}"
11498        if test "x$tool_basename" = "x$tool_specified"; then
11499          # A command without a complete path is provided, search $PATH.
11500          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11501$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11502          # Extract the first word of "$tool_basename", so it can be a program name with args.
11503set dummy $tool_basename; ac_word=$2
11504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11505$as_echo_n "checking for $ac_word... " >&6; }
11506if ${ac_cv_path_TAR+:} false; then :
11507  $as_echo_n "(cached) " >&6
11508else
11509  case $TAR in
11510  [\\/]* | ?:[\\/]*)
11511  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11512  ;;
11513  *)
11514  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11515for as_dir in $PATH
11516do
11517  IFS=$as_save_IFS
11518  test -z "$as_dir" && as_dir=.
11519    for ac_exec_ext in '' $ac_executable_extensions; do
11520  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11521    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11522    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11523    break 2
11524  fi
11525done
11526  done
11527IFS=$as_save_IFS
11528
11529  ;;
11530esac
11531fi
11532TAR=$ac_cv_path_TAR
11533if test -n "$TAR"; then
11534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11535$as_echo "$TAR" >&6; }
11536else
11537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11538$as_echo "no" >&6; }
11539fi
11540
11541
11542          if test "x$TAR" = x; then
11543            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11544          fi
11545        else
11546          # Otherwise we believe it is a complete path. Use it as it is.
11547          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11548$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11549          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11550$as_echo_n "checking for TAR... " >&6; }
11551          if test ! -x "$tool_specified"; then
11552            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11553$as_echo "not found" >&6; }
11554            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11555          fi
11556          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11557$as_echo "$tool_specified" >&6; }
11558        fi
11559      fi
11560    fi
11561
11562  fi
11563
11564
11565
11566  if test "x$TAR" = x; then
11567    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11568  fi
11569
11570
11571
11572
11573
11574  # Publish this variable in the help.
11575
11576
11577  if [ -z "${TEE+x}" ]; then
11578    # The variable is not set by user, try to locate tool using the code snippet
11579    for ac_prog in tee
11580do
11581  # Extract the first word of "$ac_prog", so it can be a program name with args.
11582set dummy $ac_prog; ac_word=$2
11583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11584$as_echo_n "checking for $ac_word... " >&6; }
11585if ${ac_cv_path_TEE+:} false; then :
11586  $as_echo_n "(cached) " >&6
11587else
11588  case $TEE in
11589  [\\/]* | ?:[\\/]*)
11590  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11591  ;;
11592  *)
11593  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11594for as_dir in $PATH
11595do
11596  IFS=$as_save_IFS
11597  test -z "$as_dir" && as_dir=.
11598    for ac_exec_ext in '' $ac_executable_extensions; do
11599  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11600    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11602    break 2
11603  fi
11604done
11605  done
11606IFS=$as_save_IFS
11607
11608  ;;
11609esac
11610fi
11611TEE=$ac_cv_path_TEE
11612if test -n "$TEE"; then
11613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11614$as_echo "$TEE" >&6; }
11615else
11616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11617$as_echo "no" >&6; }
11618fi
11619
11620
11621  test -n "$TEE" && break
11622done
11623
11624  else
11625    # The variable is set, but is it from the command line or the environment?
11626
11627    # Try to remove the string !TEE! from our list.
11628    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11629    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11630      # If it failed, the variable was not from the command line. Ignore it,
11631      # but warn the user (except for BASH, which is always set by the calling BASH).
11632      if test "xTEE" != xBASH; then
11633        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11634$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11635      fi
11636      # Try to locate tool using the code snippet
11637      for ac_prog in tee
11638do
11639  # Extract the first word of "$ac_prog", so it can be a program name with args.
11640set dummy $ac_prog; ac_word=$2
11641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11642$as_echo_n "checking for $ac_word... " >&6; }
11643if ${ac_cv_path_TEE+:} false; then :
11644  $as_echo_n "(cached) " >&6
11645else
11646  case $TEE in
11647  [\\/]* | ?:[\\/]*)
11648  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11649  ;;
11650  *)
11651  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11652for as_dir in $PATH
11653do
11654  IFS=$as_save_IFS
11655  test -z "$as_dir" && as_dir=.
11656    for ac_exec_ext in '' $ac_executable_extensions; do
11657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11658    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11660    break 2
11661  fi
11662done
11663  done
11664IFS=$as_save_IFS
11665
11666  ;;
11667esac
11668fi
11669TEE=$ac_cv_path_TEE
11670if test -n "$TEE"; then
11671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11672$as_echo "$TEE" >&6; }
11673else
11674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11675$as_echo "no" >&6; }
11676fi
11677
11678
11679  test -n "$TEE" && break
11680done
11681
11682    else
11683      # If it succeeded, then it was overridden by the user. We will use it
11684      # for the tool.
11685
11686      # First remove it from the list of overridden variables, so we can test
11687      # for unknown variables in the end.
11688      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11689
11690      # Check if we try to supply an empty value
11691      if test "x$TEE" = x; then
11692        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11693$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11694        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11695$as_echo_n "checking for TEE... " >&6; }
11696        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11697$as_echo "disabled" >&6; }
11698      else
11699        # Check if the provided tool contains a complete path.
11700        tool_specified="$TEE"
11701        tool_basename="${tool_specified##*/}"
11702        if test "x$tool_basename" = "x$tool_specified"; then
11703          # A command without a complete path is provided, search $PATH.
11704          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11705$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11706          # Extract the first word of "$tool_basename", so it can be a program name with args.
11707set dummy $tool_basename; ac_word=$2
11708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11709$as_echo_n "checking for $ac_word... " >&6; }
11710if ${ac_cv_path_TEE+:} false; then :
11711  $as_echo_n "(cached) " >&6
11712else
11713  case $TEE in
11714  [\\/]* | ?:[\\/]*)
11715  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11716  ;;
11717  *)
11718  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11719for as_dir in $PATH
11720do
11721  IFS=$as_save_IFS
11722  test -z "$as_dir" && as_dir=.
11723    for ac_exec_ext in '' $ac_executable_extensions; do
11724  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11725    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11726    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11727    break 2
11728  fi
11729done
11730  done
11731IFS=$as_save_IFS
11732
11733  ;;
11734esac
11735fi
11736TEE=$ac_cv_path_TEE
11737if test -n "$TEE"; then
11738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11739$as_echo "$TEE" >&6; }
11740else
11741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11742$as_echo "no" >&6; }
11743fi
11744
11745
11746          if test "x$TEE" = x; then
11747            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11748          fi
11749        else
11750          # Otherwise we believe it is a complete path. Use it as it is.
11751          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11752$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11753          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11754$as_echo_n "checking for TEE... " >&6; }
11755          if test ! -x "$tool_specified"; then
11756            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11757$as_echo "not found" >&6; }
11758            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11759          fi
11760          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11761$as_echo "$tool_specified" >&6; }
11762        fi
11763      fi
11764    fi
11765
11766  fi
11767
11768
11769
11770  if test "x$TEE" = x; then
11771    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11772  fi
11773
11774
11775
11776
11777
11778  # Publish this variable in the help.
11779
11780
11781  if [ -z "${TOUCH+x}" ]; then
11782    # The variable is not set by user, try to locate tool using the code snippet
11783    for ac_prog in touch
11784do
11785  # Extract the first word of "$ac_prog", so it can be a program name with args.
11786set dummy $ac_prog; ac_word=$2
11787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11788$as_echo_n "checking for $ac_word... " >&6; }
11789if ${ac_cv_path_TOUCH+:} false; then :
11790  $as_echo_n "(cached) " >&6
11791else
11792  case $TOUCH in
11793  [\\/]* | ?:[\\/]*)
11794  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11795  ;;
11796  *)
11797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11798for as_dir in $PATH
11799do
11800  IFS=$as_save_IFS
11801  test -z "$as_dir" && as_dir=.
11802    for ac_exec_ext in '' $ac_executable_extensions; do
11803  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11804    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11806    break 2
11807  fi
11808done
11809  done
11810IFS=$as_save_IFS
11811
11812  ;;
11813esac
11814fi
11815TOUCH=$ac_cv_path_TOUCH
11816if test -n "$TOUCH"; then
11817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11818$as_echo "$TOUCH" >&6; }
11819else
11820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11821$as_echo "no" >&6; }
11822fi
11823
11824
11825  test -n "$TOUCH" && break
11826done
11827
11828  else
11829    # The variable is set, but is it from the command line or the environment?
11830
11831    # Try to remove the string !TOUCH! from our list.
11832    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11833    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11834      # If it failed, the variable was not from the command line. Ignore it,
11835      # but warn the user (except for BASH, which is always set by the calling BASH).
11836      if test "xTOUCH" != xBASH; then
11837        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11838$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11839      fi
11840      # Try to locate tool using the code snippet
11841      for ac_prog in touch
11842do
11843  # Extract the first word of "$ac_prog", so it can be a program name with args.
11844set dummy $ac_prog; ac_word=$2
11845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11846$as_echo_n "checking for $ac_word... " >&6; }
11847if ${ac_cv_path_TOUCH+:} false; then :
11848  $as_echo_n "(cached) " >&6
11849else
11850  case $TOUCH in
11851  [\\/]* | ?:[\\/]*)
11852  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11853  ;;
11854  *)
11855  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11856for as_dir in $PATH
11857do
11858  IFS=$as_save_IFS
11859  test -z "$as_dir" && as_dir=.
11860    for ac_exec_ext in '' $ac_executable_extensions; do
11861  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11862    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11863    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11864    break 2
11865  fi
11866done
11867  done
11868IFS=$as_save_IFS
11869
11870  ;;
11871esac
11872fi
11873TOUCH=$ac_cv_path_TOUCH
11874if test -n "$TOUCH"; then
11875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11876$as_echo "$TOUCH" >&6; }
11877else
11878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11879$as_echo "no" >&6; }
11880fi
11881
11882
11883  test -n "$TOUCH" && break
11884done
11885
11886    else
11887      # If it succeeded, then it was overridden by the user. We will use it
11888      # for the tool.
11889
11890      # First remove it from the list of overridden variables, so we can test
11891      # for unknown variables in the end.
11892      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11893
11894      # Check if we try to supply an empty value
11895      if test "x$TOUCH" = x; then
11896        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11897$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11898        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11899$as_echo_n "checking for TOUCH... " >&6; }
11900        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11901$as_echo "disabled" >&6; }
11902      else
11903        # Check if the provided tool contains a complete path.
11904        tool_specified="$TOUCH"
11905        tool_basename="${tool_specified##*/}"
11906        if test "x$tool_basename" = "x$tool_specified"; then
11907          # A command without a complete path is provided, search $PATH.
11908          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11909$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11910          # Extract the first word of "$tool_basename", so it can be a program name with args.
11911set dummy $tool_basename; ac_word=$2
11912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11913$as_echo_n "checking for $ac_word... " >&6; }
11914if ${ac_cv_path_TOUCH+:} false; then :
11915  $as_echo_n "(cached) " >&6
11916else
11917  case $TOUCH in
11918  [\\/]* | ?:[\\/]*)
11919  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11920  ;;
11921  *)
11922  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11923for as_dir in $PATH
11924do
11925  IFS=$as_save_IFS
11926  test -z "$as_dir" && as_dir=.
11927    for ac_exec_ext in '' $ac_executable_extensions; do
11928  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11929    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11930    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11931    break 2
11932  fi
11933done
11934  done
11935IFS=$as_save_IFS
11936
11937  ;;
11938esac
11939fi
11940TOUCH=$ac_cv_path_TOUCH
11941if test -n "$TOUCH"; then
11942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11943$as_echo "$TOUCH" >&6; }
11944else
11945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11946$as_echo "no" >&6; }
11947fi
11948
11949
11950          if test "x$TOUCH" = x; then
11951            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11952          fi
11953        else
11954          # Otherwise we believe it is a complete path. Use it as it is.
11955          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11956$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11957          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11958$as_echo_n "checking for TOUCH... " >&6; }
11959          if test ! -x "$tool_specified"; then
11960            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11961$as_echo "not found" >&6; }
11962            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11963          fi
11964          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11965$as_echo "$tool_specified" >&6; }
11966        fi
11967      fi
11968    fi
11969
11970  fi
11971
11972
11973
11974  if test "x$TOUCH" = x; then
11975    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11976  fi
11977
11978
11979
11980
11981
11982  # Publish this variable in the help.
11983
11984
11985  if [ -z "${TR+x}" ]; then
11986    # The variable is not set by user, try to locate tool using the code snippet
11987    for ac_prog in tr
11988do
11989  # Extract the first word of "$ac_prog", so it can be a program name with args.
11990set dummy $ac_prog; ac_word=$2
11991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11992$as_echo_n "checking for $ac_word... " >&6; }
11993if ${ac_cv_path_TR+:} false; then :
11994  $as_echo_n "(cached) " >&6
11995else
11996  case $TR in
11997  [\\/]* | ?:[\\/]*)
11998  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11999  ;;
12000  *)
12001  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12002for as_dir in $PATH
12003do
12004  IFS=$as_save_IFS
12005  test -z "$as_dir" && as_dir=.
12006    for ac_exec_ext in '' $ac_executable_extensions; do
12007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12008    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12010    break 2
12011  fi
12012done
12013  done
12014IFS=$as_save_IFS
12015
12016  ;;
12017esac
12018fi
12019TR=$ac_cv_path_TR
12020if test -n "$TR"; then
12021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12022$as_echo "$TR" >&6; }
12023else
12024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12025$as_echo "no" >&6; }
12026fi
12027
12028
12029  test -n "$TR" && break
12030done
12031
12032  else
12033    # The variable is set, but is it from the command line or the environment?
12034
12035    # Try to remove the string !TR! from our list.
12036    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
12037    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12038      # If it failed, the variable was not from the command line. Ignore it,
12039      # but warn the user (except for BASH, which is always set by the calling BASH).
12040      if test "xTR" != xBASH; then
12041        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
12042$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
12043      fi
12044      # Try to locate tool using the code snippet
12045      for ac_prog in tr
12046do
12047  # Extract the first word of "$ac_prog", so it can be a program name with args.
12048set dummy $ac_prog; ac_word=$2
12049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12050$as_echo_n "checking for $ac_word... " >&6; }
12051if ${ac_cv_path_TR+:} false; then :
12052  $as_echo_n "(cached) " >&6
12053else
12054  case $TR in
12055  [\\/]* | ?:[\\/]*)
12056  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12057  ;;
12058  *)
12059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12060for as_dir in $PATH
12061do
12062  IFS=$as_save_IFS
12063  test -z "$as_dir" && as_dir=.
12064    for ac_exec_ext in '' $ac_executable_extensions; do
12065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12066    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12068    break 2
12069  fi
12070done
12071  done
12072IFS=$as_save_IFS
12073
12074  ;;
12075esac
12076fi
12077TR=$ac_cv_path_TR
12078if test -n "$TR"; then
12079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12080$as_echo "$TR" >&6; }
12081else
12082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12083$as_echo "no" >&6; }
12084fi
12085
12086
12087  test -n "$TR" && break
12088done
12089
12090    else
12091      # If it succeeded, then it was overridden by the user. We will use it
12092      # for the tool.
12093
12094      # First remove it from the list of overridden variables, so we can test
12095      # for unknown variables in the end.
12096      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12097
12098      # Check if we try to supply an empty value
12099      if test "x$TR" = x; then
12100        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12101$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12102        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12103$as_echo_n "checking for TR... " >&6; }
12104        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12105$as_echo "disabled" >&6; }
12106      else
12107        # Check if the provided tool contains a complete path.
12108        tool_specified="$TR"
12109        tool_basename="${tool_specified##*/}"
12110        if test "x$tool_basename" = "x$tool_specified"; then
12111          # A command without a complete path is provided, search $PATH.
12112          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12113$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12114          # Extract the first word of "$tool_basename", so it can be a program name with args.
12115set dummy $tool_basename; ac_word=$2
12116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12117$as_echo_n "checking for $ac_word... " >&6; }
12118if ${ac_cv_path_TR+:} false; then :
12119  $as_echo_n "(cached) " >&6
12120else
12121  case $TR in
12122  [\\/]* | ?:[\\/]*)
12123  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12124  ;;
12125  *)
12126  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12127for as_dir in $PATH
12128do
12129  IFS=$as_save_IFS
12130  test -z "$as_dir" && as_dir=.
12131    for ac_exec_ext in '' $ac_executable_extensions; do
12132  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12133    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12135    break 2
12136  fi
12137done
12138  done
12139IFS=$as_save_IFS
12140
12141  ;;
12142esac
12143fi
12144TR=$ac_cv_path_TR
12145if test -n "$TR"; then
12146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12147$as_echo "$TR" >&6; }
12148else
12149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12150$as_echo "no" >&6; }
12151fi
12152
12153
12154          if test "x$TR" = x; then
12155            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12156          fi
12157        else
12158          # Otherwise we believe it is a complete path. Use it as it is.
12159          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12160$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12161          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12162$as_echo_n "checking for TR... " >&6; }
12163          if test ! -x "$tool_specified"; then
12164            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12165$as_echo "not found" >&6; }
12166            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12167          fi
12168          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12169$as_echo "$tool_specified" >&6; }
12170        fi
12171      fi
12172    fi
12173
12174  fi
12175
12176
12177
12178  if test "x$TR" = x; then
12179    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12180  fi
12181
12182
12183
12184
12185
12186  # Publish this variable in the help.
12187
12188
12189  if [ -z "${UNAME+x}" ]; then
12190    # The variable is not set by user, try to locate tool using the code snippet
12191    for ac_prog in uname
12192do
12193  # Extract the first word of "$ac_prog", so it can be a program name with args.
12194set dummy $ac_prog; ac_word=$2
12195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12196$as_echo_n "checking for $ac_word... " >&6; }
12197if ${ac_cv_path_UNAME+:} false; then :
12198  $as_echo_n "(cached) " >&6
12199else
12200  case $UNAME in
12201  [\\/]* | ?:[\\/]*)
12202  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12203  ;;
12204  *)
12205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12206for as_dir in $PATH
12207do
12208  IFS=$as_save_IFS
12209  test -z "$as_dir" && as_dir=.
12210    for ac_exec_ext in '' $ac_executable_extensions; do
12211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12212    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12214    break 2
12215  fi
12216done
12217  done
12218IFS=$as_save_IFS
12219
12220  ;;
12221esac
12222fi
12223UNAME=$ac_cv_path_UNAME
12224if test -n "$UNAME"; then
12225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12226$as_echo "$UNAME" >&6; }
12227else
12228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12229$as_echo "no" >&6; }
12230fi
12231
12232
12233  test -n "$UNAME" && break
12234done
12235
12236  else
12237    # The variable is set, but is it from the command line or the environment?
12238
12239    # Try to remove the string !UNAME! from our list.
12240    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12241    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12242      # If it failed, the variable was not from the command line. Ignore it,
12243      # but warn the user (except for BASH, which is always set by the calling BASH).
12244      if test "xUNAME" != xBASH; then
12245        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12246$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12247      fi
12248      # Try to locate tool using the code snippet
12249      for ac_prog in uname
12250do
12251  # Extract the first word of "$ac_prog", so it can be a program name with args.
12252set dummy $ac_prog; ac_word=$2
12253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12254$as_echo_n "checking for $ac_word... " >&6; }
12255if ${ac_cv_path_UNAME+:} false; then :
12256  $as_echo_n "(cached) " >&6
12257else
12258  case $UNAME in
12259  [\\/]* | ?:[\\/]*)
12260  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12261  ;;
12262  *)
12263  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12264for as_dir in $PATH
12265do
12266  IFS=$as_save_IFS
12267  test -z "$as_dir" && as_dir=.
12268    for ac_exec_ext in '' $ac_executable_extensions; do
12269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12270    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12272    break 2
12273  fi
12274done
12275  done
12276IFS=$as_save_IFS
12277
12278  ;;
12279esac
12280fi
12281UNAME=$ac_cv_path_UNAME
12282if test -n "$UNAME"; then
12283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12284$as_echo "$UNAME" >&6; }
12285else
12286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12287$as_echo "no" >&6; }
12288fi
12289
12290
12291  test -n "$UNAME" && break
12292done
12293
12294    else
12295      # If it succeeded, then it was overridden by the user. We will use it
12296      # for the tool.
12297
12298      # First remove it from the list of overridden variables, so we can test
12299      # for unknown variables in the end.
12300      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12301
12302      # Check if we try to supply an empty value
12303      if test "x$UNAME" = x; then
12304        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12305$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12306        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12307$as_echo_n "checking for UNAME... " >&6; }
12308        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12309$as_echo "disabled" >&6; }
12310      else
12311        # Check if the provided tool contains a complete path.
12312        tool_specified="$UNAME"
12313        tool_basename="${tool_specified##*/}"
12314        if test "x$tool_basename" = "x$tool_specified"; then
12315          # A command without a complete path is provided, search $PATH.
12316          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12317$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12318          # Extract the first word of "$tool_basename", so it can be a program name with args.
12319set dummy $tool_basename; ac_word=$2
12320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12321$as_echo_n "checking for $ac_word... " >&6; }
12322if ${ac_cv_path_UNAME+:} false; then :
12323  $as_echo_n "(cached) " >&6
12324else
12325  case $UNAME in
12326  [\\/]* | ?:[\\/]*)
12327  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12328  ;;
12329  *)
12330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12331for as_dir in $PATH
12332do
12333  IFS=$as_save_IFS
12334  test -z "$as_dir" && as_dir=.
12335    for ac_exec_ext in '' $ac_executable_extensions; do
12336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12337    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12339    break 2
12340  fi
12341done
12342  done
12343IFS=$as_save_IFS
12344
12345  ;;
12346esac
12347fi
12348UNAME=$ac_cv_path_UNAME
12349if test -n "$UNAME"; then
12350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12351$as_echo "$UNAME" >&6; }
12352else
12353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12354$as_echo "no" >&6; }
12355fi
12356
12357
12358          if test "x$UNAME" = x; then
12359            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12360          fi
12361        else
12362          # Otherwise we believe it is a complete path. Use it as it is.
12363          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12364$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12365          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12366$as_echo_n "checking for UNAME... " >&6; }
12367          if test ! -x "$tool_specified"; then
12368            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12369$as_echo "not found" >&6; }
12370            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12371          fi
12372          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12373$as_echo "$tool_specified" >&6; }
12374        fi
12375      fi
12376    fi
12377
12378  fi
12379
12380
12381
12382  if test "x$UNAME" = x; then
12383    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12384  fi
12385
12386
12387
12388
12389
12390  # Publish this variable in the help.
12391
12392
12393  if [ -z "${UNIQ+x}" ]; then
12394    # The variable is not set by user, try to locate tool using the code snippet
12395    for ac_prog in uniq
12396do
12397  # Extract the first word of "$ac_prog", so it can be a program name with args.
12398set dummy $ac_prog; ac_word=$2
12399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12400$as_echo_n "checking for $ac_word... " >&6; }
12401if ${ac_cv_path_UNIQ+:} false; then :
12402  $as_echo_n "(cached) " >&6
12403else
12404  case $UNIQ in
12405  [\\/]* | ?:[\\/]*)
12406  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12407  ;;
12408  *)
12409  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12410for as_dir in $PATH
12411do
12412  IFS=$as_save_IFS
12413  test -z "$as_dir" && as_dir=.
12414    for ac_exec_ext in '' $ac_executable_extensions; do
12415  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12416    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12418    break 2
12419  fi
12420done
12421  done
12422IFS=$as_save_IFS
12423
12424  ;;
12425esac
12426fi
12427UNIQ=$ac_cv_path_UNIQ
12428if test -n "$UNIQ"; then
12429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12430$as_echo "$UNIQ" >&6; }
12431else
12432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12433$as_echo "no" >&6; }
12434fi
12435
12436
12437  test -n "$UNIQ" && break
12438done
12439
12440  else
12441    # The variable is set, but is it from the command line or the environment?
12442
12443    # Try to remove the string !UNIQ! from our list.
12444    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12445    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12446      # If it failed, the variable was not from the command line. Ignore it,
12447      # but warn the user (except for BASH, which is always set by the calling BASH).
12448      if test "xUNIQ" != xBASH; then
12449        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12450$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12451      fi
12452      # Try to locate tool using the code snippet
12453      for ac_prog in uniq
12454do
12455  # Extract the first word of "$ac_prog", so it can be a program name with args.
12456set dummy $ac_prog; ac_word=$2
12457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12458$as_echo_n "checking for $ac_word... " >&6; }
12459if ${ac_cv_path_UNIQ+:} false; then :
12460  $as_echo_n "(cached) " >&6
12461else
12462  case $UNIQ in
12463  [\\/]* | ?:[\\/]*)
12464  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12465  ;;
12466  *)
12467  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12468for as_dir in $PATH
12469do
12470  IFS=$as_save_IFS
12471  test -z "$as_dir" && as_dir=.
12472    for ac_exec_ext in '' $ac_executable_extensions; do
12473  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12474    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12475    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12476    break 2
12477  fi
12478done
12479  done
12480IFS=$as_save_IFS
12481
12482  ;;
12483esac
12484fi
12485UNIQ=$ac_cv_path_UNIQ
12486if test -n "$UNIQ"; then
12487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12488$as_echo "$UNIQ" >&6; }
12489else
12490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12491$as_echo "no" >&6; }
12492fi
12493
12494
12495  test -n "$UNIQ" && break
12496done
12497
12498    else
12499      # If it succeeded, then it was overridden by the user. We will use it
12500      # for the tool.
12501
12502      # First remove it from the list of overridden variables, so we can test
12503      # for unknown variables in the end.
12504      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12505
12506      # Check if we try to supply an empty value
12507      if test "x$UNIQ" = x; then
12508        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12509$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12510        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12511$as_echo_n "checking for UNIQ... " >&6; }
12512        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12513$as_echo "disabled" >&6; }
12514      else
12515        # Check if the provided tool contains a complete path.
12516        tool_specified="$UNIQ"
12517        tool_basename="${tool_specified##*/}"
12518        if test "x$tool_basename" = "x$tool_specified"; then
12519          # A command without a complete path is provided, search $PATH.
12520          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12521$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12522          # Extract the first word of "$tool_basename", so it can be a program name with args.
12523set dummy $tool_basename; ac_word=$2
12524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12525$as_echo_n "checking for $ac_word... " >&6; }
12526if ${ac_cv_path_UNIQ+:} false; then :
12527  $as_echo_n "(cached) " >&6
12528else
12529  case $UNIQ in
12530  [\\/]* | ?:[\\/]*)
12531  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12532  ;;
12533  *)
12534  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12535for as_dir in $PATH
12536do
12537  IFS=$as_save_IFS
12538  test -z "$as_dir" && as_dir=.
12539    for ac_exec_ext in '' $ac_executable_extensions; do
12540  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12541    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12542    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12543    break 2
12544  fi
12545done
12546  done
12547IFS=$as_save_IFS
12548
12549  ;;
12550esac
12551fi
12552UNIQ=$ac_cv_path_UNIQ
12553if test -n "$UNIQ"; then
12554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12555$as_echo "$UNIQ" >&6; }
12556else
12557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12558$as_echo "no" >&6; }
12559fi
12560
12561
12562          if test "x$UNIQ" = x; then
12563            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12564          fi
12565        else
12566          # Otherwise we believe it is a complete path. Use it as it is.
12567          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12568$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12569          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12570$as_echo_n "checking for UNIQ... " >&6; }
12571          if test ! -x "$tool_specified"; then
12572            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12573$as_echo "not found" >&6; }
12574            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12575          fi
12576          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12577$as_echo "$tool_specified" >&6; }
12578        fi
12579      fi
12580    fi
12581
12582  fi
12583
12584
12585
12586  if test "x$UNIQ" = x; then
12587    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12588  fi
12589
12590
12591
12592
12593
12594  # Publish this variable in the help.
12595
12596
12597  if [ -z "${WC+x}" ]; then
12598    # The variable is not set by user, try to locate tool using the code snippet
12599    for ac_prog in wc
12600do
12601  # Extract the first word of "$ac_prog", so it can be a program name with args.
12602set dummy $ac_prog; ac_word=$2
12603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12604$as_echo_n "checking for $ac_word... " >&6; }
12605if ${ac_cv_path_WC+:} false; then :
12606  $as_echo_n "(cached) " >&6
12607else
12608  case $WC in
12609  [\\/]* | ?:[\\/]*)
12610  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12611  ;;
12612  *)
12613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12614for as_dir in $PATH
12615do
12616  IFS=$as_save_IFS
12617  test -z "$as_dir" && as_dir=.
12618    for ac_exec_ext in '' $ac_executable_extensions; do
12619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12620    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12622    break 2
12623  fi
12624done
12625  done
12626IFS=$as_save_IFS
12627
12628  ;;
12629esac
12630fi
12631WC=$ac_cv_path_WC
12632if test -n "$WC"; then
12633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12634$as_echo "$WC" >&6; }
12635else
12636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12637$as_echo "no" >&6; }
12638fi
12639
12640
12641  test -n "$WC" && break
12642done
12643
12644  else
12645    # The variable is set, but is it from the command line or the environment?
12646
12647    # Try to remove the string !WC! from our list.
12648    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12649    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12650      # If it failed, the variable was not from the command line. Ignore it,
12651      # but warn the user (except for BASH, which is always set by the calling BASH).
12652      if test "xWC" != xBASH; then
12653        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12654$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12655      fi
12656      # Try to locate tool using the code snippet
12657      for ac_prog in wc
12658do
12659  # Extract the first word of "$ac_prog", so it can be a program name with args.
12660set dummy $ac_prog; ac_word=$2
12661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12662$as_echo_n "checking for $ac_word... " >&6; }
12663if ${ac_cv_path_WC+:} false; then :
12664  $as_echo_n "(cached) " >&6
12665else
12666  case $WC in
12667  [\\/]* | ?:[\\/]*)
12668  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12669  ;;
12670  *)
12671  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12672for as_dir in $PATH
12673do
12674  IFS=$as_save_IFS
12675  test -z "$as_dir" && as_dir=.
12676    for ac_exec_ext in '' $ac_executable_extensions; do
12677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12678    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12680    break 2
12681  fi
12682done
12683  done
12684IFS=$as_save_IFS
12685
12686  ;;
12687esac
12688fi
12689WC=$ac_cv_path_WC
12690if test -n "$WC"; then
12691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12692$as_echo "$WC" >&6; }
12693else
12694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12695$as_echo "no" >&6; }
12696fi
12697
12698
12699  test -n "$WC" && break
12700done
12701
12702    else
12703      # If it succeeded, then it was overridden by the user. We will use it
12704      # for the tool.
12705
12706      # First remove it from the list of overridden variables, so we can test
12707      # for unknown variables in the end.
12708      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12709
12710      # Check if we try to supply an empty value
12711      if test "x$WC" = x; then
12712        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12713$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12714        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12715$as_echo_n "checking for WC... " >&6; }
12716        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12717$as_echo "disabled" >&6; }
12718      else
12719        # Check if the provided tool contains a complete path.
12720        tool_specified="$WC"
12721        tool_basename="${tool_specified##*/}"
12722        if test "x$tool_basename" = "x$tool_specified"; then
12723          # A command without a complete path is provided, search $PATH.
12724          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12725$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12726          # Extract the first word of "$tool_basename", so it can be a program name with args.
12727set dummy $tool_basename; ac_word=$2
12728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12729$as_echo_n "checking for $ac_word... " >&6; }
12730if ${ac_cv_path_WC+:} false; then :
12731  $as_echo_n "(cached) " >&6
12732else
12733  case $WC in
12734  [\\/]* | ?:[\\/]*)
12735  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12736  ;;
12737  *)
12738  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12739for as_dir in $PATH
12740do
12741  IFS=$as_save_IFS
12742  test -z "$as_dir" && as_dir=.
12743    for ac_exec_ext in '' $ac_executable_extensions; do
12744  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12745    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12746    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12747    break 2
12748  fi
12749done
12750  done
12751IFS=$as_save_IFS
12752
12753  ;;
12754esac
12755fi
12756WC=$ac_cv_path_WC
12757if test -n "$WC"; then
12758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12759$as_echo "$WC" >&6; }
12760else
12761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12762$as_echo "no" >&6; }
12763fi
12764
12765
12766          if test "x$WC" = x; then
12767            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12768          fi
12769        else
12770          # Otherwise we believe it is a complete path. Use it as it is.
12771          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12772$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12773          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12774$as_echo_n "checking for WC... " >&6; }
12775          if test ! -x "$tool_specified"; then
12776            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12777$as_echo "not found" >&6; }
12778            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12779          fi
12780          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12781$as_echo "$tool_specified" >&6; }
12782        fi
12783      fi
12784    fi
12785
12786  fi
12787
12788
12789
12790  if test "x$WC" = x; then
12791    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12792  fi
12793
12794
12795
12796
12797
12798  # Publish this variable in the help.
12799
12800
12801  if [ -z "${WHICH+x}" ]; then
12802    # The variable is not set by user, try to locate tool using the code snippet
12803    for ac_prog in which
12804do
12805  # Extract the first word of "$ac_prog", so it can be a program name with args.
12806set dummy $ac_prog; ac_word=$2
12807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12808$as_echo_n "checking for $ac_word... " >&6; }
12809if ${ac_cv_path_WHICH+:} false; then :
12810  $as_echo_n "(cached) " >&6
12811else
12812  case $WHICH in
12813  [\\/]* | ?:[\\/]*)
12814  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12815  ;;
12816  *)
12817  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12818for as_dir in $PATH
12819do
12820  IFS=$as_save_IFS
12821  test -z "$as_dir" && as_dir=.
12822    for ac_exec_ext in '' $ac_executable_extensions; do
12823  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12824    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12825    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12826    break 2
12827  fi
12828done
12829  done
12830IFS=$as_save_IFS
12831
12832  ;;
12833esac
12834fi
12835WHICH=$ac_cv_path_WHICH
12836if test -n "$WHICH"; then
12837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12838$as_echo "$WHICH" >&6; }
12839else
12840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12841$as_echo "no" >&6; }
12842fi
12843
12844
12845  test -n "$WHICH" && break
12846done
12847
12848  else
12849    # The variable is set, but is it from the command line or the environment?
12850
12851    # Try to remove the string !WHICH! from our list.
12852    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12853    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12854      # If it failed, the variable was not from the command line. Ignore it,
12855      # but warn the user (except for BASH, which is always set by the calling BASH).
12856      if test "xWHICH" != xBASH; then
12857        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12858$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12859      fi
12860      # Try to locate tool using the code snippet
12861      for ac_prog in which
12862do
12863  # Extract the first word of "$ac_prog", so it can be a program name with args.
12864set dummy $ac_prog; ac_word=$2
12865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12866$as_echo_n "checking for $ac_word... " >&6; }
12867if ${ac_cv_path_WHICH+:} false; then :
12868  $as_echo_n "(cached) " >&6
12869else
12870  case $WHICH in
12871  [\\/]* | ?:[\\/]*)
12872  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12873  ;;
12874  *)
12875  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12876for as_dir in $PATH
12877do
12878  IFS=$as_save_IFS
12879  test -z "$as_dir" && as_dir=.
12880    for ac_exec_ext in '' $ac_executable_extensions; do
12881  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12882    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12883    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12884    break 2
12885  fi
12886done
12887  done
12888IFS=$as_save_IFS
12889
12890  ;;
12891esac
12892fi
12893WHICH=$ac_cv_path_WHICH
12894if test -n "$WHICH"; then
12895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12896$as_echo "$WHICH" >&6; }
12897else
12898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12899$as_echo "no" >&6; }
12900fi
12901
12902
12903  test -n "$WHICH" && break
12904done
12905
12906    else
12907      # If it succeeded, then it was overridden by the user. We will use it
12908      # for the tool.
12909
12910      # First remove it from the list of overridden variables, so we can test
12911      # for unknown variables in the end.
12912      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12913
12914      # Check if we try to supply an empty value
12915      if test "x$WHICH" = x; then
12916        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12917$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12918        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12919$as_echo_n "checking for WHICH... " >&6; }
12920        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12921$as_echo "disabled" >&6; }
12922      else
12923        # Check if the provided tool contains a complete path.
12924        tool_specified="$WHICH"
12925        tool_basename="${tool_specified##*/}"
12926        if test "x$tool_basename" = "x$tool_specified"; then
12927          # A command without a complete path is provided, search $PATH.
12928          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12929$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12930          # Extract the first word of "$tool_basename", so it can be a program name with args.
12931set dummy $tool_basename; ac_word=$2
12932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12933$as_echo_n "checking for $ac_word... " >&6; }
12934if ${ac_cv_path_WHICH+:} false; then :
12935  $as_echo_n "(cached) " >&6
12936else
12937  case $WHICH in
12938  [\\/]* | ?:[\\/]*)
12939  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12940  ;;
12941  *)
12942  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12943for as_dir in $PATH
12944do
12945  IFS=$as_save_IFS
12946  test -z "$as_dir" && as_dir=.
12947    for ac_exec_ext in '' $ac_executable_extensions; do
12948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12949    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12951    break 2
12952  fi
12953done
12954  done
12955IFS=$as_save_IFS
12956
12957  ;;
12958esac
12959fi
12960WHICH=$ac_cv_path_WHICH
12961if test -n "$WHICH"; then
12962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12963$as_echo "$WHICH" >&6; }
12964else
12965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12966$as_echo "no" >&6; }
12967fi
12968
12969
12970          if test "x$WHICH" = x; then
12971            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12972          fi
12973        else
12974          # Otherwise we believe it is a complete path. Use it as it is.
12975          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12976$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12977          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12978$as_echo_n "checking for WHICH... " >&6; }
12979          if test ! -x "$tool_specified"; then
12980            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12981$as_echo "not found" >&6; }
12982            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12983          fi
12984          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12985$as_echo "$tool_specified" >&6; }
12986        fi
12987      fi
12988    fi
12989
12990  fi
12991
12992
12993
12994  if test "x$WHICH" = x; then
12995    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12996  fi
12997
12998
12999
13000
13001
13002  # Publish this variable in the help.
13003
13004
13005  if [ -z "${XARGS+x}" ]; then
13006    # The variable is not set by user, try to locate tool using the code snippet
13007    for ac_prog in xargs
13008do
13009  # Extract the first word of "$ac_prog", so it can be a program name with args.
13010set dummy $ac_prog; ac_word=$2
13011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13012$as_echo_n "checking for $ac_word... " >&6; }
13013if ${ac_cv_path_XARGS+:} false; then :
13014  $as_echo_n "(cached) " >&6
13015else
13016  case $XARGS in
13017  [\\/]* | ?:[\\/]*)
13018  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13019  ;;
13020  *)
13021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13022for as_dir in $PATH
13023do
13024  IFS=$as_save_IFS
13025  test -z "$as_dir" && as_dir=.
13026    for ac_exec_ext in '' $ac_executable_extensions; do
13027  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13028    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13030    break 2
13031  fi
13032done
13033  done
13034IFS=$as_save_IFS
13035
13036  ;;
13037esac
13038fi
13039XARGS=$ac_cv_path_XARGS
13040if test -n "$XARGS"; then
13041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13042$as_echo "$XARGS" >&6; }
13043else
13044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13045$as_echo "no" >&6; }
13046fi
13047
13048
13049  test -n "$XARGS" && break
13050done
13051
13052  else
13053    # The variable is set, but is it from the command line or the environment?
13054
13055    # Try to remove the string !XARGS! from our list.
13056    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
13057    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13058      # If it failed, the variable was not from the command line. Ignore it,
13059      # but warn the user (except for BASH, which is always set by the calling BASH).
13060      if test "xXARGS" != xBASH; then
13061        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
13062$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
13063      fi
13064      # Try to locate tool using the code snippet
13065      for ac_prog in xargs
13066do
13067  # Extract the first word of "$ac_prog", so it can be a program name with args.
13068set dummy $ac_prog; ac_word=$2
13069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13070$as_echo_n "checking for $ac_word... " >&6; }
13071if ${ac_cv_path_XARGS+:} false; then :
13072  $as_echo_n "(cached) " >&6
13073else
13074  case $XARGS in
13075  [\\/]* | ?:[\\/]*)
13076  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13077  ;;
13078  *)
13079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13080for as_dir in $PATH
13081do
13082  IFS=$as_save_IFS
13083  test -z "$as_dir" && as_dir=.
13084    for ac_exec_ext in '' $ac_executable_extensions; do
13085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13086    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13088    break 2
13089  fi
13090done
13091  done
13092IFS=$as_save_IFS
13093
13094  ;;
13095esac
13096fi
13097XARGS=$ac_cv_path_XARGS
13098if test -n "$XARGS"; then
13099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13100$as_echo "$XARGS" >&6; }
13101else
13102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13103$as_echo "no" >&6; }
13104fi
13105
13106
13107  test -n "$XARGS" && break
13108done
13109
13110    else
13111      # If it succeeded, then it was overridden by the user. We will use it
13112      # for the tool.
13113
13114      # First remove it from the list of overridden variables, so we can test
13115      # for unknown variables in the end.
13116      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13117
13118      # Check if we try to supply an empty value
13119      if test "x$XARGS" = x; then
13120        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13121$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13122        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13123$as_echo_n "checking for XARGS... " >&6; }
13124        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13125$as_echo "disabled" >&6; }
13126      else
13127        # Check if the provided tool contains a complete path.
13128        tool_specified="$XARGS"
13129        tool_basename="${tool_specified##*/}"
13130        if test "x$tool_basename" = "x$tool_specified"; then
13131          # A command without a complete path is provided, search $PATH.
13132          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13133$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13134          # Extract the first word of "$tool_basename", so it can be a program name with args.
13135set dummy $tool_basename; ac_word=$2
13136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13137$as_echo_n "checking for $ac_word... " >&6; }
13138if ${ac_cv_path_XARGS+:} false; then :
13139  $as_echo_n "(cached) " >&6
13140else
13141  case $XARGS in
13142  [\\/]* | ?:[\\/]*)
13143  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13144  ;;
13145  *)
13146  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13147for as_dir in $PATH
13148do
13149  IFS=$as_save_IFS
13150  test -z "$as_dir" && as_dir=.
13151    for ac_exec_ext in '' $ac_executable_extensions; do
13152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13153    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13155    break 2
13156  fi
13157done
13158  done
13159IFS=$as_save_IFS
13160
13161  ;;
13162esac
13163fi
13164XARGS=$ac_cv_path_XARGS
13165if test -n "$XARGS"; then
13166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13167$as_echo "$XARGS" >&6; }
13168else
13169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13170$as_echo "no" >&6; }
13171fi
13172
13173
13174          if test "x$XARGS" = x; then
13175            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13176          fi
13177        else
13178          # Otherwise we believe it is a complete path. Use it as it is.
13179          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13180$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13181          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13182$as_echo_n "checking for XARGS... " >&6; }
13183          if test ! -x "$tool_specified"; then
13184            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13185$as_echo "not found" >&6; }
13186            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13187          fi
13188          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13189$as_echo "$tool_specified" >&6; }
13190        fi
13191      fi
13192    fi
13193
13194  fi
13195
13196
13197
13198  if test "x$XARGS" = x; then
13199    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13200  fi
13201
13202
13203
13204  # Then required tools that require some special treatment.
13205
13206
13207  # Publish this variable in the help.
13208
13209
13210  if [ -z "${AWK+x}" ]; then
13211    # The variable is not set by user, try to locate tool using the code snippet
13212    for ac_prog in gawk mawk nawk awk
13213do
13214  # Extract the first word of "$ac_prog", so it can be a program name with args.
13215set dummy $ac_prog; ac_word=$2
13216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13217$as_echo_n "checking for $ac_word... " >&6; }
13218if ${ac_cv_prog_AWK+:} false; then :
13219  $as_echo_n "(cached) " >&6
13220else
13221  if test -n "$AWK"; then
13222  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13223else
13224as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13225for as_dir in $PATH
13226do
13227  IFS=$as_save_IFS
13228  test -z "$as_dir" && as_dir=.
13229    for ac_exec_ext in '' $ac_executable_extensions; do
13230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13231    ac_cv_prog_AWK="$ac_prog"
13232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13233    break 2
13234  fi
13235done
13236  done
13237IFS=$as_save_IFS
13238
13239fi
13240fi
13241AWK=$ac_cv_prog_AWK
13242if test -n "$AWK"; then
13243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13244$as_echo "$AWK" >&6; }
13245else
13246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13247$as_echo "no" >&6; }
13248fi
13249
13250
13251  test -n "$AWK" && break
13252done
13253
13254  else
13255    # The variable is set, but is it from the command line or the environment?
13256
13257    # Try to remove the string !AWK! from our list.
13258    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13259    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13260      # If it failed, the variable was not from the command line. Ignore it,
13261      # but warn the user (except for BASH, which is always set by the calling BASH).
13262      if test "xAWK" != xBASH; then
13263        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13264$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13265      fi
13266      # Try to locate tool using the code snippet
13267      for ac_prog in gawk mawk nawk awk
13268do
13269  # Extract the first word of "$ac_prog", so it can be a program name with args.
13270set dummy $ac_prog; ac_word=$2
13271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13272$as_echo_n "checking for $ac_word... " >&6; }
13273if ${ac_cv_prog_AWK+:} false; then :
13274  $as_echo_n "(cached) " >&6
13275else
13276  if test -n "$AWK"; then
13277  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13278else
13279as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13280for as_dir in $PATH
13281do
13282  IFS=$as_save_IFS
13283  test -z "$as_dir" && as_dir=.
13284    for ac_exec_ext in '' $ac_executable_extensions; do
13285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13286    ac_cv_prog_AWK="$ac_prog"
13287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13288    break 2
13289  fi
13290done
13291  done
13292IFS=$as_save_IFS
13293
13294fi
13295fi
13296AWK=$ac_cv_prog_AWK
13297if test -n "$AWK"; then
13298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13299$as_echo "$AWK" >&6; }
13300else
13301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13302$as_echo "no" >&6; }
13303fi
13304
13305
13306  test -n "$AWK" && break
13307done
13308
13309    else
13310      # If it succeeded, then it was overridden by the user. We will use it
13311      # for the tool.
13312
13313      # First remove it from the list of overridden variables, so we can test
13314      # for unknown variables in the end.
13315      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13316
13317      # Check if we try to supply an empty value
13318      if test "x$AWK" = x; then
13319        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13320$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13321        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13322$as_echo_n "checking for AWK... " >&6; }
13323        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13324$as_echo "disabled" >&6; }
13325      else
13326        # Check if the provided tool contains a complete path.
13327        tool_specified="$AWK"
13328        tool_basename="${tool_specified##*/}"
13329        if test "x$tool_basename" = "x$tool_specified"; then
13330          # A command without a complete path is provided, search $PATH.
13331          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13332$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13333          # Extract the first word of "$tool_basename", so it can be a program name with args.
13334set dummy $tool_basename; ac_word=$2
13335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13336$as_echo_n "checking for $ac_word... " >&6; }
13337if ${ac_cv_path_AWK+:} false; then :
13338  $as_echo_n "(cached) " >&6
13339else
13340  case $AWK in
13341  [\\/]* | ?:[\\/]*)
13342  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13343  ;;
13344  *)
13345  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13346for as_dir in $PATH
13347do
13348  IFS=$as_save_IFS
13349  test -z "$as_dir" && as_dir=.
13350    for ac_exec_ext in '' $ac_executable_extensions; do
13351  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13352    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13354    break 2
13355  fi
13356done
13357  done
13358IFS=$as_save_IFS
13359
13360  ;;
13361esac
13362fi
13363AWK=$ac_cv_path_AWK
13364if test -n "$AWK"; then
13365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13366$as_echo "$AWK" >&6; }
13367else
13368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13369$as_echo "no" >&6; }
13370fi
13371
13372
13373          if test "x$AWK" = x; then
13374            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13375          fi
13376        else
13377          # Otherwise we believe it is a complete path. Use it as it is.
13378          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13379$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13380          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13381$as_echo_n "checking for AWK... " >&6; }
13382          if test ! -x "$tool_specified"; then
13383            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13384$as_echo "not found" >&6; }
13385            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13386          fi
13387          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13388$as_echo "$tool_specified" >&6; }
13389        fi
13390      fi
13391    fi
13392
13393  fi
13394
13395
13396  if test "x$AWK" = x; then
13397    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13398  fi
13399
13400
13401
13402
13403  # Publish this variable in the help.
13404
13405
13406  if [ -z "${GREP+x}" ]; then
13407    # The variable is not set by user, try to locate tool using the code snippet
13408    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13409$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13410if ${ac_cv_path_GREP+:} false; then :
13411  $as_echo_n "(cached) " >&6
13412else
13413  if test -z "$GREP"; then
13414  ac_path_GREP_found=false
13415  # Loop through the user's path and test for each of PROGNAME-LIST
13416  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13417for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13418do
13419  IFS=$as_save_IFS
13420  test -z "$as_dir" && as_dir=.
13421    for ac_prog in grep ggrep; do
13422    for ac_exec_ext in '' $ac_executable_extensions; do
13423      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13424      as_fn_executable_p "$ac_path_GREP" || continue
13425# Check for GNU ac_path_GREP and select it if it is found.
13426  # Check for GNU $ac_path_GREP
13427case `"$ac_path_GREP" --version 2>&1` in
13428*GNU*)
13429  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13430*)
13431  ac_count=0
13432  $as_echo_n 0123456789 >"conftest.in"
13433  while :
13434  do
13435    cat "conftest.in" "conftest.in" >"conftest.tmp"
13436    mv "conftest.tmp" "conftest.in"
13437    cp "conftest.in" "conftest.nl"
13438    $as_echo 'GREP' >> "conftest.nl"
13439    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13440    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13441    as_fn_arith $ac_count + 1 && ac_count=$as_val
13442    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13443      # Best one so far, save it but keep looking for a better one
13444      ac_cv_path_GREP="$ac_path_GREP"
13445      ac_path_GREP_max=$ac_count
13446    fi
13447    # 10*(2^10) chars as input seems more than enough
13448    test $ac_count -gt 10 && break
13449  done
13450  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13451esac
13452
13453      $ac_path_GREP_found && break 3
13454    done
13455  done
13456  done
13457IFS=$as_save_IFS
13458  if test -z "$ac_cv_path_GREP"; then
13459    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13460  fi
13461else
13462  ac_cv_path_GREP=$GREP
13463fi
13464
13465fi
13466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13467$as_echo "$ac_cv_path_GREP" >&6; }
13468 GREP="$ac_cv_path_GREP"
13469
13470
13471  else
13472    # The variable is set, but is it from the command line or the environment?
13473
13474    # Try to remove the string !GREP! from our list.
13475    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13476    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13477      # If it failed, the variable was not from the command line. Ignore it,
13478      # but warn the user (except for BASH, which is always set by the calling BASH).
13479      if test "xGREP" != xBASH; then
13480        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13481$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13482      fi
13483      # Try to locate tool using the code snippet
13484      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13485$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13486if ${ac_cv_path_GREP+:} false; then :
13487  $as_echo_n "(cached) " >&6
13488else
13489  if test -z "$GREP"; then
13490  ac_path_GREP_found=false
13491  # Loop through the user's path and test for each of PROGNAME-LIST
13492  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13493for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13494do
13495  IFS=$as_save_IFS
13496  test -z "$as_dir" && as_dir=.
13497    for ac_prog in grep ggrep; do
13498    for ac_exec_ext in '' $ac_executable_extensions; do
13499      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13500      as_fn_executable_p "$ac_path_GREP" || continue
13501# Check for GNU ac_path_GREP and select it if it is found.
13502  # Check for GNU $ac_path_GREP
13503case `"$ac_path_GREP" --version 2>&1` in
13504*GNU*)
13505  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13506*)
13507  ac_count=0
13508  $as_echo_n 0123456789 >"conftest.in"
13509  while :
13510  do
13511    cat "conftest.in" "conftest.in" >"conftest.tmp"
13512    mv "conftest.tmp" "conftest.in"
13513    cp "conftest.in" "conftest.nl"
13514    $as_echo 'GREP' >> "conftest.nl"
13515    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13516    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13517    as_fn_arith $ac_count + 1 && ac_count=$as_val
13518    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13519      # Best one so far, save it but keep looking for a better one
13520      ac_cv_path_GREP="$ac_path_GREP"
13521      ac_path_GREP_max=$ac_count
13522    fi
13523    # 10*(2^10) chars as input seems more than enough
13524    test $ac_count -gt 10 && break
13525  done
13526  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13527esac
13528
13529      $ac_path_GREP_found && break 3
13530    done
13531  done
13532  done
13533IFS=$as_save_IFS
13534  if test -z "$ac_cv_path_GREP"; then
13535    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13536  fi
13537else
13538  ac_cv_path_GREP=$GREP
13539fi
13540
13541fi
13542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13543$as_echo "$ac_cv_path_GREP" >&6; }
13544 GREP="$ac_cv_path_GREP"
13545
13546
13547    else
13548      # If it succeeded, then it was overridden by the user. We will use it
13549      # for the tool.
13550
13551      # First remove it from the list of overridden variables, so we can test
13552      # for unknown variables in the end.
13553      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13554
13555      # Check if we try to supply an empty value
13556      if test "x$GREP" = x; then
13557        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13558$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13559        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13560$as_echo_n "checking for GREP... " >&6; }
13561        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13562$as_echo "disabled" >&6; }
13563      else
13564        # Check if the provided tool contains a complete path.
13565        tool_specified="$GREP"
13566        tool_basename="${tool_specified##*/}"
13567        if test "x$tool_basename" = "x$tool_specified"; then
13568          # A command without a complete path is provided, search $PATH.
13569          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13570$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13571          # Extract the first word of "$tool_basename", so it can be a program name with args.
13572set dummy $tool_basename; ac_word=$2
13573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13574$as_echo_n "checking for $ac_word... " >&6; }
13575if ${ac_cv_path_GREP+:} false; then :
13576  $as_echo_n "(cached) " >&6
13577else
13578  case $GREP in
13579  [\\/]* | ?:[\\/]*)
13580  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13581  ;;
13582  *)
13583  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13584for as_dir in $PATH
13585do
13586  IFS=$as_save_IFS
13587  test -z "$as_dir" && as_dir=.
13588    for ac_exec_ext in '' $ac_executable_extensions; do
13589  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13590    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13592    break 2
13593  fi
13594done
13595  done
13596IFS=$as_save_IFS
13597
13598  ;;
13599esac
13600fi
13601GREP=$ac_cv_path_GREP
13602if test -n "$GREP"; then
13603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13604$as_echo "$GREP" >&6; }
13605else
13606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13607$as_echo "no" >&6; }
13608fi
13609
13610
13611          if test "x$GREP" = x; then
13612            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13613          fi
13614        else
13615          # Otherwise we believe it is a complete path. Use it as it is.
13616          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13617$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13618          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13619$as_echo_n "checking for GREP... " >&6; }
13620          if test ! -x "$tool_specified"; then
13621            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13622$as_echo "not found" >&6; }
13623            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13624          fi
13625          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13626$as_echo "$tool_specified" >&6; }
13627        fi
13628      fi
13629    fi
13630
13631  fi
13632
13633
13634  if test "x$GREP" = x; then
13635    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13636  fi
13637
13638
13639
13640
13641  # Publish this variable in the help.
13642
13643
13644  if [ -z "${EGREP+x}" ]; then
13645    # The variable is not set by user, try to locate tool using the code snippet
13646    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13647$as_echo_n "checking for egrep... " >&6; }
13648if ${ac_cv_path_EGREP+:} false; then :
13649  $as_echo_n "(cached) " >&6
13650else
13651  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13652   then ac_cv_path_EGREP="$GREP -E"
13653   else
13654     if test -z "$EGREP"; then
13655  ac_path_EGREP_found=false
13656  # Loop through the user's path and test for each of PROGNAME-LIST
13657  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13658for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13659do
13660  IFS=$as_save_IFS
13661  test -z "$as_dir" && as_dir=.
13662    for ac_prog in egrep; do
13663    for ac_exec_ext in '' $ac_executable_extensions; do
13664      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13665      as_fn_executable_p "$ac_path_EGREP" || continue
13666# Check for GNU ac_path_EGREP and select it if it is found.
13667  # Check for GNU $ac_path_EGREP
13668case `"$ac_path_EGREP" --version 2>&1` in
13669*GNU*)
13670  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13671*)
13672  ac_count=0
13673  $as_echo_n 0123456789 >"conftest.in"
13674  while :
13675  do
13676    cat "conftest.in" "conftest.in" >"conftest.tmp"
13677    mv "conftest.tmp" "conftest.in"
13678    cp "conftest.in" "conftest.nl"
13679    $as_echo 'EGREP' >> "conftest.nl"
13680    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13681    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13682    as_fn_arith $ac_count + 1 && ac_count=$as_val
13683    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13684      # Best one so far, save it but keep looking for a better one
13685      ac_cv_path_EGREP="$ac_path_EGREP"
13686      ac_path_EGREP_max=$ac_count
13687    fi
13688    # 10*(2^10) chars as input seems more than enough
13689    test $ac_count -gt 10 && break
13690  done
13691  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13692esac
13693
13694      $ac_path_EGREP_found && break 3
13695    done
13696  done
13697  done
13698IFS=$as_save_IFS
13699  if test -z "$ac_cv_path_EGREP"; then
13700    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13701  fi
13702else
13703  ac_cv_path_EGREP=$EGREP
13704fi
13705
13706   fi
13707fi
13708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13709$as_echo "$ac_cv_path_EGREP" >&6; }
13710 EGREP="$ac_cv_path_EGREP"
13711
13712
13713  else
13714    # The variable is set, but is it from the command line or the environment?
13715
13716    # Try to remove the string !EGREP! from our list.
13717    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13718    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13719      # If it failed, the variable was not from the command line. Ignore it,
13720      # but warn the user (except for BASH, which is always set by the calling BASH).
13721      if test "xEGREP" != xBASH; then
13722        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13723$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13724      fi
13725      # Try to locate tool using the code snippet
13726      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13727$as_echo_n "checking for egrep... " >&6; }
13728if ${ac_cv_path_EGREP+:} false; then :
13729  $as_echo_n "(cached) " >&6
13730else
13731  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13732   then ac_cv_path_EGREP="$GREP -E"
13733   else
13734     if test -z "$EGREP"; then
13735  ac_path_EGREP_found=false
13736  # Loop through the user's path and test for each of PROGNAME-LIST
13737  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13738for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13739do
13740  IFS=$as_save_IFS
13741  test -z "$as_dir" && as_dir=.
13742    for ac_prog in egrep; do
13743    for ac_exec_ext in '' $ac_executable_extensions; do
13744      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13745      as_fn_executable_p "$ac_path_EGREP" || continue
13746# Check for GNU ac_path_EGREP and select it if it is found.
13747  # Check for GNU $ac_path_EGREP
13748case `"$ac_path_EGREP" --version 2>&1` in
13749*GNU*)
13750  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13751*)
13752  ac_count=0
13753  $as_echo_n 0123456789 >"conftest.in"
13754  while :
13755  do
13756    cat "conftest.in" "conftest.in" >"conftest.tmp"
13757    mv "conftest.tmp" "conftest.in"
13758    cp "conftest.in" "conftest.nl"
13759    $as_echo 'EGREP' >> "conftest.nl"
13760    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13761    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13762    as_fn_arith $ac_count + 1 && ac_count=$as_val
13763    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13764      # Best one so far, save it but keep looking for a better one
13765      ac_cv_path_EGREP="$ac_path_EGREP"
13766      ac_path_EGREP_max=$ac_count
13767    fi
13768    # 10*(2^10) chars as input seems more than enough
13769    test $ac_count -gt 10 && break
13770  done
13771  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13772esac
13773
13774      $ac_path_EGREP_found && break 3
13775    done
13776  done
13777  done
13778IFS=$as_save_IFS
13779  if test -z "$ac_cv_path_EGREP"; then
13780    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13781  fi
13782else
13783  ac_cv_path_EGREP=$EGREP
13784fi
13785
13786   fi
13787fi
13788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13789$as_echo "$ac_cv_path_EGREP" >&6; }
13790 EGREP="$ac_cv_path_EGREP"
13791
13792
13793    else
13794      # If it succeeded, then it was overridden by the user. We will use it
13795      # for the tool.
13796
13797      # First remove it from the list of overridden variables, so we can test
13798      # for unknown variables in the end.
13799      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13800
13801      # Check if we try to supply an empty value
13802      if test "x$EGREP" = x; then
13803        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13804$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13805        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13806$as_echo_n "checking for EGREP... " >&6; }
13807        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13808$as_echo "disabled" >&6; }
13809      else
13810        # Check if the provided tool contains a complete path.
13811        tool_specified="$EGREP"
13812        tool_basename="${tool_specified##*/}"
13813        if test "x$tool_basename" = "x$tool_specified"; then
13814          # A command without a complete path is provided, search $PATH.
13815          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13816$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13817          # Extract the first word of "$tool_basename", so it can be a program name with args.
13818set dummy $tool_basename; ac_word=$2
13819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13820$as_echo_n "checking for $ac_word... " >&6; }
13821if ${ac_cv_path_EGREP+:} false; then :
13822  $as_echo_n "(cached) " >&6
13823else
13824  case $EGREP in
13825  [\\/]* | ?:[\\/]*)
13826  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13827  ;;
13828  *)
13829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13830for as_dir in $PATH
13831do
13832  IFS=$as_save_IFS
13833  test -z "$as_dir" && as_dir=.
13834    for ac_exec_ext in '' $ac_executable_extensions; do
13835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13836    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13838    break 2
13839  fi
13840done
13841  done
13842IFS=$as_save_IFS
13843
13844  ;;
13845esac
13846fi
13847EGREP=$ac_cv_path_EGREP
13848if test -n "$EGREP"; then
13849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13850$as_echo "$EGREP" >&6; }
13851else
13852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13853$as_echo "no" >&6; }
13854fi
13855
13856
13857          if test "x$EGREP" = x; then
13858            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13859          fi
13860        else
13861          # Otherwise we believe it is a complete path. Use it as it is.
13862          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13863$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13864          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13865$as_echo_n "checking for EGREP... " >&6; }
13866          if test ! -x "$tool_specified"; then
13867            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13868$as_echo "not found" >&6; }
13869            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13870          fi
13871          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13872$as_echo "$tool_specified" >&6; }
13873        fi
13874      fi
13875    fi
13876
13877  fi
13878
13879
13880  if test "x$EGREP" = x; then
13881    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13882  fi
13883
13884
13885
13886
13887  # Publish this variable in the help.
13888
13889
13890  if [ -z "${FGREP+x}" ]; then
13891    # The variable is not set by user, try to locate tool using the code snippet
13892    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13893$as_echo_n "checking for fgrep... " >&6; }
13894if ${ac_cv_path_FGREP+:} false; then :
13895  $as_echo_n "(cached) " >&6
13896else
13897  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13898   then ac_cv_path_FGREP="$GREP -F"
13899   else
13900     if test -z "$FGREP"; then
13901  ac_path_FGREP_found=false
13902  # Loop through the user's path and test for each of PROGNAME-LIST
13903  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13904for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13905do
13906  IFS=$as_save_IFS
13907  test -z "$as_dir" && as_dir=.
13908    for ac_prog in fgrep; do
13909    for ac_exec_ext in '' $ac_executable_extensions; do
13910      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13911      as_fn_executable_p "$ac_path_FGREP" || continue
13912# Check for GNU ac_path_FGREP and select it if it is found.
13913  # Check for GNU $ac_path_FGREP
13914case `"$ac_path_FGREP" --version 2>&1` in
13915*GNU*)
13916  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13917*)
13918  ac_count=0
13919  $as_echo_n 0123456789 >"conftest.in"
13920  while :
13921  do
13922    cat "conftest.in" "conftest.in" >"conftest.tmp"
13923    mv "conftest.tmp" "conftest.in"
13924    cp "conftest.in" "conftest.nl"
13925    $as_echo 'FGREP' >> "conftest.nl"
13926    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13927    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13928    as_fn_arith $ac_count + 1 && ac_count=$as_val
13929    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13930      # Best one so far, save it but keep looking for a better one
13931      ac_cv_path_FGREP="$ac_path_FGREP"
13932      ac_path_FGREP_max=$ac_count
13933    fi
13934    # 10*(2^10) chars as input seems more than enough
13935    test $ac_count -gt 10 && break
13936  done
13937  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13938esac
13939
13940      $ac_path_FGREP_found && break 3
13941    done
13942  done
13943  done
13944IFS=$as_save_IFS
13945  if test -z "$ac_cv_path_FGREP"; then
13946    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13947  fi
13948else
13949  ac_cv_path_FGREP=$FGREP
13950fi
13951
13952   fi
13953fi
13954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13955$as_echo "$ac_cv_path_FGREP" >&6; }
13956 FGREP="$ac_cv_path_FGREP"
13957
13958
13959  else
13960    # The variable is set, but is it from the command line or the environment?
13961
13962    # Try to remove the string !FGREP! from our list.
13963    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13964    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13965      # If it failed, the variable was not from the command line. Ignore it,
13966      # but warn the user (except for BASH, which is always set by the calling BASH).
13967      if test "xFGREP" != xBASH; then
13968        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13969$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13970      fi
13971      # Try to locate tool using the code snippet
13972      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13973$as_echo_n "checking for fgrep... " >&6; }
13974if ${ac_cv_path_FGREP+:} false; then :
13975  $as_echo_n "(cached) " >&6
13976else
13977  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13978   then ac_cv_path_FGREP="$GREP -F"
13979   else
13980     if test -z "$FGREP"; then
13981  ac_path_FGREP_found=false
13982  # Loop through the user's path and test for each of PROGNAME-LIST
13983  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13984for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13985do
13986  IFS=$as_save_IFS
13987  test -z "$as_dir" && as_dir=.
13988    for ac_prog in fgrep; do
13989    for ac_exec_ext in '' $ac_executable_extensions; do
13990      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13991      as_fn_executable_p "$ac_path_FGREP" || continue
13992# Check for GNU ac_path_FGREP and select it if it is found.
13993  # Check for GNU $ac_path_FGREP
13994case `"$ac_path_FGREP" --version 2>&1` in
13995*GNU*)
13996  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13997*)
13998  ac_count=0
13999  $as_echo_n 0123456789 >"conftest.in"
14000  while :
14001  do
14002    cat "conftest.in" "conftest.in" >"conftest.tmp"
14003    mv "conftest.tmp" "conftest.in"
14004    cp "conftest.in" "conftest.nl"
14005    $as_echo 'FGREP' >> "conftest.nl"
14006    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
14007    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14008    as_fn_arith $ac_count + 1 && ac_count=$as_val
14009    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
14010      # Best one so far, save it but keep looking for a better one
14011      ac_cv_path_FGREP="$ac_path_FGREP"
14012      ac_path_FGREP_max=$ac_count
14013    fi
14014    # 10*(2^10) chars as input seems more than enough
14015    test $ac_count -gt 10 && break
14016  done
14017  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14018esac
14019
14020      $ac_path_FGREP_found && break 3
14021    done
14022  done
14023  done
14024IFS=$as_save_IFS
14025  if test -z "$ac_cv_path_FGREP"; then
14026    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
14027  fi
14028else
14029  ac_cv_path_FGREP=$FGREP
14030fi
14031
14032   fi
14033fi
14034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
14035$as_echo "$ac_cv_path_FGREP" >&6; }
14036 FGREP="$ac_cv_path_FGREP"
14037
14038
14039    else
14040      # If it succeeded, then it was overridden by the user. We will use it
14041      # for the tool.
14042
14043      # First remove it from the list of overridden variables, so we can test
14044      # for unknown variables in the end.
14045      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14046
14047      # Check if we try to supply an empty value
14048      if test "x$FGREP" = x; then
14049        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
14050$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
14051        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14052$as_echo_n "checking for FGREP... " >&6; }
14053        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14054$as_echo "disabled" >&6; }
14055      else
14056        # Check if the provided tool contains a complete path.
14057        tool_specified="$FGREP"
14058        tool_basename="${tool_specified##*/}"
14059        if test "x$tool_basename" = "x$tool_specified"; then
14060          # A command without a complete path is provided, search $PATH.
14061          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
14062$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
14063          # Extract the first word of "$tool_basename", so it can be a program name with args.
14064set dummy $tool_basename; ac_word=$2
14065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14066$as_echo_n "checking for $ac_word... " >&6; }
14067if ${ac_cv_path_FGREP+:} false; then :
14068  $as_echo_n "(cached) " >&6
14069else
14070  case $FGREP in
14071  [\\/]* | ?:[\\/]*)
14072  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
14073  ;;
14074  *)
14075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14076for as_dir in $PATH
14077do
14078  IFS=$as_save_IFS
14079  test -z "$as_dir" && as_dir=.
14080    for ac_exec_ext in '' $ac_executable_extensions; do
14081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14082    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
14083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14084    break 2
14085  fi
14086done
14087  done
14088IFS=$as_save_IFS
14089
14090  ;;
14091esac
14092fi
14093FGREP=$ac_cv_path_FGREP
14094if test -n "$FGREP"; then
14095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14096$as_echo "$FGREP" >&6; }
14097else
14098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14099$as_echo "no" >&6; }
14100fi
14101
14102
14103          if test "x$FGREP" = x; then
14104            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14105          fi
14106        else
14107          # Otherwise we believe it is a complete path. Use it as it is.
14108          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14109$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14110          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14111$as_echo_n "checking for FGREP... " >&6; }
14112          if test ! -x "$tool_specified"; then
14113            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14114$as_echo "not found" >&6; }
14115            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14116          fi
14117          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14118$as_echo "$tool_specified" >&6; }
14119        fi
14120      fi
14121    fi
14122
14123  fi
14124
14125
14126  if test "x$FGREP" = x; then
14127    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14128  fi
14129
14130
14131
14132
14133  # Publish this variable in the help.
14134
14135
14136  if [ -z "${SED+x}" ]; then
14137    # The variable is not set by user, try to locate tool using the code snippet
14138    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14139$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14140if ${ac_cv_path_SED+:} false; then :
14141  $as_echo_n "(cached) " >&6
14142else
14143            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14144     for ac_i in 1 2 3 4 5 6 7; do
14145       ac_script="$ac_script$as_nl$ac_script"
14146     done
14147     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14148     { ac_script=; unset ac_script;}
14149     if test -z "$SED"; then
14150  ac_path_SED_found=false
14151  # Loop through the user's path and test for each of PROGNAME-LIST
14152  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14153for as_dir in $PATH
14154do
14155  IFS=$as_save_IFS
14156  test -z "$as_dir" && as_dir=.
14157    for ac_prog in sed gsed; do
14158    for ac_exec_ext in '' $ac_executable_extensions; do
14159      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14160      as_fn_executable_p "$ac_path_SED" || continue
14161# Check for GNU ac_path_SED and select it if it is found.
14162  # Check for GNU $ac_path_SED
14163case `"$ac_path_SED" --version 2>&1` in
14164*GNU*)
14165  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14166*)
14167  ac_count=0
14168  $as_echo_n 0123456789 >"conftest.in"
14169  while :
14170  do
14171    cat "conftest.in" "conftest.in" >"conftest.tmp"
14172    mv "conftest.tmp" "conftest.in"
14173    cp "conftest.in" "conftest.nl"
14174    $as_echo '' >> "conftest.nl"
14175    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14176    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14177    as_fn_arith $ac_count + 1 && ac_count=$as_val
14178    if test $ac_count -gt ${ac_path_SED_max-0}; then
14179      # Best one so far, save it but keep looking for a better one
14180      ac_cv_path_SED="$ac_path_SED"
14181      ac_path_SED_max=$ac_count
14182    fi
14183    # 10*(2^10) chars as input seems more than enough
14184    test $ac_count -gt 10 && break
14185  done
14186  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14187esac
14188
14189      $ac_path_SED_found && break 3
14190    done
14191  done
14192  done
14193IFS=$as_save_IFS
14194  if test -z "$ac_cv_path_SED"; then
14195    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14196  fi
14197else
14198  ac_cv_path_SED=$SED
14199fi
14200
14201fi
14202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14203$as_echo "$ac_cv_path_SED" >&6; }
14204 SED="$ac_cv_path_SED"
14205  rm -f conftest.sed
14206
14207  else
14208    # The variable is set, but is it from the command line or the environment?
14209
14210    # Try to remove the string !SED! from our list.
14211    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14212    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14213      # If it failed, the variable was not from the command line. Ignore it,
14214      # but warn the user (except for BASH, which is always set by the calling BASH).
14215      if test "xSED" != xBASH; then
14216        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14217$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14218      fi
14219      # Try to locate tool using the code snippet
14220      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14221$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14222if ${ac_cv_path_SED+:} false; then :
14223  $as_echo_n "(cached) " >&6
14224else
14225            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14226     for ac_i in 1 2 3 4 5 6 7; do
14227       ac_script="$ac_script$as_nl$ac_script"
14228     done
14229     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14230     { ac_script=; unset ac_script;}
14231     if test -z "$SED"; then
14232  ac_path_SED_found=false
14233  # Loop through the user's path and test for each of PROGNAME-LIST
14234  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14235for as_dir in $PATH
14236do
14237  IFS=$as_save_IFS
14238  test -z "$as_dir" && as_dir=.
14239    for ac_prog in sed gsed; do
14240    for ac_exec_ext in '' $ac_executable_extensions; do
14241      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14242      as_fn_executable_p "$ac_path_SED" || continue
14243# Check for GNU ac_path_SED and select it if it is found.
14244  # Check for GNU $ac_path_SED
14245case `"$ac_path_SED" --version 2>&1` in
14246*GNU*)
14247  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14248*)
14249  ac_count=0
14250  $as_echo_n 0123456789 >"conftest.in"
14251  while :
14252  do
14253    cat "conftest.in" "conftest.in" >"conftest.tmp"
14254    mv "conftest.tmp" "conftest.in"
14255    cp "conftest.in" "conftest.nl"
14256    $as_echo '' >> "conftest.nl"
14257    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14258    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14259    as_fn_arith $ac_count + 1 && ac_count=$as_val
14260    if test $ac_count -gt ${ac_path_SED_max-0}; then
14261      # Best one so far, save it but keep looking for a better one
14262      ac_cv_path_SED="$ac_path_SED"
14263      ac_path_SED_max=$ac_count
14264    fi
14265    # 10*(2^10) chars as input seems more than enough
14266    test $ac_count -gt 10 && break
14267  done
14268  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14269esac
14270
14271      $ac_path_SED_found && break 3
14272    done
14273  done
14274  done
14275IFS=$as_save_IFS
14276  if test -z "$ac_cv_path_SED"; then
14277    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14278  fi
14279else
14280  ac_cv_path_SED=$SED
14281fi
14282
14283fi
14284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14285$as_echo "$ac_cv_path_SED" >&6; }
14286 SED="$ac_cv_path_SED"
14287  rm -f conftest.sed
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$SED" = x; then
14299        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14300$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14301        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14302$as_echo_n "checking for SED... " >&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="$SED"
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 SED=$tool_basename" >&5
14312$as_echo "$as_me: Will search for user supplied tool SED=$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_SED+:} false; then :
14318  $as_echo_n "(cached) " >&6
14319else
14320  case $SED in
14321  [\\/]* | ?:[\\/]*)
14322  ac_cv_path_SED="$SED" # 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_SED="$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
14343SED=$ac_cv_path_SED
14344if test -n "$SED"; then
14345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14346$as_echo "$SED" >&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$SED" = 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 SED=$tool_specified" >&5
14359$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14360          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14361$as_echo_n "checking for SED... " >&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 SED=$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  if test "x$SED" = x; then
14377    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14378  fi
14379
14380
14381
14382  # Always force rm.
14383  RM="$RM -f"
14384
14385  # pwd behaves differently on various platforms and some don't support the -L flag.
14386  # Always use the bash builtin pwd to get uniform behavior.
14387  THEPWDCMD=pwd
14388
14389  # These are not required on all platforms
14390
14391
14392  # Publish this variable in the help.
14393
14394
14395  if [ -z "${CYGPATH+x}" ]; then
14396    # The variable is not set by user, try to locate tool using the code snippet
14397    for ac_prog in cygpath
14398do
14399  # Extract the first word of "$ac_prog", so it can be a program name with args.
14400set dummy $ac_prog; ac_word=$2
14401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14402$as_echo_n "checking for $ac_word... " >&6; }
14403if ${ac_cv_path_CYGPATH+:} false; then :
14404  $as_echo_n "(cached) " >&6
14405else
14406  case $CYGPATH in
14407  [\\/]* | ?:[\\/]*)
14408  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14409  ;;
14410  *)
14411  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14412for as_dir in $PATH
14413do
14414  IFS=$as_save_IFS
14415  test -z "$as_dir" && as_dir=.
14416    for ac_exec_ext in '' $ac_executable_extensions; do
14417  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14418    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14419    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14420    break 2
14421  fi
14422done
14423  done
14424IFS=$as_save_IFS
14425
14426  ;;
14427esac
14428fi
14429CYGPATH=$ac_cv_path_CYGPATH
14430if test -n "$CYGPATH"; then
14431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14432$as_echo "$CYGPATH" >&6; }
14433else
14434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14435$as_echo "no" >&6; }
14436fi
14437
14438
14439  test -n "$CYGPATH" && break
14440done
14441
14442  else
14443    # The variable is set, but is it from the command line or the environment?
14444
14445    # Try to remove the string !CYGPATH! from our list.
14446    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14447    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14448      # If it failed, the variable was not from the command line. Ignore it,
14449      # but warn the user (except for BASH, which is always set by the calling BASH).
14450      if test "xCYGPATH" != xBASH; then
14451        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14452$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14453      fi
14454      # Try to locate tool using the code snippet
14455      for ac_prog in cygpath
14456do
14457  # Extract the first word of "$ac_prog", so it can be a program name with args.
14458set dummy $ac_prog; ac_word=$2
14459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14460$as_echo_n "checking for $ac_word... " >&6; }
14461if ${ac_cv_path_CYGPATH+:} false; then :
14462  $as_echo_n "(cached) " >&6
14463else
14464  case $CYGPATH in
14465  [\\/]* | ?:[\\/]*)
14466  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14467  ;;
14468  *)
14469  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14470for as_dir in $PATH
14471do
14472  IFS=$as_save_IFS
14473  test -z "$as_dir" && as_dir=.
14474    for ac_exec_ext in '' $ac_executable_extensions; do
14475  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14476    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14477    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14478    break 2
14479  fi
14480done
14481  done
14482IFS=$as_save_IFS
14483
14484  ;;
14485esac
14486fi
14487CYGPATH=$ac_cv_path_CYGPATH
14488if test -n "$CYGPATH"; then
14489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14490$as_echo "$CYGPATH" >&6; }
14491else
14492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14493$as_echo "no" >&6; }
14494fi
14495
14496
14497  test -n "$CYGPATH" && break
14498done
14499
14500    else
14501      # If it succeeded, then it was overridden by the user. We will use it
14502      # for the tool.
14503
14504      # First remove it from the list of overridden variables, so we can test
14505      # for unknown variables in the end.
14506      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14507
14508      # Check if we try to supply an empty value
14509      if test "x$CYGPATH" = x; then
14510        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14511$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14512        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14513$as_echo_n "checking for CYGPATH... " >&6; }
14514        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14515$as_echo "disabled" >&6; }
14516      else
14517        # Check if the provided tool contains a complete path.
14518        tool_specified="$CYGPATH"
14519        tool_basename="${tool_specified##*/}"
14520        if test "x$tool_basename" = "x$tool_specified"; then
14521          # A command without a complete path is provided, search $PATH.
14522          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14523$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14524          # Extract the first word of "$tool_basename", so it can be a program name with args.
14525set dummy $tool_basename; ac_word=$2
14526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14527$as_echo_n "checking for $ac_word... " >&6; }
14528if ${ac_cv_path_CYGPATH+:} false; then :
14529  $as_echo_n "(cached) " >&6
14530else
14531  case $CYGPATH in
14532  [\\/]* | ?:[\\/]*)
14533  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14534  ;;
14535  *)
14536  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14537for as_dir in $PATH
14538do
14539  IFS=$as_save_IFS
14540  test -z "$as_dir" && as_dir=.
14541    for ac_exec_ext in '' $ac_executable_extensions; do
14542  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14543    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14545    break 2
14546  fi
14547done
14548  done
14549IFS=$as_save_IFS
14550
14551  ;;
14552esac
14553fi
14554CYGPATH=$ac_cv_path_CYGPATH
14555if test -n "$CYGPATH"; then
14556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14557$as_echo "$CYGPATH" >&6; }
14558else
14559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14560$as_echo "no" >&6; }
14561fi
14562
14563
14564          if test "x$CYGPATH" = x; then
14565            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14566          fi
14567        else
14568          # Otherwise we believe it is a complete path. Use it as it is.
14569          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14570$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14571          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14572$as_echo_n "checking for CYGPATH... " >&6; }
14573          if test ! -x "$tool_specified"; then
14574            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14575$as_echo "not found" >&6; }
14576            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14577          fi
14578          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14579$as_echo "$tool_specified" >&6; }
14580        fi
14581      fi
14582    fi
14583
14584  fi
14585
14586
14587
14588
14589  # Publish this variable in the help.
14590
14591
14592  if [ -z "${READLINK+x}" ]; then
14593    # The variable is not set by user, try to locate tool using the code snippet
14594    for ac_prog in greadlink readlink
14595do
14596  # Extract the first word of "$ac_prog", so it can be a program name with args.
14597set dummy $ac_prog; ac_word=$2
14598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14599$as_echo_n "checking for $ac_word... " >&6; }
14600if ${ac_cv_path_READLINK+:} false; then :
14601  $as_echo_n "(cached) " >&6
14602else
14603  case $READLINK in
14604  [\\/]* | ?:[\\/]*)
14605  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14606  ;;
14607  *)
14608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14609for as_dir in $PATH
14610do
14611  IFS=$as_save_IFS
14612  test -z "$as_dir" && as_dir=.
14613    for ac_exec_ext in '' $ac_executable_extensions; do
14614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14615    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14617    break 2
14618  fi
14619done
14620  done
14621IFS=$as_save_IFS
14622
14623  ;;
14624esac
14625fi
14626READLINK=$ac_cv_path_READLINK
14627if test -n "$READLINK"; then
14628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14629$as_echo "$READLINK" >&6; }
14630else
14631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14632$as_echo "no" >&6; }
14633fi
14634
14635
14636  test -n "$READLINK" && break
14637done
14638
14639  else
14640    # The variable is set, but is it from the command line or the environment?
14641
14642    # Try to remove the string !READLINK! from our list.
14643    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14644    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14645      # If it failed, the variable was not from the command line. Ignore it,
14646      # but warn the user (except for BASH, which is always set by the calling BASH).
14647      if test "xREADLINK" != xBASH; then
14648        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14649$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14650      fi
14651      # Try to locate tool using the code snippet
14652      for ac_prog in greadlink readlink
14653do
14654  # Extract the first word of "$ac_prog", so it can be a program name with args.
14655set dummy $ac_prog; ac_word=$2
14656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14657$as_echo_n "checking for $ac_word... " >&6; }
14658if ${ac_cv_path_READLINK+:} false; then :
14659  $as_echo_n "(cached) " >&6
14660else
14661  case $READLINK in
14662  [\\/]* | ?:[\\/]*)
14663  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14664  ;;
14665  *)
14666  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14667for as_dir in $PATH
14668do
14669  IFS=$as_save_IFS
14670  test -z "$as_dir" && as_dir=.
14671    for ac_exec_ext in '' $ac_executable_extensions; do
14672  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14673    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14674    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14675    break 2
14676  fi
14677done
14678  done
14679IFS=$as_save_IFS
14680
14681  ;;
14682esac
14683fi
14684READLINK=$ac_cv_path_READLINK
14685if test -n "$READLINK"; then
14686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14687$as_echo "$READLINK" >&6; }
14688else
14689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14690$as_echo "no" >&6; }
14691fi
14692
14693
14694  test -n "$READLINK" && break
14695done
14696
14697    else
14698      # If it succeeded, then it was overridden by the user. We will use it
14699      # for the tool.
14700
14701      # First remove it from the list of overridden variables, so we can test
14702      # for unknown variables in the end.
14703      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14704
14705      # Check if we try to supply an empty value
14706      if test "x$READLINK" = x; then
14707        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14708$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14709        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14710$as_echo_n "checking for READLINK... " >&6; }
14711        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14712$as_echo "disabled" >&6; }
14713      else
14714        # Check if the provided tool contains a complete path.
14715        tool_specified="$READLINK"
14716        tool_basename="${tool_specified##*/}"
14717        if test "x$tool_basename" = "x$tool_specified"; then
14718          # A command without a complete path is provided, search $PATH.
14719          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14720$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14721          # Extract the first word of "$tool_basename", so it can be a program name with args.
14722set dummy $tool_basename; ac_word=$2
14723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14724$as_echo_n "checking for $ac_word... " >&6; }
14725if ${ac_cv_path_READLINK+:} false; then :
14726  $as_echo_n "(cached) " >&6
14727else
14728  case $READLINK in
14729  [\\/]* | ?:[\\/]*)
14730  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14731  ;;
14732  *)
14733  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14734for as_dir in $PATH
14735do
14736  IFS=$as_save_IFS
14737  test -z "$as_dir" && as_dir=.
14738    for ac_exec_ext in '' $ac_executable_extensions; do
14739  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14740    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14741    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14742    break 2
14743  fi
14744done
14745  done
14746IFS=$as_save_IFS
14747
14748  ;;
14749esac
14750fi
14751READLINK=$ac_cv_path_READLINK
14752if test -n "$READLINK"; then
14753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14754$as_echo "$READLINK" >&6; }
14755else
14756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14757$as_echo "no" >&6; }
14758fi
14759
14760
14761          if test "x$READLINK" = x; then
14762            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14763          fi
14764        else
14765          # Otherwise we believe it is a complete path. Use it as it is.
14766          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14767$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14768          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14769$as_echo_n "checking for READLINK... " >&6; }
14770          if test ! -x "$tool_specified"; then
14771            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14772$as_echo "not found" >&6; }
14773            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14774          fi
14775          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14776$as_echo "$tool_specified" >&6; }
14777        fi
14778      fi
14779    fi
14780
14781  fi
14782
14783
14784
14785
14786  # Publish this variable in the help.
14787
14788
14789  if [ -z "${DF+x}" ]; then
14790    # The variable is not set by user, try to locate tool using the code snippet
14791    for ac_prog in df
14792do
14793  # Extract the first word of "$ac_prog", so it can be a program name with args.
14794set dummy $ac_prog; ac_word=$2
14795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14796$as_echo_n "checking for $ac_word... " >&6; }
14797if ${ac_cv_path_DF+:} false; then :
14798  $as_echo_n "(cached) " >&6
14799else
14800  case $DF in
14801  [\\/]* | ?:[\\/]*)
14802  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14803  ;;
14804  *)
14805  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14806for as_dir in $PATH
14807do
14808  IFS=$as_save_IFS
14809  test -z "$as_dir" && as_dir=.
14810    for ac_exec_ext in '' $ac_executable_extensions; do
14811  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14812    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14813    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14814    break 2
14815  fi
14816done
14817  done
14818IFS=$as_save_IFS
14819
14820  ;;
14821esac
14822fi
14823DF=$ac_cv_path_DF
14824if test -n "$DF"; then
14825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14826$as_echo "$DF" >&6; }
14827else
14828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14829$as_echo "no" >&6; }
14830fi
14831
14832
14833  test -n "$DF" && break
14834done
14835
14836  else
14837    # The variable is set, but is it from the command line or the environment?
14838
14839    # Try to remove the string !DF! from our list.
14840    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14841    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14842      # If it failed, the variable was not from the command line. Ignore it,
14843      # but warn the user (except for BASH, which is always set by the calling BASH).
14844      if test "xDF" != xBASH; then
14845        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14846$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14847      fi
14848      # Try to locate tool using the code snippet
14849      for ac_prog in df
14850do
14851  # Extract the first word of "$ac_prog", so it can be a program name with args.
14852set dummy $ac_prog; ac_word=$2
14853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14854$as_echo_n "checking for $ac_word... " >&6; }
14855if ${ac_cv_path_DF+:} false; then :
14856  $as_echo_n "(cached) " >&6
14857else
14858  case $DF in
14859  [\\/]* | ?:[\\/]*)
14860  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14861  ;;
14862  *)
14863  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14864for as_dir in $PATH
14865do
14866  IFS=$as_save_IFS
14867  test -z "$as_dir" && as_dir=.
14868    for ac_exec_ext in '' $ac_executable_extensions; do
14869  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14870    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14871    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14872    break 2
14873  fi
14874done
14875  done
14876IFS=$as_save_IFS
14877
14878  ;;
14879esac
14880fi
14881DF=$ac_cv_path_DF
14882if test -n "$DF"; then
14883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14884$as_echo "$DF" >&6; }
14885else
14886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14887$as_echo "no" >&6; }
14888fi
14889
14890
14891  test -n "$DF" && break
14892done
14893
14894    else
14895      # If it succeeded, then it was overridden by the user. We will use it
14896      # for the tool.
14897
14898      # First remove it from the list of overridden variables, so we can test
14899      # for unknown variables in the end.
14900      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14901
14902      # Check if we try to supply an empty value
14903      if test "x$DF" = x; then
14904        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14905$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14906        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14907$as_echo_n "checking for DF... " >&6; }
14908        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14909$as_echo "disabled" >&6; }
14910      else
14911        # Check if the provided tool contains a complete path.
14912        tool_specified="$DF"
14913        tool_basename="${tool_specified##*/}"
14914        if test "x$tool_basename" = "x$tool_specified"; then
14915          # A command without a complete path is provided, search $PATH.
14916          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14917$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14918          # Extract the first word of "$tool_basename", so it can be a program name with args.
14919set dummy $tool_basename; ac_word=$2
14920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14921$as_echo_n "checking for $ac_word... " >&6; }
14922if ${ac_cv_path_DF+:} false; then :
14923  $as_echo_n "(cached) " >&6
14924else
14925  case $DF in
14926  [\\/]* | ?:[\\/]*)
14927  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14928  ;;
14929  *)
14930  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14931for as_dir in $PATH
14932do
14933  IFS=$as_save_IFS
14934  test -z "$as_dir" && as_dir=.
14935    for ac_exec_ext in '' $ac_executable_extensions; do
14936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14937    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14939    break 2
14940  fi
14941done
14942  done
14943IFS=$as_save_IFS
14944
14945  ;;
14946esac
14947fi
14948DF=$ac_cv_path_DF
14949if test -n "$DF"; then
14950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14951$as_echo "$DF" >&6; }
14952else
14953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14954$as_echo "no" >&6; }
14955fi
14956
14957
14958          if test "x$DF" = x; then
14959            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14960          fi
14961        else
14962          # Otherwise we believe it is a complete path. Use it as it is.
14963          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14964$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14965          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14966$as_echo_n "checking for DF... " >&6; }
14967          if test ! -x "$tool_specified"; then
14968            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14969$as_echo "not found" >&6; }
14970            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14971          fi
14972          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14973$as_echo "$tool_specified" >&6; }
14974        fi
14975      fi
14976    fi
14977
14978  fi
14979
14980
14981
14982
14983  # Publish this variable in the help.
14984
14985
14986  if [ -z "${CPIO+x}" ]; then
14987    # The variable is not set by user, try to locate tool using the code snippet
14988    for ac_prog in cpio bsdcpio
14989do
14990  # Extract the first word of "$ac_prog", so it can be a program name with args.
14991set dummy $ac_prog; ac_word=$2
14992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14993$as_echo_n "checking for $ac_word... " >&6; }
14994if ${ac_cv_path_CPIO+:} false; then :
14995  $as_echo_n "(cached) " >&6
14996else
14997  case $CPIO in
14998  [\\/]* | ?:[\\/]*)
14999  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15000  ;;
15001  *)
15002  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15003for as_dir in $PATH
15004do
15005  IFS=$as_save_IFS
15006  test -z "$as_dir" && as_dir=.
15007    for ac_exec_ext in '' $ac_executable_extensions; do
15008  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15009    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15010    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15011    break 2
15012  fi
15013done
15014  done
15015IFS=$as_save_IFS
15016
15017  ;;
15018esac
15019fi
15020CPIO=$ac_cv_path_CPIO
15021if test -n "$CPIO"; then
15022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15023$as_echo "$CPIO" >&6; }
15024else
15025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15026$as_echo "no" >&6; }
15027fi
15028
15029
15030  test -n "$CPIO" && break
15031done
15032
15033  else
15034    # The variable is set, but is it from the command line or the environment?
15035
15036    # Try to remove the string !CPIO! from our list.
15037    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
15038    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15039      # If it failed, the variable was not from the command line. Ignore it,
15040      # but warn the user (except for BASH, which is always set by the calling BASH).
15041      if test "xCPIO" != xBASH; then
15042        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
15043$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
15044      fi
15045      # Try to locate tool using the code snippet
15046      for ac_prog in cpio bsdcpio
15047do
15048  # Extract the first word of "$ac_prog", so it can be a program name with args.
15049set dummy $ac_prog; ac_word=$2
15050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15051$as_echo_n "checking for $ac_word... " >&6; }
15052if ${ac_cv_path_CPIO+:} false; then :
15053  $as_echo_n "(cached) " >&6
15054else
15055  case $CPIO in
15056  [\\/]* | ?:[\\/]*)
15057  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15058  ;;
15059  *)
15060  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15061for as_dir in $PATH
15062do
15063  IFS=$as_save_IFS
15064  test -z "$as_dir" && as_dir=.
15065    for ac_exec_ext in '' $ac_executable_extensions; do
15066  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15067    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15068    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15069    break 2
15070  fi
15071done
15072  done
15073IFS=$as_save_IFS
15074
15075  ;;
15076esac
15077fi
15078CPIO=$ac_cv_path_CPIO
15079if test -n "$CPIO"; then
15080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15081$as_echo "$CPIO" >&6; }
15082else
15083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15084$as_echo "no" >&6; }
15085fi
15086
15087
15088  test -n "$CPIO" && break
15089done
15090
15091    else
15092      # If it succeeded, then it was overridden by the user. We will use it
15093      # for the tool.
15094
15095      # First remove it from the list of overridden variables, so we can test
15096      # for unknown variables in the end.
15097      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15098
15099      # Check if we try to supply an empty value
15100      if test "x$CPIO" = x; then
15101        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15102$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15103        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15104$as_echo_n "checking for CPIO... " >&6; }
15105        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15106$as_echo "disabled" >&6; }
15107      else
15108        # Check if the provided tool contains a complete path.
15109        tool_specified="$CPIO"
15110        tool_basename="${tool_specified##*/}"
15111        if test "x$tool_basename" = "x$tool_specified"; then
15112          # A command without a complete path is provided, search $PATH.
15113          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15114$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15115          # Extract the first word of "$tool_basename", so it can be a program name with args.
15116set dummy $tool_basename; ac_word=$2
15117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15118$as_echo_n "checking for $ac_word... " >&6; }
15119if ${ac_cv_path_CPIO+:} false; then :
15120  $as_echo_n "(cached) " >&6
15121else
15122  case $CPIO in
15123  [\\/]* | ?:[\\/]*)
15124  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15125  ;;
15126  *)
15127  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15128for as_dir in $PATH
15129do
15130  IFS=$as_save_IFS
15131  test -z "$as_dir" && as_dir=.
15132    for ac_exec_ext in '' $ac_executable_extensions; do
15133  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15134    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15136    break 2
15137  fi
15138done
15139  done
15140IFS=$as_save_IFS
15141
15142  ;;
15143esac
15144fi
15145CPIO=$ac_cv_path_CPIO
15146if test -n "$CPIO"; then
15147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15148$as_echo "$CPIO" >&6; }
15149else
15150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15151$as_echo "no" >&6; }
15152fi
15153
15154
15155          if test "x$CPIO" = x; then
15156            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15157          fi
15158        else
15159          # Otherwise we believe it is a complete path. Use it as it is.
15160          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15161$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15162          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15163$as_echo_n "checking for CPIO... " >&6; }
15164          if test ! -x "$tool_specified"; then
15165            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15166$as_echo "not found" >&6; }
15167            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15168          fi
15169          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15170$as_echo "$tool_specified" >&6; }
15171        fi
15172      fi
15173    fi
15174
15175  fi
15176
15177
15178
15179
15180  # Publish this variable in the help.
15181
15182
15183  if [ -z "${NICE+x}" ]; then
15184    # The variable is not set by user, try to locate tool using the code snippet
15185    for ac_prog in nice
15186do
15187  # Extract the first word of "$ac_prog", so it can be a program name with args.
15188set dummy $ac_prog; ac_word=$2
15189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15190$as_echo_n "checking for $ac_word... " >&6; }
15191if ${ac_cv_path_NICE+:} false; then :
15192  $as_echo_n "(cached) " >&6
15193else
15194  case $NICE in
15195  [\\/]* | ?:[\\/]*)
15196  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15197  ;;
15198  *)
15199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15200for as_dir in $PATH
15201do
15202  IFS=$as_save_IFS
15203  test -z "$as_dir" && as_dir=.
15204    for ac_exec_ext in '' $ac_executable_extensions; do
15205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15206    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15208    break 2
15209  fi
15210done
15211  done
15212IFS=$as_save_IFS
15213
15214  ;;
15215esac
15216fi
15217NICE=$ac_cv_path_NICE
15218if test -n "$NICE"; then
15219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15220$as_echo "$NICE" >&6; }
15221else
15222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15223$as_echo "no" >&6; }
15224fi
15225
15226
15227  test -n "$NICE" && break
15228done
15229
15230  else
15231    # The variable is set, but is it from the command line or the environment?
15232
15233    # Try to remove the string !NICE! from our list.
15234    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15235    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15236      # If it failed, the variable was not from the command line. Ignore it,
15237      # but warn the user (except for BASH, which is always set by the calling BASH).
15238      if test "xNICE" != xBASH; then
15239        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15240$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15241      fi
15242      # Try to locate tool using the code snippet
15243      for ac_prog in nice
15244do
15245  # Extract the first word of "$ac_prog", so it can be a program name with args.
15246set dummy $ac_prog; ac_word=$2
15247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15248$as_echo_n "checking for $ac_word... " >&6; }
15249if ${ac_cv_path_NICE+:} false; then :
15250  $as_echo_n "(cached) " >&6
15251else
15252  case $NICE in
15253  [\\/]* | ?:[\\/]*)
15254  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15255  ;;
15256  *)
15257  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15258for as_dir in $PATH
15259do
15260  IFS=$as_save_IFS
15261  test -z "$as_dir" && as_dir=.
15262    for ac_exec_ext in '' $ac_executable_extensions; do
15263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15264    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15266    break 2
15267  fi
15268done
15269  done
15270IFS=$as_save_IFS
15271
15272  ;;
15273esac
15274fi
15275NICE=$ac_cv_path_NICE
15276if test -n "$NICE"; then
15277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15278$as_echo "$NICE" >&6; }
15279else
15280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15281$as_echo "no" >&6; }
15282fi
15283
15284
15285  test -n "$NICE" && break
15286done
15287
15288    else
15289      # If it succeeded, then it was overridden by the user. We will use it
15290      # for the tool.
15291
15292      # First remove it from the list of overridden variables, so we can test
15293      # for unknown variables in the end.
15294      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15295
15296      # Check if we try to supply an empty value
15297      if test "x$NICE" = x; then
15298        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15299$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15300        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15301$as_echo_n "checking for NICE... " >&6; }
15302        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15303$as_echo "disabled" >&6; }
15304      else
15305        # Check if the provided tool contains a complete path.
15306        tool_specified="$NICE"
15307        tool_basename="${tool_specified##*/}"
15308        if test "x$tool_basename" = "x$tool_specified"; then
15309          # A command without a complete path is provided, search $PATH.
15310          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15311$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15312          # Extract the first word of "$tool_basename", so it can be a program name with args.
15313set dummy $tool_basename; ac_word=$2
15314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15315$as_echo_n "checking for $ac_word... " >&6; }
15316if ${ac_cv_path_NICE+:} false; then :
15317  $as_echo_n "(cached) " >&6
15318else
15319  case $NICE in
15320  [\\/]* | ?:[\\/]*)
15321  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15322  ;;
15323  *)
15324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15325for as_dir in $PATH
15326do
15327  IFS=$as_save_IFS
15328  test -z "$as_dir" && as_dir=.
15329    for ac_exec_ext in '' $ac_executable_extensions; do
15330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15331    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15333    break 2
15334  fi
15335done
15336  done
15337IFS=$as_save_IFS
15338
15339  ;;
15340esac
15341fi
15342NICE=$ac_cv_path_NICE
15343if test -n "$NICE"; then
15344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15345$as_echo "$NICE" >&6; }
15346else
15347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15348$as_echo "no" >&6; }
15349fi
15350
15351
15352          if test "x$NICE" = x; then
15353            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15354          fi
15355        else
15356          # Otherwise we believe it is a complete path. Use it as it is.
15357          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15358$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15359          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15360$as_echo_n "checking for NICE... " >&6; }
15361          if test ! -x "$tool_specified"; then
15362            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15363$as_echo "not found" >&6; }
15364            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15365          fi
15366          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15367$as_echo "$tool_specified" >&6; }
15368        fi
15369      fi
15370    fi
15371
15372  fi
15373
15374
15375
15376
15377  # Publish this variable in the help.
15378
15379
15380  if [ -z "${PANDOC+x}" ]; then
15381    # The variable is not set by user, try to locate tool using the code snippet
15382    for ac_prog in pandoc
15383do
15384  # Extract the first word of "$ac_prog", so it can be a program name with args.
15385set dummy $ac_prog; ac_word=$2
15386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15387$as_echo_n "checking for $ac_word... " >&6; }
15388if ${ac_cv_path_PANDOC+:} false; then :
15389  $as_echo_n "(cached) " >&6
15390else
15391  case $PANDOC in
15392  [\\/]* | ?:[\\/]*)
15393  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15394  ;;
15395  *)
15396  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15397for as_dir in $PATH
15398do
15399  IFS=$as_save_IFS
15400  test -z "$as_dir" && as_dir=.
15401    for ac_exec_ext in '' $ac_executable_extensions; do
15402  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15403    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15404    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15405    break 2
15406  fi
15407done
15408  done
15409IFS=$as_save_IFS
15410
15411  ;;
15412esac
15413fi
15414PANDOC=$ac_cv_path_PANDOC
15415if test -n "$PANDOC"; then
15416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15417$as_echo "$PANDOC" >&6; }
15418else
15419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15420$as_echo "no" >&6; }
15421fi
15422
15423
15424  test -n "$PANDOC" && break
15425done
15426
15427  else
15428    # The variable is set, but is it from the command line or the environment?
15429
15430    # Try to remove the string !PANDOC! from our list.
15431    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PANDOC!/}
15432    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15433      # If it failed, the variable was not from the command line. Ignore it,
15434      # but warn the user (except for BASH, which is always set by the calling BASH).
15435      if test "xPANDOC" != xBASH; then
15436        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&5
15437$as_echo "$as_me: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&2;}
15438      fi
15439      # Try to locate tool using the code snippet
15440      for ac_prog in pandoc
15441do
15442  # Extract the first word of "$ac_prog", so it can be a program name with args.
15443set dummy $ac_prog; ac_word=$2
15444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15445$as_echo_n "checking for $ac_word... " >&6; }
15446if ${ac_cv_path_PANDOC+:} false; then :
15447  $as_echo_n "(cached) " >&6
15448else
15449  case $PANDOC in
15450  [\\/]* | ?:[\\/]*)
15451  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15452  ;;
15453  *)
15454  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15455for as_dir in $PATH
15456do
15457  IFS=$as_save_IFS
15458  test -z "$as_dir" && as_dir=.
15459    for ac_exec_ext in '' $ac_executable_extensions; do
15460  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15461    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15462    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15463    break 2
15464  fi
15465done
15466  done
15467IFS=$as_save_IFS
15468
15469  ;;
15470esac
15471fi
15472PANDOC=$ac_cv_path_PANDOC
15473if test -n "$PANDOC"; then
15474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15475$as_echo "$PANDOC" >&6; }
15476else
15477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15478$as_echo "no" >&6; }
15479fi
15480
15481
15482  test -n "$PANDOC" && break
15483done
15484
15485    else
15486      # If it succeeded, then it was overridden by the user. We will use it
15487      # for the tool.
15488
15489      # First remove it from the list of overridden variables, so we can test
15490      # for unknown variables in the end.
15491      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15492
15493      # Check if we try to supply an empty value
15494      if test "x$PANDOC" = x; then
15495        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PANDOC= (no value)" >&5
15496$as_echo "$as_me: Setting user supplied tool PANDOC= (no value)" >&6;}
15497        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15498$as_echo_n "checking for PANDOC... " >&6; }
15499        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15500$as_echo "disabled" >&6; }
15501      else
15502        # Check if the provided tool contains a complete path.
15503        tool_specified="$PANDOC"
15504        tool_basename="${tool_specified##*/}"
15505        if test "x$tool_basename" = "x$tool_specified"; then
15506          # A command without a complete path is provided, search $PATH.
15507          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PANDOC=$tool_basename" >&5
15508$as_echo "$as_me: Will search for user supplied tool PANDOC=$tool_basename" >&6;}
15509          # Extract the first word of "$tool_basename", so it can be a program name with args.
15510set dummy $tool_basename; ac_word=$2
15511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15512$as_echo_n "checking for $ac_word... " >&6; }
15513if ${ac_cv_path_PANDOC+:} false; then :
15514  $as_echo_n "(cached) " >&6
15515else
15516  case $PANDOC in
15517  [\\/]* | ?:[\\/]*)
15518  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15519  ;;
15520  *)
15521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15522for as_dir in $PATH
15523do
15524  IFS=$as_save_IFS
15525  test -z "$as_dir" && as_dir=.
15526    for ac_exec_ext in '' $ac_executable_extensions; do
15527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15528    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15530    break 2
15531  fi
15532done
15533  done
15534IFS=$as_save_IFS
15535
15536  ;;
15537esac
15538fi
15539PANDOC=$ac_cv_path_PANDOC
15540if test -n "$PANDOC"; then
15541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15542$as_echo "$PANDOC" >&6; }
15543else
15544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15545$as_echo "no" >&6; }
15546fi
15547
15548
15549          if test "x$PANDOC" = x; then
15550            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15551          fi
15552        else
15553          # Otherwise we believe it is a complete path. Use it as it is.
15554          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PANDOC=$tool_specified" >&5
15555$as_echo "$as_me: Will use user supplied tool PANDOC=$tool_specified" >&6;}
15556          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15557$as_echo_n "checking for PANDOC... " >&6; }
15558          if test ! -x "$tool_specified"; then
15559            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15560$as_echo "not found" >&6; }
15561            as_fn_error $? "User supplied tool PANDOC=$tool_specified does not exist or is not executable" "$LINENO" 5
15562          fi
15563          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15564$as_echo "$tool_specified" >&6; }
15565        fi
15566      fi
15567    fi
15568
15569  fi
15570
15571
15572
15573
15574# Now we can determine OpenJDK build and target platforms. This is required to
15575# have early on.
15576# Make sure we can run config.sub.
15577$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15578  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15579
15580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15581$as_echo_n "checking build system type... " >&6; }
15582if ${ac_cv_build+:} false; then :
15583  $as_echo_n "(cached) " >&6
15584else
15585  ac_build_alias=$build_alias
15586test "x$ac_build_alias" = x &&
15587  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15588test "x$ac_build_alias" = x &&
15589  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15590ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15591  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15592
15593fi
15594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15595$as_echo "$ac_cv_build" >&6; }
15596case $ac_cv_build in
15597*-*-*) ;;
15598*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15599esac
15600build=$ac_cv_build
15601ac_save_IFS=$IFS; IFS='-'
15602set x $ac_cv_build
15603shift
15604build_cpu=$1
15605build_vendor=$2
15606shift; shift
15607# Remember, the first character of IFS is used to create $*,
15608# except with old shells:
15609build_os=$*
15610IFS=$ac_save_IFS
15611case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15612
15613
15614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15615$as_echo_n "checking host system type... " >&6; }
15616if ${ac_cv_host+:} false; then :
15617  $as_echo_n "(cached) " >&6
15618else
15619  if test "x$host_alias" = x; then
15620  ac_cv_host=$ac_cv_build
15621else
15622  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15623    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15624fi
15625
15626fi
15627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15628$as_echo "$ac_cv_host" >&6; }
15629case $ac_cv_host in
15630*-*-*) ;;
15631*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15632esac
15633host=$ac_cv_host
15634ac_save_IFS=$IFS; IFS='-'
15635set x $ac_cv_host
15636shift
15637host_cpu=$1
15638host_vendor=$2
15639shift; shift
15640# Remember, the first character of IFS is used to create $*,
15641# except with old shells:
15642host_os=$*
15643IFS=$ac_save_IFS
15644case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15645
15646
15647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15648$as_echo_n "checking target system type... " >&6; }
15649if ${ac_cv_target+:} false; then :
15650  $as_echo_n "(cached) " >&6
15651else
15652  if test "x$target_alias" = x; then
15653  ac_cv_target=$ac_cv_host
15654else
15655  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15656    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15657fi
15658
15659fi
15660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15661$as_echo "$ac_cv_target" >&6; }
15662case $ac_cv_target in
15663*-*-*) ;;
15664*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15665esac
15666target=$ac_cv_target
15667ac_save_IFS=$IFS; IFS='-'
15668set x $ac_cv_target
15669shift
15670target_cpu=$1
15671target_vendor=$2
15672shift; shift
15673# Remember, the first character of IFS is used to create $*,
15674# except with old shells:
15675target_os=$*
15676IFS=$ac_save_IFS
15677case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15678
15679
15680# The aliases save the names the user supplied, while $host etc.
15681# will get canonicalized.
15682test -n "$target_alias" &&
15683  test "$program_prefix$program_suffix$program_transform_name" = \
15684    NONENONEs,x,x, &&
15685  program_prefix=${target_alias}-
15686
15687  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15688  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15689  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15690  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15691  # to use the configure naming style.
15692
15693
15694
15695
15696
15697  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15698  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15699  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15700  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15701  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15702  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15703
15704
15705
15706  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15707
15708  case "$build_os" in
15709    *linux*)
15710      VAR_OS=linux
15711      VAR_OS_TYPE=unix
15712      ;;
15713    *solaris*)
15714      VAR_OS=solaris
15715      VAR_OS_TYPE=unix
15716      ;;
15717    *darwin*)
15718      VAR_OS=macosx
15719      VAR_OS_TYPE=unix
15720      ;;
15721    *bsd*)
15722      VAR_OS=bsd
15723      VAR_OS_TYPE=unix
15724      ;;
15725    *cygwin*)
15726      VAR_OS=windows
15727      VAR_OS_ENV=windows.cygwin
15728      ;;
15729    *mingw*)
15730      VAR_OS=windows
15731      VAR_OS_ENV=windows.msys
15732      ;;
15733    *aix*)
15734      VAR_OS=aix
15735      VAR_OS_TYPE=unix
15736      ;;
15737    *)
15738      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15739      ;;
15740  esac
15741
15742
15743  # First argument is the cpu name from the trip/quad
15744  case "$build_cpu" in
15745    x86_64)
15746      VAR_CPU=x86_64
15747      VAR_CPU_ARCH=x86
15748      VAR_CPU_BITS=64
15749      VAR_CPU_ENDIAN=little
15750      ;;
15751    i?86)
15752      VAR_CPU=x86
15753      VAR_CPU_ARCH=x86
15754      VAR_CPU_BITS=32
15755      VAR_CPU_ENDIAN=little
15756      ;;
15757    arm*)
15758      VAR_CPU=arm
15759      VAR_CPU_ARCH=arm
15760      VAR_CPU_BITS=32
15761      VAR_CPU_ENDIAN=little
15762      ;;
15763    aarch64)
15764      VAR_CPU=aarch64
15765      VAR_CPU_ARCH=aarch64
15766      VAR_CPU_BITS=64
15767      VAR_CPU_ENDIAN=little
15768      ;;
15769    powerpc)
15770      VAR_CPU=ppc
15771      VAR_CPU_ARCH=ppc
15772      VAR_CPU_BITS=32
15773      VAR_CPU_ENDIAN=big
15774      ;;
15775    powerpc64)
15776      VAR_CPU=ppc64
15777      VAR_CPU_ARCH=ppc
15778      VAR_CPU_BITS=64
15779      VAR_CPU_ENDIAN=big
15780      ;;
15781    powerpc64le)
15782      VAR_CPU=ppc64le
15783      VAR_CPU_ARCH=ppc
15784      VAR_CPU_BITS=64
15785      VAR_CPU_ENDIAN=little
15786      ;;
15787    s390)
15788      VAR_CPU=s390
15789      VAR_CPU_ARCH=s390
15790      VAR_CPU_BITS=32
15791      VAR_CPU_ENDIAN=big
15792      ;;
15793    s390x)
15794      VAR_CPU=s390x
15795      VAR_CPU_ARCH=s390
15796      VAR_CPU_BITS=64
15797      VAR_CPU_ENDIAN=big
15798      ;;
15799    sparc)
15800      VAR_CPU=sparc
15801      VAR_CPU_ARCH=sparc
15802      VAR_CPU_BITS=32
15803      VAR_CPU_ENDIAN=big
15804      ;;
15805    sparcv9|sparc64)
15806      VAR_CPU=sparcv9
15807      VAR_CPU_ARCH=sparc
15808      VAR_CPU_BITS=64
15809      VAR_CPU_ENDIAN=big
15810      ;;
15811    *)
15812      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15813      ;;
15814  esac
15815
15816  # ..and setup our own variables. (Do this explicitly to facilitate searching)
15817  OPENJDK_BUILD_OS="$VAR_OS"
15818  if test "x$VAR_OS_TYPE" != x; then
15819    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15820  else
15821    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15822  fi
15823  if test "x$VAR_OS_ENV" != x; then
15824    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15825  else
15826    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15827  fi
15828  OPENJDK_BUILD_CPU="$VAR_CPU"
15829  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15830  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15831  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15832
15833
15834
15835
15836
15837
15838
15839
15840  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15841$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15843$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15844
15845  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15846
15847  case "$host_os" in
15848    *linux*)
15849      VAR_OS=linux
15850      VAR_OS_TYPE=unix
15851      ;;
15852    *solaris*)
15853      VAR_OS=solaris
15854      VAR_OS_TYPE=unix
15855      ;;
15856    *darwin*)
15857      VAR_OS=macosx
15858      VAR_OS_TYPE=unix
15859      ;;
15860    *bsd*)
15861      VAR_OS=bsd
15862      VAR_OS_TYPE=unix
15863      ;;
15864    *cygwin*)
15865      VAR_OS=windows
15866      VAR_OS_ENV=windows.cygwin
15867      ;;
15868    *mingw*)
15869      VAR_OS=windows
15870      VAR_OS_ENV=windows.msys
15871      ;;
15872    *aix*)
15873      VAR_OS=aix
15874      VAR_OS_TYPE=unix
15875      ;;
15876    *)
15877      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15878      ;;
15879  esac
15880
15881
15882  # First argument is the cpu name from the trip/quad
15883  case "$host_cpu" in
15884    x86_64)
15885      VAR_CPU=x86_64
15886      VAR_CPU_ARCH=x86
15887      VAR_CPU_BITS=64
15888      VAR_CPU_ENDIAN=little
15889      ;;
15890    i?86)
15891      VAR_CPU=x86
15892      VAR_CPU_ARCH=x86
15893      VAR_CPU_BITS=32
15894      VAR_CPU_ENDIAN=little
15895      ;;
15896    arm*)
15897      VAR_CPU=arm
15898      VAR_CPU_ARCH=arm
15899      VAR_CPU_BITS=32
15900      VAR_CPU_ENDIAN=little
15901      ;;
15902    aarch64)
15903      VAR_CPU=aarch64
15904      VAR_CPU_ARCH=aarch64
15905      VAR_CPU_BITS=64
15906      VAR_CPU_ENDIAN=little
15907      ;;
15908    powerpc)
15909      VAR_CPU=ppc
15910      VAR_CPU_ARCH=ppc
15911      VAR_CPU_BITS=32
15912      VAR_CPU_ENDIAN=big
15913      ;;
15914    powerpc64)
15915      VAR_CPU=ppc64
15916      VAR_CPU_ARCH=ppc
15917      VAR_CPU_BITS=64
15918      VAR_CPU_ENDIAN=big
15919      ;;
15920    powerpc64le)
15921      VAR_CPU=ppc64le
15922      VAR_CPU_ARCH=ppc
15923      VAR_CPU_BITS=64
15924      VAR_CPU_ENDIAN=little
15925      ;;
15926    s390)
15927      VAR_CPU=s390
15928      VAR_CPU_ARCH=s390
15929      VAR_CPU_BITS=32
15930      VAR_CPU_ENDIAN=big
15931      ;;
15932    s390x)
15933      VAR_CPU=s390x
15934      VAR_CPU_ARCH=s390
15935      VAR_CPU_BITS=64
15936      VAR_CPU_ENDIAN=big
15937      ;;
15938    sparc)
15939      VAR_CPU=sparc
15940      VAR_CPU_ARCH=sparc
15941      VAR_CPU_BITS=32
15942      VAR_CPU_ENDIAN=big
15943      ;;
15944    sparcv9|sparc64)
15945      VAR_CPU=sparcv9
15946      VAR_CPU_ARCH=sparc
15947      VAR_CPU_BITS=64
15948      VAR_CPU_ENDIAN=big
15949      ;;
15950    *)
15951      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15952      ;;
15953  esac
15954
15955  # ... and setup our own variables. (Do this explicitly to facilitate searching)
15956  OPENJDK_TARGET_OS="$VAR_OS"
15957  if test "x$VAR_OS_TYPE" != x; then
15958    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15959  else
15960    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15961  fi
15962  if test "x$VAR_OS_ENV" != x; then
15963    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15964  else
15965    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15966  fi
15967  OPENJDK_TARGET_CPU="$VAR_CPU"
15968  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15969  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15970  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15971
15972
15973
15974
15975
15976
15977
15978
15979  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15980$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15982$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15983
15984
15985
15986# Check whether --with-target-bits was given.
15987if test "${with_target_bits+set}" = set; then :
15988  withval=$with_target_bits;
15989fi
15990
15991
15992  # We have three types of compiles:
15993  # native  == normal compilation, target system == build system
15994  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15995  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15996  #
15997  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15998    # We're doing a proper cross-compilation
15999    COMPILE_TYPE="cross"
16000  else
16001    COMPILE_TYPE="native"
16002  fi
16003
16004  if test "x$with_target_bits" != x; then
16005    if test "x$COMPILE_TYPE" = "xcross"; then
16006      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
16007    fi
16008
16009    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16010      # A reduced build is requested
16011      COMPILE_TYPE="reduced"
16012      OPENJDK_TARGET_CPU_BITS=32
16013      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
16014        OPENJDK_TARGET_CPU=x86
16015      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
16016        OPENJDK_TARGET_CPU=sparc
16017      else
16018        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
16019      fi
16020    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16021      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
16022    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
16023      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
16024$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
16025    else
16026      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
16027    fi
16028  fi
16029
16030
16031  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
16032$as_echo_n "checking compilation type... " >&6; }
16033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
16034$as_echo "$COMPILE_TYPE" >&6; }
16035
16036
16037  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16038    OPENJDK_MODULE_TARGET_OS_NAME="macos"
16039  else
16040    OPENJDK_MODULE_TARGET_OS_NAME="$OPENJDK_TARGET_OS"
16041  fi
16042
16043  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16044    OPENJDK_MODULE_TARGET_OS_ARCH="amd64"
16045  else
16046    OPENJDK_MODULE_TARGET_OS_ARCH="$OPENJDK_TARGET_CPU"
16047  fi
16048
16049  OPENJDK_MODULE_TARGET_PLATFORM="${OPENJDK_MODULE_TARGET_OS_NAME}-${OPENJDK_MODULE_TARGET_OS_ARCH}"
16050
16051
16052
16053  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
16054    RELEASE_FILE_OS_NAME=SunOS
16055  fi
16056  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
16057    RELEASE_FILE_OS_NAME=Linux
16058  fi
16059  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16060    RELEASE_FILE_OS_NAME=Windows
16061  fi
16062  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16063    RELEASE_FILE_OS_NAME="Darwin"
16064  fi
16065  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
16066    RELEASE_FILE_OS_NAME="AIX"
16067  fi
16068  RELEASE_FILE_OS_ARCH=${OPENJDK_TARGET_CPU}
16069
16070
16071
16072
16073
16074
16075  # Also store the legacy naming of the cpu.
16076  # Ie i586 and amd64 instead of x86 and x86_64
16077  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
16078  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16079    OPENJDK_TARGET_CPU_LEGACY="i586"
16080  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16081    # On all platforms except MacOSX replace x86_64 with amd64.
16082    OPENJDK_TARGET_CPU_LEGACY="amd64"
16083  fi
16084
16085
16086  # And the second legacy naming of the cpu.
16087  # Ie i386 and amd64 instead of x86 and x86_64.
16088  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
16089  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16090    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
16091  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16092    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
16093  fi
16094
16095
16096  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16097  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16098  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
16099  OPENJDK_TARGET_CPU_ISADIR=""
16100  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
16101    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16102      OPENJDK_TARGET_CPU_ISADIR="/amd64"
16103    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16104      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
16105    fi
16106  fi
16107
16108
16109  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
16110  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
16111  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
16112    # On linux only, we replace x86 with i386.
16113    OPENJDK_TARGET_CPU_OSARCH="i386"
16114  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16115    # On all platforms except macosx, we replace x86_64 with amd64.
16116    OPENJDK_TARGET_CPU_OSARCH="amd64"
16117  fi
16118
16119
16120  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
16121  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16122    OPENJDK_TARGET_CPU_JLI="i386"
16123  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16124    # On all platforms except macosx, we replace x86_64 with amd64.
16125    OPENJDK_TARGET_CPU_JLI="amd64"
16126  fi
16127
16128  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16129      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
16130  else
16131      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
16132  fi
16133
16134
16135  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16136  # Macosx is osx and x86_64 is x64
16137  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16138    OPENJDK_TARGET_OS_BUNDLE="osx"
16139  else
16140    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
16141  fi
16142  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16143    OPENJDK_TARGET_CPU_BUNDLE="x64"
16144  else
16145    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
16146  fi
16147  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
16148
16149
16150  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16151    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16152    # unpack200.exe. This variable is used in
16153    # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16154    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
16155      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
16156    fi
16157  fi
16158
16159  if test "x$COMPILE_TYPE" = "xcross"; then
16160    # FIXME: ... or should this include reduced builds..?
16161    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
16162  else
16163    DEFINE_CROSS_COMPILE_ARCH=""
16164  fi
16165
16166
16167  # Convert openjdk platform names to hotspot names
16168
16169  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
16170  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16171    HOTSPOT_TARGET_OS=bsd
16172  fi
16173
16174
16175  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
16176  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
16177    HOTSPOT_TARGET_OS_TYPE=posix
16178  fi
16179
16180
16181  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
16182  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16183    HOTSPOT_TARGET_CPU=x86_32
16184  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16185    HOTSPOT_TARGET_CPU=sparc
16186  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16187    HOTSPOT_TARGET_CPU=ppc_64
16188  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16189    HOTSPOT_TARGET_CPU=ppc_64
16190  fi
16191
16192
16193  # This is identical with OPENJDK_*, but define anyway for consistency.
16194  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
16195
16196
16197  # Setup HOTSPOT_TARGET_CPU_DEFINE
16198  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16199    HOTSPOT_TARGET_CPU_DEFINE=IA32
16200  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16201    HOTSPOT_TARGET_CPU_DEFINE=AMD64
16202  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16203    HOTSPOT_TARGET_CPU_DEFINE=SPARC
16204  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
16205    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
16206  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16207    HOTSPOT_TARGET_CPU_DEFINE=PPC64
16208  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16209    HOTSPOT_TARGET_CPU_DEFINE=PPC64
16210
16211  # The cpu defines below are for zero, we don't support them directly.
16212  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
16213    HOTSPOT_TARGET_CPU_DEFINE=SPARC
16214  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
16215    HOTSPOT_TARGET_CPU_DEFINE=PPC32
16216  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
16217    HOTSPOT_TARGET_CPU_DEFINE=S390
16218  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
16219    HOTSPOT_TARGET_CPU_DEFINE=S390
16220  elif test "x$OPENJDK_TARGET_CPU" != x; then
16221    HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
16222  fi
16223
16224
16225
16226
16227  # Also store the legacy naming of the cpu.
16228  # Ie i586 and amd64 instead of x86 and x86_64
16229  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
16230  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16231    OPENJDK_BUILD_CPU_LEGACY="i586"
16232  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16233    # On all platforms except MacOSX replace x86_64 with amd64.
16234    OPENJDK_BUILD_CPU_LEGACY="amd64"
16235  fi
16236
16237
16238  # And the second legacy naming of the cpu.
16239  # Ie i386 and amd64 instead of x86 and x86_64.
16240  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
16241  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16242    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
16243  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16244    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
16245  fi
16246
16247
16248  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16249  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16250  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
16251  OPENJDK_BUILD_CPU_ISADIR=""
16252  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16253    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16254      OPENJDK_BUILD_CPU_ISADIR="/amd64"
16255    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16256      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
16257    fi
16258  fi
16259
16260
16261  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
16262  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
16263  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
16264    # On linux only, we replace x86 with i386.
16265    OPENJDK_BUILD_CPU_OSARCH="i386"
16266  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16267    # On all platforms except macosx, we replace x86_64 with amd64.
16268    OPENJDK_BUILD_CPU_OSARCH="amd64"
16269  fi
16270
16271
16272  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16273  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16274    OPENJDK_BUILD_CPU_JLI="i386"
16275  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16276    # On all platforms except macosx, we replace x86_64 with amd64.
16277    OPENJDK_BUILD_CPU_JLI="amd64"
16278  fi
16279
16280  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16281      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16282  else
16283      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16284  fi
16285
16286
16287  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16288  # Macosx is osx and x86_64 is x64
16289  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16290    OPENJDK_BUILD_OS_BUNDLE="osx"
16291  else
16292    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16293  fi
16294  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16295    OPENJDK_BUILD_CPU_BUNDLE="x64"
16296  else
16297    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16298  fi
16299  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16300
16301
16302  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16303    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16304    # unpack200.exe. This variable is used in
16305    # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16306    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16307      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16308    fi
16309  fi
16310
16311  if test "x$COMPILE_TYPE" = "xcross"; then
16312    # FIXME: ... or should this include reduced builds..?
16313    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16314  else
16315    DEFINE_CROSS_COMPILE_ARCH=""
16316  fi
16317
16318
16319  # Convert openjdk platform names to hotspot names
16320
16321  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16322  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16323    HOTSPOT_BUILD_OS=bsd
16324  fi
16325
16326
16327  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16328  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16329    HOTSPOT_BUILD_OS_TYPE=posix
16330  fi
16331
16332
16333  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16334  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16335    HOTSPOT_BUILD_CPU=x86_32
16336  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16337    HOTSPOT_BUILD_CPU=sparc
16338  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16339    HOTSPOT_BUILD_CPU=ppc_64
16340  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16341    HOTSPOT_BUILD_CPU=ppc_64
16342  fi
16343
16344
16345  # This is identical with OPENJDK_*, but define anyway for consistency.
16346  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16347
16348
16349  # Setup HOTSPOT_BUILD_CPU_DEFINE
16350  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16351    HOTSPOT_BUILD_CPU_DEFINE=IA32
16352  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16353    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16354  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16355    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16356  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16357    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16358  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16359    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16360  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16361    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16362
16363  # The cpu defines below are for zero, we don't support them directly.
16364  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16365    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16366  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16367    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16368  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16369    HOTSPOT_BUILD_CPU_DEFINE=S390
16370  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16371    HOTSPOT_BUILD_CPU_DEFINE=S390
16372  elif test "x$OPENJDK_BUILD_CPU" != x; then
16373    HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16374  fi
16375
16376
16377
16378
16379
16380
16381# Continue setting up basic stuff. Most remaining code require fundamental tools.
16382
16383  # Save the current directory this script was started from
16384  CURDIR="$PWD"
16385
16386  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16387  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16388  # was not available at that time.
16389  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16390  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16391    ORIGINAL_PATH="$REWRITTEN_PATH"
16392    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16393$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16394  fi
16395
16396  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16397    PATH_SEP=";"
16398
16399  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16400  if test $SRC_ROOT_LENGTH -gt 100; then
16401    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16402  fi
16403
16404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16405    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16406$as_echo_n "checking cygwin release... " >&6; }
16407    CYGWIN_VERSION=`$UNAME -r`
16408    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16409$as_echo "$CYGWIN_VERSION" >&6; }
16410    WINDOWS_ENV_VENDOR='cygwin'
16411    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16412
16413    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16414    if test "x$CYGWIN_VERSION_OLD" != x; then
16415      { $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
16416$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;}
16417      as_fn_error $? "Cannot continue" "$LINENO" 5
16418    fi
16419    if test "x$CYGPATH" = x; then
16420      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16421    fi
16422    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16423$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16424    # The cmd output ends with Windows line endings (CR/LF)
16425    cygwin_winpath_root=`cd / ; cmd /c cd | $TR -d '\r\n'`
16426    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16427    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16428    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16429$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16430    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16431    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16432    if test "x$test_cygdrive_prefix" = x; then
16433      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16434    fi
16435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16436    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16437$as_echo_n "checking msys release... " >&6; }
16438    MSYS_VERSION=`$UNAME -r`
16439    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16440$as_echo "$MSYS_VERSION" >&6; }
16441
16442    WINDOWS_ENV_VENDOR='msys'
16443    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16444
16445    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16446$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16447    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16448    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16449
16450  windows_path="$MSYS_ROOT_PATH"
16451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16452    unix_path=`$CYGPATH -u "$windows_path"`
16453    MSYS_ROOT_PATH="$unix_path"
16454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16455    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16456    MSYS_ROOT_PATH="$unix_path"
16457  fi
16458
16459    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16460$as_echo "$MSYS_ROOT_PATH" >&6; }
16461    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16462  else
16463    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16464  fi
16465
16466  # Test if windows or unix (cygwin/msys) find is first in path.
16467  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16468$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16469  FIND_BINARY_OUTPUT=`find --version 2>&1`
16470  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16471    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16472$as_echo "unix style" >&6; }
16473  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16474    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16475$as_echo "Windows" >&6; }
16476    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16477$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16478    { $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
16479$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16480    as_fn_error $? "Cannot continue" "$LINENO" 5
16481  else
16482    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16483$as_echo "unknown" >&6; }
16484    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16485$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16486  fi
16487
16488  else
16489    PATH_SEP=":"
16490  fi
16491
16492
16493  # We get the top-level directory from the supporting wrappers.
16494  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16495$as_echo_n "checking for top-level directory... " >&6; }
16496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16497$as_echo "$TOPDIR" >&6; }
16498
16499
16500  # Save the original version of TOPDIR for string comparisons
16501  ORIGINAL_TOPDIR="$TOPDIR"
16502
16503
16504  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16505
16506  # Only process if variable expands to non-empty
16507
16508  if test "x$CURDIR" != x; then
16509    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16510
16511  # Input might be given as Windows format, start by converting to
16512  # unix format.
16513  path="$CURDIR"
16514  new_path=`$CYGPATH -u "$path"`
16515
16516  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16517  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16518  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16519  # "foo.exe" is OK but "foo" is an error.
16520  #
16521  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16522  # It is also a way to make sure we got the proper file name for the real test later on.
16523  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16524  if test "x$test_shortpath" = x; then
16525    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16526$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16527    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16528  fi
16529
16530  # Call helper function which possibly converts this using DOS-style short mode.
16531  # If so, the updated path is stored in $new_path.
16532
16533  input_path="$new_path"
16534  # Check if we need to convert this using DOS-style short mode. If the path
16535  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16536  # take no chances and rewrite it.
16537  # Note: m4 eats our [], so we need to use [ and ] instead.
16538  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16539  if test "x$has_forbidden_chars" != x; then
16540    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16541    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16542    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16543    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16544      # Going to short mode and back again did indeed matter. Since short mode is
16545      # case insensitive, let's make it lowercase to improve readability.
16546      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16547      # Now convert it back to Unix-style (cygpath)
16548      input_path=`$CYGPATH -u "$shortmode_path"`
16549      new_path="$input_path"
16550    fi
16551  fi
16552
16553  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16554  if test "x$test_cygdrive_prefix" = x; then
16555    # As a simple fix, exclude /usr/bin since it's not a real path.
16556    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16557      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16558      # a path prefixed by /cygdrive for fixpath to work.
16559      new_path="$CYGWIN_ROOT_PATH$input_path"
16560    fi
16561  fi
16562
16563
16564  if test "x$path" != "x$new_path"; then
16565    CURDIR="$new_path"
16566    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16567$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16568  fi
16569
16570    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16571
16572  path="$CURDIR"
16573  has_colon=`$ECHO $path | $GREP ^.:`
16574  new_path="$path"
16575  if test "x$has_colon" = x; then
16576    # Not in mixed or Windows style, start by that.
16577    new_path=`cmd //c echo $path`
16578  fi
16579
16580
16581  input_path="$new_path"
16582  # Check if we need to convert this using DOS-style short mode. If the path
16583  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16584  # take no chances and rewrite it.
16585  # Note: m4 eats our [], so we need to use [ and ] instead.
16586  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16587  if test "x$has_forbidden_chars" != x; then
16588    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16589    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16590  fi
16591
16592
16593  windows_path="$new_path"
16594  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16595    unix_path=`$CYGPATH -u "$windows_path"`
16596    new_path="$unix_path"
16597  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16598    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16599    new_path="$unix_path"
16600  fi
16601
16602  if test "x$path" != "x$new_path"; then
16603    CURDIR="$new_path"
16604    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16605$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16606  fi
16607
16608  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16609  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16610
16611    else
16612      # We're on a unix platform. Hooray! :)
16613      path="$CURDIR"
16614      has_space=`$ECHO "$path" | $GREP " "`
16615      if test "x$has_space" != x; then
16616        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16617$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16618        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16619      fi
16620
16621      # Use eval to expand a potential ~
16622      eval path="$path"
16623      if test ! -f "$path" && test ! -d "$path"; then
16624        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16625      fi
16626
16627      if test -d "$path"; then
16628        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16629      else
16630        dir="`$DIRNAME "$path"`"
16631        base="`$BASENAME "$path"`"
16632        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16633      fi
16634    fi
16635  fi
16636
16637
16638  # Only process if variable expands to non-empty
16639
16640  if test "x$TOPDIR" != x; then
16641    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16642
16643  # Input might be given as Windows format, start by converting to
16644  # unix format.
16645  path="$TOPDIR"
16646  new_path=`$CYGPATH -u "$path"`
16647
16648  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16649  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16650  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16651  # "foo.exe" is OK but "foo" is an error.
16652  #
16653  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16654  # It is also a way to make sure we got the proper file name for the real test later on.
16655  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16656  if test "x$test_shortpath" = x; then
16657    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16658$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16659    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16660  fi
16661
16662  # Call helper function which possibly converts this using DOS-style short mode.
16663  # If so, the updated path is stored in $new_path.
16664
16665  input_path="$new_path"
16666  # Check if we need to convert this using DOS-style short mode. If the path
16667  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16668  # take no chances and rewrite it.
16669  # Note: m4 eats our [], so we need to use [ and ] instead.
16670  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16671  if test "x$has_forbidden_chars" != x; then
16672    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16673    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16674    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16675    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16676      # Going to short mode and back again did indeed matter. Since short mode is
16677      # case insensitive, let's make it lowercase to improve readability.
16678      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16679      # Now convert it back to Unix-style (cygpath)
16680      input_path=`$CYGPATH -u "$shortmode_path"`
16681      new_path="$input_path"
16682    fi
16683  fi
16684
16685  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16686  if test "x$test_cygdrive_prefix" = x; then
16687    # As a simple fix, exclude /usr/bin since it's not a real path.
16688    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16689      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16690      # a path prefixed by /cygdrive for fixpath to work.
16691      new_path="$CYGWIN_ROOT_PATH$input_path"
16692    fi
16693  fi
16694
16695
16696  if test "x$path" != "x$new_path"; then
16697    TOPDIR="$new_path"
16698    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16699$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16700  fi
16701
16702    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16703
16704  path="$TOPDIR"
16705  has_colon=`$ECHO $path | $GREP ^.:`
16706  new_path="$path"
16707  if test "x$has_colon" = x; then
16708    # Not in mixed or Windows style, start by that.
16709    new_path=`cmd //c echo $path`
16710  fi
16711
16712
16713  input_path="$new_path"
16714  # Check if we need to convert this using DOS-style short mode. If the path
16715  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16716  # take no chances and rewrite it.
16717  # Note: m4 eats our [], so we need to use [ and ] instead.
16718  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16719  if test "x$has_forbidden_chars" != x; then
16720    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16721    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16722  fi
16723
16724
16725  windows_path="$new_path"
16726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16727    unix_path=`$CYGPATH -u "$windows_path"`
16728    new_path="$unix_path"
16729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16730    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16731    new_path="$unix_path"
16732  fi
16733
16734  if test "x$path" != "x$new_path"; then
16735    TOPDIR="$new_path"
16736    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16737$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16738  fi
16739
16740  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16741  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16742
16743    else
16744      # We're on a unix platform. Hooray! :)
16745      path="$TOPDIR"
16746      has_space=`$ECHO "$path" | $GREP " "`
16747      if test "x$has_space" != x; then
16748        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16749$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16750        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16751      fi
16752
16753      # Use eval to expand a potential ~
16754      eval path="$path"
16755      if test ! -f "$path" && test ! -d "$path"; then
16756        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16757      fi
16758
16759      if test -d "$path"; then
16760        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16761      else
16762        dir="`$DIRNAME "$path"`"
16763        base="`$BASENAME "$path"`"
16764        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16765      fi
16766    fi
16767  fi
16768
16769  # SRC_ROOT is a traditional alias for TOPDIR.
16770  SRC_ROOT=$TOPDIR
16771
16772  # Calculate a canonical version of TOPDIR for string comparisons
16773  CANONICAL_TOPDIR=$TOPDIR
16774
16775  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16776    # Follow a chain of symbolic links. Use readlink
16777    # where it exists, else fall back to horribly
16778    # complicated shell code.
16779    if test "x$READLINK_TESTED" != yes; then
16780      # On MacOSX there is a readlink tool with a different
16781      # purpose than the GNU readlink tool. Check the found readlink.
16782      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16783      if test "x$ISGNU" = x; then
16784        # A readlink that we do not know how to use.
16785        # Are there other non-GNU readlinks out there?
16786        READLINK_TESTED=yes
16787        READLINK=
16788      fi
16789    fi
16790
16791    if test "x$READLINK" != x; then
16792      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16793    else
16794      # Save the current directory for restoring afterwards
16795      STARTDIR=$PWD
16796      COUNTER=0
16797      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16798      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16799      cd $sym_link_dir
16800      # Use -P flag to resolve symlinks in directories.
16801      cd `$THEPWDCMD -P`
16802      sym_link_dir=`$THEPWDCMD -P`
16803      # Resolve file symlinks
16804      while test $COUNTER -lt 20; do
16805        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16806        if test "x$ISLINK" == x; then
16807          # This is not a symbolic link! We are done!
16808          break
16809        fi
16810        # Again resolve directory symlinks since the target of the just found
16811        # link could be in a different directory
16812        cd `$DIRNAME $ISLINK`
16813        sym_link_dir=`$THEPWDCMD -P`
16814        sym_link_file=`$BASENAME $ISLINK`
16815        let COUNTER=COUNTER+1
16816      done
16817      cd $STARTDIR
16818      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16819    fi
16820  fi
16821
16822
16823
16824  # Locate the directory of this script.
16825  AUTOCONF_DIR=$TOPDIR/common/autoconf
16826
16827  # Setup username (for use in adhoc version strings etc)
16828  # Outer [ ] to quote m4.
16829   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16830
16831
16832
16833# Check if it's a pure open build or if custom sources are to be used.
16834
16835  # Check whether --enable-openjdk-only was given.
16836if test "${enable_openjdk_only+set}" = set; then :
16837  enableval=$enable_openjdk_only;
16838else
16839  enable_openjdk_only="no"
16840fi
16841
16842
16843  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16844$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16846$as_echo "$enable_openjdk_only" >&6; }
16847  if test "x$enable_openjdk_only" = "xyes"; then
16848    SUPPRESS_CUSTOM_EXTENSIONS="true"
16849  elif test "x$enable_openjdk_only" = "xno"; then
16850    SUPPRESS_CUSTOM_EXTENSIONS="false"
16851  else
16852    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16853  fi
16854
16855  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16856  # the IncludeCustomExtension macro.
16857
16858
16859# Check whether --with-custom-make-dir was given.
16860if test "${with_custom_make_dir+set}" = set; then :
16861  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
16862$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16863fi
16864
16865
16866
16867
16868# These are needed to be able to create a configuration name (and thus the output directory)
16869
16870  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16871$as_echo_n "checking which variant of the JDK to build... " >&6; }
16872
16873# Check whether --with-jdk-variant was given.
16874if test "${with_jdk_variant+set}" = set; then :
16875  withval=$with_jdk_variant;
16876fi
16877
16878
16879  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16880    JDK_VARIANT="normal"
16881  else
16882    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16883  fi
16884
16885
16886
16887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16888$as_echo "$JDK_VARIANT" >&6; }
16889
16890
16891  DEBUG_LEVEL="release"
16892  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16893$as_echo_n "checking which debug level to use... " >&6; }
16894  # Check whether --enable-debug was given.
16895if test "${enable_debug+set}" = set; then :
16896  enableval=$enable_debug;
16897        ENABLE_DEBUG="${enableval}"
16898        DEBUG_LEVEL="fastdebug"
16899
16900else
16901  ENABLE_DEBUG="no"
16902fi
16903
16904
16905
16906# Check whether --with-debug-level was given.
16907if test "${with_debug_level+set}" = set; then :
16908  withval=$with_debug_level;
16909        DEBUG_LEVEL="${withval}"
16910        if test "x$ENABLE_DEBUG" = xyes; then
16911          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16912        fi
16913
16914fi
16915
16916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16917$as_echo "$DEBUG_LEVEL" >&6; }
16918
16919  if test "x$DEBUG_LEVEL" != xrelease && \
16920      test "x$DEBUG_LEVEL" != xoptimized && \
16921      test "x$DEBUG_LEVEL" != xfastdebug && \
16922      test "x$DEBUG_LEVEL" != xslowdebug; then
16923    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16924  fi
16925
16926  # Translate DEBUG_LEVEL to debug level used by Hotspot
16927  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16928  if test "x$DEBUG_LEVEL" = xrelease; then
16929    HOTSPOT_DEBUG_LEVEL="product"
16930  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16931    HOTSPOT_DEBUG_LEVEL="debug"
16932  fi
16933
16934  if test "x$DEBUG_LEVEL" = xoptimized; then
16935    # The debug level 'optimized' is a little special because it is currently only
16936    # applicable to the HotSpot build where it means to build a completely
16937    # optimized version of the VM without any debugging code (like for the
16938    # 'release' debug level which is called 'product' in the HotSpot build) but
16939    # with the exception that it can contain additional code which is otherwise
16940    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16941    # test new and/or experimental features which are not intended for customer
16942    # shipment. Because these new features need to be tested and benchmarked in
16943    # real world scenarios, we want to build the containing JDK at the 'release'
16944    # debug level.
16945    DEBUG_LEVEL="release"
16946  fi
16947
16948
16949
16950
16951
16952
16953# Check whether --with-jvm-variants was given.
16954if test "${with_jvm_variants+set}" = set; then :
16955  withval=$with_jvm_variants;
16956fi
16957
16958
16959
16960
16961# Check whether --with-cpu-port was given.
16962if test "${with_cpu_port+set}" = set; then :
16963  withval=$with_cpu_port;
16964fi
16965
16966
16967  if test "x$with_cpu_port" != x; then
16968    if test "x$OPENJDK_TARGET_CPU" != xaarch64; then
16969      as_fn_error $? "--with-cpu-port only available on aarch64" "$LINENO" 5
16970    fi
16971    if test "x$with_cpu_port" != xarm64 && \
16972        test "x$with_cpu_port" != xaarch64; then
16973      as_fn_error $? "--with-cpu-port must specify arm64 or aarch64" "$LINENO" 5
16974    fi
16975    HOTSPOT_TARGET_CPU_PORT="$with_cpu_port"
16976  fi
16977
16978
16979  if test "x$with_jvm_variants" = x; then
16980    with_jvm_variants="server"
16981  fi
16982  JVM_VARIANTS_OPT="$with_jvm_variants"
16983
16984  # Has the user listed more than one variant?
16985  # Additional [] needed to keep m4 from mangling shell constructs.
16986  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16987    BUILDING_MULTIPLE_JVM_VARIANTS=true
16988  else
16989    BUILDING_MULTIPLE_JVM_VARIANTS=false
16990  fi
16991  # Replace the commas with AND for use in the build directory name.
16992  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16993
16994  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16995$as_echo_n "checking which variants of the JVM to build... " >&6; }
16996  # JVM_VARIANTS is a space-separated list.
16997  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16998  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
17000$as_echo "$JVM_VARIANTS" >&6; }
17001
17002  # Check that the selected variants are valid
17003
17004  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
17005  # Notice that the original variant failes on SLES 10 and 11
17006  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
17007  STACK=${JVM_VARIANTS// /$'\n'}
17008  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
17009  if test "x$INVALID_VARIANTS" != x; then
17010    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
17011$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
17012    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
17013  fi
17014
17015  # All "special" variants share the same output directory ("server")
17016  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
17017  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
17018  STACK=${JVM_VARIANTS// /$'\n'}
17019  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
17020  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
17021    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
17022  fi
17023
17024  # The "main" variant is the one used by other libs to link against during the
17025  # build.
17026  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
17027    MAIN_VARIANT_PRIO_ORDER="server client minimal"
17028    for variant in $MAIN_VARIANT_PRIO_ORDER; do
17029      if   [[ " $JVM_VARIANTS " =~ " $variant " ]]  ; then
17030        JVM_VARIANT_MAIN="$variant"
17031        break
17032      fi
17033    done
17034  else
17035    JVM_VARIANT_MAIN="$JVM_VARIANTS"
17036  fi
17037
17038
17039
17040
17041
17042  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
17043    # zero behaves as a platform and rewrites these values. This is really weird. :(
17044    # We are guaranteed that we do not build any other variants when building zero.
17045    HOTSPOT_TARGET_CPU=zero
17046    HOTSPOT_TARGET_CPU_ARCH=zero
17047  fi
17048
17049
17050# With basic setup done, call the custom early hook.
17051
17052
17053# Check if we have devkits, extra paths or sysroot set.
17054
17055
17056# Check whether --with-devkit was given.
17057if test "${with_devkit+set}" = set; then :
17058  withval=$with_devkit;
17059
17060  # Only process if variable expands to non-empty
17061
17062  if test "x$with_devkit" != x; then
17063    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17064
17065  # Input might be given as Windows format, start by converting to
17066  # unix format.
17067  path="$with_devkit"
17068  new_path=`$CYGPATH -u "$path"`
17069
17070  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17071  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17072  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17073  # "foo.exe" is OK but "foo" is an error.
17074  #
17075  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17076  # It is also a way to make sure we got the proper file name for the real test later on.
17077  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17078  if test "x$test_shortpath" = x; then
17079    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17080$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17081    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
17082  fi
17083
17084  # Call helper function which possibly converts this using DOS-style short mode.
17085  # If so, the updated path is stored in $new_path.
17086
17087  input_path="$new_path"
17088  # Check if we need to convert this using DOS-style short mode. If the path
17089  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17090  # take no chances and rewrite it.
17091  # Note: m4 eats our [], so we need to use [ and ] instead.
17092  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17093  if test "x$has_forbidden_chars" != x; then
17094    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17095    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17096    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17097    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17098      # Going to short mode and back again did indeed matter. Since short mode is
17099      # case insensitive, let's make it lowercase to improve readability.
17100      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17101      # Now convert it back to Unix-style (cygpath)
17102      input_path=`$CYGPATH -u "$shortmode_path"`
17103      new_path="$input_path"
17104    fi
17105  fi
17106
17107  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17108  if test "x$test_cygdrive_prefix" = x; then
17109    # As a simple fix, exclude /usr/bin since it's not a real path.
17110    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17111      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17112      # a path prefixed by /cygdrive for fixpath to work.
17113      new_path="$CYGWIN_ROOT_PATH$input_path"
17114    fi
17115  fi
17116
17117
17118  if test "x$path" != "x$new_path"; then
17119    with_devkit="$new_path"
17120    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17121$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17122  fi
17123
17124    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17125
17126  path="$with_devkit"
17127  has_colon=`$ECHO $path | $GREP ^.:`
17128  new_path="$path"
17129  if test "x$has_colon" = x; then
17130    # Not in mixed or Windows style, start by that.
17131    new_path=`cmd //c echo $path`
17132  fi
17133
17134
17135  input_path="$new_path"
17136  # Check if we need to convert this using DOS-style short mode. If the path
17137  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17138  # take no chances and rewrite it.
17139  # Note: m4 eats our [], so we need to use [ and ] instead.
17140  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17141  if test "x$has_forbidden_chars" != x; then
17142    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17143    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17144  fi
17145
17146
17147  windows_path="$new_path"
17148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17149    unix_path=`$CYGPATH -u "$windows_path"`
17150    new_path="$unix_path"
17151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17152    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17153    new_path="$unix_path"
17154  fi
17155
17156  if test "x$path" != "x$new_path"; then
17157    with_devkit="$new_path"
17158    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17159$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17160  fi
17161
17162  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17163  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17164
17165    else
17166      # We're on a unix platform. Hooray! :)
17167      path="$with_devkit"
17168      has_space=`$ECHO "$path" | $GREP " "`
17169      if test "x$has_space" != x; then
17170        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17171$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17172        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17173      fi
17174
17175      # Use eval to expand a potential ~
17176      eval path="$path"
17177      if test ! -f "$path" && test ! -d "$path"; then
17178        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
17179      fi
17180
17181      if test -d "$path"; then
17182        with_devkit="`cd "$path"; $THEPWDCMD -L`"
17183      else
17184        dir="`$DIRNAME "$path"`"
17185        base="`$BASENAME "$path"`"
17186        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
17187      fi
17188    fi
17189  fi
17190
17191        DEVKIT_ROOT="$with_devkit"
17192        # Check for a meta data info file in the root of the devkit
17193        if test -f "$DEVKIT_ROOT/devkit.info"; then
17194          . $DEVKIT_ROOT/devkit.info
17195          # This potentially sets the following:
17196          # A descriptive name of the devkit
17197
17198  if test "x$DEVKIT_NAME" = x; then
17199    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
17200  fi
17201
17202          # Corresponds to --with-extra-path
17203
17204  if test "x$DEVKIT_EXTRA_PATH" = x; then
17205    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
17206  fi
17207
17208          # Corresponds to --with-toolchain-path
17209
17210  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17211    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
17212  fi
17213
17214          # Corresponds to --with-sysroot
17215
17216  if test "x$DEVKIT_SYSROOT" = x; then
17217    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
17218  fi
17219
17220
17221          # Identifies the Visual Studio version in the devkit
17222
17223  if test "x$DEVKIT_VS_VERSION" = x; then
17224    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
17225  fi
17226
17227          # The Visual Studio include environment variable
17228
17229  if test "x$DEVKIT_VS_INCLUDE" = x; then
17230    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
17231  fi
17232
17233          # The Visual Studio lib environment variable
17234
17235  if test "x$DEVKIT_VS_LIB" = x; then
17236    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
17237  fi
17238
17239          # Corresponds to --with-msvcr-dll
17240
17241  if test "x$DEVKIT_MSVCR_DLL" = x; then
17242    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
17243  fi
17244
17245          # Corresponds to --with-msvcp-dll
17246
17247  if test "x$DEVKIT_MSVCP_DLL" = x; then
17248    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
17249  fi
17250
17251        fi
17252
17253        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
17254$as_echo_n "checking for devkit... " >&6; }
17255        if test "x$DEVKIT_NAME" != x; then
17256          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
17257$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
17258        else
17259          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
17260$as_echo "$DEVKIT_ROOT" >&6; }
17261        fi
17262
17263
17264  if test "x$DEVKIT_EXTRA_PATH" != x; then
17265    if test "x$EXTRA_PATH" = x; then
17266      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
17267    else
17268      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
17269    fi
17270  fi
17271
17272
17273        # Fallback default of just /bin if DEVKIT_PATH is not defined
17274        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17275          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
17276        fi
17277
17278  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17279    if test "x$TOOLCHAIN_PATH" = x; then
17280      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17281    else
17282      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17283    fi
17284  fi
17285
17286
17287        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17288        # places for backwards compatiblity.
17289        if test "x$DEVKIT_SYSROOT" != x; then
17290          SYSROOT="$DEVKIT_SYSROOT"
17291        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17292          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17293        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17294          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17295        fi
17296
17297
17298fi
17299
17300
17301  # You can force the sysroot if the sysroot encoded into the compiler tools
17302  # is not correct.
17303
17304# Check whether --with-sys-root was given.
17305if test "${with_sys_root+set}" = set; then :
17306  withval=$with_sys_root; SYSROOT=$with_sys_root
17307
17308fi
17309
17310
17311
17312# Check whether --with-sysroot was given.
17313if test "${with_sysroot+set}" = set; then :
17314  withval=$with_sysroot; SYSROOT=$with_sysroot
17315
17316fi
17317
17318
17319
17320# Check whether --with-tools-dir was given.
17321if test "${with_tools_dir+set}" = set; then :
17322  withval=$with_tools_dir;
17323  if test "x$with_tools_dir" != x; then
17324    if test "x$TOOLCHAIN_PATH" = x; then
17325      TOOLCHAIN_PATH="$with_tools_dir"
17326    else
17327      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17328    fi
17329  fi
17330
17331
17332fi
17333
17334
17335
17336# Check whether --with-toolchain-path was given.
17337if test "${with_toolchain_path+set}" = set; then :
17338  withval=$with_toolchain_path;
17339  if test "x$with_toolchain_path" != x; then
17340    if test "x$TOOLCHAIN_PATH" = x; then
17341      TOOLCHAIN_PATH="$with_toolchain_path"
17342    else
17343      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17344    fi
17345  fi
17346
17347
17348fi
17349
17350
17351
17352# Check whether --with-extra-path was given.
17353if test "${with_extra_path+set}" = set; then :
17354  withval=$with_extra_path;
17355  if test "x$with_extra_path" != x; then
17356    if test "x$EXTRA_PATH" = x; then
17357      EXTRA_PATH="$with_extra_path"
17358    else
17359      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17360    fi
17361  fi
17362
17363
17364fi
17365
17366
17367  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17368    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17369    # If not, detect if Xcode is installed by running xcodebuild -version
17370    # if no Xcode installed, xcodebuild exits with 1
17371    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17372    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17373      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17374      # fall back on the stub binary in /usr/bin/xcodebuild
17375      # Extract the first word of "xcodebuild", so it can be a program name with args.
17376set dummy xcodebuild; ac_word=$2
17377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17378$as_echo_n "checking for $ac_word... " >&6; }
17379if ${ac_cv_path_XCODEBUILD+:} false; then :
17380  $as_echo_n "(cached) " >&6
17381else
17382  case $XCODEBUILD in
17383  [\\/]* | ?:[\\/]*)
17384  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17385  ;;
17386  *)
17387  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17388for as_dir in $TOOLCHAIN_PATH
17389do
17390  IFS=$as_save_IFS
17391  test -z "$as_dir" && as_dir=.
17392    for ac_exec_ext in '' $ac_executable_extensions; do
17393  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17394    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17396    break 2
17397  fi
17398done
17399  done
17400IFS=$as_save_IFS
17401
17402  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17403  ;;
17404esac
17405fi
17406XCODEBUILD=$ac_cv_path_XCODEBUILD
17407if test -n "$XCODEBUILD"; then
17408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17409$as_echo "$XCODEBUILD" >&6; }
17410else
17411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17412$as_echo "no" >&6; }
17413fi
17414
17415
17416    else
17417      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17418      # when only the command line tools are installed there are no SDKs, so headers
17419      # are copied into the system frameworks
17420      XCODEBUILD=
17421
17422    fi
17423
17424    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17425$as_echo_n "checking for sdk name... " >&6; }
17426
17427# Check whether --with-sdk-name was given.
17428if test "${with_sdk_name+set}" = set; then :
17429  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17430
17431fi
17432
17433    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17434$as_echo "$SDKNAME" >&6; }
17435
17436    # if toolchain path is specified then don't rely on system headers, they may not compile
17437    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17438    test -z "$TOOLCHAIN_PATH" && \
17439      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17440
17441    if test -z "$SYSROOT"; then
17442      if test -n "$XCODEBUILD"; then
17443        # if we don't have system headers, use default SDK name (last resort)
17444        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17445          SDKNAME=${SDKNAME:-macosx}
17446        fi
17447
17448        if test -n "$SDKNAME"; then
17449          # Call xcodebuild to determine SYSROOT
17450          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17451        fi
17452      else
17453        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17454          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
17455        fi
17456      fi
17457    else
17458      # warn user if --with-sdk-name was also set
17459      if test -n "$with_sdk_name"; then
17460        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17461$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17462      fi
17463    fi
17464
17465    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17466      # If no system framework headers, then SYSROOT must be set, or we won't build
17467      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
17468    fi
17469
17470    # Perform a basic sanity test
17471    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17472      if test -z "$SYSROOT"; then
17473        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
17474      else
17475        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17476      fi
17477    fi
17478
17479    # set SDKROOT too, Xcode tools will pick it up
17480    SDKROOT="$SYSROOT"
17481
17482  fi
17483
17484  # Prepend the extra path to the global path
17485
17486  if test "x$EXTRA_PATH" != x; then
17487    if test "x$PATH" = x; then
17488      PATH="$EXTRA_PATH"
17489    else
17490      PATH="$EXTRA_PATH:$PATH"
17491    fi
17492  fi
17493
17494
17495  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17496$as_echo_n "checking for sysroot... " >&6; }
17497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17498$as_echo "$SYSROOT" >&6; }
17499  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17500$as_echo_n "checking for toolchain path... " >&6; }
17501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17502$as_echo "$TOOLCHAIN_PATH" >&6; }
17503  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17504$as_echo_n "checking for extra path... " >&6; }
17505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17506$as_echo "$EXTRA_PATH" >&6; }
17507
17508
17509# To properly create a configuration name, we need to have the OpenJDK target
17510# and options (variants and debug level) parsed.
17511
17512
17513
17514# Check whether --with-conf-name was given.
17515if test "${with_conf_name+set}" = set; then :
17516  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17517fi
17518
17519
17520  # Test from where we are running configure, in or outside of src root.
17521  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17522$as_echo_n "checking where to store configuration... " >&6; }
17523  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17524      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17525      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17526    # We are running configure from the src root.
17527    # Create a default ./build/target-variant-debuglevel output root.
17528    if test "x${CONF_NAME}" = x; then
17529      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17530$as_echo "in default location" >&6; }
17531      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17532    else
17533      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17534$as_echo "in build directory with custom name" >&6; }
17535    fi
17536    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17537    $MKDIR -p "$OUTPUT_ROOT"
17538    if test ! -d "$OUTPUT_ROOT"; then
17539      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17540    fi
17541  else
17542    # We are running configure from outside of the src dir.
17543    # Then use the current directory as output dir!
17544    # If configuration is situated in normal build directory, just use the build
17545    # directory name as configuration name, otherwise use the complete path.
17546    if test "x${CONF_NAME}" = x; then
17547      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17548    fi
17549    OUTPUT_ROOT="$CURDIR"
17550    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17551$as_echo "in current directory" >&6; }
17552
17553    # WARNING: This might be a bad thing to do. You need to be sure you want to
17554    # have a configuration in this directory. Do some sanity checks!
17555
17556    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17557      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17558      # other files
17559      files_present=`$LS $OUTPUT_ROOT`
17560      # Configure has already touched config.log and confdefs.h in the current dir when this check
17561      # is performed.
17562      filtered_files=`$ECHO "$files_present" \
17563          | $SED -e 's/config.log//g' \
17564              -e 's/configure.log//g' \
17565              -e 's/confdefs.h//g' \
17566              -e 's/ //g' \
17567          | $TR -d '\n'`
17568      if test "x$filtered_files" != x; then
17569        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17570$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17571        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17572$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17573        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17574$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17575        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17576$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17577        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17578$as_echo "$as_me: seriously mess up just about everything." >&6;}
17579        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17580$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17581        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17582$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17583        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17584      fi
17585    fi
17586  fi
17587  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17588$as_echo_n "checking what configuration name to use... " >&6; }
17589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17590$as_echo "$CONF_NAME" >&6; }
17591
17592
17593  # Only process if variable expands to non-empty
17594
17595  if test "x$OUTPUT_ROOT" != x; then
17596    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17597
17598  # Input might be given as Windows format, start by converting to
17599  # unix format.
17600  path="$OUTPUT_ROOT"
17601  new_path=`$CYGPATH -u "$path"`
17602
17603  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17604  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17605  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17606  # "foo.exe" is OK but "foo" is an error.
17607  #
17608  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17609  # It is also a way to make sure we got the proper file name for the real test later on.
17610  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17611  if test "x$test_shortpath" = x; then
17612    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17613$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17614    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17615  fi
17616
17617  # Call helper function which possibly converts this using DOS-style short mode.
17618  # If so, the updated path is stored in $new_path.
17619
17620  input_path="$new_path"
17621  # Check if we need to convert this using DOS-style short mode. If the path
17622  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17623  # take no chances and rewrite it.
17624  # Note: m4 eats our [], so we need to use [ and ] instead.
17625  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17626  if test "x$has_forbidden_chars" != x; then
17627    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17628    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17629    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17630    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17631      # Going to short mode and back again did indeed matter. Since short mode is
17632      # case insensitive, let's make it lowercase to improve readability.
17633      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17634      # Now convert it back to Unix-style (cygpath)
17635      input_path=`$CYGPATH -u "$shortmode_path"`
17636      new_path="$input_path"
17637    fi
17638  fi
17639
17640  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17641  if test "x$test_cygdrive_prefix" = x; then
17642    # As a simple fix, exclude /usr/bin since it's not a real path.
17643    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17644      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17645      # a path prefixed by /cygdrive for fixpath to work.
17646      new_path="$CYGWIN_ROOT_PATH$input_path"
17647    fi
17648  fi
17649
17650
17651  if test "x$path" != "x$new_path"; then
17652    OUTPUT_ROOT="$new_path"
17653    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17654$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17655  fi
17656
17657    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17658
17659  path="$OUTPUT_ROOT"
17660  has_colon=`$ECHO $path | $GREP ^.:`
17661  new_path="$path"
17662  if test "x$has_colon" = x; then
17663    # Not in mixed or Windows style, start by that.
17664    new_path=`cmd //c echo $path`
17665  fi
17666
17667
17668  input_path="$new_path"
17669  # Check if we need to convert this using DOS-style short mode. If the path
17670  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17671  # take no chances and rewrite it.
17672  # Note: m4 eats our [], so we need to use [ and ] instead.
17673  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17674  if test "x$has_forbidden_chars" != x; then
17675    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17676    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17677  fi
17678
17679
17680  windows_path="$new_path"
17681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17682    unix_path=`$CYGPATH -u "$windows_path"`
17683    new_path="$unix_path"
17684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17686    new_path="$unix_path"
17687  fi
17688
17689  if test "x$path" != "x$new_path"; then
17690    OUTPUT_ROOT="$new_path"
17691    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17692$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17693  fi
17694
17695  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17696  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17697
17698    else
17699      # We're on a unix platform. Hooray! :)
17700      path="$OUTPUT_ROOT"
17701      has_space=`$ECHO "$path" | $GREP " "`
17702      if test "x$has_space" != x; then
17703        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17704$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17705        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17706      fi
17707
17708      # Use eval to expand a potential ~
17709      eval path="$path"
17710      if test ! -f "$path" && test ! -d "$path"; then
17711        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17712      fi
17713
17714      if test -d "$path"; then
17715        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17716      else
17717        dir="`$DIRNAME "$path"`"
17718        base="`$BASENAME "$path"`"
17719        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17720      fi
17721    fi
17722  fi
17723
17724
17725  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17726  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17727
17728  SPEC="$OUTPUT_ROOT/spec.gmk"
17729
17730
17731
17732
17733
17734  # The spec.gmk file contains all variables for the make system.
17735  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17736
17737  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17738  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17739
17740  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17741  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17742
17743  # The compare.sh is used to compare the build output to other builds.
17744  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17745
17746  # The generated Makefile knows where the spec.gmk is and where the source is.
17747  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17748  # which will look for generated configurations
17749  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17750
17751
17752
17753# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17754
17755  for ac_prog in apt-get yum brew port pkgutil pkgadd
17756do
17757  # Extract the first word of "$ac_prog", so it can be a program name with args.
17758set dummy $ac_prog; ac_word=$2
17759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17760$as_echo_n "checking for $ac_word... " >&6; }
17761if ${ac_cv_prog_PKGHANDLER+:} false; then :
17762  $as_echo_n "(cached) " >&6
17763else
17764  if test -n "$PKGHANDLER"; then
17765  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17766else
17767as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17768for as_dir in $PATH
17769do
17770  IFS=$as_save_IFS
17771  test -z "$as_dir" && as_dir=.
17772    for ac_exec_ext in '' $ac_executable_extensions; do
17773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17774    ac_cv_prog_PKGHANDLER="$ac_prog"
17775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17776    break 2
17777  fi
17778done
17779  done
17780IFS=$as_save_IFS
17781
17782fi
17783fi
17784PKGHANDLER=$ac_cv_prog_PKGHANDLER
17785if test -n "$PKGHANDLER"; then
17786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17787$as_echo "$PKGHANDLER" >&6; }
17788else
17789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17790$as_echo "no" >&6; }
17791fi
17792
17793
17794  test -n "$PKGHANDLER" && break
17795done
17796
17797
17798
17799# Setup tools that requires more complex handling, or that is not needed by the configure script.
17800
17801
17802
17803  # Publish this variable in the help.
17804
17805
17806  if [ -z "${MAKE+x}" ]; then
17807    # The variable is not set by user, try to locate tool using the code snippet
17808
17809    # Try our hardest to locate a correct version of GNU make
17810    for ac_prog in gmake
17811do
17812  # Extract the first word of "$ac_prog", so it can be a program name with args.
17813set dummy $ac_prog; ac_word=$2
17814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17815$as_echo_n "checking for $ac_word... " >&6; }
17816if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17817  $as_echo_n "(cached) " >&6
17818else
17819  case $CHECK_GMAKE in
17820  [\\/]* | ?:[\\/]*)
17821  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17822  ;;
17823  *)
17824  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17825for as_dir in $PATH
17826do
17827  IFS=$as_save_IFS
17828  test -z "$as_dir" && as_dir=.
17829    for ac_exec_ext in '' $ac_executable_extensions; do
17830  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17831    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17832    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17833    break 2
17834  fi
17835done
17836  done
17837IFS=$as_save_IFS
17838
17839  ;;
17840esac
17841fi
17842CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17843if test -n "$CHECK_GMAKE"; then
17844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17845$as_echo "$CHECK_GMAKE" >&6; }
17846else
17847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17848$as_echo "no" >&6; }
17849fi
17850
17851
17852  test -n "$CHECK_GMAKE" && break
17853done
17854
17855
17856  MAKE_CANDIDATE=""$CHECK_GMAKE""
17857  DESCRIPTION="gmake in PATH"
17858
17859  # On Cygwin, we require a newer version of make than on other platforms
17860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17861    MAKE_VERSION_EXPR="-e 4\."
17862    MAKE_REQUIRED_VERSION="4.0"
17863   else
17864    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17865    MAKE_REQUIRED_VERSION="3.81"
17866  fi
17867
17868  if test "x$MAKE_CANDIDATE" != x; then
17869    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17870$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17871    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17872    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17873    if test "x$IS_GNU_MAKE" = x; then
17874      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17875$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17876    else
17877      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17878      if test "x$IS_MODERN_MAKE" = x; then
17879        { $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
17880$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;}
17881      else
17882        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17883          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17884            MAKE_EXPECTED_ENV='cygwin'
17885          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17886            MAKE_EXPECTED_ENV='msys'
17887          else
17888            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17889          fi
17890          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17891          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17892        else
17893          # Not relevant for non-Windows
17894          IS_MAKE_CORRECT_ENV=true
17895        fi
17896        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17897          { $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
17898$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;}
17899        else
17900          FOUND_MAKE=$MAKE_CANDIDATE
17901
17902  # Only process if variable expands to non-empty
17903
17904  if test "x$FOUND_MAKE" != x; then
17905    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17906
17907  # First separate the path from the arguments. This will split at the first
17908  # space.
17909  complete="$FOUND_MAKE"
17910  path="${complete%% *}"
17911  tmp="$complete EOL"
17912  arguments="${tmp#* }"
17913
17914  # Input might be given as Windows format, start by converting to
17915  # unix format.
17916  new_path=`$CYGPATH -u "$path"`
17917
17918  # Now try to locate executable using which
17919  new_path=`$WHICH "$new_path" 2> /dev/null`
17920  # bat and cmd files are not always considered executable in cygwin causing which
17921  # to not find them
17922  if test "x$new_path" = x \
17923      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17924      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17925    new_path=`$CYGPATH -u "$path"`
17926  fi
17927  if test "x$new_path" = x; then
17928    # Oops. Which didn't find the executable.
17929    # The splitting of arguments from the executable at a space might have been incorrect,
17930    # since paths with space are more likely in Windows. Give it another try with the whole
17931    # argument.
17932    path="$complete"
17933    arguments="EOL"
17934    new_path=`$CYGPATH -u "$path"`
17935    new_path=`$WHICH "$new_path" 2> /dev/null`
17936    # bat and cmd files are not always considered executable in cygwin causing which
17937    # to not find them
17938    if test "x$new_path" = x \
17939        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17940        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17941      new_path=`$CYGPATH -u "$path"`
17942    fi
17943    if test "x$new_path" = x; then
17944      # It's still not found. Now this is an unrecoverable error.
17945      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17946$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17947      has_space=`$ECHO "$complete" | $GREP " "`
17948      if test "x$has_space" != x; then
17949        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17950$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17951      fi
17952      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17953    fi
17954  fi
17955
17956  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17957  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17958  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17959  # "foo.exe" is OK but "foo" is an error.
17960  #
17961  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17962  # It is also a way to make sure we got the proper file name for the real test later on.
17963  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17964  if test "x$test_shortpath" = x; then
17965    # Short path failed, file does not exist as specified.
17966    # Try adding .exe or .cmd
17967    if test -f "${new_path}.exe"; then
17968      input_to_shortpath="${new_path}.exe"
17969    elif test -f "${new_path}.cmd"; then
17970      input_to_shortpath="${new_path}.cmd"
17971    else
17972      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17973$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17974      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17975$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17976      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17977    fi
17978  else
17979    input_to_shortpath="$new_path"
17980  fi
17981
17982  # Call helper function which possibly converts this using DOS-style short mode.
17983  # If so, the updated path is stored in $new_path.
17984  new_path="$input_to_shortpath"
17985
17986  input_path="$input_to_shortpath"
17987  # Check if we need to convert this using DOS-style short mode. If the path
17988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17989  # take no chances and rewrite it.
17990  # Note: m4 eats our [], so we need to use [ and ] instead.
17991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17992  if test "x$has_forbidden_chars" != x; then
17993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17994    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17995    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17996    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17997      # Going to short mode and back again did indeed matter. Since short mode is
17998      # case insensitive, let's make it lowercase to improve readability.
17999      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18000      # Now convert it back to Unix-style (cygpath)
18001      input_path=`$CYGPATH -u "$shortmode_path"`
18002      new_path="$input_path"
18003    fi
18004  fi
18005
18006  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18007  if test "x$test_cygdrive_prefix" = x; then
18008    # As a simple fix, exclude /usr/bin since it's not a real path.
18009    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18010      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18011      # a path prefixed by /cygdrive for fixpath to work.
18012      new_path="$CYGWIN_ROOT_PATH$input_path"
18013    fi
18014  fi
18015
18016  # remove trailing .exe if any
18017  new_path="${new_path/%.exe/}"
18018
18019    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18020
18021  # First separate the path from the arguments. This will split at the first
18022  # space.
18023  complete="$FOUND_MAKE"
18024  path="${complete%% *}"
18025  tmp="$complete EOL"
18026  arguments="${tmp#* }"
18027
18028  # Input might be given as Windows format, start by converting to
18029  # unix format.
18030  new_path="$path"
18031
18032  windows_path="$new_path"
18033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18034    unix_path=`$CYGPATH -u "$windows_path"`
18035    new_path="$unix_path"
18036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18037    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18038    new_path="$unix_path"
18039  fi
18040
18041
18042  # Now try to locate executable using which
18043  new_path=`$WHICH "$new_path" 2> /dev/null`
18044
18045  if test "x$new_path" = x; then
18046    # Oops. Which didn't find the executable.
18047    # The splitting of arguments from the executable at a space might have been incorrect,
18048    # since paths with space are more likely in Windows. Give it another try with the whole
18049    # argument.
18050    path="$complete"
18051    arguments="EOL"
18052    new_path="$path"
18053
18054  windows_path="$new_path"
18055  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18056    unix_path=`$CYGPATH -u "$windows_path"`
18057    new_path="$unix_path"
18058  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18059    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18060    new_path="$unix_path"
18061  fi
18062
18063
18064    new_path=`$WHICH "$new_path" 2> /dev/null`
18065    # bat and cmd files are not always considered executable in MSYS causing which
18066    # to not find them
18067    if test "x$new_path" = x \
18068        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18069        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18070      new_path="$path"
18071
18072  windows_path="$new_path"
18073  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18074    unix_path=`$CYGPATH -u "$windows_path"`
18075    new_path="$unix_path"
18076  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18077    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18078    new_path="$unix_path"
18079  fi
18080
18081    fi
18082
18083    if test "x$new_path" = x; then
18084      # It's still not found. Now this is an unrecoverable error.
18085      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18086$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18087      has_space=`$ECHO "$complete" | $GREP " "`
18088      if test "x$has_space" != x; then
18089        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18090$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18091      fi
18092      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18093    fi
18094  fi
18095
18096  # Now new_path has a complete unix path to the binary
18097  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18098    # Keep paths in /bin as-is, but remove trailing .exe if any
18099    new_path="${new_path/%.exe/}"
18100    # Do not save /bin paths to all_fixpath_prefixes!
18101  else
18102    # Not in mixed or Windows style, start by that.
18103    new_path=`cmd //c echo $new_path`
18104
18105  input_path="$new_path"
18106  # Check if we need to convert this using DOS-style short mode. If the path
18107  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18108  # take no chances and rewrite it.
18109  # Note: m4 eats our [], so we need to use [ and ] instead.
18110  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18111  if test "x$has_forbidden_chars" != x; then
18112    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18113    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18114  fi
18115
18116    # Output is in $new_path
18117
18118  windows_path="$new_path"
18119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18120    unix_path=`$CYGPATH -u "$windows_path"`
18121    new_path="$unix_path"
18122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18123    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18124    new_path="$unix_path"
18125  fi
18126
18127    # remove trailing .exe if any
18128    new_path="${new_path/%.exe/}"
18129
18130    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18131    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18132  fi
18133
18134    else
18135      # We're on a unix platform. Hooray! :)
18136      # First separate the path from the arguments. This will split at the first
18137      # space.
18138      complete="$FOUND_MAKE"
18139      path="${complete%% *}"
18140      tmp="$complete EOL"
18141      arguments="${tmp#* }"
18142
18143      # Cannot rely on the command "which" here since it doesn't always work.
18144      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18145      if test -z "$is_absolute_path"; then
18146        # Path to executable is not absolute. Find it.
18147        IFS_save="$IFS"
18148        IFS=:
18149        for p in $PATH; do
18150          if test -f "$p/$path" && test -x "$p/$path"; then
18151            new_path="$p/$path"
18152            break
18153          fi
18154        done
18155        IFS="$IFS_save"
18156      else
18157        # This is an absolute path, we can use it without further modifications.
18158        new_path="$path"
18159      fi
18160
18161      if test "x$new_path" = x; then
18162        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18163$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18164        has_space=`$ECHO "$complete" | $GREP " "`
18165        if test "x$has_space" != x; then
18166          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18167$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18168        fi
18169        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18170      fi
18171    fi
18172
18173    # Now join together the path and the arguments once again
18174    if test "x$arguments" != xEOL; then
18175      new_complete="$new_path ${arguments% *}"
18176    else
18177      new_complete="$new_path"
18178    fi
18179
18180    if test "x$complete" != "x$new_complete"; then
18181      FOUND_MAKE="$new_complete"
18182      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18183$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18184    fi
18185  fi
18186
18187        fi
18188      fi
18189    fi
18190  fi
18191
18192
18193    if test "x$FOUND_MAKE" = x; then
18194      for ac_prog in make
18195do
18196  # Extract the first word of "$ac_prog", so it can be a program name with args.
18197set dummy $ac_prog; ac_word=$2
18198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18199$as_echo_n "checking for $ac_word... " >&6; }
18200if ${ac_cv_path_CHECK_MAKE+:} false; then :
18201  $as_echo_n "(cached) " >&6
18202else
18203  case $CHECK_MAKE in
18204  [\\/]* | ?:[\\/]*)
18205  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18206  ;;
18207  *)
18208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18209for as_dir in $PATH
18210do
18211  IFS=$as_save_IFS
18212  test -z "$as_dir" && as_dir=.
18213    for ac_exec_ext in '' $ac_executable_extensions; do
18214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18215    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18217    break 2
18218  fi
18219done
18220  done
18221IFS=$as_save_IFS
18222
18223  ;;
18224esac
18225fi
18226CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18227if test -n "$CHECK_MAKE"; then
18228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18229$as_echo "$CHECK_MAKE" >&6; }
18230else
18231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18232$as_echo "no" >&6; }
18233fi
18234
18235
18236  test -n "$CHECK_MAKE" && break
18237done
18238
18239
18240  MAKE_CANDIDATE=""$CHECK_MAKE""
18241  DESCRIPTION="make in PATH"
18242
18243  # On Cygwin, we require a newer version of make than on other platforms
18244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18245    MAKE_VERSION_EXPR="-e 4\."
18246    MAKE_REQUIRED_VERSION="4.0"
18247   else
18248    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18249    MAKE_REQUIRED_VERSION="3.81"
18250  fi
18251
18252  if test "x$MAKE_CANDIDATE" != x; then
18253    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18254$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18255    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18256    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18257    if test "x$IS_GNU_MAKE" = x; then
18258      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18259$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18260    else
18261      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18262      if test "x$IS_MODERN_MAKE" = x; then
18263        { $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
18264$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;}
18265      else
18266        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18267          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18268            MAKE_EXPECTED_ENV='cygwin'
18269          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18270            MAKE_EXPECTED_ENV='msys'
18271          else
18272            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18273          fi
18274          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18275          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18276        else
18277          # Not relevant for non-Windows
18278          IS_MAKE_CORRECT_ENV=true
18279        fi
18280        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18281          { $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
18282$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;}
18283        else
18284          FOUND_MAKE=$MAKE_CANDIDATE
18285
18286  # Only process if variable expands to non-empty
18287
18288  if test "x$FOUND_MAKE" != x; then
18289    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18290
18291  # First separate the path from the arguments. This will split at the first
18292  # space.
18293  complete="$FOUND_MAKE"
18294  path="${complete%% *}"
18295  tmp="$complete EOL"
18296  arguments="${tmp#* }"
18297
18298  # Input might be given as Windows format, start by converting to
18299  # unix format.
18300  new_path=`$CYGPATH -u "$path"`
18301
18302  # Now try to locate executable using which
18303  new_path=`$WHICH "$new_path" 2> /dev/null`
18304  # bat and cmd files are not always considered executable in cygwin causing which
18305  # to not find them
18306  if test "x$new_path" = x \
18307      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18308      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18309    new_path=`$CYGPATH -u "$path"`
18310  fi
18311  if test "x$new_path" = x; then
18312    # Oops. Which didn't find the executable.
18313    # The splitting of arguments from the executable at a space might have been incorrect,
18314    # since paths with space are more likely in Windows. Give it another try with the whole
18315    # argument.
18316    path="$complete"
18317    arguments="EOL"
18318    new_path=`$CYGPATH -u "$path"`
18319    new_path=`$WHICH "$new_path" 2> /dev/null`
18320    # bat and cmd files are not always considered executable in cygwin causing which
18321    # to not find them
18322    if test "x$new_path" = x \
18323        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18324        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18325      new_path=`$CYGPATH -u "$path"`
18326    fi
18327    if test "x$new_path" = x; then
18328      # It's still not found. Now this is an unrecoverable error.
18329      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18330$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18331      has_space=`$ECHO "$complete" | $GREP " "`
18332      if test "x$has_space" != x; then
18333        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18334$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18335      fi
18336      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18337    fi
18338  fi
18339
18340  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18341  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18342  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18343  # "foo.exe" is OK but "foo" is an error.
18344  #
18345  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18346  # It is also a way to make sure we got the proper file name for the real test later on.
18347  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18348  if test "x$test_shortpath" = x; then
18349    # Short path failed, file does not exist as specified.
18350    # Try adding .exe or .cmd
18351    if test -f "${new_path}.exe"; then
18352      input_to_shortpath="${new_path}.exe"
18353    elif test -f "${new_path}.cmd"; then
18354      input_to_shortpath="${new_path}.cmd"
18355    else
18356      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18357$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18358      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18359$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18360      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18361    fi
18362  else
18363    input_to_shortpath="$new_path"
18364  fi
18365
18366  # Call helper function which possibly converts this using DOS-style short mode.
18367  # If so, the updated path is stored in $new_path.
18368  new_path="$input_to_shortpath"
18369
18370  input_path="$input_to_shortpath"
18371  # Check if we need to convert this using DOS-style short mode. If the path
18372  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18373  # take no chances and rewrite it.
18374  # Note: m4 eats our [], so we need to use [ and ] instead.
18375  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18376  if test "x$has_forbidden_chars" != x; then
18377    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18378    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18379    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18380    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18381      # Going to short mode and back again did indeed matter. Since short mode is
18382      # case insensitive, let's make it lowercase to improve readability.
18383      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18384      # Now convert it back to Unix-style (cygpath)
18385      input_path=`$CYGPATH -u "$shortmode_path"`
18386      new_path="$input_path"
18387    fi
18388  fi
18389
18390  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18391  if test "x$test_cygdrive_prefix" = x; then
18392    # As a simple fix, exclude /usr/bin since it's not a real path.
18393    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18394      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18395      # a path prefixed by /cygdrive for fixpath to work.
18396      new_path="$CYGWIN_ROOT_PATH$input_path"
18397    fi
18398  fi
18399
18400  # remove trailing .exe if any
18401  new_path="${new_path/%.exe/}"
18402
18403    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18404
18405  # First separate the path from the arguments. This will split at the first
18406  # space.
18407  complete="$FOUND_MAKE"
18408  path="${complete%% *}"
18409  tmp="$complete EOL"
18410  arguments="${tmp#* }"
18411
18412  # Input might be given as Windows format, start by converting to
18413  # unix format.
18414  new_path="$path"
18415
18416  windows_path="$new_path"
18417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18418    unix_path=`$CYGPATH -u "$windows_path"`
18419    new_path="$unix_path"
18420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18421    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18422    new_path="$unix_path"
18423  fi
18424
18425
18426  # Now try to locate executable using which
18427  new_path=`$WHICH "$new_path" 2> /dev/null`
18428
18429  if test "x$new_path" = x; then
18430    # Oops. Which didn't find the executable.
18431    # The splitting of arguments from the executable at a space might have been incorrect,
18432    # since paths with space are more likely in Windows. Give it another try with the whole
18433    # argument.
18434    path="$complete"
18435    arguments="EOL"
18436    new_path="$path"
18437
18438  windows_path="$new_path"
18439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18440    unix_path=`$CYGPATH -u "$windows_path"`
18441    new_path="$unix_path"
18442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18443    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18444    new_path="$unix_path"
18445  fi
18446
18447
18448    new_path=`$WHICH "$new_path" 2> /dev/null`
18449    # bat and cmd files are not always considered executable in MSYS causing which
18450    # to not find them
18451    if test "x$new_path" = x \
18452        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18453        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18454      new_path="$path"
18455
18456  windows_path="$new_path"
18457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18458    unix_path=`$CYGPATH -u "$windows_path"`
18459    new_path="$unix_path"
18460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18461    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18462    new_path="$unix_path"
18463  fi
18464
18465    fi
18466
18467    if test "x$new_path" = x; then
18468      # It's still not found. Now this is an unrecoverable error.
18469      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18470$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18471      has_space=`$ECHO "$complete" | $GREP " "`
18472      if test "x$has_space" != x; then
18473        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18474$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18475      fi
18476      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18477    fi
18478  fi
18479
18480  # Now new_path has a complete unix path to the binary
18481  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18482    # Keep paths in /bin as-is, but remove trailing .exe if any
18483    new_path="${new_path/%.exe/}"
18484    # Do not save /bin paths to all_fixpath_prefixes!
18485  else
18486    # Not in mixed or Windows style, start by that.
18487    new_path=`cmd //c echo $new_path`
18488
18489  input_path="$new_path"
18490  # Check if we need to convert this using DOS-style short mode. If the path
18491  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18492  # take no chances and rewrite it.
18493  # Note: m4 eats our [], so we need to use [ and ] instead.
18494  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18495  if test "x$has_forbidden_chars" != x; then
18496    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18497    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18498  fi
18499
18500    # Output is in $new_path
18501
18502  windows_path="$new_path"
18503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18504    unix_path=`$CYGPATH -u "$windows_path"`
18505    new_path="$unix_path"
18506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18507    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18508    new_path="$unix_path"
18509  fi
18510
18511    # remove trailing .exe if any
18512    new_path="${new_path/%.exe/}"
18513
18514    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18515    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18516  fi
18517
18518    else
18519      # We're on a unix platform. Hooray! :)
18520      # First separate the path from the arguments. This will split at the first
18521      # space.
18522      complete="$FOUND_MAKE"
18523      path="${complete%% *}"
18524      tmp="$complete EOL"
18525      arguments="${tmp#* }"
18526
18527      # Cannot rely on the command "which" here since it doesn't always work.
18528      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18529      if test -z "$is_absolute_path"; then
18530        # Path to executable is not absolute. Find it.
18531        IFS_save="$IFS"
18532        IFS=:
18533        for p in $PATH; do
18534          if test -f "$p/$path" && test -x "$p/$path"; then
18535            new_path="$p/$path"
18536            break
18537          fi
18538        done
18539        IFS="$IFS_save"
18540      else
18541        # This is an absolute path, we can use it without further modifications.
18542        new_path="$path"
18543      fi
18544
18545      if test "x$new_path" = x; then
18546        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18547$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18548        has_space=`$ECHO "$complete" | $GREP " "`
18549        if test "x$has_space" != x; then
18550          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18551$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18552        fi
18553        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18554      fi
18555    fi
18556
18557    # Now join together the path and the arguments once again
18558    if test "x$arguments" != xEOL; then
18559      new_complete="$new_path ${arguments% *}"
18560    else
18561      new_complete="$new_path"
18562    fi
18563
18564    if test "x$complete" != "x$new_complete"; then
18565      FOUND_MAKE="$new_complete"
18566      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18567$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18568    fi
18569  fi
18570
18571        fi
18572      fi
18573    fi
18574  fi
18575
18576    fi
18577
18578    if test "x$FOUND_MAKE" = x; then
18579      if test "x$TOOLCHAIN_PATH" != x; then
18580        # We have a toolchain path, check that as well before giving up.
18581        OLD_PATH=$PATH
18582        PATH=$TOOLCHAIN_PATH:$PATH
18583        for ac_prog in gmake
18584do
18585  # Extract the first word of "$ac_prog", so it can be a program name with args.
18586set dummy $ac_prog; ac_word=$2
18587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18588$as_echo_n "checking for $ac_word... " >&6; }
18589if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18590  $as_echo_n "(cached) " >&6
18591else
18592  case $CHECK_TOOLSDIR_GMAKE in
18593  [\\/]* | ?:[\\/]*)
18594  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18595  ;;
18596  *)
18597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18598for as_dir in $PATH
18599do
18600  IFS=$as_save_IFS
18601  test -z "$as_dir" && as_dir=.
18602    for ac_exec_ext in '' $ac_executable_extensions; do
18603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18604    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18606    break 2
18607  fi
18608done
18609  done
18610IFS=$as_save_IFS
18611
18612  ;;
18613esac
18614fi
18615CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18616if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18618$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18619else
18620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18621$as_echo "no" >&6; }
18622fi
18623
18624
18625  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18626done
18627
18628
18629  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18630  DESCRIPTION="gmake in tools-dir"
18631
18632  # On Cygwin, we require a newer version of make than on other platforms
18633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18634    MAKE_VERSION_EXPR="-e 4\."
18635    MAKE_REQUIRED_VERSION="4.0"
18636   else
18637    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18638    MAKE_REQUIRED_VERSION="3.81"
18639  fi
18640
18641  if test "x$MAKE_CANDIDATE" != x; then
18642    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18643$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18644    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18645    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18646    if test "x$IS_GNU_MAKE" = x; then
18647      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18648$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18649    else
18650      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18651      if test "x$IS_MODERN_MAKE" = x; then
18652        { $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
18653$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;}
18654      else
18655        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18656          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18657            MAKE_EXPECTED_ENV='cygwin'
18658          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18659            MAKE_EXPECTED_ENV='msys'
18660          else
18661            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18662          fi
18663          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18664          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18665        else
18666          # Not relevant for non-Windows
18667          IS_MAKE_CORRECT_ENV=true
18668        fi
18669        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18670          { $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
18671$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;}
18672        else
18673          FOUND_MAKE=$MAKE_CANDIDATE
18674
18675  # Only process if variable expands to non-empty
18676
18677  if test "x$FOUND_MAKE" != x; then
18678    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18679
18680  # First separate the path from the arguments. This will split at the first
18681  # space.
18682  complete="$FOUND_MAKE"
18683  path="${complete%% *}"
18684  tmp="$complete EOL"
18685  arguments="${tmp#* }"
18686
18687  # Input might be given as Windows format, start by converting to
18688  # unix format.
18689  new_path=`$CYGPATH -u "$path"`
18690
18691  # Now try to locate executable using which
18692  new_path=`$WHICH "$new_path" 2> /dev/null`
18693  # bat and cmd files are not always considered executable in cygwin causing which
18694  # to not find them
18695  if test "x$new_path" = x \
18696      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18697      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18698    new_path=`$CYGPATH -u "$path"`
18699  fi
18700  if test "x$new_path" = x; then
18701    # Oops. Which didn't find the executable.
18702    # The splitting of arguments from the executable at a space might have been incorrect,
18703    # since paths with space are more likely in Windows. Give it another try with the whole
18704    # argument.
18705    path="$complete"
18706    arguments="EOL"
18707    new_path=`$CYGPATH -u "$path"`
18708    new_path=`$WHICH "$new_path" 2> /dev/null`
18709    # bat and cmd files are not always considered executable in cygwin causing which
18710    # to not find them
18711    if test "x$new_path" = x \
18712        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18713        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18714      new_path=`$CYGPATH -u "$path"`
18715    fi
18716    if test "x$new_path" = x; then
18717      # It's still not found. Now this is an unrecoverable error.
18718      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18719$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18720      has_space=`$ECHO "$complete" | $GREP " "`
18721      if test "x$has_space" != x; then
18722        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18723$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18724      fi
18725      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18726    fi
18727  fi
18728
18729  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18730  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18731  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18732  # "foo.exe" is OK but "foo" is an error.
18733  #
18734  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18735  # It is also a way to make sure we got the proper file name for the real test later on.
18736  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18737  if test "x$test_shortpath" = x; then
18738    # Short path failed, file does not exist as specified.
18739    # Try adding .exe or .cmd
18740    if test -f "${new_path}.exe"; then
18741      input_to_shortpath="${new_path}.exe"
18742    elif test -f "${new_path}.cmd"; then
18743      input_to_shortpath="${new_path}.cmd"
18744    else
18745      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18746$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18747      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18748$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18749      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18750    fi
18751  else
18752    input_to_shortpath="$new_path"
18753  fi
18754
18755  # Call helper function which possibly converts this using DOS-style short mode.
18756  # If so, the updated path is stored in $new_path.
18757  new_path="$input_to_shortpath"
18758
18759  input_path="$input_to_shortpath"
18760  # Check if we need to convert this using DOS-style short mode. If the path
18761  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18762  # take no chances and rewrite it.
18763  # Note: m4 eats our [], so we need to use [ and ] instead.
18764  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18765  if test "x$has_forbidden_chars" != x; then
18766    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18767    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18768    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18769    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18770      # Going to short mode and back again did indeed matter. Since short mode is
18771      # case insensitive, let's make it lowercase to improve readability.
18772      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18773      # Now convert it back to Unix-style (cygpath)
18774      input_path=`$CYGPATH -u "$shortmode_path"`
18775      new_path="$input_path"
18776    fi
18777  fi
18778
18779  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18780  if test "x$test_cygdrive_prefix" = x; then
18781    # As a simple fix, exclude /usr/bin since it's not a real path.
18782    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18783      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18784      # a path prefixed by /cygdrive for fixpath to work.
18785      new_path="$CYGWIN_ROOT_PATH$input_path"
18786    fi
18787  fi
18788
18789  # remove trailing .exe if any
18790  new_path="${new_path/%.exe/}"
18791
18792    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18793
18794  # First separate the path from the arguments. This will split at the first
18795  # space.
18796  complete="$FOUND_MAKE"
18797  path="${complete%% *}"
18798  tmp="$complete EOL"
18799  arguments="${tmp#* }"
18800
18801  # Input might be given as Windows format, start by converting to
18802  # unix format.
18803  new_path="$path"
18804
18805  windows_path="$new_path"
18806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18807    unix_path=`$CYGPATH -u "$windows_path"`
18808    new_path="$unix_path"
18809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18811    new_path="$unix_path"
18812  fi
18813
18814
18815  # Now try to locate executable using which
18816  new_path=`$WHICH "$new_path" 2> /dev/null`
18817
18818  if test "x$new_path" = x; then
18819    # Oops. Which didn't find the executable.
18820    # The splitting of arguments from the executable at a space might have been incorrect,
18821    # since paths with space are more likely in Windows. Give it another try with the whole
18822    # argument.
18823    path="$complete"
18824    arguments="EOL"
18825    new_path="$path"
18826
18827  windows_path="$new_path"
18828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18829    unix_path=`$CYGPATH -u "$windows_path"`
18830    new_path="$unix_path"
18831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18833    new_path="$unix_path"
18834  fi
18835
18836
18837    new_path=`$WHICH "$new_path" 2> /dev/null`
18838    # bat and cmd files are not always considered executable in MSYS causing which
18839    # to not find them
18840    if test "x$new_path" = x \
18841        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18842        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18843      new_path="$path"
18844
18845  windows_path="$new_path"
18846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18847    unix_path=`$CYGPATH -u "$windows_path"`
18848    new_path="$unix_path"
18849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18851    new_path="$unix_path"
18852  fi
18853
18854    fi
18855
18856    if test "x$new_path" = x; then
18857      # It's still not found. Now this is an unrecoverable error.
18858      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18859$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18860      has_space=`$ECHO "$complete" | $GREP " "`
18861      if test "x$has_space" != x; then
18862        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18863$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18864      fi
18865      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18866    fi
18867  fi
18868
18869  # Now new_path has a complete unix path to the binary
18870  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18871    # Keep paths in /bin as-is, but remove trailing .exe if any
18872    new_path="${new_path/%.exe/}"
18873    # Do not save /bin paths to all_fixpath_prefixes!
18874  else
18875    # Not in mixed or Windows style, start by that.
18876    new_path=`cmd //c echo $new_path`
18877
18878  input_path="$new_path"
18879  # Check if we need to convert this using DOS-style short mode. If the path
18880  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18881  # take no chances and rewrite it.
18882  # Note: m4 eats our [], so we need to use [ and ] instead.
18883  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18884  if test "x$has_forbidden_chars" != x; then
18885    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18886    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18887  fi
18888
18889    # Output is in $new_path
18890
18891  windows_path="$new_path"
18892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18893    unix_path=`$CYGPATH -u "$windows_path"`
18894    new_path="$unix_path"
18895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18896    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18897    new_path="$unix_path"
18898  fi
18899
18900    # remove trailing .exe if any
18901    new_path="${new_path/%.exe/}"
18902
18903    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18904    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18905  fi
18906
18907    else
18908      # We're on a unix platform. Hooray! :)
18909      # First separate the path from the arguments. This will split at the first
18910      # space.
18911      complete="$FOUND_MAKE"
18912      path="${complete%% *}"
18913      tmp="$complete EOL"
18914      arguments="${tmp#* }"
18915
18916      # Cannot rely on the command "which" here since it doesn't always work.
18917      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18918      if test -z "$is_absolute_path"; then
18919        # Path to executable is not absolute. Find it.
18920        IFS_save="$IFS"
18921        IFS=:
18922        for p in $PATH; do
18923          if test -f "$p/$path" && test -x "$p/$path"; then
18924            new_path="$p/$path"
18925            break
18926          fi
18927        done
18928        IFS="$IFS_save"
18929      else
18930        # This is an absolute path, we can use it without further modifications.
18931        new_path="$path"
18932      fi
18933
18934      if test "x$new_path" = x; then
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}: This might be caused by spaces in the path, which is not allowed." >&5
18940$as_echo "$as_me: This might be caused by spaces in the path, 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 join together the path and the arguments once again
18947    if test "x$arguments" != xEOL; then
18948      new_complete="$new_path ${arguments% *}"
18949    else
18950      new_complete="$new_path"
18951    fi
18952
18953    if test "x$complete" != "x$new_complete"; then
18954      FOUND_MAKE="$new_complete"
18955      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18956$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18957    fi
18958  fi
18959
18960        fi
18961      fi
18962    fi
18963  fi
18964
18965        if test "x$FOUND_MAKE" = x; then
18966          for ac_prog in make
18967do
18968  # Extract the first word of "$ac_prog", so it can be a program name with args.
18969set dummy $ac_prog; ac_word=$2
18970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18971$as_echo_n "checking for $ac_word... " >&6; }
18972if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18973  $as_echo_n "(cached) " >&6
18974else
18975  case $CHECK_TOOLSDIR_MAKE in
18976  [\\/]* | ?:[\\/]*)
18977  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18978  ;;
18979  *)
18980  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18981for as_dir in $PATH
18982do
18983  IFS=$as_save_IFS
18984  test -z "$as_dir" && as_dir=.
18985    for ac_exec_ext in '' $ac_executable_extensions; do
18986  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18987    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18988    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18989    break 2
18990  fi
18991done
18992  done
18993IFS=$as_save_IFS
18994
18995  ;;
18996esac
18997fi
18998CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18999if test -n "$CHECK_TOOLSDIR_MAKE"; then
19000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19001$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19002else
19003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19004$as_echo "no" >&6; }
19005fi
19006
19007
19008  test -n "$CHECK_TOOLSDIR_MAKE" && break
19009done
19010
19011
19012  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19013  DESCRIPTION="make in tools-dir"
19014
19015  # On Cygwin, we require a newer version of make than on other platforms
19016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19017    MAKE_VERSION_EXPR="-e 4\."
19018    MAKE_REQUIRED_VERSION="4.0"
19019   else
19020    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19021    MAKE_REQUIRED_VERSION="3.81"
19022  fi
19023
19024  if test "x$MAKE_CANDIDATE" != x; then
19025    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19026$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19027    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19028    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19029    if test "x$IS_GNU_MAKE" = x; then
19030      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19031$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19032    else
19033      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19034      if test "x$IS_MODERN_MAKE" = x; then
19035        { $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
19036$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;}
19037      else
19038        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19039          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19040            MAKE_EXPECTED_ENV='cygwin'
19041          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19042            MAKE_EXPECTED_ENV='msys'
19043          else
19044            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19045          fi
19046          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19047          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19048        else
19049          # Not relevant for non-Windows
19050          IS_MAKE_CORRECT_ENV=true
19051        fi
19052        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19053          { $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
19054$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;}
19055        else
19056          FOUND_MAKE=$MAKE_CANDIDATE
19057
19058  # Only process if variable expands to non-empty
19059
19060  if test "x$FOUND_MAKE" != x; then
19061    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19062
19063  # First separate the path from the arguments. This will split at the first
19064  # space.
19065  complete="$FOUND_MAKE"
19066  path="${complete%% *}"
19067  tmp="$complete EOL"
19068  arguments="${tmp#* }"
19069
19070  # Input might be given as Windows format, start by converting to
19071  # unix format.
19072  new_path=`$CYGPATH -u "$path"`
19073
19074  # Now try to locate executable using which
19075  new_path=`$WHICH "$new_path" 2> /dev/null`
19076  # bat and cmd files are not always considered executable in cygwin causing which
19077  # to not find them
19078  if test "x$new_path" = x \
19079      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19080      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19081    new_path=`$CYGPATH -u "$path"`
19082  fi
19083  if test "x$new_path" = x; then
19084    # Oops. Which didn't find the executable.
19085    # The splitting of arguments from the executable at a space might have been incorrect,
19086    # since paths with space are more likely in Windows. Give it another try with the whole
19087    # argument.
19088    path="$complete"
19089    arguments="EOL"
19090    new_path=`$CYGPATH -u "$path"`
19091    new_path=`$WHICH "$new_path" 2> /dev/null`
19092    # bat and cmd files are not always considered executable in cygwin causing which
19093    # to not find them
19094    if test "x$new_path" = x \
19095        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19096        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19097      new_path=`$CYGPATH -u "$path"`
19098    fi
19099    if test "x$new_path" = x; then
19100      # It's still not found. Now this is an unrecoverable error.
19101      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19102$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19103      has_space=`$ECHO "$complete" | $GREP " "`
19104      if test "x$has_space" != x; then
19105        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19106$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19107      fi
19108      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19109    fi
19110  fi
19111
19112  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19113  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19114  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19115  # "foo.exe" is OK but "foo" is an error.
19116  #
19117  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19118  # It is also a way to make sure we got the proper file name for the real test later on.
19119  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19120  if test "x$test_shortpath" = x; then
19121    # Short path failed, file does not exist as specified.
19122    # Try adding .exe or .cmd
19123    if test -f "${new_path}.exe"; then
19124      input_to_shortpath="${new_path}.exe"
19125    elif test -f "${new_path}.cmd"; then
19126      input_to_shortpath="${new_path}.cmd"
19127    else
19128      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19129$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19130      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19131$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19132      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19133    fi
19134  else
19135    input_to_shortpath="$new_path"
19136  fi
19137
19138  # Call helper function which possibly converts this using DOS-style short mode.
19139  # If so, the updated path is stored in $new_path.
19140  new_path="$input_to_shortpath"
19141
19142  input_path="$input_to_shortpath"
19143  # Check if we need to convert this using DOS-style short mode. If the path
19144  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19145  # take no chances and rewrite it.
19146  # Note: m4 eats our [], so we need to use [ and ] instead.
19147  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19148  if test "x$has_forbidden_chars" != x; then
19149    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19150    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19151    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19152    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19153      # Going to short mode and back again did indeed matter. Since short mode is
19154      # case insensitive, let's make it lowercase to improve readability.
19155      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19156      # Now convert it back to Unix-style (cygpath)
19157      input_path=`$CYGPATH -u "$shortmode_path"`
19158      new_path="$input_path"
19159    fi
19160  fi
19161
19162  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19163  if test "x$test_cygdrive_prefix" = x; then
19164    # As a simple fix, exclude /usr/bin since it's not a real path.
19165    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19166      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19167      # a path prefixed by /cygdrive for fixpath to work.
19168      new_path="$CYGWIN_ROOT_PATH$input_path"
19169    fi
19170  fi
19171
19172  # remove trailing .exe if any
19173  new_path="${new_path/%.exe/}"
19174
19175    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19176
19177  # First separate the path from the arguments. This will split at the first
19178  # space.
19179  complete="$FOUND_MAKE"
19180  path="${complete%% *}"
19181  tmp="$complete EOL"
19182  arguments="${tmp#* }"
19183
19184  # Input might be given as Windows format, start by converting to
19185  # unix format.
19186  new_path="$path"
19187
19188  windows_path="$new_path"
19189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19190    unix_path=`$CYGPATH -u "$windows_path"`
19191    new_path="$unix_path"
19192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19193    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19194    new_path="$unix_path"
19195  fi
19196
19197
19198  # Now try to locate executable using which
19199  new_path=`$WHICH "$new_path" 2> /dev/null`
19200
19201  if test "x$new_path" = x; then
19202    # Oops. Which didn't find the executable.
19203    # The splitting of arguments from the executable at a space might have been incorrect,
19204    # since paths with space are more likely in Windows. Give it another try with the whole
19205    # argument.
19206    path="$complete"
19207    arguments="EOL"
19208    new_path="$path"
19209
19210  windows_path="$new_path"
19211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19212    unix_path=`$CYGPATH -u "$windows_path"`
19213    new_path="$unix_path"
19214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19215    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19216    new_path="$unix_path"
19217  fi
19218
19219
19220    new_path=`$WHICH "$new_path" 2> /dev/null`
19221    # bat and cmd files are not always considered executable in MSYS causing which
19222    # to not find them
19223    if test "x$new_path" = x \
19224        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19225        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19226      new_path="$path"
19227
19228  windows_path="$new_path"
19229  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19230    unix_path=`$CYGPATH -u "$windows_path"`
19231    new_path="$unix_path"
19232  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19233    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19234    new_path="$unix_path"
19235  fi
19236
19237    fi
19238
19239    if test "x$new_path" = x; then
19240      # It's still not found. Now this is an unrecoverable error.
19241      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19242$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19243      has_space=`$ECHO "$complete" | $GREP " "`
19244      if test "x$has_space" != x; then
19245        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19246$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19247      fi
19248      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19249    fi
19250  fi
19251
19252  # Now new_path has a complete unix path to the binary
19253  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19254    # Keep paths in /bin as-is, but remove trailing .exe if any
19255    new_path="${new_path/%.exe/}"
19256    # Do not save /bin paths to all_fixpath_prefixes!
19257  else
19258    # Not in mixed or Windows style, start by that.
19259    new_path=`cmd //c echo $new_path`
19260
19261  input_path="$new_path"
19262  # Check if we need to convert this using DOS-style short mode. If the path
19263  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19264  # take no chances and rewrite it.
19265  # Note: m4 eats our [], so we need to use [ and ] instead.
19266  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19267  if test "x$has_forbidden_chars" != x; then
19268    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19269    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19270  fi
19271
19272    # Output is in $new_path
19273
19274  windows_path="$new_path"
19275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19276    unix_path=`$CYGPATH -u "$windows_path"`
19277    new_path="$unix_path"
19278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19279    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19280    new_path="$unix_path"
19281  fi
19282
19283    # remove trailing .exe if any
19284    new_path="${new_path/%.exe/}"
19285
19286    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19287    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19288  fi
19289
19290    else
19291      # We're on a unix platform. Hooray! :)
19292      # First separate the path from the arguments. This will split at the first
19293      # space.
19294      complete="$FOUND_MAKE"
19295      path="${complete%% *}"
19296      tmp="$complete EOL"
19297      arguments="${tmp#* }"
19298
19299      # Cannot rely on the command "which" here since it doesn't always work.
19300      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19301      if test -z "$is_absolute_path"; then
19302        # Path to executable is not absolute. Find it.
19303        IFS_save="$IFS"
19304        IFS=:
19305        for p in $PATH; do
19306          if test -f "$p/$path" && test -x "$p/$path"; then
19307            new_path="$p/$path"
19308            break
19309          fi
19310        done
19311        IFS="$IFS_save"
19312      else
19313        # This is an absolute path, we can use it without further modifications.
19314        new_path="$path"
19315      fi
19316
19317      if test "x$new_path" = x; then
19318        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19319$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19320        has_space=`$ECHO "$complete" | $GREP " "`
19321        if test "x$has_space" != x; then
19322          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19323$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19324        fi
19325        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19326      fi
19327    fi
19328
19329    # Now join together the path and the arguments once again
19330    if test "x$arguments" != xEOL; then
19331      new_complete="$new_path ${arguments% *}"
19332    else
19333      new_complete="$new_path"
19334    fi
19335
19336    if test "x$complete" != "x$new_complete"; then
19337      FOUND_MAKE="$new_complete"
19338      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19339$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19340    fi
19341  fi
19342
19343        fi
19344      fi
19345    fi
19346  fi
19347
19348        fi
19349        PATH=$OLD_PATH
19350      fi
19351    fi
19352
19353    if test "x$FOUND_MAKE" = x; then
19354      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
19355    fi
19356
19357  else
19358    # The variable is set, but is it from the command line or the environment?
19359
19360    # Try to remove the string !MAKE! from our list.
19361    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19362    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19363      # If it failed, the variable was not from the command line. Ignore it,
19364      # but warn the user (except for BASH, which is always set by the calling BASH).
19365      if test "xMAKE" != xBASH; then
19366        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19367$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19368      fi
19369      # Try to locate tool using the code snippet
19370
19371    # Try our hardest to locate a correct version of GNU make
19372    for ac_prog in gmake
19373do
19374  # Extract the first word of "$ac_prog", so it can be a program name with args.
19375set dummy $ac_prog; ac_word=$2
19376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19377$as_echo_n "checking for $ac_word... " >&6; }
19378if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19379  $as_echo_n "(cached) " >&6
19380else
19381  case $CHECK_GMAKE in
19382  [\\/]* | ?:[\\/]*)
19383  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19384  ;;
19385  *)
19386  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19387for as_dir in $PATH
19388do
19389  IFS=$as_save_IFS
19390  test -z "$as_dir" && as_dir=.
19391    for ac_exec_ext in '' $ac_executable_extensions; do
19392  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19393    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19394    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19395    break 2
19396  fi
19397done
19398  done
19399IFS=$as_save_IFS
19400
19401  ;;
19402esac
19403fi
19404CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19405if test -n "$CHECK_GMAKE"; then
19406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19407$as_echo "$CHECK_GMAKE" >&6; }
19408else
19409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19410$as_echo "no" >&6; }
19411fi
19412
19413
19414  test -n "$CHECK_GMAKE" && break
19415done
19416
19417
19418  MAKE_CANDIDATE=""$CHECK_GMAKE""
19419  DESCRIPTION="gmake in PATH"
19420
19421  # On Cygwin, we require a newer version of make than on other platforms
19422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19423    MAKE_VERSION_EXPR="-e 4\."
19424    MAKE_REQUIRED_VERSION="4.0"
19425   else
19426    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19427    MAKE_REQUIRED_VERSION="3.81"
19428  fi
19429
19430  if test "x$MAKE_CANDIDATE" != x; then
19431    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19432$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19433    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19434    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19435    if test "x$IS_GNU_MAKE" = x; then
19436      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19437$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19438    else
19439      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19440      if test "x$IS_MODERN_MAKE" = x; then
19441        { $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
19442$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;}
19443      else
19444        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19445          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19446            MAKE_EXPECTED_ENV='cygwin'
19447          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19448            MAKE_EXPECTED_ENV='msys'
19449          else
19450            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19451          fi
19452          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19453          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19454        else
19455          # Not relevant for non-Windows
19456          IS_MAKE_CORRECT_ENV=true
19457        fi
19458        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19459          { $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
19460$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;}
19461        else
19462          FOUND_MAKE=$MAKE_CANDIDATE
19463
19464  # Only process if variable expands to non-empty
19465
19466  if test "x$FOUND_MAKE" != x; then
19467    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19468
19469  # First separate the path from the arguments. This will split at the first
19470  # space.
19471  complete="$FOUND_MAKE"
19472  path="${complete%% *}"
19473  tmp="$complete EOL"
19474  arguments="${tmp#* }"
19475
19476  # Input might be given as Windows format, start by converting to
19477  # unix format.
19478  new_path=`$CYGPATH -u "$path"`
19479
19480  # Now try to locate executable using which
19481  new_path=`$WHICH "$new_path" 2> /dev/null`
19482  # bat and cmd files are not always considered executable in cygwin causing which
19483  # to not find them
19484  if test "x$new_path" = x \
19485      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19486      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19487    new_path=`$CYGPATH -u "$path"`
19488  fi
19489  if test "x$new_path" = x; then
19490    # Oops. Which didn't find the executable.
19491    # The splitting of arguments from the executable at a space might have been incorrect,
19492    # since paths with space are more likely in Windows. Give it another try with the whole
19493    # argument.
19494    path="$complete"
19495    arguments="EOL"
19496    new_path=`$CYGPATH -u "$path"`
19497    new_path=`$WHICH "$new_path" 2> /dev/null`
19498    # bat and cmd files are not always considered executable in cygwin causing which
19499    # to not find them
19500    if test "x$new_path" = x \
19501        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19502        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19503      new_path=`$CYGPATH -u "$path"`
19504    fi
19505    if test "x$new_path" = x; then
19506      # It's still not found. Now this is an unrecoverable error.
19507      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19508$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19509      has_space=`$ECHO "$complete" | $GREP " "`
19510      if test "x$has_space" != x; then
19511        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19512$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19513      fi
19514      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19515    fi
19516  fi
19517
19518  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19519  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19520  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19521  # "foo.exe" is OK but "foo" is an error.
19522  #
19523  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19524  # It is also a way to make sure we got the proper file name for the real test later on.
19525  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19526  if test "x$test_shortpath" = x; then
19527    # Short path failed, file does not exist as specified.
19528    # Try adding .exe or .cmd
19529    if test -f "${new_path}.exe"; then
19530      input_to_shortpath="${new_path}.exe"
19531    elif test -f "${new_path}.cmd"; then
19532      input_to_shortpath="${new_path}.cmd"
19533    else
19534      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19535$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19536      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19537$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19538      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19539    fi
19540  else
19541    input_to_shortpath="$new_path"
19542  fi
19543
19544  # Call helper function which possibly converts this using DOS-style short mode.
19545  # If so, the updated path is stored in $new_path.
19546  new_path="$input_to_shortpath"
19547
19548  input_path="$input_to_shortpath"
19549  # Check if we need to convert this using DOS-style short mode. If the path
19550  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19551  # take no chances and rewrite it.
19552  # Note: m4 eats our [], so we need to use [ and ] instead.
19553  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19554  if test "x$has_forbidden_chars" != x; then
19555    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19556    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19557    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19558    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19559      # Going to short mode and back again did indeed matter. Since short mode is
19560      # case insensitive, let's make it lowercase to improve readability.
19561      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19562      # Now convert it back to Unix-style (cygpath)
19563      input_path=`$CYGPATH -u "$shortmode_path"`
19564      new_path="$input_path"
19565    fi
19566  fi
19567
19568  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19569  if test "x$test_cygdrive_prefix" = x; then
19570    # As a simple fix, exclude /usr/bin since it's not a real path.
19571    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19572      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19573      # a path prefixed by /cygdrive for fixpath to work.
19574      new_path="$CYGWIN_ROOT_PATH$input_path"
19575    fi
19576  fi
19577
19578  # remove trailing .exe if any
19579  new_path="${new_path/%.exe/}"
19580
19581    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19582
19583  # First separate the path from the arguments. This will split at the first
19584  # space.
19585  complete="$FOUND_MAKE"
19586  path="${complete%% *}"
19587  tmp="$complete EOL"
19588  arguments="${tmp#* }"
19589
19590  # Input might be given as Windows format, start by converting to
19591  # unix format.
19592  new_path="$path"
19593
19594  windows_path="$new_path"
19595  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19596    unix_path=`$CYGPATH -u "$windows_path"`
19597    new_path="$unix_path"
19598  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19599    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19600    new_path="$unix_path"
19601  fi
19602
19603
19604  # Now try to locate executable using which
19605  new_path=`$WHICH "$new_path" 2> /dev/null`
19606
19607  if test "x$new_path" = x; then
19608    # Oops. Which didn't find the executable.
19609    # The splitting of arguments from the executable at a space might have been incorrect,
19610    # since paths with space are more likely in Windows. Give it another try with the whole
19611    # argument.
19612    path="$complete"
19613    arguments="EOL"
19614    new_path="$path"
19615
19616  windows_path="$new_path"
19617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19618    unix_path=`$CYGPATH -u "$windows_path"`
19619    new_path="$unix_path"
19620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19622    new_path="$unix_path"
19623  fi
19624
19625
19626    new_path=`$WHICH "$new_path" 2> /dev/null`
19627    # bat and cmd files are not always considered executable in MSYS causing which
19628    # to not find them
19629    if test "x$new_path" = x \
19630        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19631        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19632      new_path="$path"
19633
19634  windows_path="$new_path"
19635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19636    unix_path=`$CYGPATH -u "$windows_path"`
19637    new_path="$unix_path"
19638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19639    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19640    new_path="$unix_path"
19641  fi
19642
19643    fi
19644
19645    if test "x$new_path" = x; then
19646      # It's still not found. Now this is an unrecoverable error.
19647      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19648$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19649      has_space=`$ECHO "$complete" | $GREP " "`
19650      if test "x$has_space" != x; then
19651        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19652$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19653      fi
19654      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19655    fi
19656  fi
19657
19658  # Now new_path has a complete unix path to the binary
19659  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19660    # Keep paths in /bin as-is, but remove trailing .exe if any
19661    new_path="${new_path/%.exe/}"
19662    # Do not save /bin paths to all_fixpath_prefixes!
19663  else
19664    # Not in mixed or Windows style, start by that.
19665    new_path=`cmd //c echo $new_path`
19666
19667  input_path="$new_path"
19668  # Check if we need to convert this using DOS-style short mode. If the path
19669  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19670  # take no chances and rewrite it.
19671  # Note: m4 eats our [], so we need to use [ and ] instead.
19672  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19673  if test "x$has_forbidden_chars" != x; then
19674    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19675    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19676  fi
19677
19678    # Output is in $new_path
19679
19680  windows_path="$new_path"
19681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19682    unix_path=`$CYGPATH -u "$windows_path"`
19683    new_path="$unix_path"
19684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19686    new_path="$unix_path"
19687  fi
19688
19689    # remove trailing .exe if any
19690    new_path="${new_path/%.exe/}"
19691
19692    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19693    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19694  fi
19695
19696    else
19697      # We're on a unix platform. Hooray! :)
19698      # First separate the path from the arguments. This will split at the first
19699      # space.
19700      complete="$FOUND_MAKE"
19701      path="${complete%% *}"
19702      tmp="$complete EOL"
19703      arguments="${tmp#* }"
19704
19705      # Cannot rely on the command "which" here since it doesn't always work.
19706      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19707      if test -z "$is_absolute_path"; then
19708        # Path to executable is not absolute. Find it.
19709        IFS_save="$IFS"
19710        IFS=:
19711        for p in $PATH; do
19712          if test -f "$p/$path" && test -x "$p/$path"; then
19713            new_path="$p/$path"
19714            break
19715          fi
19716        done
19717        IFS="$IFS_save"
19718      else
19719        # This is an absolute path, we can use it without further modifications.
19720        new_path="$path"
19721      fi
19722
19723      if test "x$new_path" = x; then
19724        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19725$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19726        has_space=`$ECHO "$complete" | $GREP " "`
19727        if test "x$has_space" != x; then
19728          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19729$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19730        fi
19731        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19732      fi
19733    fi
19734
19735    # Now join together the path and the arguments once again
19736    if test "x$arguments" != xEOL; then
19737      new_complete="$new_path ${arguments% *}"
19738    else
19739      new_complete="$new_path"
19740    fi
19741
19742    if test "x$complete" != "x$new_complete"; then
19743      FOUND_MAKE="$new_complete"
19744      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19745$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19746    fi
19747  fi
19748
19749        fi
19750      fi
19751    fi
19752  fi
19753
19754
19755    if test "x$FOUND_MAKE" = x; then
19756      for ac_prog in make
19757do
19758  # Extract the first word of "$ac_prog", so it can be a program name with args.
19759set dummy $ac_prog; ac_word=$2
19760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19761$as_echo_n "checking for $ac_word... " >&6; }
19762if ${ac_cv_path_CHECK_MAKE+:} false; then :
19763  $as_echo_n "(cached) " >&6
19764else
19765  case $CHECK_MAKE in
19766  [\\/]* | ?:[\\/]*)
19767  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19768  ;;
19769  *)
19770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19771for as_dir in $PATH
19772do
19773  IFS=$as_save_IFS
19774  test -z "$as_dir" && as_dir=.
19775    for ac_exec_ext in '' $ac_executable_extensions; do
19776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19777    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19779    break 2
19780  fi
19781done
19782  done
19783IFS=$as_save_IFS
19784
19785  ;;
19786esac
19787fi
19788CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19789if test -n "$CHECK_MAKE"; then
19790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19791$as_echo "$CHECK_MAKE" >&6; }
19792else
19793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19794$as_echo "no" >&6; }
19795fi
19796
19797
19798  test -n "$CHECK_MAKE" && break
19799done
19800
19801
19802  MAKE_CANDIDATE=""$CHECK_MAKE""
19803  DESCRIPTION="make in PATH"
19804
19805  # On Cygwin, we require a newer version of make than on other platforms
19806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19807    MAKE_VERSION_EXPR="-e 4\."
19808    MAKE_REQUIRED_VERSION="4.0"
19809   else
19810    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19811    MAKE_REQUIRED_VERSION="3.81"
19812  fi
19813
19814  if test "x$MAKE_CANDIDATE" != x; then
19815    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19816$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19817    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19818    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19819    if test "x$IS_GNU_MAKE" = x; then
19820      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19821$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19822    else
19823      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19824      if test "x$IS_MODERN_MAKE" = x; then
19825        { $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
19826$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;}
19827      else
19828        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19829          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19830            MAKE_EXPECTED_ENV='cygwin'
19831          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19832            MAKE_EXPECTED_ENV='msys'
19833          else
19834            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19835          fi
19836          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19837          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19838        else
19839          # Not relevant for non-Windows
19840          IS_MAKE_CORRECT_ENV=true
19841        fi
19842        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19843          { $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
19844$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;}
19845        else
19846          FOUND_MAKE=$MAKE_CANDIDATE
19847
19848  # Only process if variable expands to non-empty
19849
19850  if test "x$FOUND_MAKE" != x; then
19851    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19852
19853  # First separate the path from the arguments. This will split at the first
19854  # space.
19855  complete="$FOUND_MAKE"
19856  path="${complete%% *}"
19857  tmp="$complete EOL"
19858  arguments="${tmp#* }"
19859
19860  # Input might be given as Windows format, start by converting to
19861  # unix format.
19862  new_path=`$CYGPATH -u "$path"`
19863
19864  # Now try to locate executable using which
19865  new_path=`$WHICH "$new_path" 2> /dev/null`
19866  # bat and cmd files are not always considered executable in cygwin causing which
19867  # to not find them
19868  if test "x$new_path" = x \
19869      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19870      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19871    new_path=`$CYGPATH -u "$path"`
19872  fi
19873  if test "x$new_path" = x; then
19874    # Oops. Which didn't find the executable.
19875    # The splitting of arguments from the executable at a space might have been incorrect,
19876    # since paths with space are more likely in Windows. Give it another try with the whole
19877    # argument.
19878    path="$complete"
19879    arguments="EOL"
19880    new_path=`$CYGPATH -u "$path"`
19881    new_path=`$WHICH "$new_path" 2> /dev/null`
19882    # bat and cmd files are not always considered executable in cygwin causing which
19883    # to not find them
19884    if test "x$new_path" = x \
19885        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19886        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19887      new_path=`$CYGPATH -u "$path"`
19888    fi
19889    if test "x$new_path" = x; then
19890      # It's still not found. Now this is an unrecoverable error.
19891      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19892$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19893      has_space=`$ECHO "$complete" | $GREP " "`
19894      if test "x$has_space" != x; then
19895        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19896$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19897      fi
19898      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19899    fi
19900  fi
19901
19902  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19903  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19904  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19905  # "foo.exe" is OK but "foo" is an error.
19906  #
19907  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19908  # It is also a way to make sure we got the proper file name for the real test later on.
19909  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19910  if test "x$test_shortpath" = x; then
19911    # Short path failed, file does not exist as specified.
19912    # Try adding .exe or .cmd
19913    if test -f "${new_path}.exe"; then
19914      input_to_shortpath="${new_path}.exe"
19915    elif test -f "${new_path}.cmd"; then
19916      input_to_shortpath="${new_path}.cmd"
19917    else
19918      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19919$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19920      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19921$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19922      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19923    fi
19924  else
19925    input_to_shortpath="$new_path"
19926  fi
19927
19928  # Call helper function which possibly converts this using DOS-style short mode.
19929  # If so, the updated path is stored in $new_path.
19930  new_path="$input_to_shortpath"
19931
19932  input_path="$input_to_shortpath"
19933  # Check if we need to convert this using DOS-style short mode. If the path
19934  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19935  # take no chances and rewrite it.
19936  # Note: m4 eats our [], so we need to use [ and ] instead.
19937  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19938  if test "x$has_forbidden_chars" != x; then
19939    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19940    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19941    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19942    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19943      # Going to short mode and back again did indeed matter. Since short mode is
19944      # case insensitive, let's make it lowercase to improve readability.
19945      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19946      # Now convert it back to Unix-style (cygpath)
19947      input_path=`$CYGPATH -u "$shortmode_path"`
19948      new_path="$input_path"
19949    fi
19950  fi
19951
19952  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19953  if test "x$test_cygdrive_prefix" = x; then
19954    # As a simple fix, exclude /usr/bin since it's not a real path.
19955    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19956      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19957      # a path prefixed by /cygdrive for fixpath to work.
19958      new_path="$CYGWIN_ROOT_PATH$input_path"
19959    fi
19960  fi
19961
19962  # remove trailing .exe if any
19963  new_path="${new_path/%.exe/}"
19964
19965    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19966
19967  # First separate the path from the arguments. This will split at the first
19968  # space.
19969  complete="$FOUND_MAKE"
19970  path="${complete%% *}"
19971  tmp="$complete EOL"
19972  arguments="${tmp#* }"
19973
19974  # Input might be given as Windows format, start by converting to
19975  # unix format.
19976  new_path="$path"
19977
19978  windows_path="$new_path"
19979  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19980    unix_path=`$CYGPATH -u "$windows_path"`
19981    new_path="$unix_path"
19982  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19983    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19984    new_path="$unix_path"
19985  fi
19986
19987
19988  # Now try to locate executable using which
19989  new_path=`$WHICH "$new_path" 2> /dev/null`
19990
19991  if test "x$new_path" = x; then
19992    # Oops. Which didn't find the executable.
19993    # The splitting of arguments from the executable at a space might have been incorrect,
19994    # since paths with space are more likely in Windows. Give it another try with the whole
19995    # argument.
19996    path="$complete"
19997    arguments="EOL"
19998    new_path="$path"
19999
20000  windows_path="$new_path"
20001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20002    unix_path=`$CYGPATH -u "$windows_path"`
20003    new_path="$unix_path"
20004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20005    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20006    new_path="$unix_path"
20007  fi
20008
20009
20010    new_path=`$WHICH "$new_path" 2> /dev/null`
20011    # bat and cmd files are not always considered executable in MSYS causing which
20012    # to not find them
20013    if test "x$new_path" = x \
20014        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20015        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20016      new_path="$path"
20017
20018  windows_path="$new_path"
20019  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20020    unix_path=`$CYGPATH -u "$windows_path"`
20021    new_path="$unix_path"
20022  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20023    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20024    new_path="$unix_path"
20025  fi
20026
20027    fi
20028
20029    if test "x$new_path" = x; then
20030      # It's still not found. Now this is an unrecoverable error.
20031      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20032$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20033      has_space=`$ECHO "$complete" | $GREP " "`
20034      if test "x$has_space" != x; then
20035        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20036$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20037      fi
20038      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20039    fi
20040  fi
20041
20042  # Now new_path has a complete unix path to the binary
20043  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20044    # Keep paths in /bin as-is, but remove trailing .exe if any
20045    new_path="${new_path/%.exe/}"
20046    # Do not save /bin paths to all_fixpath_prefixes!
20047  else
20048    # Not in mixed or Windows style, start by that.
20049    new_path=`cmd //c echo $new_path`
20050
20051  input_path="$new_path"
20052  # Check if we need to convert this using DOS-style short mode. If the path
20053  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20054  # take no chances and rewrite it.
20055  # Note: m4 eats our [], so we need to use [ and ] instead.
20056  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20057  if test "x$has_forbidden_chars" != x; then
20058    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20059    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20060  fi
20061
20062    # Output is in $new_path
20063
20064  windows_path="$new_path"
20065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20066    unix_path=`$CYGPATH -u "$windows_path"`
20067    new_path="$unix_path"
20068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20069    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20070    new_path="$unix_path"
20071  fi
20072
20073    # remove trailing .exe if any
20074    new_path="${new_path/%.exe/}"
20075
20076    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20077    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20078  fi
20079
20080    else
20081      # We're on a unix platform. Hooray! :)
20082      # First separate the path from the arguments. This will split at the first
20083      # space.
20084      complete="$FOUND_MAKE"
20085      path="${complete%% *}"
20086      tmp="$complete EOL"
20087      arguments="${tmp#* }"
20088
20089      # Cannot rely on the command "which" here since it doesn't always work.
20090      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20091      if test -z "$is_absolute_path"; then
20092        # Path to executable is not absolute. Find it.
20093        IFS_save="$IFS"
20094        IFS=:
20095        for p in $PATH; do
20096          if test -f "$p/$path" && test -x "$p/$path"; then
20097            new_path="$p/$path"
20098            break
20099          fi
20100        done
20101        IFS="$IFS_save"
20102      else
20103        # This is an absolute path, we can use it without further modifications.
20104        new_path="$path"
20105      fi
20106
20107      if test "x$new_path" = x; then
20108        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20109$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20110        has_space=`$ECHO "$complete" | $GREP " "`
20111        if test "x$has_space" != x; then
20112          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20113$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20114        fi
20115        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20116      fi
20117    fi
20118
20119    # Now join together the path and the arguments once again
20120    if test "x$arguments" != xEOL; then
20121      new_complete="$new_path ${arguments% *}"
20122    else
20123      new_complete="$new_path"
20124    fi
20125
20126    if test "x$complete" != "x$new_complete"; then
20127      FOUND_MAKE="$new_complete"
20128      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20129$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20130    fi
20131  fi
20132
20133        fi
20134      fi
20135    fi
20136  fi
20137
20138    fi
20139
20140    if test "x$FOUND_MAKE" = x; then
20141      if test "x$TOOLCHAIN_PATH" != x; then
20142        # We have a toolchain path, check that as well before giving up.
20143        OLD_PATH=$PATH
20144        PATH=$TOOLCHAIN_PATH:$PATH
20145        for ac_prog in gmake
20146do
20147  # Extract the first word of "$ac_prog", so it can be a program name with args.
20148set dummy $ac_prog; ac_word=$2
20149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20150$as_echo_n "checking for $ac_word... " >&6; }
20151if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
20152  $as_echo_n "(cached) " >&6
20153else
20154  case $CHECK_TOOLSDIR_GMAKE in
20155  [\\/]* | ?:[\\/]*)
20156  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
20157  ;;
20158  *)
20159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20160for as_dir in $PATH
20161do
20162  IFS=$as_save_IFS
20163  test -z "$as_dir" && as_dir=.
20164    for ac_exec_ext in '' $ac_executable_extensions; do
20165  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20166    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
20167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20168    break 2
20169  fi
20170done
20171  done
20172IFS=$as_save_IFS
20173
20174  ;;
20175esac
20176fi
20177CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
20178if test -n "$CHECK_TOOLSDIR_GMAKE"; then
20179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
20180$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
20181else
20182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20183$as_echo "no" >&6; }
20184fi
20185
20186
20187  test -n "$CHECK_TOOLSDIR_GMAKE" && break
20188done
20189
20190
20191  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
20192  DESCRIPTION="gmake in tools-dir"
20193
20194  # On Cygwin, we require a newer version of make than on other platforms
20195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20196    MAKE_VERSION_EXPR="-e 4\."
20197    MAKE_REQUIRED_VERSION="4.0"
20198   else
20199    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20200    MAKE_REQUIRED_VERSION="3.81"
20201  fi
20202
20203  if test "x$MAKE_CANDIDATE" != x; then
20204    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20205$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20206    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20207    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20208    if test "x$IS_GNU_MAKE" = x; then
20209      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20210$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20211    else
20212      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20213      if test "x$IS_MODERN_MAKE" = x; then
20214        { $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
20215$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;}
20216      else
20217        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20218          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20219            MAKE_EXPECTED_ENV='cygwin'
20220          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20221            MAKE_EXPECTED_ENV='msys'
20222          else
20223            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20224          fi
20225          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20226          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20227        else
20228          # Not relevant for non-Windows
20229          IS_MAKE_CORRECT_ENV=true
20230        fi
20231        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20232          { $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
20233$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;}
20234        else
20235          FOUND_MAKE=$MAKE_CANDIDATE
20236
20237  # Only process if variable expands to non-empty
20238
20239  if test "x$FOUND_MAKE" != x; then
20240    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20241
20242  # First separate the path from the arguments. This will split at the first
20243  # space.
20244  complete="$FOUND_MAKE"
20245  path="${complete%% *}"
20246  tmp="$complete EOL"
20247  arguments="${tmp#* }"
20248
20249  # Input might be given as Windows format, start by converting to
20250  # unix format.
20251  new_path=`$CYGPATH -u "$path"`
20252
20253  # Now try to locate executable using which
20254  new_path=`$WHICH "$new_path" 2> /dev/null`
20255  # bat and cmd files are not always considered executable in cygwin causing which
20256  # to not find them
20257  if test "x$new_path" = x \
20258      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20259      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20260    new_path=`$CYGPATH -u "$path"`
20261  fi
20262  if test "x$new_path" = x; then
20263    # Oops. Which didn't find the executable.
20264    # The splitting of arguments from the executable at a space might have been incorrect,
20265    # since paths with space are more likely in Windows. Give it another try with the whole
20266    # argument.
20267    path="$complete"
20268    arguments="EOL"
20269    new_path=`$CYGPATH -u "$path"`
20270    new_path=`$WHICH "$new_path" 2> /dev/null`
20271    # bat and cmd files are not always considered executable in cygwin causing which
20272    # to not find them
20273    if test "x$new_path" = x \
20274        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20275        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20276      new_path=`$CYGPATH -u "$path"`
20277    fi
20278    if test "x$new_path" = x; then
20279      # It's still not found. Now this is an unrecoverable error.
20280      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20281$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20282      has_space=`$ECHO "$complete" | $GREP " "`
20283      if test "x$has_space" != x; then
20284        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20285$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20286      fi
20287      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20288    fi
20289  fi
20290
20291  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20292  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20293  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20294  # "foo.exe" is OK but "foo" is an error.
20295  #
20296  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20297  # It is also a way to make sure we got the proper file name for the real test later on.
20298  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20299  if test "x$test_shortpath" = x; then
20300    # Short path failed, file does not exist as specified.
20301    # Try adding .exe or .cmd
20302    if test -f "${new_path}.exe"; then
20303      input_to_shortpath="${new_path}.exe"
20304    elif test -f "${new_path}.cmd"; then
20305      input_to_shortpath="${new_path}.cmd"
20306    else
20307      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20308$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20309      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20310$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20311      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20312    fi
20313  else
20314    input_to_shortpath="$new_path"
20315  fi
20316
20317  # Call helper function which possibly converts this using DOS-style short mode.
20318  # If so, the updated path is stored in $new_path.
20319  new_path="$input_to_shortpath"
20320
20321  input_path="$input_to_shortpath"
20322  # Check if we need to convert this using DOS-style short mode. If the path
20323  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20324  # take no chances and rewrite it.
20325  # Note: m4 eats our [], so we need to use [ and ] instead.
20326  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20327  if test "x$has_forbidden_chars" != x; then
20328    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20329    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20330    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20331    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20332      # Going to short mode and back again did indeed matter. Since short mode is
20333      # case insensitive, let's make it lowercase to improve readability.
20334      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20335      # Now convert it back to Unix-style (cygpath)
20336      input_path=`$CYGPATH -u "$shortmode_path"`
20337      new_path="$input_path"
20338    fi
20339  fi
20340
20341  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20342  if test "x$test_cygdrive_prefix" = x; then
20343    # As a simple fix, exclude /usr/bin since it's not a real path.
20344    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20345      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20346      # a path prefixed by /cygdrive for fixpath to work.
20347      new_path="$CYGWIN_ROOT_PATH$input_path"
20348    fi
20349  fi
20350
20351  # remove trailing .exe if any
20352  new_path="${new_path/%.exe/}"
20353
20354    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20355
20356  # First separate the path from the arguments. This will split at the first
20357  # space.
20358  complete="$FOUND_MAKE"
20359  path="${complete%% *}"
20360  tmp="$complete EOL"
20361  arguments="${tmp#* }"
20362
20363  # Input might be given as Windows format, start by converting to
20364  # unix format.
20365  new_path="$path"
20366
20367  windows_path="$new_path"
20368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20369    unix_path=`$CYGPATH -u "$windows_path"`
20370    new_path="$unix_path"
20371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20372    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20373    new_path="$unix_path"
20374  fi
20375
20376
20377  # Now try to locate executable using which
20378  new_path=`$WHICH "$new_path" 2> /dev/null`
20379
20380  if test "x$new_path" = x; then
20381    # Oops. Which didn't find the executable.
20382    # The splitting of arguments from the executable at a space might have been incorrect,
20383    # since paths with space are more likely in Windows. Give it another try with the whole
20384    # argument.
20385    path="$complete"
20386    arguments="EOL"
20387    new_path="$path"
20388
20389  windows_path="$new_path"
20390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20391    unix_path=`$CYGPATH -u "$windows_path"`
20392    new_path="$unix_path"
20393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20395    new_path="$unix_path"
20396  fi
20397
20398
20399    new_path=`$WHICH "$new_path" 2> /dev/null`
20400    # bat and cmd files are not always considered executable in MSYS causing which
20401    # to not find them
20402    if test "x$new_path" = x \
20403        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20404        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20405      new_path="$path"
20406
20407  windows_path="$new_path"
20408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20409    unix_path=`$CYGPATH -u "$windows_path"`
20410    new_path="$unix_path"
20411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20413    new_path="$unix_path"
20414  fi
20415
20416    fi
20417
20418    if test "x$new_path" = x; then
20419      # It's still not found. Now this is an unrecoverable error.
20420      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20421$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20422      has_space=`$ECHO "$complete" | $GREP " "`
20423      if test "x$has_space" != x; then
20424        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20425$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20426      fi
20427      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20428    fi
20429  fi
20430
20431  # Now new_path has a complete unix path to the binary
20432  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20433    # Keep paths in /bin as-is, but remove trailing .exe if any
20434    new_path="${new_path/%.exe/}"
20435    # Do not save /bin paths to all_fixpath_prefixes!
20436  else
20437    # Not in mixed or Windows style, start by that.
20438    new_path=`cmd //c echo $new_path`
20439
20440  input_path="$new_path"
20441  # Check if we need to convert this using DOS-style short mode. If the path
20442  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20443  # take no chances and rewrite it.
20444  # Note: m4 eats our [], so we need to use [ and ] instead.
20445  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20446  if test "x$has_forbidden_chars" != x; then
20447    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20448    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20449  fi
20450
20451    # Output is in $new_path
20452
20453  windows_path="$new_path"
20454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20455    unix_path=`$CYGPATH -u "$windows_path"`
20456    new_path="$unix_path"
20457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20459    new_path="$unix_path"
20460  fi
20461
20462    # remove trailing .exe if any
20463    new_path="${new_path/%.exe/}"
20464
20465    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20466    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20467  fi
20468
20469    else
20470      # We're on a unix platform. Hooray! :)
20471      # First separate the path from the arguments. This will split at the first
20472      # space.
20473      complete="$FOUND_MAKE"
20474      path="${complete%% *}"
20475      tmp="$complete EOL"
20476      arguments="${tmp#* }"
20477
20478      # Cannot rely on the command "which" here since it doesn't always work.
20479      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20480      if test -z "$is_absolute_path"; then
20481        # Path to executable is not absolute. Find it.
20482        IFS_save="$IFS"
20483        IFS=:
20484        for p in $PATH; do
20485          if test -f "$p/$path" && test -x "$p/$path"; then
20486            new_path="$p/$path"
20487            break
20488          fi
20489        done
20490        IFS="$IFS_save"
20491      else
20492        # This is an absolute path, we can use it without further modifications.
20493        new_path="$path"
20494      fi
20495
20496      if test "x$new_path" = x; then
20497        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20498$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20499        has_space=`$ECHO "$complete" | $GREP " "`
20500        if test "x$has_space" != x; then
20501          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20502$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20503        fi
20504        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20505      fi
20506    fi
20507
20508    # Now join together the path and the arguments once again
20509    if test "x$arguments" != xEOL; then
20510      new_complete="$new_path ${arguments% *}"
20511    else
20512      new_complete="$new_path"
20513    fi
20514
20515    if test "x$complete" != "x$new_complete"; then
20516      FOUND_MAKE="$new_complete"
20517      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20518$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20519    fi
20520  fi
20521
20522        fi
20523      fi
20524    fi
20525  fi
20526
20527        if test "x$FOUND_MAKE" = x; then
20528          for ac_prog in make
20529do
20530  # Extract the first word of "$ac_prog", so it can be a program name with args.
20531set dummy $ac_prog; ac_word=$2
20532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20533$as_echo_n "checking for $ac_word... " >&6; }
20534if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20535  $as_echo_n "(cached) " >&6
20536else
20537  case $CHECK_TOOLSDIR_MAKE in
20538  [\\/]* | ?:[\\/]*)
20539  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20540  ;;
20541  *)
20542  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20543for as_dir in $PATH
20544do
20545  IFS=$as_save_IFS
20546  test -z "$as_dir" && as_dir=.
20547    for ac_exec_ext in '' $ac_executable_extensions; do
20548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20549    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20551    break 2
20552  fi
20553done
20554  done
20555IFS=$as_save_IFS
20556
20557  ;;
20558esac
20559fi
20560CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20561if test -n "$CHECK_TOOLSDIR_MAKE"; then
20562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20563$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20564else
20565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20566$as_echo "no" >&6; }
20567fi
20568
20569
20570  test -n "$CHECK_TOOLSDIR_MAKE" && break
20571done
20572
20573
20574  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20575  DESCRIPTION="make in tools-dir"
20576
20577  # On Cygwin, we require a newer version of make than on other platforms
20578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20579    MAKE_VERSION_EXPR="-e 4\."
20580    MAKE_REQUIRED_VERSION="4.0"
20581   else
20582    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20583    MAKE_REQUIRED_VERSION="3.81"
20584  fi
20585
20586  if test "x$MAKE_CANDIDATE" != x; then
20587    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20588$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20589    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20590    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20591    if test "x$IS_GNU_MAKE" = x; then
20592      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20593$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20594    else
20595      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20596      if test "x$IS_MODERN_MAKE" = x; then
20597        { $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
20598$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;}
20599      else
20600        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20601          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20602            MAKE_EXPECTED_ENV='cygwin'
20603          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20604            MAKE_EXPECTED_ENV='msys'
20605          else
20606            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20607          fi
20608          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20609          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20610        else
20611          # Not relevant for non-Windows
20612          IS_MAKE_CORRECT_ENV=true
20613        fi
20614        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20615          { $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
20616$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;}
20617        else
20618          FOUND_MAKE=$MAKE_CANDIDATE
20619
20620  # Only process if variable expands to non-empty
20621
20622  if test "x$FOUND_MAKE" != x; then
20623    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20624
20625  # First separate the path from the arguments. This will split at the first
20626  # space.
20627  complete="$FOUND_MAKE"
20628  path="${complete%% *}"
20629  tmp="$complete EOL"
20630  arguments="${tmp#* }"
20631
20632  # Input might be given as Windows format, start by converting to
20633  # unix format.
20634  new_path=`$CYGPATH -u "$path"`
20635
20636  # Now try to locate executable using which
20637  new_path=`$WHICH "$new_path" 2> /dev/null`
20638  # bat and cmd files are not always considered executable in cygwin causing which
20639  # to not find them
20640  if test "x$new_path" = x \
20641      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20642      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20643    new_path=`$CYGPATH -u "$path"`
20644  fi
20645  if test "x$new_path" = x; then
20646    # Oops. Which didn't find the executable.
20647    # The splitting of arguments from the executable at a space might have been incorrect,
20648    # since paths with space are more likely in Windows. Give it another try with the whole
20649    # argument.
20650    path="$complete"
20651    arguments="EOL"
20652    new_path=`$CYGPATH -u "$path"`
20653    new_path=`$WHICH "$new_path" 2> /dev/null`
20654    # bat and cmd files are not always considered executable in cygwin causing which
20655    # to not find them
20656    if test "x$new_path" = x \
20657        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20658        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20659      new_path=`$CYGPATH -u "$path"`
20660    fi
20661    if test "x$new_path" = x; then
20662      # It's still not found. Now this is an unrecoverable error.
20663      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20664$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20665      has_space=`$ECHO "$complete" | $GREP " "`
20666      if test "x$has_space" != x; then
20667        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20668$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20669      fi
20670      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20671    fi
20672  fi
20673
20674  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20675  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20676  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20677  # "foo.exe" is OK but "foo" is an error.
20678  #
20679  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20680  # It is also a way to make sure we got the proper file name for the real test later on.
20681  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20682  if test "x$test_shortpath" = x; then
20683    # Short path failed, file does not exist as specified.
20684    # Try adding .exe or .cmd
20685    if test -f "${new_path}.exe"; then
20686      input_to_shortpath="${new_path}.exe"
20687    elif test -f "${new_path}.cmd"; then
20688      input_to_shortpath="${new_path}.cmd"
20689    else
20690      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20691$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20692      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20693$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20694      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20695    fi
20696  else
20697    input_to_shortpath="$new_path"
20698  fi
20699
20700  # Call helper function which possibly converts this using DOS-style short mode.
20701  # If so, the updated path is stored in $new_path.
20702  new_path="$input_to_shortpath"
20703
20704  input_path="$input_to_shortpath"
20705  # Check if we need to convert this using DOS-style short mode. If the path
20706  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20707  # take no chances and rewrite it.
20708  # Note: m4 eats our [], so we need to use [ and ] instead.
20709  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20710  if test "x$has_forbidden_chars" != x; then
20711    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20712    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20713    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20714    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20715      # Going to short mode and back again did indeed matter. Since short mode is
20716      # case insensitive, let's make it lowercase to improve readability.
20717      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20718      # Now convert it back to Unix-style (cygpath)
20719      input_path=`$CYGPATH -u "$shortmode_path"`
20720      new_path="$input_path"
20721    fi
20722  fi
20723
20724  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20725  if test "x$test_cygdrive_prefix" = x; then
20726    # As a simple fix, exclude /usr/bin since it's not a real path.
20727    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20728      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20729      # a path prefixed by /cygdrive for fixpath to work.
20730      new_path="$CYGWIN_ROOT_PATH$input_path"
20731    fi
20732  fi
20733
20734  # remove trailing .exe if any
20735  new_path="${new_path/%.exe/}"
20736
20737    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20738
20739  # First separate the path from the arguments. This will split at the first
20740  # space.
20741  complete="$FOUND_MAKE"
20742  path="${complete%% *}"
20743  tmp="$complete EOL"
20744  arguments="${tmp#* }"
20745
20746  # Input might be given as Windows format, start by converting to
20747  # unix format.
20748  new_path="$path"
20749
20750  windows_path="$new_path"
20751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20752    unix_path=`$CYGPATH -u "$windows_path"`
20753    new_path="$unix_path"
20754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20755    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20756    new_path="$unix_path"
20757  fi
20758
20759
20760  # Now try to locate executable using which
20761  new_path=`$WHICH "$new_path" 2> /dev/null`
20762
20763  if test "x$new_path" = x; then
20764    # Oops. Which didn't find the executable.
20765    # The splitting of arguments from the executable at a space might have been incorrect,
20766    # since paths with space are more likely in Windows. Give it another try with the whole
20767    # argument.
20768    path="$complete"
20769    arguments="EOL"
20770    new_path="$path"
20771
20772  windows_path="$new_path"
20773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20774    unix_path=`$CYGPATH -u "$windows_path"`
20775    new_path="$unix_path"
20776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20777    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20778    new_path="$unix_path"
20779  fi
20780
20781
20782    new_path=`$WHICH "$new_path" 2> /dev/null`
20783    # bat and cmd files are not always considered executable in MSYS causing which
20784    # to not find them
20785    if test "x$new_path" = x \
20786        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20787        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20788      new_path="$path"
20789
20790  windows_path="$new_path"
20791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20792    unix_path=`$CYGPATH -u "$windows_path"`
20793    new_path="$unix_path"
20794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20795    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20796    new_path="$unix_path"
20797  fi
20798
20799    fi
20800
20801    if test "x$new_path" = x; then
20802      # It's still not found. Now this is an unrecoverable error.
20803      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20804$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20805      has_space=`$ECHO "$complete" | $GREP " "`
20806      if test "x$has_space" != x; then
20807        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20808$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20809      fi
20810      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20811    fi
20812  fi
20813
20814  # Now new_path has a complete unix path to the binary
20815  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20816    # Keep paths in /bin as-is, but remove trailing .exe if any
20817    new_path="${new_path/%.exe/}"
20818    # Do not save /bin paths to all_fixpath_prefixes!
20819  else
20820    # Not in mixed or Windows style, start by that.
20821    new_path=`cmd //c echo $new_path`
20822
20823  input_path="$new_path"
20824  # Check if we need to convert this using DOS-style short mode. If the path
20825  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20826  # take no chances and rewrite it.
20827  # Note: m4 eats our [], so we need to use [ and ] instead.
20828  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20829  if test "x$has_forbidden_chars" != x; then
20830    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20831    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20832  fi
20833
20834    # Output is in $new_path
20835
20836  windows_path="$new_path"
20837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20838    unix_path=`$CYGPATH -u "$windows_path"`
20839    new_path="$unix_path"
20840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20841    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20842    new_path="$unix_path"
20843  fi
20844
20845    # remove trailing .exe if any
20846    new_path="${new_path/%.exe/}"
20847
20848    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20849    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20850  fi
20851
20852    else
20853      # We're on a unix platform. Hooray! :)
20854      # First separate the path from the arguments. This will split at the first
20855      # space.
20856      complete="$FOUND_MAKE"
20857      path="${complete%% *}"
20858      tmp="$complete EOL"
20859      arguments="${tmp#* }"
20860
20861      # Cannot rely on the command "which" here since it doesn't always work.
20862      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20863      if test -z "$is_absolute_path"; then
20864        # Path to executable is not absolute. Find it.
20865        IFS_save="$IFS"
20866        IFS=:
20867        for p in $PATH; do
20868          if test -f "$p/$path" && test -x "$p/$path"; then
20869            new_path="$p/$path"
20870            break
20871          fi
20872        done
20873        IFS="$IFS_save"
20874      else
20875        # This is an absolute path, we can use it without further modifications.
20876        new_path="$path"
20877      fi
20878
20879      if test "x$new_path" = x; then
20880        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20881$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20882        has_space=`$ECHO "$complete" | $GREP " "`
20883        if test "x$has_space" != x; then
20884          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20885$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20886        fi
20887        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20888      fi
20889    fi
20890
20891    # Now join together the path and the arguments once again
20892    if test "x$arguments" != xEOL; then
20893      new_complete="$new_path ${arguments% *}"
20894    else
20895      new_complete="$new_path"
20896    fi
20897
20898    if test "x$complete" != "x$new_complete"; then
20899      FOUND_MAKE="$new_complete"
20900      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20901$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20902    fi
20903  fi
20904
20905        fi
20906      fi
20907    fi
20908  fi
20909
20910        fi
20911        PATH=$OLD_PATH
20912      fi
20913    fi
20914
20915    if test "x$FOUND_MAKE" = x; then
20916      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
20917    fi
20918
20919    else
20920      # If it succeeded, then it was overridden by the user. We will use it
20921      # for the tool.
20922
20923      # First remove it from the list of overridden variables, so we can test
20924      # for unknown variables in the end.
20925      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20926
20927      # Check if we try to supply an empty value
20928      if test "x$MAKE" = x; then
20929        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20930$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20931        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20932$as_echo_n "checking for MAKE... " >&6; }
20933        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20934$as_echo "disabled" >&6; }
20935      else
20936        # Check if the provided tool contains a complete path.
20937        tool_specified="$MAKE"
20938        tool_basename="${tool_specified##*/}"
20939        if test "x$tool_basename" = "x$tool_specified"; then
20940          # A command without a complete path is provided, search $PATH.
20941          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20942$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20943          # Extract the first word of "$tool_basename", so it can be a program name with args.
20944set dummy $tool_basename; ac_word=$2
20945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20946$as_echo_n "checking for $ac_word... " >&6; }
20947if ${ac_cv_path_MAKE+:} false; then :
20948  $as_echo_n "(cached) " >&6
20949else
20950  case $MAKE in
20951  [\\/]* | ?:[\\/]*)
20952  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20953  ;;
20954  *)
20955  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20956for as_dir in $PATH
20957do
20958  IFS=$as_save_IFS
20959  test -z "$as_dir" && as_dir=.
20960    for ac_exec_ext in '' $ac_executable_extensions; do
20961  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20962    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20964    break 2
20965  fi
20966done
20967  done
20968IFS=$as_save_IFS
20969
20970  ;;
20971esac
20972fi
20973MAKE=$ac_cv_path_MAKE
20974if test -n "$MAKE"; then
20975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20976$as_echo "$MAKE" >&6; }
20977else
20978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20979$as_echo "no" >&6; }
20980fi
20981
20982
20983          if test "x$MAKE" = x; then
20984            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20985          fi
20986        else
20987          # Otherwise we believe it is a complete path. Use it as it is.
20988          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20989$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20990          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20991$as_echo_n "checking for MAKE... " >&6; }
20992          if test ! -x "$tool_specified"; then
20993            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20994$as_echo "not found" >&6; }
20995            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20996          fi
20997          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20998$as_echo "$tool_specified" >&6; }
20999        fi
21000      fi
21001    fi
21002
21003    # If MAKE was set by user, verify the version
21004
21005  MAKE_CANDIDATE=""$MAKE""
21006  DESCRIPTION="user supplied MAKE=$MAKE"
21007
21008  # On Cygwin, we require a newer version of make than on other platforms
21009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21010    MAKE_VERSION_EXPR="-e 4\."
21011    MAKE_REQUIRED_VERSION="4.0"
21012   else
21013    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
21014    MAKE_REQUIRED_VERSION="3.81"
21015  fi
21016
21017  if test "x$MAKE_CANDIDATE" != x; then
21018    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
21019$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
21020    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
21021    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
21022    if test "x$IS_GNU_MAKE" = x; then
21023      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
21024$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
21025    else
21026      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
21027      if test "x$IS_MODERN_MAKE" = x; then
21028        { $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
21029$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;}
21030      else
21031        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
21032          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21033            MAKE_EXPECTED_ENV='cygwin'
21034          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21035            MAKE_EXPECTED_ENV='msys'
21036          else
21037            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
21038          fi
21039          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
21040          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
21041        else
21042          # Not relevant for non-Windows
21043          IS_MAKE_CORRECT_ENV=true
21044        fi
21045        if test "x$IS_MAKE_CORRECT_ENV" = x; then
21046          { $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
21047$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;}
21048        else
21049          FOUND_MAKE=$MAKE_CANDIDATE
21050
21051  # Only process if variable expands to non-empty
21052
21053  if test "x$FOUND_MAKE" != x; then
21054    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21055
21056  # First separate the path from the arguments. This will split at the first
21057  # space.
21058  complete="$FOUND_MAKE"
21059  path="${complete%% *}"
21060  tmp="$complete EOL"
21061  arguments="${tmp#* }"
21062
21063  # Input might be given as Windows format, start by converting to
21064  # unix format.
21065  new_path=`$CYGPATH -u "$path"`
21066
21067  # Now try to locate executable using which
21068  new_path=`$WHICH "$new_path" 2> /dev/null`
21069  # bat and cmd files are not always considered executable in cygwin causing which
21070  # to not find them
21071  if test "x$new_path" = x \
21072      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21073      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21074    new_path=`$CYGPATH -u "$path"`
21075  fi
21076  if test "x$new_path" = x; then
21077    # Oops. Which didn't find the executable.
21078    # The splitting of arguments from the executable at a space might have been incorrect,
21079    # since paths with space are more likely in Windows. Give it another try with the whole
21080    # argument.
21081    path="$complete"
21082    arguments="EOL"
21083    new_path=`$CYGPATH -u "$path"`
21084    new_path=`$WHICH "$new_path" 2> /dev/null`
21085    # bat and cmd files are not always considered executable in cygwin causing which
21086    # to not find them
21087    if test "x$new_path" = x \
21088        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21089        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21090      new_path=`$CYGPATH -u "$path"`
21091    fi
21092    if test "x$new_path" = x; then
21093      # It's still not found. Now this is an unrecoverable error.
21094      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21095$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21096      has_space=`$ECHO "$complete" | $GREP " "`
21097      if test "x$has_space" != x; then
21098        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21099$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21100      fi
21101      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21102    fi
21103  fi
21104
21105  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21106  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21107  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21108  # "foo.exe" is OK but "foo" is an error.
21109  #
21110  # This test is therefore slightly more accurate than "test -f" to check for file presence.
21111  # It is also a way to make sure we got the proper file name for the real test later on.
21112  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21113  if test "x$test_shortpath" = x; then
21114    # Short path failed, file does not exist as specified.
21115    # Try adding .exe or .cmd
21116    if test -f "${new_path}.exe"; then
21117      input_to_shortpath="${new_path}.exe"
21118    elif test -f "${new_path}.cmd"; then
21119      input_to_shortpath="${new_path}.cmd"
21120    else
21121      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
21122$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
21123      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21124$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21125      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21126    fi
21127  else
21128    input_to_shortpath="$new_path"
21129  fi
21130
21131  # Call helper function which possibly converts this using DOS-style short mode.
21132  # If so, the updated path is stored in $new_path.
21133  new_path="$input_to_shortpath"
21134
21135  input_path="$input_to_shortpath"
21136  # Check if we need to convert this using DOS-style short mode. If the path
21137  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21138  # take no chances and rewrite it.
21139  # Note: m4 eats our [], so we need to use [ and ] instead.
21140  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21141  if test "x$has_forbidden_chars" != x; then
21142    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21143    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21144    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21145    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21146      # Going to short mode and back again did indeed matter. Since short mode is
21147      # case insensitive, let's make it lowercase to improve readability.
21148      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21149      # Now convert it back to Unix-style (cygpath)
21150      input_path=`$CYGPATH -u "$shortmode_path"`
21151      new_path="$input_path"
21152    fi
21153  fi
21154
21155  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21156  if test "x$test_cygdrive_prefix" = x; then
21157    # As a simple fix, exclude /usr/bin since it's not a real path.
21158    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21159      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21160      # a path prefixed by /cygdrive for fixpath to work.
21161      new_path="$CYGWIN_ROOT_PATH$input_path"
21162    fi
21163  fi
21164
21165  # remove trailing .exe if any
21166  new_path="${new_path/%.exe/}"
21167
21168    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21169
21170  # First separate the path from the arguments. This will split at the first
21171  # space.
21172  complete="$FOUND_MAKE"
21173  path="${complete%% *}"
21174  tmp="$complete EOL"
21175  arguments="${tmp#* }"
21176
21177  # Input might be given as Windows format, start by converting to
21178  # unix format.
21179  new_path="$path"
21180
21181  windows_path="$new_path"
21182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21183    unix_path=`$CYGPATH -u "$windows_path"`
21184    new_path="$unix_path"
21185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21186    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21187    new_path="$unix_path"
21188  fi
21189
21190
21191  # Now try to locate executable using which
21192  new_path=`$WHICH "$new_path" 2> /dev/null`
21193
21194  if test "x$new_path" = x; then
21195    # Oops. Which didn't find the executable.
21196    # The splitting of arguments from the executable at a space might have been incorrect,
21197    # since paths with space are more likely in Windows. Give it another try with the whole
21198    # argument.
21199    path="$complete"
21200    arguments="EOL"
21201    new_path="$path"
21202
21203  windows_path="$new_path"
21204  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21205    unix_path=`$CYGPATH -u "$windows_path"`
21206    new_path="$unix_path"
21207  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21208    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21209    new_path="$unix_path"
21210  fi
21211
21212
21213    new_path=`$WHICH "$new_path" 2> /dev/null`
21214    # bat and cmd files are not always considered executable in MSYS causing which
21215    # to not find them
21216    if test "x$new_path" = x \
21217        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21218        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21219      new_path="$path"
21220
21221  windows_path="$new_path"
21222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21223    unix_path=`$CYGPATH -u "$windows_path"`
21224    new_path="$unix_path"
21225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21226    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21227    new_path="$unix_path"
21228  fi
21229
21230    fi
21231
21232    if test "x$new_path" = x; then
21233      # It's still not found. Now this is an unrecoverable error.
21234      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21235$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21236      has_space=`$ECHO "$complete" | $GREP " "`
21237      if test "x$has_space" != x; then
21238        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21239$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21240      fi
21241      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21242    fi
21243  fi
21244
21245  # Now new_path has a complete unix path to the binary
21246  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21247    # Keep paths in /bin as-is, but remove trailing .exe if any
21248    new_path="${new_path/%.exe/}"
21249    # Do not save /bin paths to all_fixpath_prefixes!
21250  else
21251    # Not in mixed or Windows style, start by that.
21252    new_path=`cmd //c echo $new_path`
21253
21254  input_path="$new_path"
21255  # Check if we need to convert this using DOS-style short mode. If the path
21256  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21257  # take no chances and rewrite it.
21258  # Note: m4 eats our [], so we need to use [ and ] instead.
21259  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21260  if test "x$has_forbidden_chars" != x; then
21261    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21262    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21263  fi
21264
21265    # Output is in $new_path
21266
21267  windows_path="$new_path"
21268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21269    unix_path=`$CYGPATH -u "$windows_path"`
21270    new_path="$unix_path"
21271  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21272    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21273    new_path="$unix_path"
21274  fi
21275
21276    # remove trailing .exe if any
21277    new_path="${new_path/%.exe/}"
21278
21279    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21280    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21281  fi
21282
21283    else
21284      # We're on a unix platform. Hooray! :)
21285      # First separate the path from the arguments. This will split at the first
21286      # space.
21287      complete="$FOUND_MAKE"
21288      path="${complete%% *}"
21289      tmp="$complete EOL"
21290      arguments="${tmp#* }"
21291
21292      # Cannot rely on the command "which" here since it doesn't always work.
21293      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21294      if test -z "$is_absolute_path"; then
21295        # Path to executable is not absolute. Find it.
21296        IFS_save="$IFS"
21297        IFS=:
21298        for p in $PATH; do
21299          if test -f "$p/$path" && test -x "$p/$path"; then
21300            new_path="$p/$path"
21301            break
21302          fi
21303        done
21304        IFS="$IFS_save"
21305      else
21306        # This is an absolute path, we can use it without further modifications.
21307        new_path="$path"
21308      fi
21309
21310      if test "x$new_path" = x; then
21311        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21312$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21313        has_space=`$ECHO "$complete" | $GREP " "`
21314        if test "x$has_space" != x; then
21315          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21316$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21317        fi
21318        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21319      fi
21320    fi
21321
21322    # Now join together the path and the arguments once again
21323    if test "x$arguments" != xEOL; then
21324      new_complete="$new_path ${arguments% *}"
21325    else
21326      new_complete="$new_path"
21327    fi
21328
21329    if test "x$complete" != "x$new_complete"; then
21330      FOUND_MAKE="$new_complete"
21331      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21332$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21333    fi
21334  fi
21335
21336        fi
21337      fi
21338    fi
21339  fi
21340
21341    if test "x$FOUND_MAKE" = x; then
21342      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21343    fi
21344
21345  fi
21346
21347
21348  MAKE=$FOUND_MAKE
21349
21350  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21351$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21352
21353
21354  # Check if make supports the output sync option and if so, setup using it.
21355  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21356$as_echo_n "checking if make --output-sync is supported... " >&6; }
21357  if $MAKE --version -O > /dev/null 2>&1; then
21358    OUTPUT_SYNC_SUPPORTED=true
21359    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21360$as_echo "yes" >&6; }
21361    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21362$as_echo_n "checking for output-sync value... " >&6; }
21363
21364# Check whether --with-output-sync was given.
21365if test "${with_output_sync+set}" = set; then :
21366  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21367fi
21368
21369    if test "x$OUTPUT_SYNC" = "x"; then
21370      OUTPUT_SYNC=none
21371    fi
21372    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21373$as_echo "$OUTPUT_SYNC" >&6; }
21374    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21375      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21376    fi
21377  else
21378    OUTPUT_SYNC_SUPPORTED=false
21379    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21380$as_echo "no" >&6; }
21381  fi
21382
21383
21384
21385
21386
21387
21388  # Test if find supports -delete
21389  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21390$as_echo_n "checking if find supports -delete... " >&6; }
21391  FIND_DELETE="-delete"
21392
21393  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21394
21395  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21396
21397  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21398  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21399    # No, it does not.
21400    $RM $DELETEDIR/TestIfFindSupportsDelete
21401    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21402      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21403      FIND_DELETE="-print | $XARGS $RM"
21404    else
21405      FIND_DELETE="-exec $RM \{\} \+"
21406    fi
21407    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21408$as_echo "no" >&6; }
21409  else
21410    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21411$as_echo "yes" >&6; }
21412  fi
21413  $RMDIR $DELETEDIR
21414
21415
21416
21417  # Test which kind of tar was found
21418  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21419    TAR_TYPE="gnu"
21420  elif test "x$($TAR --version | $GREP "bsdtar")" != "x"; then
21421    TAR_TYPE="bsd"
21422  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21423    TAR_TYPE="bsd"
21424  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21425    TAR_TYPE="solaris"
21426  fi
21427  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21428$as_echo_n "checking what type of tar was found... " >&6; }
21429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21430$as_echo "$TAR_TYPE" >&6; }
21431
21432  TAR_CREATE_FILE_PARAM=""
21433
21434  if test "x$TAR_TYPE" = "xgnu"; then
21435    TAR_INCLUDE_PARAM="T"
21436    TAR_SUPPORTS_TRANSFORM="true"
21437    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21438      # When using gnu tar for Solaris targets, need to use compatibility mode
21439      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21440    fi
21441  else
21442    TAR_INCLUDE_PARAM="I"
21443    TAR_SUPPORTS_TRANSFORM="false"
21444  fi
21445
21446
21447
21448
21449
21450
21451  # Test that grep supports -Fx with a list of pattern which includes null pattern.
21452  # This is a problem for the grep resident on AIX.
21453  { $as_echo "$as_me:${as_lineno-$LINENO}: checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly" >&5
21454$as_echo_n "checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly... " >&6; }
21455  # Multiple subsequent spaces..
21456  STACK_SPACES='aaa   bbb   ccc'
21457  # ..converted to subsequent newlines, causes STACK_LIST to be a list with some empty
21458  # patterns in it.
21459  STACK_LIST=${STACK_SPACES// /$'\n'}
21460  NEEDLE_SPACES='ccc bbb aaa'
21461  NEEDLE_LIST=${NEEDLE_SPACES// /$'\n'}
21462  RESULT="$($GREP -Fvx "$STACK_LIST" <<< "$NEEDLE_LIST")"
21463  if test "x$RESULT" == "x"; then
21464    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21465$as_echo "yes" >&6; }
21466  else
21467    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21468      ADDINFO="Please make sure you use GNU grep, usually found at /opt/freeware/bin."
21469    fi
21470    as_fn_error $? "grep does not handle -Fx correctly. ${ADDINFO}" "$LINENO" 5
21471  fi
21472
21473
21474  # These tools might not be installed by default,
21475  # need hint on how to install them.
21476
21477
21478
21479  # Publish this variable in the help.
21480
21481
21482  if [ -z "${UNZIP+x}" ]; then
21483    # The variable is not set by user, try to locate tool using the code snippet
21484    for ac_prog in unzip
21485do
21486  # Extract the first word of "$ac_prog", so it can be a program name with args.
21487set dummy $ac_prog; ac_word=$2
21488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21489$as_echo_n "checking for $ac_word... " >&6; }
21490if ${ac_cv_path_UNZIP+:} false; then :
21491  $as_echo_n "(cached) " >&6
21492else
21493  case $UNZIP in
21494  [\\/]* | ?:[\\/]*)
21495  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21496  ;;
21497  *)
21498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21499for as_dir in $PATH
21500do
21501  IFS=$as_save_IFS
21502  test -z "$as_dir" && as_dir=.
21503    for ac_exec_ext in '' $ac_executable_extensions; do
21504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21505    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21507    break 2
21508  fi
21509done
21510  done
21511IFS=$as_save_IFS
21512
21513  ;;
21514esac
21515fi
21516UNZIP=$ac_cv_path_UNZIP
21517if test -n "$UNZIP"; then
21518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21519$as_echo "$UNZIP" >&6; }
21520else
21521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21522$as_echo "no" >&6; }
21523fi
21524
21525
21526  test -n "$UNZIP" && break
21527done
21528
21529  else
21530    # The variable is set, but is it from the command line or the environment?
21531
21532    # Try to remove the string !UNZIP! from our list.
21533    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21534    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21535      # If it failed, the variable was not from the command line. Ignore it,
21536      # but warn the user (except for BASH, which is always set by the calling BASH).
21537      if test "xUNZIP" != xBASH; then
21538        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21539$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21540      fi
21541      # Try to locate tool using the code snippet
21542      for ac_prog in unzip
21543do
21544  # Extract the first word of "$ac_prog", so it can be a program name with args.
21545set dummy $ac_prog; ac_word=$2
21546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21547$as_echo_n "checking for $ac_word... " >&6; }
21548if ${ac_cv_path_UNZIP+:} false; then :
21549  $as_echo_n "(cached) " >&6
21550else
21551  case $UNZIP in
21552  [\\/]* | ?:[\\/]*)
21553  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21554  ;;
21555  *)
21556  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21557for as_dir in $PATH
21558do
21559  IFS=$as_save_IFS
21560  test -z "$as_dir" && as_dir=.
21561    for ac_exec_ext in '' $ac_executable_extensions; do
21562  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21563    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21564    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21565    break 2
21566  fi
21567done
21568  done
21569IFS=$as_save_IFS
21570
21571  ;;
21572esac
21573fi
21574UNZIP=$ac_cv_path_UNZIP
21575if test -n "$UNZIP"; then
21576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21577$as_echo "$UNZIP" >&6; }
21578else
21579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21580$as_echo "no" >&6; }
21581fi
21582
21583
21584  test -n "$UNZIP" && break
21585done
21586
21587    else
21588      # If it succeeded, then it was overridden by the user. We will use it
21589      # for the tool.
21590
21591      # First remove it from the list of overridden variables, so we can test
21592      # for unknown variables in the end.
21593      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21594
21595      # Check if we try to supply an empty value
21596      if test "x$UNZIP" = x; then
21597        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21598$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21599        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21600$as_echo_n "checking for UNZIP... " >&6; }
21601        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21602$as_echo "disabled" >&6; }
21603      else
21604        # Check if the provided tool contains a complete path.
21605        tool_specified="$UNZIP"
21606        tool_basename="${tool_specified##*/}"
21607        if test "x$tool_basename" = "x$tool_specified"; then
21608          # A command without a complete path is provided, search $PATH.
21609          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21610$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21611          # Extract the first word of "$tool_basename", so it can be a program name with args.
21612set dummy $tool_basename; ac_word=$2
21613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21614$as_echo_n "checking for $ac_word... " >&6; }
21615if ${ac_cv_path_UNZIP+:} false; then :
21616  $as_echo_n "(cached) " >&6
21617else
21618  case $UNZIP in
21619  [\\/]* | ?:[\\/]*)
21620  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21621  ;;
21622  *)
21623  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21624for as_dir in $PATH
21625do
21626  IFS=$as_save_IFS
21627  test -z "$as_dir" && as_dir=.
21628    for ac_exec_ext in '' $ac_executable_extensions; do
21629  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21630    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21632    break 2
21633  fi
21634done
21635  done
21636IFS=$as_save_IFS
21637
21638  ;;
21639esac
21640fi
21641UNZIP=$ac_cv_path_UNZIP
21642if test -n "$UNZIP"; then
21643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21644$as_echo "$UNZIP" >&6; }
21645else
21646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21647$as_echo "no" >&6; }
21648fi
21649
21650
21651          if test "x$UNZIP" = x; then
21652            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21653          fi
21654        else
21655          # Otherwise we believe it is a complete path. Use it as it is.
21656          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21657$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21658          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21659$as_echo_n "checking for UNZIP... " >&6; }
21660          if test ! -x "$tool_specified"; then
21661            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21662$as_echo "not found" >&6; }
21663            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21664          fi
21665          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21666$as_echo "$tool_specified" >&6; }
21667        fi
21668      fi
21669    fi
21670
21671  fi
21672
21673
21674
21675  if test "x$UNZIP" = x; then
21676    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21677  fi
21678
21679
21680  # Since zip uses "ZIP" as a environment variable for passing options, we need
21681  # to name our variable differently, hence ZIPEXE.
21682
21683
21684
21685  # Publish this variable in the help.
21686
21687
21688  if [ -z "${ZIPEXE+x}" ]; then
21689    # The variable is not set by user, try to locate tool using the code snippet
21690    for ac_prog in zip
21691do
21692  # Extract the first word of "$ac_prog", so it can be a program name with args.
21693set dummy $ac_prog; ac_word=$2
21694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21695$as_echo_n "checking for $ac_word... " >&6; }
21696if ${ac_cv_path_ZIPEXE+:} false; then :
21697  $as_echo_n "(cached) " >&6
21698else
21699  case $ZIPEXE in
21700  [\\/]* | ?:[\\/]*)
21701  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21702  ;;
21703  *)
21704  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21705for as_dir in $PATH
21706do
21707  IFS=$as_save_IFS
21708  test -z "$as_dir" && as_dir=.
21709    for ac_exec_ext in '' $ac_executable_extensions; do
21710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21711    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21713    break 2
21714  fi
21715done
21716  done
21717IFS=$as_save_IFS
21718
21719  ;;
21720esac
21721fi
21722ZIPEXE=$ac_cv_path_ZIPEXE
21723if test -n "$ZIPEXE"; then
21724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21725$as_echo "$ZIPEXE" >&6; }
21726else
21727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21728$as_echo "no" >&6; }
21729fi
21730
21731
21732  test -n "$ZIPEXE" && break
21733done
21734
21735  else
21736    # The variable is set, but is it from the command line or the environment?
21737
21738    # Try to remove the string !ZIPEXE! from our list.
21739    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIPEXE!/}
21740    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21741      # If it failed, the variable was not from the command line. Ignore it,
21742      # but warn the user (except for BASH, which is always set by the calling BASH).
21743      if test "xZIPEXE" != xBASH; then
21744        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&5
21745$as_echo "$as_me: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&2;}
21746      fi
21747      # Try to locate tool using the code snippet
21748      for ac_prog in zip
21749do
21750  # Extract the first word of "$ac_prog", so it can be a program name with args.
21751set dummy $ac_prog; ac_word=$2
21752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21753$as_echo_n "checking for $ac_word... " >&6; }
21754if ${ac_cv_path_ZIPEXE+:} false; then :
21755  $as_echo_n "(cached) " >&6
21756else
21757  case $ZIPEXE in
21758  [\\/]* | ?:[\\/]*)
21759  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21760  ;;
21761  *)
21762  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21763for as_dir in $PATH
21764do
21765  IFS=$as_save_IFS
21766  test -z "$as_dir" && as_dir=.
21767    for ac_exec_ext in '' $ac_executable_extensions; do
21768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21769    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21771    break 2
21772  fi
21773done
21774  done
21775IFS=$as_save_IFS
21776
21777  ;;
21778esac
21779fi
21780ZIPEXE=$ac_cv_path_ZIPEXE
21781if test -n "$ZIPEXE"; then
21782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21783$as_echo "$ZIPEXE" >&6; }
21784else
21785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21786$as_echo "no" >&6; }
21787fi
21788
21789
21790  test -n "$ZIPEXE" && break
21791done
21792
21793    else
21794      # If it succeeded, then it was overridden by the user. We will use it
21795      # for the tool.
21796
21797      # First remove it from the list of overridden variables, so we can test
21798      # for unknown variables in the end.
21799      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21800
21801      # Check if we try to supply an empty value
21802      if test "x$ZIPEXE" = x; then
21803        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIPEXE= (no value)" >&5
21804$as_echo "$as_me: Setting user supplied tool ZIPEXE= (no value)" >&6;}
21805        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21806$as_echo_n "checking for ZIPEXE... " >&6; }
21807        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21808$as_echo "disabled" >&6; }
21809      else
21810        # Check if the provided tool contains a complete path.
21811        tool_specified="$ZIPEXE"
21812        tool_basename="${tool_specified##*/}"
21813        if test "x$tool_basename" = "x$tool_specified"; then
21814          # A command without a complete path is provided, search $PATH.
21815          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIPEXE=$tool_basename" >&5
21816$as_echo "$as_me: Will search for user supplied tool ZIPEXE=$tool_basename" >&6;}
21817          # Extract the first word of "$tool_basename", so it can be a program name with args.
21818set dummy $tool_basename; ac_word=$2
21819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21820$as_echo_n "checking for $ac_word... " >&6; }
21821if ${ac_cv_path_ZIPEXE+:} false; then :
21822  $as_echo_n "(cached) " >&6
21823else
21824  case $ZIPEXE in
21825  [\\/]* | ?:[\\/]*)
21826  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21827  ;;
21828  *)
21829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21830for as_dir in $PATH
21831do
21832  IFS=$as_save_IFS
21833  test -z "$as_dir" && as_dir=.
21834    for ac_exec_ext in '' $ac_executable_extensions; do
21835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21836    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21838    break 2
21839  fi
21840done
21841  done
21842IFS=$as_save_IFS
21843
21844  ;;
21845esac
21846fi
21847ZIPEXE=$ac_cv_path_ZIPEXE
21848if test -n "$ZIPEXE"; then
21849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21850$as_echo "$ZIPEXE" >&6; }
21851else
21852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21853$as_echo "no" >&6; }
21854fi
21855
21856
21857          if test "x$ZIPEXE" = x; then
21858            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21859          fi
21860        else
21861          # Otherwise we believe it is a complete path. Use it as it is.
21862          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIPEXE=$tool_specified" >&5
21863$as_echo "$as_me: Will use user supplied tool ZIPEXE=$tool_specified" >&6;}
21864          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21865$as_echo_n "checking for ZIPEXE... " >&6; }
21866          if test ! -x "$tool_specified"; then
21867            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21868$as_echo "not found" >&6; }
21869            as_fn_error $? "User supplied tool ZIPEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
21870          fi
21871          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21872$as_echo "$tool_specified" >&6; }
21873        fi
21874      fi
21875    fi
21876
21877  fi
21878
21879
21880
21881  if test "x$ZIPEXE" = x; then
21882    as_fn_error $? "Could not find required tool for ZIPEXE" "$LINENO" 5
21883  fi
21884
21885
21886
21887  # Non-required basic tools
21888
21889
21890
21891  # Publish this variable in the help.
21892
21893
21894  if [ -z "${LDD+x}" ]; then
21895    # The variable is not set by user, try to locate tool using the code snippet
21896    for ac_prog in ldd
21897do
21898  # Extract the first word of "$ac_prog", so it can be a program name with args.
21899set dummy $ac_prog; ac_word=$2
21900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21901$as_echo_n "checking for $ac_word... " >&6; }
21902if ${ac_cv_path_LDD+:} false; then :
21903  $as_echo_n "(cached) " >&6
21904else
21905  case $LDD in
21906  [\\/]* | ?:[\\/]*)
21907  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21908  ;;
21909  *)
21910  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21911for as_dir in $PATH
21912do
21913  IFS=$as_save_IFS
21914  test -z "$as_dir" && as_dir=.
21915    for ac_exec_ext in '' $ac_executable_extensions; do
21916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21917    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21919    break 2
21920  fi
21921done
21922  done
21923IFS=$as_save_IFS
21924
21925  ;;
21926esac
21927fi
21928LDD=$ac_cv_path_LDD
21929if test -n "$LDD"; then
21930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21931$as_echo "$LDD" >&6; }
21932else
21933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21934$as_echo "no" >&6; }
21935fi
21936
21937
21938  test -n "$LDD" && break
21939done
21940
21941  else
21942    # The variable is set, but is it from the command line or the environment?
21943
21944    # Try to remove the string !LDD! from our list.
21945    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21946    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21947      # If it failed, the variable was not from the command line. Ignore it,
21948      # but warn the user (except for BASH, which is always set by the calling BASH).
21949      if test "xLDD" != xBASH; then
21950        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21951$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21952      fi
21953      # Try to locate tool using the code snippet
21954      for ac_prog in ldd
21955do
21956  # Extract the first word of "$ac_prog", so it can be a program name with args.
21957set dummy $ac_prog; ac_word=$2
21958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21959$as_echo_n "checking for $ac_word... " >&6; }
21960if ${ac_cv_path_LDD+:} false; then :
21961  $as_echo_n "(cached) " >&6
21962else
21963  case $LDD in
21964  [\\/]* | ?:[\\/]*)
21965  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21966  ;;
21967  *)
21968  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21969for as_dir in $PATH
21970do
21971  IFS=$as_save_IFS
21972  test -z "$as_dir" && as_dir=.
21973    for ac_exec_ext in '' $ac_executable_extensions; do
21974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21975    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21977    break 2
21978  fi
21979done
21980  done
21981IFS=$as_save_IFS
21982
21983  ;;
21984esac
21985fi
21986LDD=$ac_cv_path_LDD
21987if test -n "$LDD"; then
21988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21989$as_echo "$LDD" >&6; }
21990else
21991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21992$as_echo "no" >&6; }
21993fi
21994
21995
21996  test -n "$LDD" && break
21997done
21998
21999    else
22000      # If it succeeded, then it was overridden by the user. We will use it
22001      # for the tool.
22002
22003      # First remove it from the list of overridden variables, so we can test
22004      # for unknown variables in the end.
22005      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22006
22007      # Check if we try to supply an empty value
22008      if test "x$LDD" = x; then
22009        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
22010$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
22011        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
22012$as_echo_n "checking for LDD... " >&6; }
22013        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22014$as_echo "disabled" >&6; }
22015      else
22016        # Check if the provided tool contains a complete path.
22017        tool_specified="$LDD"
22018        tool_basename="${tool_specified##*/}"
22019        if test "x$tool_basename" = "x$tool_specified"; then
22020          # A command without a complete path is provided, search $PATH.
22021          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
22022$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
22023          # Extract the first word of "$tool_basename", so it can be a program name with args.
22024set dummy $tool_basename; ac_word=$2
22025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22026$as_echo_n "checking for $ac_word... " >&6; }
22027if ${ac_cv_path_LDD+:} false; then :
22028  $as_echo_n "(cached) " >&6
22029else
22030  case $LDD in
22031  [\\/]* | ?:[\\/]*)
22032  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
22033  ;;
22034  *)
22035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22036for as_dir in $PATH
22037do
22038  IFS=$as_save_IFS
22039  test -z "$as_dir" && as_dir=.
22040    for ac_exec_ext in '' $ac_executable_extensions; do
22041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22042    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
22043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22044    break 2
22045  fi
22046done
22047  done
22048IFS=$as_save_IFS
22049
22050  ;;
22051esac
22052fi
22053LDD=$ac_cv_path_LDD
22054if test -n "$LDD"; then
22055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
22056$as_echo "$LDD" >&6; }
22057else
22058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22059$as_echo "no" >&6; }
22060fi
22061
22062
22063          if test "x$LDD" = x; then
22064            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22065          fi
22066        else
22067          # Otherwise we believe it is a complete path. Use it as it is.
22068          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
22069$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
22070          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
22071$as_echo_n "checking for LDD... " >&6; }
22072          if test ! -x "$tool_specified"; then
22073            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22074$as_echo "not found" >&6; }
22075            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
22076          fi
22077          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22078$as_echo "$tool_specified" >&6; }
22079        fi
22080      fi
22081    fi
22082
22083  fi
22084
22085
22086  if test "x$LDD" = "x"; then
22087    # List shared lib dependencies is used for
22088    # debug output and checking for forbidden dependencies.
22089    # We can build without it.
22090    LDD="true"
22091  fi
22092
22093
22094  # Publish this variable in the help.
22095
22096
22097  if [ -z "${OTOOL+x}" ]; then
22098    # The variable is not set by user, try to locate tool using the code snippet
22099    for ac_prog in otool
22100do
22101  # Extract the first word of "$ac_prog", so it can be a program name with args.
22102set dummy $ac_prog; ac_word=$2
22103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22104$as_echo_n "checking for $ac_word... " >&6; }
22105if ${ac_cv_path_OTOOL+:} false; then :
22106  $as_echo_n "(cached) " >&6
22107else
22108  case $OTOOL in
22109  [\\/]* | ?:[\\/]*)
22110  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22111  ;;
22112  *)
22113  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22114for as_dir in $PATH
22115do
22116  IFS=$as_save_IFS
22117  test -z "$as_dir" && as_dir=.
22118    for ac_exec_ext in '' $ac_executable_extensions; do
22119  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22120    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22121    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22122    break 2
22123  fi
22124done
22125  done
22126IFS=$as_save_IFS
22127
22128  ;;
22129esac
22130fi
22131OTOOL=$ac_cv_path_OTOOL
22132if test -n "$OTOOL"; then
22133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22134$as_echo "$OTOOL" >&6; }
22135else
22136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22137$as_echo "no" >&6; }
22138fi
22139
22140
22141  test -n "$OTOOL" && break
22142done
22143
22144  else
22145    # The variable is set, but is it from the command line or the environment?
22146
22147    # Try to remove the string !OTOOL! from our list.
22148    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
22149    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22150      # If it failed, the variable was not from the command line. Ignore it,
22151      # but warn the user (except for BASH, which is always set by the calling BASH).
22152      if test "xOTOOL" != xBASH; then
22153        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
22154$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
22155      fi
22156      # Try to locate tool using the code snippet
22157      for ac_prog in otool
22158do
22159  # Extract the first word of "$ac_prog", so it can be a program name with args.
22160set dummy $ac_prog; ac_word=$2
22161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22162$as_echo_n "checking for $ac_word... " >&6; }
22163if ${ac_cv_path_OTOOL+:} false; then :
22164  $as_echo_n "(cached) " >&6
22165else
22166  case $OTOOL in
22167  [\\/]* | ?:[\\/]*)
22168  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22169  ;;
22170  *)
22171  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22172for as_dir in $PATH
22173do
22174  IFS=$as_save_IFS
22175  test -z "$as_dir" && as_dir=.
22176    for ac_exec_ext in '' $ac_executable_extensions; do
22177  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22178    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22179    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22180    break 2
22181  fi
22182done
22183  done
22184IFS=$as_save_IFS
22185
22186  ;;
22187esac
22188fi
22189OTOOL=$ac_cv_path_OTOOL
22190if test -n "$OTOOL"; then
22191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22192$as_echo "$OTOOL" >&6; }
22193else
22194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22195$as_echo "no" >&6; }
22196fi
22197
22198
22199  test -n "$OTOOL" && break
22200done
22201
22202    else
22203      # If it succeeded, then it was overridden by the user. We will use it
22204      # for the tool.
22205
22206      # First remove it from the list of overridden variables, so we can test
22207      # for unknown variables in the end.
22208      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22209
22210      # Check if we try to supply an empty value
22211      if test "x$OTOOL" = x; then
22212        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
22213$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
22214        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22215$as_echo_n "checking for OTOOL... " >&6; }
22216        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22217$as_echo "disabled" >&6; }
22218      else
22219        # Check if the provided tool contains a complete path.
22220        tool_specified="$OTOOL"
22221        tool_basename="${tool_specified##*/}"
22222        if test "x$tool_basename" = "x$tool_specified"; then
22223          # A command without a complete path is provided, search $PATH.
22224          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
22225$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
22226          # Extract the first word of "$tool_basename", so it can be a program name with args.
22227set dummy $tool_basename; ac_word=$2
22228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22229$as_echo_n "checking for $ac_word... " >&6; }
22230if ${ac_cv_path_OTOOL+:} false; then :
22231  $as_echo_n "(cached) " >&6
22232else
22233  case $OTOOL in
22234  [\\/]* | ?:[\\/]*)
22235  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22236  ;;
22237  *)
22238  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22239for as_dir in $PATH
22240do
22241  IFS=$as_save_IFS
22242  test -z "$as_dir" && as_dir=.
22243    for ac_exec_ext in '' $ac_executable_extensions; do
22244  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22245    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22246    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22247    break 2
22248  fi
22249done
22250  done
22251IFS=$as_save_IFS
22252
22253  ;;
22254esac
22255fi
22256OTOOL=$ac_cv_path_OTOOL
22257if test -n "$OTOOL"; then
22258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22259$as_echo "$OTOOL" >&6; }
22260else
22261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22262$as_echo "no" >&6; }
22263fi
22264
22265
22266          if test "x$OTOOL" = x; then
22267            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22268          fi
22269        else
22270          # Otherwise we believe it is a complete path. Use it as it is.
22271          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
22272$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
22273          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22274$as_echo_n "checking for OTOOL... " >&6; }
22275          if test ! -x "$tool_specified"; then
22276            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22277$as_echo "not found" >&6; }
22278            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
22279          fi
22280          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22281$as_echo "$tool_specified" >&6; }
22282        fi
22283      fi
22284    fi
22285
22286  fi
22287
22288
22289  if test "x$OTOOL" = "x"; then
22290    OTOOL="true"
22291  fi
22292
22293
22294  # Publish this variable in the help.
22295
22296
22297  if [ -z "${READELF+x}" ]; then
22298    # The variable is not set by user, try to locate tool using the code snippet
22299    for ac_prog in greadelf readelf
22300do
22301  # Extract the first word of "$ac_prog", so it can be a program name with args.
22302set dummy $ac_prog; ac_word=$2
22303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22304$as_echo_n "checking for $ac_word... " >&6; }
22305if ${ac_cv_path_READELF+:} false; then :
22306  $as_echo_n "(cached) " >&6
22307else
22308  case $READELF in
22309  [\\/]* | ?:[\\/]*)
22310  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22311  ;;
22312  *)
22313  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22314for as_dir in $PATH
22315do
22316  IFS=$as_save_IFS
22317  test -z "$as_dir" && as_dir=.
22318    for ac_exec_ext in '' $ac_executable_extensions; do
22319  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22320    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22321    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22322    break 2
22323  fi
22324done
22325  done
22326IFS=$as_save_IFS
22327
22328  ;;
22329esac
22330fi
22331READELF=$ac_cv_path_READELF
22332if test -n "$READELF"; then
22333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22334$as_echo "$READELF" >&6; }
22335else
22336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22337$as_echo "no" >&6; }
22338fi
22339
22340
22341  test -n "$READELF" && break
22342done
22343
22344  else
22345    # The variable is set, but is it from the command line or the environment?
22346
22347    # Try to remove the string !READELF! from our list.
22348    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22349    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22350      # If it failed, the variable was not from the command line. Ignore it,
22351      # but warn the user (except for BASH, which is always set by the calling BASH).
22352      if test "xREADELF" != xBASH; then
22353        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22354$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22355      fi
22356      # Try to locate tool using the code snippet
22357      for ac_prog in greadelf readelf
22358do
22359  # Extract the first word of "$ac_prog", so it can be a program name with args.
22360set dummy $ac_prog; ac_word=$2
22361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22362$as_echo_n "checking for $ac_word... " >&6; }
22363if ${ac_cv_path_READELF+:} false; then :
22364  $as_echo_n "(cached) " >&6
22365else
22366  case $READELF in
22367  [\\/]* | ?:[\\/]*)
22368  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22369  ;;
22370  *)
22371  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22372for as_dir in $PATH
22373do
22374  IFS=$as_save_IFS
22375  test -z "$as_dir" && as_dir=.
22376    for ac_exec_ext in '' $ac_executable_extensions; do
22377  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22378    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22379    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22380    break 2
22381  fi
22382done
22383  done
22384IFS=$as_save_IFS
22385
22386  ;;
22387esac
22388fi
22389READELF=$ac_cv_path_READELF
22390if test -n "$READELF"; then
22391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22392$as_echo "$READELF" >&6; }
22393else
22394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22395$as_echo "no" >&6; }
22396fi
22397
22398
22399  test -n "$READELF" && break
22400done
22401
22402    else
22403      # If it succeeded, then it was overridden by the user. We will use it
22404      # for the tool.
22405
22406      # First remove it from the list of overridden variables, so we can test
22407      # for unknown variables in the end.
22408      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22409
22410      # Check if we try to supply an empty value
22411      if test "x$READELF" = x; then
22412        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22413$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22414        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22415$as_echo_n "checking for READELF... " >&6; }
22416        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22417$as_echo "disabled" >&6; }
22418      else
22419        # Check if the provided tool contains a complete path.
22420        tool_specified="$READELF"
22421        tool_basename="${tool_specified##*/}"
22422        if test "x$tool_basename" = "x$tool_specified"; then
22423          # A command without a complete path is provided, search $PATH.
22424          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22425$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22426          # Extract the first word of "$tool_basename", so it can be a program name with args.
22427set dummy $tool_basename; ac_word=$2
22428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22429$as_echo_n "checking for $ac_word... " >&6; }
22430if ${ac_cv_path_READELF+:} false; then :
22431  $as_echo_n "(cached) " >&6
22432else
22433  case $READELF in
22434  [\\/]* | ?:[\\/]*)
22435  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22436  ;;
22437  *)
22438  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22439for as_dir in $PATH
22440do
22441  IFS=$as_save_IFS
22442  test -z "$as_dir" && as_dir=.
22443    for ac_exec_ext in '' $ac_executable_extensions; do
22444  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22445    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22446    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22447    break 2
22448  fi
22449done
22450  done
22451IFS=$as_save_IFS
22452
22453  ;;
22454esac
22455fi
22456READELF=$ac_cv_path_READELF
22457if test -n "$READELF"; then
22458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22459$as_echo "$READELF" >&6; }
22460else
22461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22462$as_echo "no" >&6; }
22463fi
22464
22465
22466          if test "x$READELF" = x; then
22467            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22468          fi
22469        else
22470          # Otherwise we believe it is a complete path. Use it as it is.
22471          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22472$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22473          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22474$as_echo_n "checking for READELF... " >&6; }
22475          if test ! -x "$tool_specified"; then
22476            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22477$as_echo "not found" >&6; }
22478            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22479          fi
22480          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22481$as_echo "$tool_specified" >&6; }
22482        fi
22483      fi
22484    fi
22485
22486  fi
22487
22488
22489
22490
22491  # Publish this variable in the help.
22492
22493
22494  if [ -z "${DOT+x}" ]; then
22495    # The variable is not set by user, try to locate tool using the code snippet
22496    for ac_prog in dot
22497do
22498  # Extract the first word of "$ac_prog", so it can be a program name with args.
22499set dummy $ac_prog; ac_word=$2
22500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22501$as_echo_n "checking for $ac_word... " >&6; }
22502if ${ac_cv_path_DOT+:} false; then :
22503  $as_echo_n "(cached) " >&6
22504else
22505  case $DOT in
22506  [\\/]* | ?:[\\/]*)
22507  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22508  ;;
22509  *)
22510  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22511for as_dir in $PATH
22512do
22513  IFS=$as_save_IFS
22514  test -z "$as_dir" && as_dir=.
22515    for ac_exec_ext in '' $ac_executable_extensions; do
22516  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22517    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22518    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22519    break 2
22520  fi
22521done
22522  done
22523IFS=$as_save_IFS
22524
22525  ;;
22526esac
22527fi
22528DOT=$ac_cv_path_DOT
22529if test -n "$DOT"; then
22530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22531$as_echo "$DOT" >&6; }
22532else
22533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22534$as_echo "no" >&6; }
22535fi
22536
22537
22538  test -n "$DOT" && break
22539done
22540
22541  else
22542    # The variable is set, but is it from the command line or the environment?
22543
22544    # Try to remove the string !DOT! from our list.
22545    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DOT!/}
22546    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22547      # If it failed, the variable was not from the command line. Ignore it,
22548      # but warn the user (except for BASH, which is always set by the calling BASH).
22549      if test "xDOT" != xBASH; then
22550        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&5
22551$as_echo "$as_me: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&2;}
22552      fi
22553      # Try to locate tool using the code snippet
22554      for ac_prog in dot
22555do
22556  # Extract the first word of "$ac_prog", so it can be a program name with args.
22557set dummy $ac_prog; ac_word=$2
22558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22559$as_echo_n "checking for $ac_word... " >&6; }
22560if ${ac_cv_path_DOT+:} false; then :
22561  $as_echo_n "(cached) " >&6
22562else
22563  case $DOT in
22564  [\\/]* | ?:[\\/]*)
22565  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22566  ;;
22567  *)
22568  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22569for as_dir in $PATH
22570do
22571  IFS=$as_save_IFS
22572  test -z "$as_dir" && as_dir=.
22573    for ac_exec_ext in '' $ac_executable_extensions; do
22574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22575    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22577    break 2
22578  fi
22579done
22580  done
22581IFS=$as_save_IFS
22582
22583  ;;
22584esac
22585fi
22586DOT=$ac_cv_path_DOT
22587if test -n "$DOT"; then
22588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22589$as_echo "$DOT" >&6; }
22590else
22591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22592$as_echo "no" >&6; }
22593fi
22594
22595
22596  test -n "$DOT" && break
22597done
22598
22599    else
22600      # If it succeeded, then it was overridden by the user. We will use it
22601      # for the tool.
22602
22603      # First remove it from the list of overridden variables, so we can test
22604      # for unknown variables in the end.
22605      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22606
22607      # Check if we try to supply an empty value
22608      if test "x$DOT" = x; then
22609        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DOT= (no value)" >&5
22610$as_echo "$as_me: Setting user supplied tool DOT= (no value)" >&6;}
22611        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
22612$as_echo_n "checking for DOT... " >&6; }
22613        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22614$as_echo "disabled" >&6; }
22615      else
22616        # Check if the provided tool contains a complete path.
22617        tool_specified="$DOT"
22618        tool_basename="${tool_specified##*/}"
22619        if test "x$tool_basename" = "x$tool_specified"; then
22620          # A command without a complete path is provided, search $PATH.
22621          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DOT=$tool_basename" >&5
22622$as_echo "$as_me: Will search for user supplied tool DOT=$tool_basename" >&6;}
22623          # Extract the first word of "$tool_basename", so it can be a program name with args.
22624set dummy $tool_basename; ac_word=$2
22625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22626$as_echo_n "checking for $ac_word... " >&6; }
22627if ${ac_cv_path_DOT+:} false; then :
22628  $as_echo_n "(cached) " >&6
22629else
22630  case $DOT in
22631  [\\/]* | ?:[\\/]*)
22632  ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22633  ;;
22634  *)
22635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22636for as_dir in $PATH
22637do
22638  IFS=$as_save_IFS
22639  test -z "$as_dir" && as_dir=.
22640    for ac_exec_ext in '' $ac_executable_extensions; do
22641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22642    ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22644    break 2
22645  fi
22646done
22647  done
22648IFS=$as_save_IFS
22649
22650  ;;
22651esac
22652fi
22653DOT=$ac_cv_path_DOT
22654if test -n "$DOT"; then
22655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22656$as_echo "$DOT" >&6; }
22657else
22658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22659$as_echo "no" >&6; }
22660fi
22661
22662
22663          if test "x$DOT" = x; then
22664            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22665          fi
22666        else
22667          # Otherwise we believe it is a complete path. Use it as it is.
22668          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DOT=$tool_specified" >&5
22669$as_echo "$as_me: Will use user supplied tool DOT=$tool_specified" >&6;}
22670          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
22671$as_echo_n "checking for DOT... " >&6; }
22672          if test ! -x "$tool_specified"; then
22673            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22674$as_echo "not found" >&6; }
22675            as_fn_error $? "User supplied tool DOT=$tool_specified does not exist or is not executable" "$LINENO" 5
22676          fi
22677          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22678$as_echo "$tool_specified" >&6; }
22679        fi
22680      fi
22681    fi
22682
22683  fi
22684
22685
22686
22687
22688  # Publish this variable in the help.
22689
22690
22691  if [ -z "${HG+x}" ]; then
22692    # The variable is not set by user, try to locate tool using the code snippet
22693    for ac_prog in hg
22694do
22695  # Extract the first word of "$ac_prog", so it can be a program name with args.
22696set dummy $ac_prog; ac_word=$2
22697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22698$as_echo_n "checking for $ac_word... " >&6; }
22699if ${ac_cv_path_HG+:} false; then :
22700  $as_echo_n "(cached) " >&6
22701else
22702  case $HG in
22703  [\\/]* | ?:[\\/]*)
22704  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22705  ;;
22706  *)
22707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22708for as_dir in $PATH
22709do
22710  IFS=$as_save_IFS
22711  test -z "$as_dir" && as_dir=.
22712    for ac_exec_ext in '' $ac_executable_extensions; do
22713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22714    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22716    break 2
22717  fi
22718done
22719  done
22720IFS=$as_save_IFS
22721
22722  ;;
22723esac
22724fi
22725HG=$ac_cv_path_HG
22726if test -n "$HG"; then
22727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22728$as_echo "$HG" >&6; }
22729else
22730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22731$as_echo "no" >&6; }
22732fi
22733
22734
22735  test -n "$HG" && break
22736done
22737
22738  else
22739    # The variable is set, but is it from the command line or the environment?
22740
22741    # Try to remove the string !HG! from our list.
22742    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22743    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22744      # If it failed, the variable was not from the command line. Ignore it,
22745      # but warn the user (except for BASH, which is always set by the calling BASH).
22746      if test "xHG" != xBASH; then
22747        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22748$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22749      fi
22750      # Try to locate tool using the code snippet
22751      for ac_prog in hg
22752do
22753  # Extract the first word of "$ac_prog", so it can be a program name with args.
22754set dummy $ac_prog; ac_word=$2
22755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22756$as_echo_n "checking for $ac_word... " >&6; }
22757if ${ac_cv_path_HG+:} false; then :
22758  $as_echo_n "(cached) " >&6
22759else
22760  case $HG in
22761  [\\/]* | ?:[\\/]*)
22762  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22763  ;;
22764  *)
22765  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22766for as_dir in $PATH
22767do
22768  IFS=$as_save_IFS
22769  test -z "$as_dir" && as_dir=.
22770    for ac_exec_ext in '' $ac_executable_extensions; do
22771  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22772    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22773    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22774    break 2
22775  fi
22776done
22777  done
22778IFS=$as_save_IFS
22779
22780  ;;
22781esac
22782fi
22783HG=$ac_cv_path_HG
22784if test -n "$HG"; then
22785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22786$as_echo "$HG" >&6; }
22787else
22788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22789$as_echo "no" >&6; }
22790fi
22791
22792
22793  test -n "$HG" && break
22794done
22795
22796    else
22797      # If it succeeded, then it was overridden by the user. We will use it
22798      # for the tool.
22799
22800      # First remove it from the list of overridden variables, so we can test
22801      # for unknown variables in the end.
22802      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22803
22804      # Check if we try to supply an empty value
22805      if test "x$HG" = x; then
22806        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22807$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22808        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22809$as_echo_n "checking for HG... " >&6; }
22810        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22811$as_echo "disabled" >&6; }
22812      else
22813        # Check if the provided tool contains a complete path.
22814        tool_specified="$HG"
22815        tool_basename="${tool_specified##*/}"
22816        if test "x$tool_basename" = "x$tool_specified"; then
22817          # A command without a complete path is provided, search $PATH.
22818          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22819$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22820          # Extract the first word of "$tool_basename", so it can be a program name with args.
22821set dummy $tool_basename; ac_word=$2
22822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22823$as_echo_n "checking for $ac_word... " >&6; }
22824if ${ac_cv_path_HG+:} false; then :
22825  $as_echo_n "(cached) " >&6
22826else
22827  case $HG in
22828  [\\/]* | ?:[\\/]*)
22829  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22830  ;;
22831  *)
22832  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22833for as_dir in $PATH
22834do
22835  IFS=$as_save_IFS
22836  test -z "$as_dir" && as_dir=.
22837    for ac_exec_ext in '' $ac_executable_extensions; do
22838  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22839    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22840    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22841    break 2
22842  fi
22843done
22844  done
22845IFS=$as_save_IFS
22846
22847  ;;
22848esac
22849fi
22850HG=$ac_cv_path_HG
22851if test -n "$HG"; then
22852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22853$as_echo "$HG" >&6; }
22854else
22855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22856$as_echo "no" >&6; }
22857fi
22858
22859
22860          if test "x$HG" = x; then
22861            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22862          fi
22863        else
22864          # Otherwise we believe it is a complete path. Use it as it is.
22865          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22866$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22867          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22868$as_echo_n "checking for HG... " >&6; }
22869          if test ! -x "$tool_specified"; then
22870            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22871$as_echo "not found" >&6; }
22872            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22873          fi
22874          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22875$as_echo "$tool_specified" >&6; }
22876        fi
22877      fi
22878    fi
22879
22880  fi
22881
22882
22883
22884
22885  # Publish this variable in the help.
22886
22887
22888  if [ -z "${STAT+x}" ]; then
22889    # The variable is not set by user, try to locate tool using the code snippet
22890    for ac_prog in stat
22891do
22892  # Extract the first word of "$ac_prog", so it can be a program name with args.
22893set dummy $ac_prog; ac_word=$2
22894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22895$as_echo_n "checking for $ac_word... " >&6; }
22896if ${ac_cv_path_STAT+:} false; then :
22897  $as_echo_n "(cached) " >&6
22898else
22899  case $STAT in
22900  [\\/]* | ?:[\\/]*)
22901  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22902  ;;
22903  *)
22904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22905for as_dir in $PATH
22906do
22907  IFS=$as_save_IFS
22908  test -z "$as_dir" && as_dir=.
22909    for ac_exec_ext in '' $ac_executable_extensions; do
22910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22911    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22913    break 2
22914  fi
22915done
22916  done
22917IFS=$as_save_IFS
22918
22919  ;;
22920esac
22921fi
22922STAT=$ac_cv_path_STAT
22923if test -n "$STAT"; then
22924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22925$as_echo "$STAT" >&6; }
22926else
22927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22928$as_echo "no" >&6; }
22929fi
22930
22931
22932  test -n "$STAT" && break
22933done
22934
22935  else
22936    # The variable is set, but is it from the command line or the environment?
22937
22938    # Try to remove the string !STAT! from our list.
22939    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22940    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22941      # If it failed, the variable was not from the command line. Ignore it,
22942      # but warn the user (except for BASH, which is always set by the calling BASH).
22943      if test "xSTAT" != xBASH; then
22944        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22945$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22946      fi
22947      # Try to locate tool using the code snippet
22948      for ac_prog in stat
22949do
22950  # Extract the first word of "$ac_prog", so it can be a program name with args.
22951set dummy $ac_prog; ac_word=$2
22952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22953$as_echo_n "checking for $ac_word... " >&6; }
22954if ${ac_cv_path_STAT+:} false; then :
22955  $as_echo_n "(cached) " >&6
22956else
22957  case $STAT in
22958  [\\/]* | ?:[\\/]*)
22959  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22960  ;;
22961  *)
22962  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22963for as_dir in $PATH
22964do
22965  IFS=$as_save_IFS
22966  test -z "$as_dir" && as_dir=.
22967    for ac_exec_ext in '' $ac_executable_extensions; do
22968  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22969    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22971    break 2
22972  fi
22973done
22974  done
22975IFS=$as_save_IFS
22976
22977  ;;
22978esac
22979fi
22980STAT=$ac_cv_path_STAT
22981if test -n "$STAT"; then
22982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22983$as_echo "$STAT" >&6; }
22984else
22985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22986$as_echo "no" >&6; }
22987fi
22988
22989
22990  test -n "$STAT" && break
22991done
22992
22993    else
22994      # If it succeeded, then it was overridden by the user. We will use it
22995      # for the tool.
22996
22997      # First remove it from the list of overridden variables, so we can test
22998      # for unknown variables in the end.
22999      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23000
23001      # Check if we try to supply an empty value
23002      if test "x$STAT" = x; then
23003        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
23004$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
23005        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
23006$as_echo_n "checking for STAT... " >&6; }
23007        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23008$as_echo "disabled" >&6; }
23009      else
23010        # Check if the provided tool contains a complete path.
23011        tool_specified="$STAT"
23012        tool_basename="${tool_specified##*/}"
23013        if test "x$tool_basename" = "x$tool_specified"; then
23014          # A command without a complete path is provided, search $PATH.
23015          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
23016$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
23017          # Extract the first word of "$tool_basename", so it can be a program name with args.
23018set dummy $tool_basename; ac_word=$2
23019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23020$as_echo_n "checking for $ac_word... " >&6; }
23021if ${ac_cv_path_STAT+:} false; then :
23022  $as_echo_n "(cached) " >&6
23023else
23024  case $STAT in
23025  [\\/]* | ?:[\\/]*)
23026  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
23027  ;;
23028  *)
23029  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23030for as_dir in $PATH
23031do
23032  IFS=$as_save_IFS
23033  test -z "$as_dir" && as_dir=.
23034    for ac_exec_ext in '' $ac_executable_extensions; do
23035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23036    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
23037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23038    break 2
23039  fi
23040done
23041  done
23042IFS=$as_save_IFS
23043
23044  ;;
23045esac
23046fi
23047STAT=$ac_cv_path_STAT
23048if test -n "$STAT"; then
23049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
23050$as_echo "$STAT" >&6; }
23051else
23052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23053$as_echo "no" >&6; }
23054fi
23055
23056
23057          if test "x$STAT" = x; then
23058            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23059          fi
23060        else
23061          # Otherwise we believe it is a complete path. Use it as it is.
23062          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
23063$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
23064          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
23065$as_echo_n "checking for STAT... " >&6; }
23066          if test ! -x "$tool_specified"; then
23067            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23068$as_echo "not found" >&6; }
23069            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
23070          fi
23071          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23072$as_echo "$tool_specified" >&6; }
23073        fi
23074      fi
23075    fi
23076
23077  fi
23078
23079
23080
23081
23082  # Publish this variable in the help.
23083
23084
23085  if [ -z "${TIME+x}" ]; then
23086    # The variable is not set by user, try to locate tool using the code snippet
23087    for ac_prog in time
23088do
23089  # Extract the first word of "$ac_prog", so it can be a program name with args.
23090set dummy $ac_prog; ac_word=$2
23091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23092$as_echo_n "checking for $ac_word... " >&6; }
23093if ${ac_cv_path_TIME+:} false; then :
23094  $as_echo_n "(cached) " >&6
23095else
23096  case $TIME in
23097  [\\/]* | ?:[\\/]*)
23098  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23099  ;;
23100  *)
23101  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23102for as_dir in $PATH
23103do
23104  IFS=$as_save_IFS
23105  test -z "$as_dir" && as_dir=.
23106    for ac_exec_ext in '' $ac_executable_extensions; do
23107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23108    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23110    break 2
23111  fi
23112done
23113  done
23114IFS=$as_save_IFS
23115
23116  ;;
23117esac
23118fi
23119TIME=$ac_cv_path_TIME
23120if test -n "$TIME"; then
23121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23122$as_echo "$TIME" >&6; }
23123else
23124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23125$as_echo "no" >&6; }
23126fi
23127
23128
23129  test -n "$TIME" && break
23130done
23131
23132  else
23133    # The variable is set, but is it from the command line or the environment?
23134
23135    # Try to remove the string !TIME! from our list.
23136    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
23137    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23138      # If it failed, the variable was not from the command line. Ignore it,
23139      # but warn the user (except for BASH, which is always set by the calling BASH).
23140      if test "xTIME" != xBASH; then
23141        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
23142$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
23143      fi
23144      # Try to locate tool using the code snippet
23145      for ac_prog in time
23146do
23147  # Extract the first word of "$ac_prog", so it can be a program name with args.
23148set dummy $ac_prog; ac_word=$2
23149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23150$as_echo_n "checking for $ac_word... " >&6; }
23151if ${ac_cv_path_TIME+:} false; then :
23152  $as_echo_n "(cached) " >&6
23153else
23154  case $TIME in
23155  [\\/]* | ?:[\\/]*)
23156  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23157  ;;
23158  *)
23159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23160for as_dir in $PATH
23161do
23162  IFS=$as_save_IFS
23163  test -z "$as_dir" && as_dir=.
23164    for ac_exec_ext in '' $ac_executable_extensions; do
23165  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23166    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23168    break 2
23169  fi
23170done
23171  done
23172IFS=$as_save_IFS
23173
23174  ;;
23175esac
23176fi
23177TIME=$ac_cv_path_TIME
23178if test -n "$TIME"; then
23179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23180$as_echo "$TIME" >&6; }
23181else
23182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23183$as_echo "no" >&6; }
23184fi
23185
23186
23187  test -n "$TIME" && break
23188done
23189
23190    else
23191      # If it succeeded, then it was overridden by the user. We will use it
23192      # for the tool.
23193
23194      # First remove it from the list of overridden variables, so we can test
23195      # for unknown variables in the end.
23196      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23197
23198      # Check if we try to supply an empty value
23199      if test "x$TIME" = x; then
23200        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
23201$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
23202        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23203$as_echo_n "checking for TIME... " >&6; }
23204        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23205$as_echo "disabled" >&6; }
23206      else
23207        # Check if the provided tool contains a complete path.
23208        tool_specified="$TIME"
23209        tool_basename="${tool_specified##*/}"
23210        if test "x$tool_basename" = "x$tool_specified"; then
23211          # A command without a complete path is provided, search $PATH.
23212          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
23213$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
23214          # Extract the first word of "$tool_basename", so it can be a program name with args.
23215set dummy $tool_basename; ac_word=$2
23216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23217$as_echo_n "checking for $ac_word... " >&6; }
23218if ${ac_cv_path_TIME+:} false; then :
23219  $as_echo_n "(cached) " >&6
23220else
23221  case $TIME in
23222  [\\/]* | ?:[\\/]*)
23223  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23224  ;;
23225  *)
23226  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23227for as_dir in $PATH
23228do
23229  IFS=$as_save_IFS
23230  test -z "$as_dir" && as_dir=.
23231    for ac_exec_ext in '' $ac_executable_extensions; do
23232  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23233    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23235    break 2
23236  fi
23237done
23238  done
23239IFS=$as_save_IFS
23240
23241  ;;
23242esac
23243fi
23244TIME=$ac_cv_path_TIME
23245if test -n "$TIME"; then
23246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23247$as_echo "$TIME" >&6; }
23248else
23249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23250$as_echo "no" >&6; }
23251fi
23252
23253
23254          if test "x$TIME" = x; then
23255            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23256          fi
23257        else
23258          # Otherwise we believe it is a complete path. Use it as it is.
23259          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
23260$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
23261          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23262$as_echo_n "checking for TIME... " >&6; }
23263          if test ! -x "$tool_specified"; then
23264            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23265$as_echo "not found" >&6; }
23266            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
23267          fi
23268          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23269$as_echo "$tool_specified" >&6; }
23270        fi
23271      fi
23272    fi
23273
23274  fi
23275
23276
23277
23278
23279  # Publish this variable in the help.
23280
23281
23282  if [ -z "${FLOCK+x}" ]; then
23283    # The variable is not set by user, try to locate tool using the code snippet
23284    for ac_prog in flock
23285do
23286  # Extract the first word of "$ac_prog", so it can be a program name with args.
23287set dummy $ac_prog; ac_word=$2
23288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23289$as_echo_n "checking for $ac_word... " >&6; }
23290if ${ac_cv_path_FLOCK+:} false; then :
23291  $as_echo_n "(cached) " >&6
23292else
23293  case $FLOCK in
23294  [\\/]* | ?:[\\/]*)
23295  ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23296  ;;
23297  *)
23298  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23299for as_dir in $PATH
23300do
23301  IFS=$as_save_IFS
23302  test -z "$as_dir" && as_dir=.
23303    for ac_exec_ext in '' $ac_executable_extensions; do
23304  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23305    ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23306    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23307    break 2
23308  fi
23309done
23310  done
23311IFS=$as_save_IFS
23312
23313  ;;
23314esac
23315fi
23316FLOCK=$ac_cv_path_FLOCK
23317if test -n "$FLOCK"; then
23318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23319$as_echo "$FLOCK" >&6; }
23320else
23321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23322$as_echo "no" >&6; }
23323fi
23324
23325
23326  test -n "$FLOCK" && break
23327done
23328
23329  else
23330    # The variable is set, but is it from the command line or the environment?
23331
23332    # Try to remove the string !FLOCK! from our list.
23333    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FLOCK!/}
23334    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23335      # If it failed, the variable was not from the command line. Ignore it,
23336      # but warn the user (except for BASH, which is always set by the calling BASH).
23337      if test "xFLOCK" != xBASH; then
23338        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FLOCK from the environment. Use command line variables instead." >&5
23339$as_echo "$as_me: WARNING: Ignoring value of FLOCK from the environment. Use command line variables instead." >&2;}
23340      fi
23341      # Try to locate tool using the code snippet
23342      for ac_prog in flock
23343do
23344  # Extract the first word of "$ac_prog", so it can be a program name with args.
23345set dummy $ac_prog; ac_word=$2
23346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23347$as_echo_n "checking for $ac_word... " >&6; }
23348if ${ac_cv_path_FLOCK+:} false; then :
23349  $as_echo_n "(cached) " >&6
23350else
23351  case $FLOCK in
23352  [\\/]* | ?:[\\/]*)
23353  ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23354  ;;
23355  *)
23356  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23357for as_dir in $PATH
23358do
23359  IFS=$as_save_IFS
23360  test -z "$as_dir" && as_dir=.
23361    for ac_exec_ext in '' $ac_executable_extensions; do
23362  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23363    ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23364    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23365    break 2
23366  fi
23367done
23368  done
23369IFS=$as_save_IFS
23370
23371  ;;
23372esac
23373fi
23374FLOCK=$ac_cv_path_FLOCK
23375if test -n "$FLOCK"; then
23376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23377$as_echo "$FLOCK" >&6; }
23378else
23379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23380$as_echo "no" >&6; }
23381fi
23382
23383
23384  test -n "$FLOCK" && break
23385done
23386
23387    else
23388      # If it succeeded, then it was overridden by the user. We will use it
23389      # for the tool.
23390
23391      # First remove it from the list of overridden variables, so we can test
23392      # for unknown variables in the end.
23393      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23394
23395      # Check if we try to supply an empty value
23396      if test "x$FLOCK" = x; then
23397        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FLOCK= (no value)" >&5
23398$as_echo "$as_me: Setting user supplied tool FLOCK= (no value)" >&6;}
23399        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLOCK" >&5
23400$as_echo_n "checking for FLOCK... " >&6; }
23401        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23402$as_echo "disabled" >&6; }
23403      else
23404        # Check if the provided tool contains a complete path.
23405        tool_specified="$FLOCK"
23406        tool_basename="${tool_specified##*/}"
23407        if test "x$tool_basename" = "x$tool_specified"; then
23408          # A command without a complete path is provided, search $PATH.
23409          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FLOCK=$tool_basename" >&5
23410$as_echo "$as_me: Will search for user supplied tool FLOCK=$tool_basename" >&6;}
23411          # Extract the first word of "$tool_basename", so it can be a program name with args.
23412set dummy $tool_basename; ac_word=$2
23413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23414$as_echo_n "checking for $ac_word... " >&6; }
23415if ${ac_cv_path_FLOCK+:} false; then :
23416  $as_echo_n "(cached) " >&6
23417else
23418  case $FLOCK in
23419  [\\/]* | ?:[\\/]*)
23420  ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23421  ;;
23422  *)
23423  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23424for as_dir in $PATH
23425do
23426  IFS=$as_save_IFS
23427  test -z "$as_dir" && as_dir=.
23428    for ac_exec_ext in '' $ac_executable_extensions; do
23429  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23430    ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23431    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23432    break 2
23433  fi
23434done
23435  done
23436IFS=$as_save_IFS
23437
23438  ;;
23439esac
23440fi
23441FLOCK=$ac_cv_path_FLOCK
23442if test -n "$FLOCK"; then
23443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23444$as_echo "$FLOCK" >&6; }
23445else
23446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23447$as_echo "no" >&6; }
23448fi
23449
23450
23451          if test "x$FLOCK" = x; then
23452            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23453          fi
23454        else
23455          # Otherwise we believe it is a complete path. Use it as it is.
23456          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FLOCK=$tool_specified" >&5
23457$as_echo "$as_me: Will use user supplied tool FLOCK=$tool_specified" >&6;}
23458          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLOCK" >&5
23459$as_echo_n "checking for FLOCK... " >&6; }
23460          if test ! -x "$tool_specified"; then
23461            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23462$as_echo "not found" >&6; }
23463            as_fn_error $? "User supplied tool FLOCK=$tool_specified does not exist or is not executable" "$LINENO" 5
23464          fi
23465          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23466$as_echo "$tool_specified" >&6; }
23467        fi
23468      fi
23469    fi
23470
23471  fi
23472
23473
23474  # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
23475  # be in the user path.
23476
23477
23478  # Publish this variable in the help.
23479
23480
23481  if [ -z "${DTRACE+x}" ]; then
23482    # The variable is not set by user, try to locate tool using the code snippet
23483    for ac_prog in dtrace
23484do
23485  # Extract the first word of "$ac_prog", so it can be a program name with args.
23486set dummy $ac_prog; ac_word=$2
23487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23488$as_echo_n "checking for $ac_word... " >&6; }
23489if ${ac_cv_path_DTRACE+:} false; then :
23490  $as_echo_n "(cached) " >&6
23491else
23492  case $DTRACE in
23493  [\\/]* | ?:[\\/]*)
23494  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23495  ;;
23496  *)
23497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23498as_dummy="$PATH:/usr/sbin"
23499for as_dir in $as_dummy
23500do
23501  IFS=$as_save_IFS
23502  test -z "$as_dir" && as_dir=.
23503    for ac_exec_ext in '' $ac_executable_extensions; do
23504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23505    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23507    break 2
23508  fi
23509done
23510  done
23511IFS=$as_save_IFS
23512
23513  ;;
23514esac
23515fi
23516DTRACE=$ac_cv_path_DTRACE
23517if test -n "$DTRACE"; then
23518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23519$as_echo "$DTRACE" >&6; }
23520else
23521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23522$as_echo "no" >&6; }
23523fi
23524
23525
23526  test -n "$DTRACE" && break
23527done
23528
23529  else
23530    # The variable is set, but is it from the command line or the environment?
23531
23532    # Try to remove the string !DTRACE! from our list.
23533    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
23534    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23535      # If it failed, the variable was not from the command line. Ignore it,
23536      # but warn the user (except for BASH, which is always set by the calling BASH).
23537      if test "xDTRACE" != xBASH; then
23538        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
23539$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
23540      fi
23541      # Try to locate tool using the code snippet
23542      for ac_prog in dtrace
23543do
23544  # Extract the first word of "$ac_prog", so it can be a program name with args.
23545set dummy $ac_prog; ac_word=$2
23546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23547$as_echo_n "checking for $ac_word... " >&6; }
23548if ${ac_cv_path_DTRACE+:} false; then :
23549  $as_echo_n "(cached) " >&6
23550else
23551  case $DTRACE in
23552  [\\/]* | ?:[\\/]*)
23553  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23554  ;;
23555  *)
23556  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23557as_dummy="$PATH:/usr/sbin"
23558for as_dir in $as_dummy
23559do
23560  IFS=$as_save_IFS
23561  test -z "$as_dir" && as_dir=.
23562    for ac_exec_ext in '' $ac_executable_extensions; do
23563  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23564    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23566    break 2
23567  fi
23568done
23569  done
23570IFS=$as_save_IFS
23571
23572  ;;
23573esac
23574fi
23575DTRACE=$ac_cv_path_DTRACE
23576if test -n "$DTRACE"; then
23577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23578$as_echo "$DTRACE" >&6; }
23579else
23580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23581$as_echo "no" >&6; }
23582fi
23583
23584
23585  test -n "$DTRACE" && break
23586done
23587
23588    else
23589      # If it succeeded, then it was overridden by the user. We will use it
23590      # for the tool.
23591
23592      # First remove it from the list of overridden variables, so we can test
23593      # for unknown variables in the end.
23594      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23595
23596      # Check if we try to supply an empty value
23597      if test "x$DTRACE" = x; then
23598        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
23599$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
23600        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23601$as_echo_n "checking for DTRACE... " >&6; }
23602        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23603$as_echo "disabled" >&6; }
23604      else
23605        # Check if the provided tool contains a complete path.
23606        tool_specified="$DTRACE"
23607        tool_basename="${tool_specified##*/}"
23608        if test "x$tool_basename" = "x$tool_specified"; then
23609          # A command without a complete path is provided, search $PATH.
23610          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
23611$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
23612          # Extract the first word of "$tool_basename", so it can be a program name with args.
23613set dummy $tool_basename; ac_word=$2
23614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23615$as_echo_n "checking for $ac_word... " >&6; }
23616if ${ac_cv_path_DTRACE+:} false; then :
23617  $as_echo_n "(cached) " >&6
23618else
23619  case $DTRACE in
23620  [\\/]* | ?:[\\/]*)
23621  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23622  ;;
23623  *)
23624  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23625for as_dir in $PATH
23626do
23627  IFS=$as_save_IFS
23628  test -z "$as_dir" && as_dir=.
23629    for ac_exec_ext in '' $ac_executable_extensions; do
23630  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23631    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23632    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23633    break 2
23634  fi
23635done
23636  done
23637IFS=$as_save_IFS
23638
23639  ;;
23640esac
23641fi
23642DTRACE=$ac_cv_path_DTRACE
23643if test -n "$DTRACE"; then
23644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23645$as_echo "$DTRACE" >&6; }
23646else
23647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23648$as_echo "no" >&6; }
23649fi
23650
23651
23652          if test "x$DTRACE" = x; then
23653            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23654          fi
23655        else
23656          # Otherwise we believe it is a complete path. Use it as it is.
23657          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
23658$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
23659          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23660$as_echo_n "checking for DTRACE... " >&6; }
23661          if test ! -x "$tool_specified"; then
23662            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23663$as_echo "not found" >&6; }
23664            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
23665          fi
23666          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23667$as_echo "$tool_specified" >&6; }
23668        fi
23669      fi
23670    fi
23671
23672  fi
23673
23674
23675
23676
23677  # Publish this variable in the help.
23678
23679
23680  if [ -z "${PATCH+x}" ]; then
23681    # The variable is not set by user, try to locate tool using the code snippet
23682    for ac_prog in gpatch patch
23683do
23684  # Extract the first word of "$ac_prog", so it can be a program name with args.
23685set dummy $ac_prog; ac_word=$2
23686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23687$as_echo_n "checking for $ac_word... " >&6; }
23688if ${ac_cv_path_PATCH+:} false; then :
23689  $as_echo_n "(cached) " >&6
23690else
23691  case $PATCH in
23692  [\\/]* | ?:[\\/]*)
23693  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23694  ;;
23695  *)
23696  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23697for as_dir in $PATH
23698do
23699  IFS=$as_save_IFS
23700  test -z "$as_dir" && as_dir=.
23701    for ac_exec_ext in '' $ac_executable_extensions; do
23702  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23703    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23704    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23705    break 2
23706  fi
23707done
23708  done
23709IFS=$as_save_IFS
23710
23711  ;;
23712esac
23713fi
23714PATCH=$ac_cv_path_PATCH
23715if test -n "$PATCH"; then
23716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23717$as_echo "$PATCH" >&6; }
23718else
23719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23720$as_echo "no" >&6; }
23721fi
23722
23723
23724  test -n "$PATCH" && break
23725done
23726
23727  else
23728    # The variable is set, but is it from the command line or the environment?
23729
23730    # Try to remove the string !PATCH! from our list.
23731    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23732    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23733      # If it failed, the variable was not from the command line. Ignore it,
23734      # but warn the user (except for BASH, which is always set by the calling BASH).
23735      if test "xPATCH" != xBASH; then
23736        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23737$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23738      fi
23739      # Try to locate tool using the code snippet
23740      for ac_prog in gpatch patch
23741do
23742  # Extract the first word of "$ac_prog", so it can be a program name with args.
23743set dummy $ac_prog; ac_word=$2
23744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23745$as_echo_n "checking for $ac_word... " >&6; }
23746if ${ac_cv_path_PATCH+:} false; then :
23747  $as_echo_n "(cached) " >&6
23748else
23749  case $PATCH in
23750  [\\/]* | ?:[\\/]*)
23751  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23752  ;;
23753  *)
23754  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23755for as_dir in $PATH
23756do
23757  IFS=$as_save_IFS
23758  test -z "$as_dir" && as_dir=.
23759    for ac_exec_ext in '' $ac_executable_extensions; do
23760  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23761    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23762    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23763    break 2
23764  fi
23765done
23766  done
23767IFS=$as_save_IFS
23768
23769  ;;
23770esac
23771fi
23772PATCH=$ac_cv_path_PATCH
23773if test -n "$PATCH"; then
23774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23775$as_echo "$PATCH" >&6; }
23776else
23777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23778$as_echo "no" >&6; }
23779fi
23780
23781
23782  test -n "$PATCH" && break
23783done
23784
23785    else
23786      # If it succeeded, then it was overridden by the user. We will use it
23787      # for the tool.
23788
23789      # First remove it from the list of overridden variables, so we can test
23790      # for unknown variables in the end.
23791      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23792
23793      # Check if we try to supply an empty value
23794      if test "x$PATCH" = x; then
23795        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23796$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23797        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23798$as_echo_n "checking for PATCH... " >&6; }
23799        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23800$as_echo "disabled" >&6; }
23801      else
23802        # Check if the provided tool contains a complete path.
23803        tool_specified="$PATCH"
23804        tool_basename="${tool_specified##*/}"
23805        if test "x$tool_basename" = "x$tool_specified"; then
23806          # A command without a complete path is provided, search $PATH.
23807          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23808$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23809          # Extract the first word of "$tool_basename", so it can be a program name with args.
23810set dummy $tool_basename; ac_word=$2
23811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23812$as_echo_n "checking for $ac_word... " >&6; }
23813if ${ac_cv_path_PATCH+:} false; then :
23814  $as_echo_n "(cached) " >&6
23815else
23816  case $PATCH in
23817  [\\/]* | ?:[\\/]*)
23818  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23819  ;;
23820  *)
23821  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23822for as_dir in $PATH
23823do
23824  IFS=$as_save_IFS
23825  test -z "$as_dir" && as_dir=.
23826    for ac_exec_ext in '' $ac_executable_extensions; do
23827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23828    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23830    break 2
23831  fi
23832done
23833  done
23834IFS=$as_save_IFS
23835
23836  ;;
23837esac
23838fi
23839PATCH=$ac_cv_path_PATCH
23840if test -n "$PATCH"; then
23841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23842$as_echo "$PATCH" >&6; }
23843else
23844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23845$as_echo "no" >&6; }
23846fi
23847
23848
23849          if test "x$PATCH" = x; then
23850            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23851          fi
23852        else
23853          # Otherwise we believe it is a complete path. Use it as it is.
23854          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23855$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23856          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23857$as_echo_n "checking for PATCH... " >&6; }
23858          if test ! -x "$tool_specified"; then
23859            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23860$as_echo "not found" >&6; }
23861            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23862          fi
23863          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23864$as_echo "$tool_specified" >&6; }
23865        fi
23866      fi
23867    fi
23868
23869  fi
23870
23871
23872  # Check if it's GNU time
23873  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23874  if test "x$IS_GNU_TIME" != x; then
23875    IS_GNU_TIME=yes
23876  else
23877    IS_GNU_TIME=no
23878  fi
23879
23880
23881  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23882
23883
23884
23885  # Publish this variable in the help.
23886
23887
23888  if [ -z "${DSYMUTIL+x}" ]; then
23889    # The variable is not set by user, try to locate tool using the code snippet
23890    for ac_prog in dsymutil
23891do
23892  # Extract the first word of "$ac_prog", so it can be a program name with args.
23893set dummy $ac_prog; ac_word=$2
23894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23895$as_echo_n "checking for $ac_word... " >&6; }
23896if ${ac_cv_path_DSYMUTIL+:} false; then :
23897  $as_echo_n "(cached) " >&6
23898else
23899  case $DSYMUTIL in
23900  [\\/]* | ?:[\\/]*)
23901  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23902  ;;
23903  *)
23904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23905for as_dir in $PATH
23906do
23907  IFS=$as_save_IFS
23908  test -z "$as_dir" && as_dir=.
23909    for ac_exec_ext in '' $ac_executable_extensions; do
23910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23911    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23913    break 2
23914  fi
23915done
23916  done
23917IFS=$as_save_IFS
23918
23919  ;;
23920esac
23921fi
23922DSYMUTIL=$ac_cv_path_DSYMUTIL
23923if test -n "$DSYMUTIL"; then
23924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23925$as_echo "$DSYMUTIL" >&6; }
23926else
23927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23928$as_echo "no" >&6; }
23929fi
23930
23931
23932  test -n "$DSYMUTIL" && break
23933done
23934
23935  else
23936    # The variable is set, but is it from the command line or the environment?
23937
23938    # Try to remove the string !DSYMUTIL! from our list.
23939    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23940    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23941      # If it failed, the variable was not from the command line. Ignore it,
23942      # but warn the user (except for BASH, which is always set by the calling BASH).
23943      if test "xDSYMUTIL" != xBASH; then
23944        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23945$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23946      fi
23947      # Try to locate tool using the code snippet
23948      for ac_prog in dsymutil
23949do
23950  # Extract the first word of "$ac_prog", so it can be a program name with args.
23951set dummy $ac_prog; ac_word=$2
23952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23953$as_echo_n "checking for $ac_word... " >&6; }
23954if ${ac_cv_path_DSYMUTIL+:} false; then :
23955  $as_echo_n "(cached) " >&6
23956else
23957  case $DSYMUTIL in
23958  [\\/]* | ?:[\\/]*)
23959  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23960  ;;
23961  *)
23962  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23963for as_dir in $PATH
23964do
23965  IFS=$as_save_IFS
23966  test -z "$as_dir" && as_dir=.
23967    for ac_exec_ext in '' $ac_executable_extensions; do
23968  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23969    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23971    break 2
23972  fi
23973done
23974  done
23975IFS=$as_save_IFS
23976
23977  ;;
23978esac
23979fi
23980DSYMUTIL=$ac_cv_path_DSYMUTIL
23981if test -n "$DSYMUTIL"; then
23982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23983$as_echo "$DSYMUTIL" >&6; }
23984else
23985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23986$as_echo "no" >&6; }
23987fi
23988
23989
23990  test -n "$DSYMUTIL" && break
23991done
23992
23993    else
23994      # If it succeeded, then it was overridden by the user. We will use it
23995      # for the tool.
23996
23997      # First remove it from the list of overridden variables, so we can test
23998      # for unknown variables in the end.
23999      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24000
24001      # Check if we try to supply an empty value
24002      if test "x$DSYMUTIL" = x; then
24003        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
24004$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
24005        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
24006$as_echo_n "checking for DSYMUTIL... " >&6; }
24007        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24008$as_echo "disabled" >&6; }
24009      else
24010        # Check if the provided tool contains a complete path.
24011        tool_specified="$DSYMUTIL"
24012        tool_basename="${tool_specified##*/}"
24013        if test "x$tool_basename" = "x$tool_specified"; then
24014          # A command without a complete path is provided, search $PATH.
24015          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
24016$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
24017          # Extract the first word of "$tool_basename", so it can be a program name with args.
24018set dummy $tool_basename; ac_word=$2
24019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24020$as_echo_n "checking for $ac_word... " >&6; }
24021if ${ac_cv_path_DSYMUTIL+:} false; then :
24022  $as_echo_n "(cached) " >&6
24023else
24024  case $DSYMUTIL in
24025  [\\/]* | ?:[\\/]*)
24026  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
24027  ;;
24028  *)
24029  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24030for as_dir in $PATH
24031do
24032  IFS=$as_save_IFS
24033  test -z "$as_dir" && as_dir=.
24034    for ac_exec_ext in '' $ac_executable_extensions; do
24035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24036    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
24037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24038    break 2
24039  fi
24040done
24041  done
24042IFS=$as_save_IFS
24043
24044  ;;
24045esac
24046fi
24047DSYMUTIL=$ac_cv_path_DSYMUTIL
24048if test -n "$DSYMUTIL"; then
24049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
24050$as_echo "$DSYMUTIL" >&6; }
24051else
24052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24053$as_echo "no" >&6; }
24054fi
24055
24056
24057          if test "x$DSYMUTIL" = x; then
24058            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24059          fi
24060        else
24061          # Otherwise we believe it is a complete path. Use it as it is.
24062          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
24063$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
24064          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
24065$as_echo_n "checking for DSYMUTIL... " >&6; }
24066          if test ! -x "$tool_specified"; then
24067            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24068$as_echo "not found" >&6; }
24069            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
24070          fi
24071          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24072$as_echo "$tool_specified" >&6; }
24073        fi
24074      fi
24075    fi
24076
24077  fi
24078
24079
24080
24081  if test "x$DSYMUTIL" = x; then
24082    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
24083  fi
24084
24085
24086
24087
24088
24089  # Publish this variable in the help.
24090
24091
24092  if [ -z "${XATTR+x}" ]; then
24093    # The variable is not set by user, try to locate tool using the code snippet
24094    for ac_prog in xattr
24095do
24096  # Extract the first word of "$ac_prog", so it can be a program name with args.
24097set dummy $ac_prog; ac_word=$2
24098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24099$as_echo_n "checking for $ac_word... " >&6; }
24100if ${ac_cv_path_XATTR+:} false; then :
24101  $as_echo_n "(cached) " >&6
24102else
24103  case $XATTR in
24104  [\\/]* | ?:[\\/]*)
24105  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24106  ;;
24107  *)
24108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24109for as_dir in $PATH
24110do
24111  IFS=$as_save_IFS
24112  test -z "$as_dir" && as_dir=.
24113    for ac_exec_ext in '' $ac_executable_extensions; do
24114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24115    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24117    break 2
24118  fi
24119done
24120  done
24121IFS=$as_save_IFS
24122
24123  ;;
24124esac
24125fi
24126XATTR=$ac_cv_path_XATTR
24127if test -n "$XATTR"; then
24128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24129$as_echo "$XATTR" >&6; }
24130else
24131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24132$as_echo "no" >&6; }
24133fi
24134
24135
24136  test -n "$XATTR" && break
24137done
24138
24139  else
24140    # The variable is set, but is it from the command line or the environment?
24141
24142    # Try to remove the string !XATTR! from our list.
24143    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
24144    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24145      # If it failed, the variable was not from the command line. Ignore it,
24146      # but warn the user (except for BASH, which is always set by the calling BASH).
24147      if test "xXATTR" != xBASH; then
24148        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
24149$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
24150      fi
24151      # Try to locate tool using the code snippet
24152      for ac_prog in xattr
24153do
24154  # Extract the first word of "$ac_prog", so it can be a program name with args.
24155set dummy $ac_prog; ac_word=$2
24156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24157$as_echo_n "checking for $ac_word... " >&6; }
24158if ${ac_cv_path_XATTR+:} false; then :
24159  $as_echo_n "(cached) " >&6
24160else
24161  case $XATTR in
24162  [\\/]* | ?:[\\/]*)
24163  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24164  ;;
24165  *)
24166  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24167for as_dir in $PATH
24168do
24169  IFS=$as_save_IFS
24170  test -z "$as_dir" && as_dir=.
24171    for ac_exec_ext in '' $ac_executable_extensions; do
24172  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24173    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24174    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24175    break 2
24176  fi
24177done
24178  done
24179IFS=$as_save_IFS
24180
24181  ;;
24182esac
24183fi
24184XATTR=$ac_cv_path_XATTR
24185if test -n "$XATTR"; then
24186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24187$as_echo "$XATTR" >&6; }
24188else
24189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24190$as_echo "no" >&6; }
24191fi
24192
24193
24194  test -n "$XATTR" && break
24195done
24196
24197    else
24198      # If it succeeded, then it was overridden by the user. We will use it
24199      # for the tool.
24200
24201      # First remove it from the list of overridden variables, so we can test
24202      # for unknown variables in the end.
24203      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24204
24205      # Check if we try to supply an empty value
24206      if test "x$XATTR" = x; then
24207        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
24208$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
24209        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
24210$as_echo_n "checking for XATTR... " >&6; }
24211        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24212$as_echo "disabled" >&6; }
24213      else
24214        # Check if the provided tool contains a complete path.
24215        tool_specified="$XATTR"
24216        tool_basename="${tool_specified##*/}"
24217        if test "x$tool_basename" = "x$tool_specified"; then
24218          # A command without a complete path is provided, search $PATH.
24219          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
24220$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
24221          # Extract the first word of "$tool_basename", so it can be a program name with args.
24222set dummy $tool_basename; ac_word=$2
24223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24224$as_echo_n "checking for $ac_word... " >&6; }
24225if ${ac_cv_path_XATTR+:} false; then :
24226  $as_echo_n "(cached) " >&6
24227else
24228  case $XATTR in
24229  [\\/]* | ?:[\\/]*)
24230  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24231  ;;
24232  *)
24233  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24234for as_dir in $PATH
24235do
24236  IFS=$as_save_IFS
24237  test -z "$as_dir" && as_dir=.
24238    for ac_exec_ext in '' $ac_executable_extensions; do
24239  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24240    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24242    break 2
24243  fi
24244done
24245  done
24246IFS=$as_save_IFS
24247
24248  ;;
24249esac
24250fi
24251XATTR=$ac_cv_path_XATTR
24252if test -n "$XATTR"; then
24253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24254$as_echo "$XATTR" >&6; }
24255else
24256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24257$as_echo "no" >&6; }
24258fi
24259
24260
24261          if test "x$XATTR" = x; then
24262            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24263          fi
24264        else
24265          # Otherwise we believe it is a complete path. Use it as it is.
24266          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
24267$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
24268          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
24269$as_echo_n "checking for XATTR... " >&6; }
24270          if test ! -x "$tool_specified"; then
24271            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24272$as_echo "not found" >&6; }
24273            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
24274          fi
24275          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24276$as_echo "$tool_specified" >&6; }
24277        fi
24278      fi
24279    fi
24280
24281  fi
24282
24283
24284
24285  if test "x$XATTR" = x; then
24286    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
24287  fi
24288
24289
24290
24291
24292  # Publish this variable in the help.
24293
24294
24295  if [ -z "${CODESIGN+x}" ]; then
24296    # The variable is not set by user, try to locate tool using the code snippet
24297    for ac_prog in codesign
24298do
24299  # Extract the first word of "$ac_prog", so it can be a program name with args.
24300set dummy $ac_prog; ac_word=$2
24301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24302$as_echo_n "checking for $ac_word... " >&6; }
24303if ${ac_cv_path_CODESIGN+:} false; then :
24304  $as_echo_n "(cached) " >&6
24305else
24306  case $CODESIGN in
24307  [\\/]* | ?:[\\/]*)
24308  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24309  ;;
24310  *)
24311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24312for as_dir in $PATH
24313do
24314  IFS=$as_save_IFS
24315  test -z "$as_dir" && as_dir=.
24316    for ac_exec_ext in '' $ac_executable_extensions; do
24317  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24318    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24320    break 2
24321  fi
24322done
24323  done
24324IFS=$as_save_IFS
24325
24326  ;;
24327esac
24328fi
24329CODESIGN=$ac_cv_path_CODESIGN
24330if test -n "$CODESIGN"; then
24331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24332$as_echo "$CODESIGN" >&6; }
24333else
24334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24335$as_echo "no" >&6; }
24336fi
24337
24338
24339  test -n "$CODESIGN" && break
24340done
24341
24342  else
24343    # The variable is set, but is it from the command line or the environment?
24344
24345    # Try to remove the string !CODESIGN! from our list.
24346    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
24347    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24348      # If it failed, the variable was not from the command line. Ignore it,
24349      # but warn the user (except for BASH, which is always set by the calling BASH).
24350      if test "xCODESIGN" != xBASH; then
24351        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
24352$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
24353      fi
24354      # Try to locate tool using the code snippet
24355      for ac_prog in codesign
24356do
24357  # Extract the first word of "$ac_prog", so it can be a program name with args.
24358set dummy $ac_prog; ac_word=$2
24359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24360$as_echo_n "checking for $ac_word... " >&6; }
24361if ${ac_cv_path_CODESIGN+:} false; then :
24362  $as_echo_n "(cached) " >&6
24363else
24364  case $CODESIGN in
24365  [\\/]* | ?:[\\/]*)
24366  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24367  ;;
24368  *)
24369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24370for as_dir in $PATH
24371do
24372  IFS=$as_save_IFS
24373  test -z "$as_dir" && as_dir=.
24374    for ac_exec_ext in '' $ac_executable_extensions; do
24375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24376    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24378    break 2
24379  fi
24380done
24381  done
24382IFS=$as_save_IFS
24383
24384  ;;
24385esac
24386fi
24387CODESIGN=$ac_cv_path_CODESIGN
24388if test -n "$CODESIGN"; then
24389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24390$as_echo "$CODESIGN" >&6; }
24391else
24392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24393$as_echo "no" >&6; }
24394fi
24395
24396
24397  test -n "$CODESIGN" && break
24398done
24399
24400    else
24401      # If it succeeded, then it was overridden by the user. We will use it
24402      # for the tool.
24403
24404      # First remove it from the list of overridden variables, so we can test
24405      # for unknown variables in the end.
24406      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24407
24408      # Check if we try to supply an empty value
24409      if test "x$CODESIGN" = x; then
24410        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
24411$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
24412        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24413$as_echo_n "checking for CODESIGN... " >&6; }
24414        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24415$as_echo "disabled" >&6; }
24416      else
24417        # Check if the provided tool contains a complete path.
24418        tool_specified="$CODESIGN"
24419        tool_basename="${tool_specified##*/}"
24420        if test "x$tool_basename" = "x$tool_specified"; then
24421          # A command without a complete path is provided, search $PATH.
24422          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
24423$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
24424          # Extract the first word of "$tool_basename", so it can be a program name with args.
24425set dummy $tool_basename; ac_word=$2
24426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24427$as_echo_n "checking for $ac_word... " >&6; }
24428if ${ac_cv_path_CODESIGN+:} false; then :
24429  $as_echo_n "(cached) " >&6
24430else
24431  case $CODESIGN in
24432  [\\/]* | ?:[\\/]*)
24433  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24434  ;;
24435  *)
24436  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24437for as_dir in $PATH
24438do
24439  IFS=$as_save_IFS
24440  test -z "$as_dir" && as_dir=.
24441    for ac_exec_ext in '' $ac_executable_extensions; do
24442  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24443    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24444    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24445    break 2
24446  fi
24447done
24448  done
24449IFS=$as_save_IFS
24450
24451  ;;
24452esac
24453fi
24454CODESIGN=$ac_cv_path_CODESIGN
24455if test -n "$CODESIGN"; then
24456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24457$as_echo "$CODESIGN" >&6; }
24458else
24459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24460$as_echo "no" >&6; }
24461fi
24462
24463
24464          if test "x$CODESIGN" = x; then
24465            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24466          fi
24467        else
24468          # Otherwise we believe it is a complete path. Use it as it is.
24469          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
24470$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
24471          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24472$as_echo_n "checking for CODESIGN... " >&6; }
24473          if test ! -x "$tool_specified"; then
24474            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24475$as_echo "not found" >&6; }
24476            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
24477          fi
24478          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24479$as_echo "$tool_specified" >&6; }
24480        fi
24481      fi
24482    fi
24483
24484  fi
24485
24486
24487    if test "x$CODESIGN" != "x"; then
24488      # Verify that the openjdk_codesign certificate is present
24489      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
24490$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
24491      $RM codesign-testfile
24492      $TOUCH codesign-testfile
24493      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
24494      $RM codesign-testfile
24495      if test "x$CODESIGN" = x; then
24496        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24497$as_echo "no" >&6; }
24498      else
24499        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24500$as_echo "yes" >&6; }
24501      fi
24502    fi
24503
24504
24505
24506  # Publish this variable in the help.
24507
24508
24509  if [ -z "${SETFILE+x}" ]; then
24510    # The variable is not set by user, try to locate tool using the code snippet
24511    for ac_prog in SetFile
24512do
24513  # Extract the first word of "$ac_prog", so it can be a program name with args.
24514set dummy $ac_prog; ac_word=$2
24515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24516$as_echo_n "checking for $ac_word... " >&6; }
24517if ${ac_cv_path_SETFILE+:} false; then :
24518  $as_echo_n "(cached) " >&6
24519else
24520  case $SETFILE in
24521  [\\/]* | ?:[\\/]*)
24522  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24523  ;;
24524  *)
24525  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24526for as_dir in $PATH
24527do
24528  IFS=$as_save_IFS
24529  test -z "$as_dir" && as_dir=.
24530    for ac_exec_ext in '' $ac_executable_extensions; do
24531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24532    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24534    break 2
24535  fi
24536done
24537  done
24538IFS=$as_save_IFS
24539
24540  ;;
24541esac
24542fi
24543SETFILE=$ac_cv_path_SETFILE
24544if test -n "$SETFILE"; then
24545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24546$as_echo "$SETFILE" >&6; }
24547else
24548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24549$as_echo "no" >&6; }
24550fi
24551
24552
24553  test -n "$SETFILE" && break
24554done
24555
24556  else
24557    # The variable is set, but is it from the command line or the environment?
24558
24559    # Try to remove the string !SETFILE! from our list.
24560    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
24561    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24562      # If it failed, the variable was not from the command line. Ignore it,
24563      # but warn the user (except for BASH, which is always set by the calling BASH).
24564      if test "xSETFILE" != xBASH; then
24565        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
24566$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
24567      fi
24568      # Try to locate tool using the code snippet
24569      for ac_prog in SetFile
24570do
24571  # Extract the first word of "$ac_prog", so it can be a program name with args.
24572set dummy $ac_prog; ac_word=$2
24573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24574$as_echo_n "checking for $ac_word... " >&6; }
24575if ${ac_cv_path_SETFILE+:} false; then :
24576  $as_echo_n "(cached) " >&6
24577else
24578  case $SETFILE in
24579  [\\/]* | ?:[\\/]*)
24580  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24581  ;;
24582  *)
24583  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24584for as_dir in $PATH
24585do
24586  IFS=$as_save_IFS
24587  test -z "$as_dir" && as_dir=.
24588    for ac_exec_ext in '' $ac_executable_extensions; do
24589  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24590    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24592    break 2
24593  fi
24594done
24595  done
24596IFS=$as_save_IFS
24597
24598  ;;
24599esac
24600fi
24601SETFILE=$ac_cv_path_SETFILE
24602if test -n "$SETFILE"; then
24603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24604$as_echo "$SETFILE" >&6; }
24605else
24606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24607$as_echo "no" >&6; }
24608fi
24609
24610
24611  test -n "$SETFILE" && break
24612done
24613
24614    else
24615      # If it succeeded, then it was overridden by the user. We will use it
24616      # for the tool.
24617
24618      # First remove it from the list of overridden variables, so we can test
24619      # for unknown variables in the end.
24620      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24621
24622      # Check if we try to supply an empty value
24623      if test "x$SETFILE" = x; then
24624        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
24625$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
24626        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24627$as_echo_n "checking for SETFILE... " >&6; }
24628        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24629$as_echo "disabled" >&6; }
24630      else
24631        # Check if the provided tool contains a complete path.
24632        tool_specified="$SETFILE"
24633        tool_basename="${tool_specified##*/}"
24634        if test "x$tool_basename" = "x$tool_specified"; then
24635          # A command without a complete path is provided, search $PATH.
24636          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
24637$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
24638          # Extract the first word of "$tool_basename", so it can be a program name with args.
24639set dummy $tool_basename; ac_word=$2
24640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24641$as_echo_n "checking for $ac_word... " >&6; }
24642if ${ac_cv_path_SETFILE+:} false; then :
24643  $as_echo_n "(cached) " >&6
24644else
24645  case $SETFILE in
24646  [\\/]* | ?:[\\/]*)
24647  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24648  ;;
24649  *)
24650  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24651for as_dir in $PATH
24652do
24653  IFS=$as_save_IFS
24654  test -z "$as_dir" && as_dir=.
24655    for ac_exec_ext in '' $ac_executable_extensions; do
24656  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24657    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24658    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24659    break 2
24660  fi
24661done
24662  done
24663IFS=$as_save_IFS
24664
24665  ;;
24666esac
24667fi
24668SETFILE=$ac_cv_path_SETFILE
24669if test -n "$SETFILE"; then
24670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24671$as_echo "$SETFILE" >&6; }
24672else
24673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24674$as_echo "no" >&6; }
24675fi
24676
24677
24678          if test "x$SETFILE" = x; then
24679            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24680          fi
24681        else
24682          # Otherwise we believe it is a complete path. Use it as it is.
24683          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
24684$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
24685          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24686$as_echo_n "checking for SETFILE... " >&6; }
24687          if test ! -x "$tool_specified"; then
24688            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24689$as_echo "not found" >&6; }
24690            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
24691          fi
24692          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24693$as_echo "$tool_specified" >&6; }
24694        fi
24695      fi
24696    fi
24697
24698  fi
24699
24700
24701
24702  if test "x$SETFILE" = x; then
24703    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24704  fi
24705
24706
24707  fi
24708
24709
24710  # Check bash version
24711  # Extra [ ] to stop m4 mangling
24712   BASH_VER=`$BASH --version | $SED -n  -e 's/^.*bash.*ersion *\([0-9.]*\).*$/\1/ p'`
24713  { $as_echo "$as_me:${as_lineno-$LINENO}: checking bash version" >&5
24714$as_echo_n "checking bash version... " >&6; }
24715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH_VER" >&5
24716$as_echo "$BASH_VER" >&6; }
24717
24718  BASH_MAJOR=`$ECHO $BASH_VER | $CUT -d . -f 1`
24719  BASH_MINOR=`$ECHO $BASH_VER | $CUT -d . -f 2`
24720  if test $BASH_MAJOR -lt 3 || (test $BASH_MAJOR -eq 3 && test $BASH_MINOR -lt 2); then
24721    as_fn_error $? "bash version 3.2 or better is required" "$LINENO" 5
24722  fi
24723
24724  # Test if bash supports pipefail.
24725  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24726$as_echo_n "checking if bash supports pipefail... " >&6; }
24727  if ${BASH} -c 'set -o pipefail'; then
24728    BASH_ARGS="$BASH_ARGS -o pipefail"
24729    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24730$as_echo "yes" >&6; }
24731  else
24732    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24733$as_echo "no" >&6; }
24734  fi
24735
24736  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24737$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24738  if ${BASH} -e -c 'true'; then
24739    BASH_ARGS="$BASH_ARGS -e"
24740    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24741$as_echo "yes" >&6; }
24742  else
24743    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24744$as_echo "no" >&6; }
24745  fi
24746
24747
24748
24749
24750# Check if pkg-config is available.
24751
24752
24753if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24754	if test -n "$ac_tool_prefix"; then
24755  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24756set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24758$as_echo_n "checking for $ac_word... " >&6; }
24759if ${ac_cv_path_PKG_CONFIG+:} false; then :
24760  $as_echo_n "(cached) " >&6
24761else
24762  case $PKG_CONFIG in
24763  [\\/]* | ?:[\\/]*)
24764  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24765  ;;
24766  *)
24767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24768for as_dir in $PATH
24769do
24770  IFS=$as_save_IFS
24771  test -z "$as_dir" && as_dir=.
24772    for ac_exec_ext in '' $ac_executable_extensions; do
24773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24774    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24776    break 2
24777  fi
24778done
24779  done
24780IFS=$as_save_IFS
24781
24782  ;;
24783esac
24784fi
24785PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24786if test -n "$PKG_CONFIG"; then
24787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24788$as_echo "$PKG_CONFIG" >&6; }
24789else
24790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24791$as_echo "no" >&6; }
24792fi
24793
24794
24795fi
24796if test -z "$ac_cv_path_PKG_CONFIG"; then
24797  ac_pt_PKG_CONFIG=$PKG_CONFIG
24798  # Extract the first word of "pkg-config", so it can be a program name with args.
24799set dummy pkg-config; ac_word=$2
24800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24801$as_echo_n "checking for $ac_word... " >&6; }
24802if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24803  $as_echo_n "(cached) " >&6
24804else
24805  case $ac_pt_PKG_CONFIG in
24806  [\\/]* | ?:[\\/]*)
24807  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24808  ;;
24809  *)
24810  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24811for as_dir in $PATH
24812do
24813  IFS=$as_save_IFS
24814  test -z "$as_dir" && as_dir=.
24815    for ac_exec_ext in '' $ac_executable_extensions; do
24816  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24817    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24818    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24819    break 2
24820  fi
24821done
24822  done
24823IFS=$as_save_IFS
24824
24825  ;;
24826esac
24827fi
24828ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24829if test -n "$ac_pt_PKG_CONFIG"; then
24830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24831$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24832else
24833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24834$as_echo "no" >&6; }
24835fi
24836
24837  if test "x$ac_pt_PKG_CONFIG" = x; then
24838    PKG_CONFIG=""
24839  else
24840    case $cross_compiling:$ac_tool_warned in
24841yes:)
24842{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24843$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24844ac_tool_warned=yes ;;
24845esac
24846    PKG_CONFIG=$ac_pt_PKG_CONFIG
24847  fi
24848else
24849  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24850fi
24851
24852fi
24853if test -n "$PKG_CONFIG"; then
24854	_pkg_min_version=0.9.0
24855	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24856$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24857	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24858		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24859$as_echo "yes" >&6; }
24860	else
24861		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24862$as_echo "no" >&6; }
24863		PKG_CONFIG=""
24864	fi
24865
24866fi
24867
24868# After basic tools have been setup, we can check build os specific details.
24869
24870  ###############################################################################
24871
24872  # Note that this is the build platform OS version!
24873
24874  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24875  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24876  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24877  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24878
24879
24880
24881
24882
24883# Misc basic settings
24884
24885
24886# Check whether --with-default-make-target was given.
24887if test "${with_default_make_target+set}" = set; then :
24888  withval=$with_default_make_target;
24889fi
24890
24891  if test "x$with_default_make_target" = "x" \
24892      || test "x$with_default_make_target" = "xyes"; then
24893    DEFAULT_MAKE_TARGET="exploded-image"
24894  elif test "x$with_default_make_target" = "xno"; then
24895    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24896  else
24897    DEFAULT_MAKE_TARGET="$with_default_make_target"
24898  fi
24899
24900
24901
24902
24903###############################################################################
24904#
24905# Determine OpenJDK variants, options and version numbers.
24906#
24907###############################################################################
24908
24909# We need build & target for this.
24910
24911  # Should we build a JDK without a graphical UI?
24912  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24913$as_echo_n "checking headless only... " >&6; }
24914  # Check whether --enable-headless-only was given.
24915if test "${enable_headless_only+set}" = set; then :
24916  enableval=$enable_headless_only;
24917fi
24918
24919
24920  if test "x$enable_headless_only" = "xyes"; then
24921    ENABLE_HEADLESS_ONLY="true"
24922    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24923$as_echo "yes" >&6; }
24924  elif test "x$enable_headless_only" = "xno"; then
24925    ENABLE_HEADLESS_ONLY="false"
24926    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24927$as_echo "no" >&6; }
24928  elif test "x$enable_headless_only" = "x"; then
24929    ENABLE_HEADLESS_ONLY="false"
24930    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24931$as_echo "no" >&6; }
24932  else
24933    as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24934  fi
24935
24936
24937
24938  # Should we build the complete docs, or just a lightweight version?
24939  # Check whether --enable-full-docs was given.
24940if test "${enable_full_docs+set}" = set; then :
24941  enableval=$enable_full_docs;
24942fi
24943
24944
24945  # Verify dependencies
24946  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for graphviz dot" >&5
24947$as_echo_n "checking for graphviz dot... " >&6; }
24948  if test "x$DOT" != "x"; then
24949    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24950$as_echo "yes" >&6; }
24951  else
24952    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cannot generate full docs" >&5
24953$as_echo "no, cannot generate full docs" >&6; }
24954    FULL_DOCS_DEP_MISSING=true
24955  fi
24956
24957  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pandoc" >&5
24958$as_echo_n "checking for pandoc... " >&6; }
24959  if test "x$PANDOC" != "x"; then
24960    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24961$as_echo "yes" >&6; }
24962  else
24963    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cannot generate full docs" >&5
24964$as_echo "no, cannot generate full docs" >&6; }
24965    FULL_DOCS_DEP_MISSING=true
24966  fi
24967
24968  { $as_echo "$as_me:${as_lineno-$LINENO}: checking full docs" >&5
24969$as_echo_n "checking full docs... " >&6; }
24970  if test "x$enable_full_docs" = xyes; then
24971    if test "x$FULL_DOCS_DEP_MISSING" = "xtrue"; then
24972      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
24973$as_echo "no, missing dependencies" >&6; }
24974
24975  # Print a helpful message on how to acquire the necessary build dependency.
24976  # dot is the help tag: freetype, cups, alsa etc
24977  MISSING_DEPENDENCY=dot
24978
24979  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24980    cygwin_help $MISSING_DEPENDENCY
24981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24982    msys_help $MISSING_DEPENDENCY
24983  else
24984    PKGHANDLER_COMMAND=
24985
24986    case $PKGHANDLER in
24987      apt-get)
24988        apt_help     $MISSING_DEPENDENCY ;;
24989      yum)
24990        yum_help     $MISSING_DEPENDENCY ;;
24991      brew)
24992        brew_help    $MISSING_DEPENDENCY ;;
24993      port)
24994        port_help    $MISSING_DEPENDENCY ;;
24995      pkgutil)
24996        pkgutil_help $MISSING_DEPENDENCY ;;
24997      pkgadd)
24998        pkgadd_help  $MISSING_DEPENDENCY ;;
24999    esac
25000
25001    if test "x$PKGHANDLER_COMMAND" != x; then
25002      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25003    fi
25004  fi
25005
25006      as_fn_error $? "Cannot enable full docs with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
25007    else
25008      ENABLE_FULL_DOCS=true
25009      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
25010$as_echo "yes, forced" >&6; }
25011    fi
25012  elif test "x$enable_full_docs" = xno; then
25013    ENABLE_FULL_DOCS=false
25014    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
25015$as_echo "no, forced" >&6; }
25016  elif test "x$enable_full_docs" = x; then
25017    # Check for prerequisites
25018    if test "x$FULL_DOCS_DEP_MISSING" = xtrue; then
25019      ENABLE_FULL_DOCS=false
25020      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
25021$as_echo "no, missing dependencies" >&6; }
25022    else
25023      ENABLE_FULL_DOCS=true
25024      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
25025$as_echo "yes, dependencies present" >&6; }
25026    fi
25027  else
25028    as_fn_error $? "--enable-full-docs can only take yes or no" "$LINENO" 5
25029  fi
25030
25031
25032
25033  # Choose cacerts source file
25034
25035# Check whether --with-cacerts-file was given.
25036if test "${with_cacerts_file+set}" = set; then :
25037  withval=$with_cacerts_file;
25038fi
25039
25040  if test "x$with_cacerts_file" != x; then
25041    CACERTS_FILE=$with_cacerts_file
25042  fi
25043
25044
25045  # Enable or disable unlimited crypto
25046  # Check whether --enable-unlimited-crypto was given.
25047if test "${enable_unlimited_crypto+set}" = set; then :
25048  enableval=$enable_unlimited_crypto;
25049else
25050  enable_unlimited_crypto=yes
25051fi
25052
25053  if test "x$enable_unlimited_crypto" = "xyes"; then
25054    UNLIMITED_CRYPTO=true
25055  else
25056    UNLIMITED_CRYPTO=false
25057  fi
25058
25059
25060  # Should we build the serviceability agent (SA)?
25061  INCLUDE_SA=true
25062  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
25063    INCLUDE_SA=false
25064  fi
25065  if test "x$OPENJDK_TARGET_OS" = xaix ; then
25066    INCLUDE_SA=false
25067  fi
25068
25069
25070  # Compress jars
25071  COMPRESS_JARS=false
25072
25073
25074
25075  # Setup default copyright year. Mostly overridden when building close to a new year.
25076
25077# Check whether --with-copyright-year was given.
25078if test "${with_copyright_year+set}" = set; then :
25079  withval=$with_copyright_year;
25080fi
25081
25082  if test "x$with_copyright_year" = xyes; then
25083    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
25084  elif test "x$with_copyright_year" != x; then
25085    COPYRIGHT_YEAR="$with_copyright_year"
25086  else
25087    COPYRIGHT_YEAR=`$DATE +'%Y'`
25088  fi
25089
25090
25091
25092  # Check whether --enable-keep-packaged-modules was given.
25093if test "${enable_keep_packaged_modules+set}" = set; then :
25094  enableval=$enable_keep_packaged_modules;
25095fi
25096
25097
25098  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
25099$as_echo_n "checking if packaged modules are kept... " >&6; }
25100  if test "x$enable_keep_packaged_modules" = "xyes"; then
25101    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25102$as_echo "yes" >&6; }
25103    JLINK_KEEP_PACKAGED_MODULES=true
25104  elif test "x$enable_keep_packaged_modules" = "xno"; then
25105    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25106$as_echo "no" >&6; }
25107    JLINK_KEEP_PACKAGED_MODULES=false
25108  elif test "x$enable_keep_packaged_modules" = "x"; then
25109    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
25110$as_echo "yes (default)" >&6; }
25111    JLINK_KEEP_PACKAGED_MODULES=true
25112  else
25113    { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
25114$as_echo "error" >&6; }
25115    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
25116  fi
25117
25118
25119
25120
25121  # Warn user that old version arguments are deprecated.
25122
25123
25124# Check whether --with-milestone was given.
25125if test "${with_milestone+set}" = set; then :
25126  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
25127$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
25128fi
25129
25130
25131
25132
25133# Check whether --with-update-version was given.
25134if test "${with_update_version+set}" = set; then :
25135  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
25136$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
25137fi
25138
25139
25140
25141
25142# Check whether --with-user-release-suffix was given.
25143if test "${with_user_release_suffix+set}" = set; then :
25144  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
25145$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
25146fi
25147
25148
25149
25150
25151# Check whether --with-build-number was given.
25152if test "${with_build_number+set}" = set; then :
25153  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
25154$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
25155fi
25156
25157
25158
25159  # Source the version numbers file
25160  . $AUTOCONF_DIR/version-numbers
25161
25162  # Some non-version number information is set in that file
25163
25164
25165
25166
25167
25168
25169
25170
25171
25172  # Override version from arguments
25173
25174  # If --with-version-string is set, process it first. It is possible to
25175  # override parts with more specific flags, since these are processed later.
25176
25177# Check whether --with-version-string was given.
25178if test "${with_version_string+set}" = set; then :
25179  withval=$with_version_string;
25180fi
25181
25182  if test "x$with_version_string" = xyes; then
25183    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
25184  elif test "x$with_version_string" != x; then
25185    # Additional [] needed to keep m4 from mangling shell constructs.
25186    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
25187      VERSION_MAJOR=${BASH_REMATCH[1]}
25188      VERSION_MINOR=${BASH_REMATCH[3]}
25189      VERSION_SECURITY=${BASH_REMATCH[5]}
25190      VERSION_PATCH=${BASH_REMATCH[7]}
25191      VERSION_PRE=${BASH_REMATCH[9]}
25192      version_plus_separator=${BASH_REMATCH[11]}
25193      VERSION_BUILD=${BASH_REMATCH[12]}
25194      VERSION_OPT=${BASH_REMATCH[14]}
25195      # Unspecified numerical fields are interpreted as 0.
25196      if test "x$VERSION_MINOR" = x; then
25197        VERSION_MINOR=0
25198      fi
25199      if test "x$VERSION_SECURITY" = x; then
25200        VERSION_SECURITY=0
25201      fi
25202      if test "x$VERSION_PATCH" = x; then
25203        VERSION_PATCH=0
25204      fi
25205      if test "x$version_plus_separator" != x \
25206          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
25207        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
25208      fi
25209      # Stop the version part process from setting default values.
25210      # We still allow them to explicitly override though.
25211      NO_DEFAULT_VERSION_PARTS=true
25212    else
25213      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
25214    fi
25215  fi
25216
25217
25218# Check whether --with-version-pre was given.
25219if test "${with_version_pre+set}" = set; then :
25220  withval=$with_version_pre; with_version_pre_present=true
25221else
25222  with_version_pre_present=false
25223fi
25224
25225
25226  if test "x$with_version_pre_present" = xtrue; then
25227    if test "x$with_version_pre" = xyes; then
25228      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
25229    elif test "x$with_version_pre" = xno; then
25230      # Interpret --without-* as empty string instead of the literal "no"
25231      VERSION_PRE=
25232    else
25233      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
25234       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
25235      if test "x$VERSION_PRE" != "x$with_version_pre"; then
25236        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
25237$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
25238      fi
25239    fi
25240  else
25241    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25242      # Default is to use "internal" as pre
25243      VERSION_PRE="internal"
25244    fi
25245  fi
25246
25247
25248# Check whether --with-version-opt was given.
25249if test "${with_version_opt+set}" = set; then :
25250  withval=$with_version_opt; with_version_opt_present=true
25251else
25252  with_version_opt_present=false
25253fi
25254
25255
25256  if test "x$with_version_opt_present" = xtrue; then
25257    if test "x$with_version_opt" = xyes; then
25258      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
25259    elif test "x$with_version_opt" = xno; then
25260      # Interpret --without-* as empty string instead of the literal "no"
25261      VERSION_OPT=
25262    else
25263      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
25264       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
25265      if test "x$VERSION_OPT" != "x$with_version_opt"; then
25266        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
25267$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
25268      fi
25269    fi
25270  else
25271    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25272      # Default is to calculate a string like this 'adhoc.<username>.<base dir name>'
25273      # Outer [ ] to quote m4.
25274       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
25275      VERSION_OPT="adhoc.$USERNAME.$basedirname"
25276    fi
25277  fi
25278
25279
25280# Check whether --with-version-build was given.
25281if test "${with_version_build+set}" = set; then :
25282  withval=$with_version_build; with_version_build_present=true
25283else
25284  with_version_build_present=false
25285fi
25286
25287
25288  if test "x$with_version_build_present" = xtrue; then
25289    if test "x$with_version_build" = xyes; then
25290      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
25291    elif test "x$with_version_build" = xno; then
25292      # Interpret --without-* as empty string instead of the literal "no"
25293      VERSION_BUILD=
25294    elif test "x$with_version_build" = x; then
25295      VERSION_BUILD=
25296    else
25297
25298  # Additional [] needed to keep m4 from mangling shell constructs.
25299  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25300    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
25301  fi
25302  # Extract the version number without leading zeros.
25303  cleaned_value=${BASH_REMATCH[1]}
25304  if test "x$cleaned_value" = x; then
25305    # Special case for zero
25306    cleaned_value=${BASH_REMATCH[2]}
25307  fi
25308
25309  if test $cleaned_value -gt 255; then
25310    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
25311  fi
25312  if test "x$cleaned_value" != "x$with_version_build"; then
25313    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
25314$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
25315  fi
25316  VERSION_BUILD=$cleaned_value
25317
25318    fi
25319  else
25320    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25321      # Default is to not have a build number.
25322      VERSION_BUILD=""
25323      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
25324      VERSION_BUILD=0
25325    fi
25326  fi
25327
25328
25329# Check whether --with-version-major was given.
25330if test "${with_version_major+set}" = set; then :
25331  withval=$with_version_major; with_version_major_present=true
25332else
25333  with_version_major_present=false
25334fi
25335
25336
25337  if test "x$with_version_major_present" = xtrue; then
25338    if test "x$with_version_major" = xyes; then
25339      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
25340    else
25341
25342  # Additional [] needed to keep m4 from mangling shell constructs.
25343  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25344    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
25345  fi
25346  # Extract the version number without leading zeros.
25347  cleaned_value=${BASH_REMATCH[1]}
25348  if test "x$cleaned_value" = x; then
25349    # Special case for zero
25350    cleaned_value=${BASH_REMATCH[2]}
25351  fi
25352
25353  if test $cleaned_value -gt 255; then
25354    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
25355  fi
25356  if test "x$cleaned_value" != "x$with_version_major"; then
25357    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
25358$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
25359  fi
25360  VERSION_MAJOR=$cleaned_value
25361
25362    fi
25363  else
25364    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25365      # Default is to get value from version-numbers
25366      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
25367    fi
25368  fi
25369
25370
25371# Check whether --with-version-minor was given.
25372if test "${with_version_minor+set}" = set; then :
25373  withval=$with_version_minor; with_version_minor_present=true
25374else
25375  with_version_minor_present=false
25376fi
25377
25378
25379  if test "x$with_version_minor_present" = xtrue; then
25380    if test "x$with_version_minor" = xyes; then
25381      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
25382    elif test "x$with_version_minor" = xno; then
25383      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25384      VERSION_MINOR=0
25385    elif test "x$with_version_minor" = x; then
25386      VERSION_MINOR=0
25387    else
25388
25389  # Additional [] needed to keep m4 from mangling shell constructs.
25390  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25391    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
25392  fi
25393  # Extract the version number without leading zeros.
25394  cleaned_value=${BASH_REMATCH[1]}
25395  if test "x$cleaned_value" = x; then
25396    # Special case for zero
25397    cleaned_value=${BASH_REMATCH[2]}
25398  fi
25399
25400  if test $cleaned_value -gt 255; then
25401    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
25402  fi
25403  if test "x$cleaned_value" != "x$with_version_minor"; then
25404    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
25405$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
25406  fi
25407  VERSION_MINOR=$cleaned_value
25408
25409    fi
25410  else
25411    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25412      # Default is 0, if unspecified
25413      VERSION_MINOR=$DEFAULT_VERSION_MINOR
25414    fi
25415  fi
25416
25417
25418# Check whether --with-version-security was given.
25419if test "${with_version_security+set}" = set; then :
25420  withval=$with_version_security; with_version_security_present=true
25421else
25422  with_version_security_present=false
25423fi
25424
25425
25426  if test "x$with_version_security_present" = xtrue; then
25427    if test "x$with_version_security" = xyes; then
25428      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
25429    elif test "x$with_version_security" = xno; then
25430      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25431      VERSION_SECURITY=0
25432    elif test "x$with_version_security" = x; then
25433      VERSION_SECURITY=0
25434    else
25435
25436  # Additional [] needed to keep m4 from mangling shell constructs.
25437  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25438    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
25439  fi
25440  # Extract the version number without leading zeros.
25441  cleaned_value=${BASH_REMATCH[1]}
25442  if test "x$cleaned_value" = x; then
25443    # Special case for zero
25444    cleaned_value=${BASH_REMATCH[2]}
25445  fi
25446
25447  if test $cleaned_value -gt 255; then
25448    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
25449  fi
25450  if test "x$cleaned_value" != "x$with_version_security"; then
25451    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
25452$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
25453  fi
25454  VERSION_SECURITY=$cleaned_value
25455
25456    fi
25457  else
25458    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25459      # Default is 0, if unspecified
25460      VERSION_SECURITY=$DEFAULT_VERSION_SECURITY
25461    fi
25462  fi
25463
25464
25465# Check whether --with-version-patch was given.
25466if test "${with_version_patch+set}" = set; then :
25467  withval=$with_version_patch; with_version_patch_present=true
25468else
25469  with_version_patch_present=false
25470fi
25471
25472
25473  if test "x$with_version_patch_present" = xtrue; then
25474    if test "x$with_version_patch" = xyes; then
25475      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
25476    elif test "x$with_version_patch" = xno; then
25477      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25478      VERSION_PATCH=0
25479    elif test "x$with_version_patch" = x; then
25480      VERSION_PATCH=0
25481    else
25482
25483  # Additional [] needed to keep m4 from mangling shell constructs.
25484  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25485    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
25486  fi
25487  # Extract the version number without leading zeros.
25488  cleaned_value=${BASH_REMATCH[1]}
25489  if test "x$cleaned_value" = x; then
25490    # Special case for zero
25491    cleaned_value=${BASH_REMATCH[2]}
25492  fi
25493
25494  if test $cleaned_value -gt 255; then
25495    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
25496  fi
25497  if test "x$cleaned_value" != "x$with_version_patch"; then
25498    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
25499$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
25500  fi
25501  VERSION_PATCH=$cleaned_value
25502
25503    fi
25504  else
25505    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25506      # Default is 0, if unspecified
25507      VERSION_PATCH=$DEFAULT_VERSION_PATCH
25508    fi
25509  fi
25510
25511  # Calculate derived version properties
25512
25513  # Set VERSION_IS_GA based on if VERSION_PRE has a value
25514  if test "x$VERSION_PRE" = x; then
25515    VERSION_IS_GA=true
25516  else
25517    VERSION_IS_GA=false
25518  fi
25519
25520  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
25521  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
25522
25523  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
25524  # Strip trailing zeroes from stripped_version_number
25525  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
25526  VERSION_NUMBER=$stripped_version_number
25527
25528  # The complete version string, with additional build information
25529  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
25530    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25531  else
25532    # If either build or opt is set, we need a + separator
25533    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
25534  fi
25535
25536  # The short version string, just VERSION_NUMBER and PRE, if present.
25537  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25538
25539  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
25540$as_echo_n "checking for version string... " >&6; }
25541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
25542$as_echo "$VERSION_STRING" >&6; }
25543
25544
25545
25546
25547
25548
25549
25550
25551
25552
25553
25554
25555
25556
25557
25558###############################################################################
25559#
25560# Setup BootJDK, used to bootstrap the build.
25561#
25562###############################################################################
25563
25564
25565  BOOT_JDK_FOUND=no
25566
25567# Check whether --with-boot-jdk was given.
25568if test "${with_boot_jdk+set}" = set; then :
25569  withval=$with_boot_jdk;
25570fi
25571
25572
25573  # We look for the Boot JDK through various means, going from more certain to
25574  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
25575  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
25576  # must check if this is indeed valid; otherwise we'll continue looking.
25577
25578  # Test: Is bootjdk explicitly set by command line arguments?
25579
25580  if test "x$BOOT_JDK_FOUND" = xno; then
25581    # Now execute the test
25582
25583  if test "x$with_boot_jdk" != x; then
25584    BOOT_JDK=$with_boot_jdk
25585    BOOT_JDK_FOUND=maybe
25586    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
25587$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
25588  fi
25589
25590
25591    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25592    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25593      # Do we have a bin/java?
25594      if test ! -x "$BOOT_JDK/bin/java"; then
25595        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25596$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25597        BOOT_JDK_FOUND=no
25598      else
25599        # Do we have a bin/javac?
25600        if test ! -x "$BOOT_JDK/bin/javac"; then
25601          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25602$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25603          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25604$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25605          BOOT_JDK_FOUND=no
25606        else
25607          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25608          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25609
25610          # Extra M4 quote needed to protect [] in grep expression.
25611          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25612          if test "x$FOUND_CORRECT_VERSION" = x; then
25613            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25614$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25615            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25616$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25617            BOOT_JDK_FOUND=no
25618          else
25619            # We're done! :-)
25620            BOOT_JDK_FOUND=yes
25621
25622  # Only process if variable expands to non-empty
25623
25624  if test "x$BOOT_JDK" != x; then
25625    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25626
25627  # Input might be given as Windows format, start by converting to
25628  # unix format.
25629  path="$BOOT_JDK"
25630  new_path=`$CYGPATH -u "$path"`
25631
25632  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25633  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25634  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25635  # "foo.exe" is OK but "foo" is an error.
25636  #
25637  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25638  # It is also a way to make sure we got the proper file name for the real test later on.
25639  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25640  if test "x$test_shortpath" = x; then
25641    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25642$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25643    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25644  fi
25645
25646  # Call helper function which possibly converts this using DOS-style short mode.
25647  # If so, the updated path is stored in $new_path.
25648
25649  input_path="$new_path"
25650  # Check if we need to convert this using DOS-style short mode. If the path
25651  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25652  # take no chances and rewrite it.
25653  # Note: m4 eats our [], so we need to use [ and ] instead.
25654  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25655  if test "x$has_forbidden_chars" != x; then
25656    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25657    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25658    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25659    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25660      # Going to short mode and back again did indeed matter. Since short mode is
25661      # case insensitive, let's make it lowercase to improve readability.
25662      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25663      # Now convert it back to Unix-style (cygpath)
25664      input_path=`$CYGPATH -u "$shortmode_path"`
25665      new_path="$input_path"
25666    fi
25667  fi
25668
25669  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25670  if test "x$test_cygdrive_prefix" = x; then
25671    # As a simple fix, exclude /usr/bin since it's not a real path.
25672    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25673      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25674      # a path prefixed by /cygdrive for fixpath to work.
25675      new_path="$CYGWIN_ROOT_PATH$input_path"
25676    fi
25677  fi
25678
25679
25680  if test "x$path" != "x$new_path"; then
25681    BOOT_JDK="$new_path"
25682    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25683$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25684  fi
25685
25686    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25687
25688  path="$BOOT_JDK"
25689  has_colon=`$ECHO $path | $GREP ^.:`
25690  new_path="$path"
25691  if test "x$has_colon" = x; then
25692    # Not in mixed or Windows style, start by that.
25693    new_path=`cmd //c echo $path`
25694  fi
25695
25696
25697  input_path="$new_path"
25698  # Check if we need to convert this using DOS-style short mode. If the path
25699  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25700  # take no chances and rewrite it.
25701  # Note: m4 eats our [], so we need to use [ and ] instead.
25702  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25703  if test "x$has_forbidden_chars" != x; then
25704    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25705    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25706  fi
25707
25708
25709  windows_path="$new_path"
25710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25711    unix_path=`$CYGPATH -u "$windows_path"`
25712    new_path="$unix_path"
25713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25714    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25715    new_path="$unix_path"
25716  fi
25717
25718  if test "x$path" != "x$new_path"; then
25719    BOOT_JDK="$new_path"
25720    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25721$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25722  fi
25723
25724  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25725  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25726
25727    else
25728      # We're on a unix platform. Hooray! :)
25729      path="$BOOT_JDK"
25730      has_space=`$ECHO "$path" | $GREP " "`
25731      if test "x$has_space" != x; then
25732        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25733$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25734        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25735      fi
25736
25737      # Use eval to expand a potential ~
25738      eval path="$path"
25739      if test ! -f "$path" && test ! -d "$path"; then
25740        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25741      fi
25742
25743      if test -d "$path"; then
25744        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25745      else
25746        dir="`$DIRNAME "$path"`"
25747        base="`$BASENAME "$path"`"
25748        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25749      fi
25750    fi
25751  fi
25752
25753            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25754$as_echo_n "checking for Boot JDK... " >&6; }
25755            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25756$as_echo "$BOOT_JDK" >&6; }
25757            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25758$as_echo_n "checking Boot JDK version... " >&6; }
25759            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25760            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25761$as_echo "$BOOT_JDK_VERSION" >&6; }
25762          fi # end check jdk version
25763        fi # end check javac
25764      fi # end check java
25765    fi # end check boot jdk found
25766  fi
25767
25768  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
25769    # Having specified an argument which is incorrect will produce an instant failure;
25770    # we should not go on looking
25771    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
25772  fi
25773
25774  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
25775
25776  if test "x$BOOT_JDK_FOUND" = xno; then
25777    # Now execute the test
25778
25779  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
25780    # First check at user selected default
25781
25782  if test "x$BOOT_JDK_FOUND" = xno; then
25783    # Now execute the test
25784
25785  if test -x /usr/libexec/java_home; then
25786    BOOT_JDK=`/usr/libexec/java_home `
25787    BOOT_JDK_FOUND=maybe
25788    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
25789$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
25790  fi
25791
25792
25793    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25794    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25795      # Do we have a bin/java?
25796      if test ! -x "$BOOT_JDK/bin/java"; then
25797        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25798$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25799        BOOT_JDK_FOUND=no
25800      else
25801        # Do we have a bin/javac?
25802        if test ! -x "$BOOT_JDK/bin/javac"; then
25803          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25804$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25805          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25806$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25807          BOOT_JDK_FOUND=no
25808        else
25809          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25810          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25811
25812          # Extra M4 quote needed to protect [] in grep expression.
25813          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25814          if test "x$FOUND_CORRECT_VERSION" = x; then
25815            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25816$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25817            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25818$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25819            BOOT_JDK_FOUND=no
25820          else
25821            # We're done! :-)
25822            BOOT_JDK_FOUND=yes
25823
25824  # Only process if variable expands to non-empty
25825
25826  if test "x$BOOT_JDK" != x; then
25827    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25828
25829  # Input might be given as Windows format, start by converting to
25830  # unix format.
25831  path="$BOOT_JDK"
25832  new_path=`$CYGPATH -u "$path"`
25833
25834  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25835  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25836  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25837  # "foo.exe" is OK but "foo" is an error.
25838  #
25839  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25840  # It is also a way to make sure we got the proper file name for the real test later on.
25841  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25842  if test "x$test_shortpath" = x; then
25843    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25844$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25845    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25846  fi
25847
25848  # Call helper function which possibly converts this using DOS-style short mode.
25849  # If so, the updated path is stored in $new_path.
25850
25851  input_path="$new_path"
25852  # Check if we need to convert this using DOS-style short mode. If the path
25853  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25854  # take no chances and rewrite it.
25855  # Note: m4 eats our [], so we need to use [ and ] instead.
25856  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25857  if test "x$has_forbidden_chars" != x; then
25858    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25859    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25860    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25861    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25862      # Going to short mode and back again did indeed matter. Since short mode is
25863      # case insensitive, let's make it lowercase to improve readability.
25864      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25865      # Now convert it back to Unix-style (cygpath)
25866      input_path=`$CYGPATH -u "$shortmode_path"`
25867      new_path="$input_path"
25868    fi
25869  fi
25870
25871  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25872  if test "x$test_cygdrive_prefix" = x; then
25873    # As a simple fix, exclude /usr/bin since it's not a real path.
25874    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25875      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25876      # a path prefixed by /cygdrive for fixpath to work.
25877      new_path="$CYGWIN_ROOT_PATH$input_path"
25878    fi
25879  fi
25880
25881
25882  if test "x$path" != "x$new_path"; then
25883    BOOT_JDK="$new_path"
25884    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25885$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25886  fi
25887
25888    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25889
25890  path="$BOOT_JDK"
25891  has_colon=`$ECHO $path | $GREP ^.:`
25892  new_path="$path"
25893  if test "x$has_colon" = x; then
25894    # Not in mixed or Windows style, start by that.
25895    new_path=`cmd //c echo $path`
25896  fi
25897
25898
25899  input_path="$new_path"
25900  # Check if we need to convert this using DOS-style short mode. If the path
25901  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25902  # take no chances and rewrite it.
25903  # Note: m4 eats our [], so we need to use [ and ] instead.
25904  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25905  if test "x$has_forbidden_chars" != x; then
25906    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25907    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25908  fi
25909
25910
25911  windows_path="$new_path"
25912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25913    unix_path=`$CYGPATH -u "$windows_path"`
25914    new_path="$unix_path"
25915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25917    new_path="$unix_path"
25918  fi
25919
25920  if test "x$path" != "x$new_path"; then
25921    BOOT_JDK="$new_path"
25922    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25923$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25924  fi
25925
25926  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25927  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25928
25929    else
25930      # We're on a unix platform. Hooray! :)
25931      path="$BOOT_JDK"
25932      has_space=`$ECHO "$path" | $GREP " "`
25933      if test "x$has_space" != x; then
25934        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25935$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25936        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25937      fi
25938
25939      # Use eval to expand a potential ~
25940      eval path="$path"
25941      if test ! -f "$path" && test ! -d "$path"; then
25942        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25943      fi
25944
25945      if test -d "$path"; then
25946        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25947      else
25948        dir="`$DIRNAME "$path"`"
25949        base="`$BASENAME "$path"`"
25950        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25951      fi
25952    fi
25953  fi
25954
25955            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25956$as_echo_n "checking for Boot JDK... " >&6; }
25957            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25958$as_echo "$BOOT_JDK" >&6; }
25959            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25960$as_echo_n "checking Boot JDK version... " >&6; }
25961            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25962            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25963$as_echo "$BOOT_JDK_VERSION" >&6; }
25964          fi # end check jdk version
25965        fi # end check javac
25966      fi # end check java
25967    fi # end check boot jdk found
25968  fi
25969
25970    # If that did not work out (e.g. too old), try explicit versions instead
25971
25972  if test "x$BOOT_JDK_FOUND" = xno; then
25973    # Now execute the test
25974
25975  if test -x /usr/libexec/java_home; then
25976    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25977    BOOT_JDK_FOUND=maybe
25978    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25979$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25980  fi
25981
25982
25983    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25984    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25985      # Do we have a bin/java?
25986      if test ! -x "$BOOT_JDK/bin/java"; then
25987        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25988$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25989        BOOT_JDK_FOUND=no
25990      else
25991        # Do we have a bin/javac?
25992        if test ! -x "$BOOT_JDK/bin/javac"; then
25993          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25994$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25995          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25996$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25997          BOOT_JDK_FOUND=no
25998        else
25999          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26000          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26001
26002          # Extra M4 quote needed to protect [] in grep expression.
26003          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26004          if test "x$FOUND_CORRECT_VERSION" = x; then
26005            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26006$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26007            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26008$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26009            BOOT_JDK_FOUND=no
26010          else
26011            # We're done! :-)
26012            BOOT_JDK_FOUND=yes
26013
26014  # Only process if variable expands to non-empty
26015
26016  if test "x$BOOT_JDK" != x; then
26017    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26018
26019  # Input might be given as Windows format, start by converting to
26020  # unix format.
26021  path="$BOOT_JDK"
26022  new_path=`$CYGPATH -u "$path"`
26023
26024  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26025  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26026  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26027  # "foo.exe" is OK but "foo" is an error.
26028  #
26029  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26030  # It is also a way to make sure we got the proper file name for the real test later on.
26031  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26032  if test "x$test_shortpath" = x; then
26033    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26034$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26035    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26036  fi
26037
26038  # Call helper function which possibly converts this using DOS-style short mode.
26039  # If so, the updated path is stored in $new_path.
26040
26041  input_path="$new_path"
26042  # Check if we need to convert this using DOS-style short mode. If the path
26043  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26044  # take no chances and rewrite it.
26045  # Note: m4 eats our [], so we need to use [ and ] instead.
26046  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26047  if test "x$has_forbidden_chars" != x; then
26048    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26049    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26050    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26051    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26052      # Going to short mode and back again did indeed matter. Since short mode is
26053      # case insensitive, let's make it lowercase to improve readability.
26054      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26055      # Now convert it back to Unix-style (cygpath)
26056      input_path=`$CYGPATH -u "$shortmode_path"`
26057      new_path="$input_path"
26058    fi
26059  fi
26060
26061  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26062  if test "x$test_cygdrive_prefix" = x; then
26063    # As a simple fix, exclude /usr/bin since it's not a real path.
26064    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26065      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26066      # a path prefixed by /cygdrive for fixpath to work.
26067      new_path="$CYGWIN_ROOT_PATH$input_path"
26068    fi
26069  fi
26070
26071
26072  if test "x$path" != "x$new_path"; then
26073    BOOT_JDK="$new_path"
26074    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26075$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26076  fi
26077
26078    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26079
26080  path="$BOOT_JDK"
26081  has_colon=`$ECHO $path | $GREP ^.:`
26082  new_path="$path"
26083  if test "x$has_colon" = x; then
26084    # Not in mixed or Windows style, start by that.
26085    new_path=`cmd //c echo $path`
26086  fi
26087
26088
26089  input_path="$new_path"
26090  # Check if we need to convert this using DOS-style short mode. If the path
26091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26092  # take no chances and rewrite it.
26093  # Note: m4 eats our [], so we need to use [ and ] instead.
26094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26095  if test "x$has_forbidden_chars" != x; then
26096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26097    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26098  fi
26099
26100
26101  windows_path="$new_path"
26102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26103    unix_path=`$CYGPATH -u "$windows_path"`
26104    new_path="$unix_path"
26105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26106    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26107    new_path="$unix_path"
26108  fi
26109
26110  if test "x$path" != "x$new_path"; then
26111    BOOT_JDK="$new_path"
26112    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26113$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26114  fi
26115
26116  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26117  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26118
26119    else
26120      # We're on a unix platform. Hooray! :)
26121      path="$BOOT_JDK"
26122      has_space=`$ECHO "$path" | $GREP " "`
26123      if test "x$has_space" != x; then
26124        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26125$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26126        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26127      fi
26128
26129      # Use eval to expand a potential ~
26130      eval path="$path"
26131      if test ! -f "$path" && test ! -d "$path"; then
26132        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26133      fi
26134
26135      if test -d "$path"; then
26136        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26137      else
26138        dir="`$DIRNAME "$path"`"
26139        base="`$BASENAME "$path"`"
26140        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26141      fi
26142    fi
26143  fi
26144
26145            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26146$as_echo_n "checking for Boot JDK... " >&6; }
26147            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26148$as_echo "$BOOT_JDK" >&6; }
26149            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26150$as_echo_n "checking Boot JDK version... " >&6; }
26151            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26152            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26153$as_echo "$BOOT_JDK_VERSION" >&6; }
26154          fi # end check jdk version
26155        fi # end check javac
26156      fi # end check java
26157    fi # end check boot jdk found
26158  fi
26159
26160
26161  if test "x$BOOT_JDK_FOUND" = xno; then
26162    # Now execute the test
26163
26164  if test -x /usr/libexec/java_home; then
26165    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
26166    BOOT_JDK_FOUND=maybe
26167    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
26168$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
26169  fi
26170
26171
26172    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26173    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26174      # Do we have a bin/java?
26175      if test ! -x "$BOOT_JDK/bin/java"; then
26176        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26177$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26178        BOOT_JDK_FOUND=no
26179      else
26180        # Do we have a bin/javac?
26181        if test ! -x "$BOOT_JDK/bin/javac"; then
26182          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26183$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26184          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26185$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26186          BOOT_JDK_FOUND=no
26187        else
26188          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26189          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26190
26191          # Extra M4 quote needed to protect [] in grep expression.
26192          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26193          if test "x$FOUND_CORRECT_VERSION" = x; then
26194            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26195$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26196            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26197$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26198            BOOT_JDK_FOUND=no
26199          else
26200            # We're done! :-)
26201            BOOT_JDK_FOUND=yes
26202
26203  # Only process if variable expands to non-empty
26204
26205  if test "x$BOOT_JDK" != x; then
26206    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26207
26208  # Input might be given as Windows format, start by converting to
26209  # unix format.
26210  path="$BOOT_JDK"
26211  new_path=`$CYGPATH -u "$path"`
26212
26213  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26214  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26215  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26216  # "foo.exe" is OK but "foo" is an error.
26217  #
26218  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26219  # It is also a way to make sure we got the proper file name for the real test later on.
26220  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26221  if test "x$test_shortpath" = x; then
26222    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26223$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26224    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26225  fi
26226
26227  # Call helper function which possibly converts this using DOS-style short mode.
26228  # If so, the updated path is stored in $new_path.
26229
26230  input_path="$new_path"
26231  # Check if we need to convert this using DOS-style short mode. If the path
26232  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26233  # take no chances and rewrite it.
26234  # Note: m4 eats our [], so we need to use [ and ] instead.
26235  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26236  if test "x$has_forbidden_chars" != x; then
26237    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26238    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26239    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26240    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26241      # Going to short mode and back again did indeed matter. Since short mode is
26242      # case insensitive, let's make it lowercase to improve readability.
26243      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26244      # Now convert it back to Unix-style (cygpath)
26245      input_path=`$CYGPATH -u "$shortmode_path"`
26246      new_path="$input_path"
26247    fi
26248  fi
26249
26250  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26251  if test "x$test_cygdrive_prefix" = x; then
26252    # As a simple fix, exclude /usr/bin since it's not a real path.
26253    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26254      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26255      # a path prefixed by /cygdrive for fixpath to work.
26256      new_path="$CYGWIN_ROOT_PATH$input_path"
26257    fi
26258  fi
26259
26260
26261  if test "x$path" != "x$new_path"; then
26262    BOOT_JDK="$new_path"
26263    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26264$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26265  fi
26266
26267    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26268
26269  path="$BOOT_JDK"
26270  has_colon=`$ECHO $path | $GREP ^.:`
26271  new_path="$path"
26272  if test "x$has_colon" = x; then
26273    # Not in mixed or Windows style, start by that.
26274    new_path=`cmd //c echo $path`
26275  fi
26276
26277
26278  input_path="$new_path"
26279  # Check if we need to convert this using DOS-style short mode. If the path
26280  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26281  # take no chances and rewrite it.
26282  # Note: m4 eats our [], so we need to use [ and ] instead.
26283  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26284  if test "x$has_forbidden_chars" != x; then
26285    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26286    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26287  fi
26288
26289
26290  windows_path="$new_path"
26291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26292    unix_path=`$CYGPATH -u "$windows_path"`
26293    new_path="$unix_path"
26294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26295    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26296    new_path="$unix_path"
26297  fi
26298
26299  if test "x$path" != "x$new_path"; then
26300    BOOT_JDK="$new_path"
26301    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26302$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26303  fi
26304
26305  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26306  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26307
26308    else
26309      # We're on a unix platform. Hooray! :)
26310      path="$BOOT_JDK"
26311      has_space=`$ECHO "$path" | $GREP " "`
26312      if test "x$has_space" != x; then
26313        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26314$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26315        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26316      fi
26317
26318      # Use eval to expand a potential ~
26319      eval path="$path"
26320      if test ! -f "$path" && test ! -d "$path"; then
26321        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26322      fi
26323
26324      if test -d "$path"; then
26325        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26326      else
26327        dir="`$DIRNAME "$path"`"
26328        base="`$BASENAME "$path"`"
26329        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26330      fi
26331    fi
26332  fi
26333
26334            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26335$as_echo_n "checking for Boot JDK... " >&6; }
26336            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26337$as_echo "$BOOT_JDK" >&6; }
26338            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26339$as_echo_n "checking Boot JDK version... " >&6; }
26340            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26341            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26342$as_echo "$BOOT_JDK_VERSION" >&6; }
26343          fi # end check jdk version
26344        fi # end check javac
26345      fi # end check java
26346    fi # end check boot jdk found
26347  fi
26348
26349
26350  if test "x$BOOT_JDK_FOUND" = xno; then
26351    # Now execute the test
26352
26353  if test -x /usr/libexec/java_home; then
26354    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
26355    BOOT_JDK_FOUND=maybe
26356    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
26357$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
26358  fi
26359
26360
26361    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26362    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26363      # Do we have a bin/java?
26364      if test ! -x "$BOOT_JDK/bin/java"; then
26365        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26366$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26367        BOOT_JDK_FOUND=no
26368      else
26369        # Do we have a bin/javac?
26370        if test ! -x "$BOOT_JDK/bin/javac"; then
26371          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26372$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26373          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26374$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26375          BOOT_JDK_FOUND=no
26376        else
26377          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26378          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26379
26380          # Extra M4 quote needed to protect [] in grep expression.
26381          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26382          if test "x$FOUND_CORRECT_VERSION" = x; then
26383            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26384$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26385            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26386$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26387            BOOT_JDK_FOUND=no
26388          else
26389            # We're done! :-)
26390            BOOT_JDK_FOUND=yes
26391
26392  # Only process if variable expands to non-empty
26393
26394  if test "x$BOOT_JDK" != x; then
26395    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26396
26397  # Input might be given as Windows format, start by converting to
26398  # unix format.
26399  path="$BOOT_JDK"
26400  new_path=`$CYGPATH -u "$path"`
26401
26402  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26403  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26404  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26405  # "foo.exe" is OK but "foo" is an error.
26406  #
26407  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26408  # It is also a way to make sure we got the proper file name for the real test later on.
26409  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26410  if test "x$test_shortpath" = x; then
26411    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26412$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26413    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26414  fi
26415
26416  # Call helper function which possibly converts this using DOS-style short mode.
26417  # If so, the updated path is stored in $new_path.
26418
26419  input_path="$new_path"
26420  # Check if we need to convert this using DOS-style short mode. If the path
26421  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26422  # take no chances and rewrite it.
26423  # Note: m4 eats our [], so we need to use [ and ] instead.
26424  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26425  if test "x$has_forbidden_chars" != x; then
26426    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26427    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26428    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26429    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26430      # Going to short mode and back again did indeed matter. Since short mode is
26431      # case insensitive, let's make it lowercase to improve readability.
26432      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26433      # Now convert it back to Unix-style (cygpath)
26434      input_path=`$CYGPATH -u "$shortmode_path"`
26435      new_path="$input_path"
26436    fi
26437  fi
26438
26439  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26440  if test "x$test_cygdrive_prefix" = x; then
26441    # As a simple fix, exclude /usr/bin since it's not a real path.
26442    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26443      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26444      # a path prefixed by /cygdrive for fixpath to work.
26445      new_path="$CYGWIN_ROOT_PATH$input_path"
26446    fi
26447  fi
26448
26449
26450  if test "x$path" != "x$new_path"; then
26451    BOOT_JDK="$new_path"
26452    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26453$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26454  fi
26455
26456    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26457
26458  path="$BOOT_JDK"
26459  has_colon=`$ECHO $path | $GREP ^.:`
26460  new_path="$path"
26461  if test "x$has_colon" = x; then
26462    # Not in mixed or Windows style, start by that.
26463    new_path=`cmd //c echo $path`
26464  fi
26465
26466
26467  input_path="$new_path"
26468  # Check if we need to convert this using DOS-style short mode. If the path
26469  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26470  # take no chances and rewrite it.
26471  # Note: m4 eats our [], so we need to use [ and ] instead.
26472  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26473  if test "x$has_forbidden_chars" != x; then
26474    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26475    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26476  fi
26477
26478
26479  windows_path="$new_path"
26480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26481    unix_path=`$CYGPATH -u "$windows_path"`
26482    new_path="$unix_path"
26483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26485    new_path="$unix_path"
26486  fi
26487
26488  if test "x$path" != "x$new_path"; then
26489    BOOT_JDK="$new_path"
26490    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26491$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26492  fi
26493
26494  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26495  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26496
26497    else
26498      # We're on a unix platform. Hooray! :)
26499      path="$BOOT_JDK"
26500      has_space=`$ECHO "$path" | $GREP " "`
26501      if test "x$has_space" != x; then
26502        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26503$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26504        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26505      fi
26506
26507      # Use eval to expand a potential ~
26508      eval path="$path"
26509      if test ! -f "$path" && test ! -d "$path"; then
26510        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26511      fi
26512
26513      if test -d "$path"; then
26514        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26515      else
26516        dir="`$DIRNAME "$path"`"
26517        base="`$BASENAME "$path"`"
26518        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26519      fi
26520    fi
26521  fi
26522
26523            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26524$as_echo_n "checking for Boot JDK... " >&6; }
26525            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26526$as_echo "$BOOT_JDK" >&6; }
26527            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26528$as_echo_n "checking Boot JDK version... " >&6; }
26529            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26530            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26531$as_echo "$BOOT_JDK_VERSION" >&6; }
26532          fi # end check jdk version
26533        fi # end check javac
26534      fi # end check java
26535    fi # end check boot jdk found
26536  fi
26537
26538  fi
26539
26540
26541    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26542    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26543      # Do we have a bin/java?
26544      if test ! -x "$BOOT_JDK/bin/java"; then
26545        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26546$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26547        BOOT_JDK_FOUND=no
26548      else
26549        # Do we have a bin/javac?
26550        if test ! -x "$BOOT_JDK/bin/javac"; then
26551          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26552$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26553          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26554$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26555          BOOT_JDK_FOUND=no
26556        else
26557          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26558          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26559
26560          # Extra M4 quote needed to protect [] in grep expression.
26561          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26562          if test "x$FOUND_CORRECT_VERSION" = x; then
26563            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26564$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26565            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26566$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26567            BOOT_JDK_FOUND=no
26568          else
26569            # We're done! :-)
26570            BOOT_JDK_FOUND=yes
26571
26572  # Only process if variable expands to non-empty
26573
26574  if test "x$BOOT_JDK" != x; then
26575    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26576
26577  # Input might be given as Windows format, start by converting to
26578  # unix format.
26579  path="$BOOT_JDK"
26580  new_path=`$CYGPATH -u "$path"`
26581
26582  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26583  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26584  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26585  # "foo.exe" is OK but "foo" is an error.
26586  #
26587  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26588  # It is also a way to make sure we got the proper file name for the real test later on.
26589  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26590  if test "x$test_shortpath" = x; then
26591    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26592$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26593    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26594  fi
26595
26596  # Call helper function which possibly converts this using DOS-style short mode.
26597  # If so, the updated path is stored in $new_path.
26598
26599  input_path="$new_path"
26600  # Check if we need to convert this using DOS-style short mode. If the path
26601  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26602  # take no chances and rewrite it.
26603  # Note: m4 eats our [], so we need to use [ and ] instead.
26604  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26605  if test "x$has_forbidden_chars" != x; then
26606    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26607    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26608    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26609    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26610      # Going to short mode and back again did indeed matter. Since short mode is
26611      # case insensitive, let's make it lowercase to improve readability.
26612      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26613      # Now convert it back to Unix-style (cygpath)
26614      input_path=`$CYGPATH -u "$shortmode_path"`
26615      new_path="$input_path"
26616    fi
26617  fi
26618
26619  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26620  if test "x$test_cygdrive_prefix" = x; then
26621    # As a simple fix, exclude /usr/bin since it's not a real path.
26622    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26623      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26624      # a path prefixed by /cygdrive for fixpath to work.
26625      new_path="$CYGWIN_ROOT_PATH$input_path"
26626    fi
26627  fi
26628
26629
26630  if test "x$path" != "x$new_path"; then
26631    BOOT_JDK="$new_path"
26632    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26633$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26634  fi
26635
26636    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26637
26638  path="$BOOT_JDK"
26639  has_colon=`$ECHO $path | $GREP ^.:`
26640  new_path="$path"
26641  if test "x$has_colon" = x; then
26642    # Not in mixed or Windows style, start by that.
26643    new_path=`cmd //c echo $path`
26644  fi
26645
26646
26647  input_path="$new_path"
26648  # Check if we need to convert this using DOS-style short mode. If the path
26649  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26650  # take no chances and rewrite it.
26651  # Note: m4 eats our [], so we need to use [ and ] instead.
26652  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26653  if test "x$has_forbidden_chars" != x; then
26654    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26655    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26656  fi
26657
26658
26659  windows_path="$new_path"
26660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26661    unix_path=`$CYGPATH -u "$windows_path"`
26662    new_path="$unix_path"
26663  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26664    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26665    new_path="$unix_path"
26666  fi
26667
26668  if test "x$path" != "x$new_path"; then
26669    BOOT_JDK="$new_path"
26670    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26671$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26672  fi
26673
26674  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26675  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26676
26677    else
26678      # We're on a unix platform. Hooray! :)
26679      path="$BOOT_JDK"
26680      has_space=`$ECHO "$path" | $GREP " "`
26681      if test "x$has_space" != x; then
26682        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26683$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26684        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26685      fi
26686
26687      # Use eval to expand a potential ~
26688      eval path="$path"
26689      if test ! -f "$path" && test ! -d "$path"; then
26690        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26691      fi
26692
26693      if test -d "$path"; then
26694        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26695      else
26696        dir="`$DIRNAME "$path"`"
26697        base="`$BASENAME "$path"`"
26698        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26699      fi
26700    fi
26701  fi
26702
26703            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26704$as_echo_n "checking for Boot JDK... " >&6; }
26705            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26706$as_echo "$BOOT_JDK" >&6; }
26707            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26708$as_echo_n "checking Boot JDK version... " >&6; }
26709            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26710            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26711$as_echo "$BOOT_JDK_VERSION" >&6; }
26712          fi # end check jdk version
26713        fi # end check javac
26714      fi # end check java
26715    fi # end check boot jdk found
26716  fi
26717
26718
26719  # Test: Is $JAVA_HOME set?
26720
26721  if test "x$BOOT_JDK_FOUND" = xno; then
26722    # Now execute the test
26723
26724  if test "x$JAVA_HOME" != x; then
26725    JAVA_HOME_PROCESSED="$JAVA_HOME"
26726
26727  # Only process if variable expands to non-empty
26728
26729  if test "x$JAVA_HOME_PROCESSED" != x; then
26730    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26731
26732  # Input might be given as Windows format, start by converting to
26733  # unix format.
26734  path="$JAVA_HOME_PROCESSED"
26735  new_path=`$CYGPATH -u "$path"`
26736
26737  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26738  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26739  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26740  # "foo.exe" is OK but "foo" is an error.
26741  #
26742  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26743  # It is also a way to make sure we got the proper file name for the real test later on.
26744  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26745  if test "x$test_shortpath" = x; then
26746    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26747$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26748    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
26749  fi
26750
26751  # Call helper function which possibly converts this using DOS-style short mode.
26752  # If so, the updated path is stored in $new_path.
26753
26754  input_path="$new_path"
26755  # Check if we need to convert this using DOS-style short mode. If the path
26756  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26757  # take no chances and rewrite it.
26758  # Note: m4 eats our [], so we need to use [ and ] instead.
26759  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26760  if test "x$has_forbidden_chars" != x; then
26761    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26762    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26763    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26764    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26765      # Going to short mode and back again did indeed matter. Since short mode is
26766      # case insensitive, let's make it lowercase to improve readability.
26767      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26768      # Now convert it back to Unix-style (cygpath)
26769      input_path=`$CYGPATH -u "$shortmode_path"`
26770      new_path="$input_path"
26771    fi
26772  fi
26773
26774  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26775  if test "x$test_cygdrive_prefix" = x; then
26776    # As a simple fix, exclude /usr/bin since it's not a real path.
26777    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26778      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26779      # a path prefixed by /cygdrive for fixpath to work.
26780      new_path="$CYGWIN_ROOT_PATH$input_path"
26781    fi
26782  fi
26783
26784
26785  if test "x$path" != "x$new_path"; then
26786    JAVA_HOME_PROCESSED="$new_path"
26787    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26788$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26789  fi
26790
26791    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26792
26793  path="$JAVA_HOME_PROCESSED"
26794  has_colon=`$ECHO $path | $GREP ^.:`
26795  new_path="$path"
26796  if test "x$has_colon" = x; then
26797    # Not in mixed or Windows style, start by that.
26798    new_path=`cmd //c echo $path`
26799  fi
26800
26801
26802  input_path="$new_path"
26803  # Check if we need to convert this using DOS-style short mode. If the path
26804  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26805  # take no chances and rewrite it.
26806  # Note: m4 eats our [], so we need to use [ and ] instead.
26807  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26808  if test "x$has_forbidden_chars" != x; then
26809    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26810    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26811  fi
26812
26813
26814  windows_path="$new_path"
26815  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26816    unix_path=`$CYGPATH -u "$windows_path"`
26817    new_path="$unix_path"
26818  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26819    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26820    new_path="$unix_path"
26821  fi
26822
26823  if test "x$path" != "x$new_path"; then
26824    JAVA_HOME_PROCESSED="$new_path"
26825    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26826$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26827  fi
26828
26829  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26830  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26831
26832    else
26833      # We're on a unix platform. Hooray! :)
26834      path="$JAVA_HOME_PROCESSED"
26835      has_space=`$ECHO "$path" | $GREP " "`
26836      if test "x$has_space" != x; then
26837        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26838$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26839        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26840      fi
26841
26842      # Use eval to expand a potential ~
26843      eval path="$path"
26844      if test ! -f "$path" && test ! -d "$path"; then
26845        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26846      fi
26847
26848      if test -d "$path"; then
26849        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26850      else
26851        dir="`$DIRNAME "$path"`"
26852        base="`$BASENAME "$path"`"
26853        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26854      fi
26855    fi
26856  fi
26857
26858    if test ! -d "$JAVA_HOME_PROCESSED"; then
26859      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26860$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26861    else
26862      # Aha, the user has set a JAVA_HOME
26863      # let us use that as the Boot JDK.
26864      BOOT_JDK="$JAVA_HOME_PROCESSED"
26865      BOOT_JDK_FOUND=maybe
26866      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26867$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26868    fi
26869  fi
26870
26871
26872    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26873    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26874      # Do we have a bin/java?
26875      if test ! -x "$BOOT_JDK/bin/java"; then
26876        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26877$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26878        BOOT_JDK_FOUND=no
26879      else
26880        # Do we have a bin/javac?
26881        if test ! -x "$BOOT_JDK/bin/javac"; then
26882          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26883$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26884          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26885$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26886          BOOT_JDK_FOUND=no
26887        else
26888          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26889          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26890
26891          # Extra M4 quote needed to protect [] in grep expression.
26892          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26893          if test "x$FOUND_CORRECT_VERSION" = x; then
26894            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26895$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26896            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26897$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26898            BOOT_JDK_FOUND=no
26899          else
26900            # We're done! :-)
26901            BOOT_JDK_FOUND=yes
26902
26903  # Only process if variable expands to non-empty
26904
26905  if test "x$BOOT_JDK" != x; then
26906    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26907
26908  # Input might be given as Windows format, start by converting to
26909  # unix format.
26910  path="$BOOT_JDK"
26911  new_path=`$CYGPATH -u "$path"`
26912
26913  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26914  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26915  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26916  # "foo.exe" is OK but "foo" is an error.
26917  #
26918  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26919  # It is also a way to make sure we got the proper file name for the real test later on.
26920  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26921  if test "x$test_shortpath" = x; then
26922    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26923$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26924    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26925  fi
26926
26927  # Call helper function which possibly converts this using DOS-style short mode.
26928  # If so, the updated path is stored in $new_path.
26929
26930  input_path="$new_path"
26931  # Check if we need to convert this using DOS-style short mode. If the path
26932  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26933  # take no chances and rewrite it.
26934  # Note: m4 eats our [], so we need to use [ and ] instead.
26935  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26936  if test "x$has_forbidden_chars" != x; then
26937    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26938    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26939    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26940    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26941      # Going to short mode and back again did indeed matter. Since short mode is
26942      # case insensitive, let's make it lowercase to improve readability.
26943      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26944      # Now convert it back to Unix-style (cygpath)
26945      input_path=`$CYGPATH -u "$shortmode_path"`
26946      new_path="$input_path"
26947    fi
26948  fi
26949
26950  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26951  if test "x$test_cygdrive_prefix" = x; then
26952    # As a simple fix, exclude /usr/bin since it's not a real path.
26953    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26954      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26955      # a path prefixed by /cygdrive for fixpath to work.
26956      new_path="$CYGWIN_ROOT_PATH$input_path"
26957    fi
26958  fi
26959
26960
26961  if test "x$path" != "x$new_path"; then
26962    BOOT_JDK="$new_path"
26963    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26964$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26965  fi
26966
26967    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26968
26969  path="$BOOT_JDK"
26970  has_colon=`$ECHO $path | $GREP ^.:`
26971  new_path="$path"
26972  if test "x$has_colon" = x; then
26973    # Not in mixed or Windows style, start by that.
26974    new_path=`cmd //c echo $path`
26975  fi
26976
26977
26978  input_path="$new_path"
26979  # Check if we need to convert this using DOS-style short mode. If the path
26980  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26981  # take no chances and rewrite it.
26982  # Note: m4 eats our [], so we need to use [ and ] instead.
26983  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26984  if test "x$has_forbidden_chars" != x; then
26985    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26986    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26987  fi
26988
26989
26990  windows_path="$new_path"
26991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26992    unix_path=`$CYGPATH -u "$windows_path"`
26993    new_path="$unix_path"
26994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26995    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26996    new_path="$unix_path"
26997  fi
26998
26999  if test "x$path" != "x$new_path"; then
27000    BOOT_JDK="$new_path"
27001    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27002$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27003  fi
27004
27005  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27006  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27007
27008    else
27009      # We're on a unix platform. Hooray! :)
27010      path="$BOOT_JDK"
27011      has_space=`$ECHO "$path" | $GREP " "`
27012      if test "x$has_space" != x; then
27013        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27014$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27015        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27016      fi
27017
27018      # Use eval to expand a potential ~
27019      eval path="$path"
27020      if test ! -f "$path" && test ! -d "$path"; then
27021        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27022      fi
27023
27024      if test -d "$path"; then
27025        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27026      else
27027        dir="`$DIRNAME "$path"`"
27028        base="`$BASENAME "$path"`"
27029        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27030      fi
27031    fi
27032  fi
27033
27034            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27035$as_echo_n "checking for Boot JDK... " >&6; }
27036            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27037$as_echo "$BOOT_JDK" >&6; }
27038            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27039$as_echo_n "checking Boot JDK version... " >&6; }
27040            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27041            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27042$as_echo "$BOOT_JDK_VERSION" >&6; }
27043          fi # end check jdk version
27044        fi # end check javac
27045      fi # end check java
27046    fi # end check boot jdk found
27047  fi
27048
27049
27050  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
27051
27052  if test "x$BOOT_JDK_FOUND" = xno; then
27053    # Now execute the test
27054
27055  # Extract the first word of "javac", so it can be a program name with args.
27056set dummy javac; ac_word=$2
27057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27058$as_echo_n "checking for $ac_word... " >&6; }
27059if ${ac_cv_path_JAVAC_CHECK+:} false; then :
27060  $as_echo_n "(cached) " >&6
27061else
27062  case $JAVAC_CHECK in
27063  [\\/]* | ?:[\\/]*)
27064  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
27065  ;;
27066  *)
27067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27068for as_dir in $PATH
27069do
27070  IFS=$as_save_IFS
27071  test -z "$as_dir" && as_dir=.
27072    for ac_exec_ext in '' $ac_executable_extensions; do
27073  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27074    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
27075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27076    break 2
27077  fi
27078done
27079  done
27080IFS=$as_save_IFS
27081
27082  ;;
27083esac
27084fi
27085JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
27086if test -n "$JAVAC_CHECK"; then
27087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
27088$as_echo "$JAVAC_CHECK" >&6; }
27089else
27090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27091$as_echo "no" >&6; }
27092fi
27093
27094
27095  # Extract the first word of "java", so it can be a program name with args.
27096set dummy java; ac_word=$2
27097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27098$as_echo_n "checking for $ac_word... " >&6; }
27099if ${ac_cv_path_JAVA_CHECK+:} false; then :
27100  $as_echo_n "(cached) " >&6
27101else
27102  case $JAVA_CHECK in
27103  [\\/]* | ?:[\\/]*)
27104  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
27105  ;;
27106  *)
27107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27108for as_dir in $PATH
27109do
27110  IFS=$as_save_IFS
27111  test -z "$as_dir" && as_dir=.
27112    for ac_exec_ext in '' $ac_executable_extensions; do
27113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27114    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
27115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27116    break 2
27117  fi
27118done
27119  done
27120IFS=$as_save_IFS
27121
27122  ;;
27123esac
27124fi
27125JAVA_CHECK=$ac_cv_path_JAVA_CHECK
27126if test -n "$JAVA_CHECK"; then
27127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
27128$as_echo "$JAVA_CHECK" >&6; }
27129else
27130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27131$as_echo "no" >&6; }
27132fi
27133
27134
27135  BINARY="$JAVAC_CHECK"
27136  if test "x$JAVAC_CHECK" = x; then
27137    BINARY="$JAVA_CHECK"
27138  fi
27139  if test "x$BINARY" != x; then
27140    # So there is a java(c) binary, it might be part of a JDK.
27141    # Lets find the JDK/JRE directory by following symbolic links.
27142    # Linux/GNU systems often have links from /usr/bin/java to
27143    # /etc/alternatives/java to the real JDK binary.
27144
27145  if test "x$OPENJDK_BUILD_OS" != xwindows; then
27146    # Follow a chain of symbolic links. Use readlink
27147    # where it exists, else fall back to horribly
27148    # complicated shell code.
27149    if test "x$READLINK_TESTED" != yes; then
27150      # On MacOSX there is a readlink tool with a different
27151      # purpose than the GNU readlink tool. Check the found readlink.
27152      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
27153      if test "x$ISGNU" = x; then
27154        # A readlink that we do not know how to use.
27155        # Are there other non-GNU readlinks out there?
27156        READLINK_TESTED=yes
27157        READLINK=
27158      fi
27159    fi
27160
27161    if test "x$READLINK" != x; then
27162      BINARY=`$READLINK -f $BINARY`
27163    else
27164      # Save the current directory for restoring afterwards
27165      STARTDIR=$PWD
27166      COUNTER=0
27167      sym_link_dir=`$DIRNAME $BINARY`
27168      sym_link_file=`$BASENAME $BINARY`
27169      cd $sym_link_dir
27170      # Use -P flag to resolve symlinks in directories.
27171      cd `$THEPWDCMD -P`
27172      sym_link_dir=`$THEPWDCMD -P`
27173      # Resolve file symlinks
27174      while test $COUNTER -lt 20; do
27175        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
27176        if test "x$ISLINK" == x; then
27177          # This is not a symbolic link! We are done!
27178          break
27179        fi
27180        # Again resolve directory symlinks since the target of the just found
27181        # link could be in a different directory
27182        cd `$DIRNAME $ISLINK`
27183        sym_link_dir=`$THEPWDCMD -P`
27184        sym_link_file=`$BASENAME $ISLINK`
27185        let COUNTER=COUNTER+1
27186      done
27187      cd $STARTDIR
27188      BINARY=$sym_link_dir/$sym_link_file
27189    fi
27190  fi
27191
27192    BOOT_JDK=`dirname "$BINARY"`
27193    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
27194    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
27195      # Looks like we found ourselves an JDK
27196      BOOT_JDK_FOUND=maybe
27197      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
27198$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
27199    fi
27200  fi
27201
27202
27203    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27204    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27205      # Do we have a bin/java?
27206      if test ! -x "$BOOT_JDK/bin/java"; then
27207        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27208$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27209        BOOT_JDK_FOUND=no
27210      else
27211        # Do we have a bin/javac?
27212        if test ! -x "$BOOT_JDK/bin/javac"; then
27213          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27214$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27215          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27216$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27217          BOOT_JDK_FOUND=no
27218        else
27219          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27220          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27221
27222          # Extra M4 quote needed to protect [] in grep expression.
27223          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27224          if test "x$FOUND_CORRECT_VERSION" = x; then
27225            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27226$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27227            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27228$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27229            BOOT_JDK_FOUND=no
27230          else
27231            # We're done! :-)
27232            BOOT_JDK_FOUND=yes
27233
27234  # Only process if variable expands to non-empty
27235
27236  if test "x$BOOT_JDK" != x; then
27237    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27238
27239  # Input might be given as Windows format, start by converting to
27240  # unix format.
27241  path="$BOOT_JDK"
27242  new_path=`$CYGPATH -u "$path"`
27243
27244  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27245  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27246  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27247  # "foo.exe" is OK but "foo" is an error.
27248  #
27249  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27250  # It is also a way to make sure we got the proper file name for the real test later on.
27251  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27252  if test "x$test_shortpath" = x; then
27253    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27254$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27255    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27256  fi
27257
27258  # Call helper function which possibly converts this using DOS-style short mode.
27259  # If so, the updated path is stored in $new_path.
27260
27261  input_path="$new_path"
27262  # Check if we need to convert this using DOS-style short mode. If the path
27263  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27264  # take no chances and rewrite it.
27265  # Note: m4 eats our [], so we need to use [ and ] instead.
27266  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27267  if test "x$has_forbidden_chars" != x; then
27268    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27269    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27270    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27271    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27272      # Going to short mode and back again did indeed matter. Since short mode is
27273      # case insensitive, let's make it lowercase to improve readability.
27274      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27275      # Now convert it back to Unix-style (cygpath)
27276      input_path=`$CYGPATH -u "$shortmode_path"`
27277      new_path="$input_path"
27278    fi
27279  fi
27280
27281  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27282  if test "x$test_cygdrive_prefix" = x; then
27283    # As a simple fix, exclude /usr/bin since it's not a real path.
27284    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27285      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27286      # a path prefixed by /cygdrive for fixpath to work.
27287      new_path="$CYGWIN_ROOT_PATH$input_path"
27288    fi
27289  fi
27290
27291
27292  if test "x$path" != "x$new_path"; then
27293    BOOT_JDK="$new_path"
27294    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27295$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27296  fi
27297
27298    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27299
27300  path="$BOOT_JDK"
27301  has_colon=`$ECHO $path | $GREP ^.:`
27302  new_path="$path"
27303  if test "x$has_colon" = x; then
27304    # Not in mixed or Windows style, start by that.
27305    new_path=`cmd //c echo $path`
27306  fi
27307
27308
27309  input_path="$new_path"
27310  # Check if we need to convert this using DOS-style short mode. If the path
27311  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27312  # take no chances and rewrite it.
27313  # Note: m4 eats our [], so we need to use [ and ] instead.
27314  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27315  if test "x$has_forbidden_chars" != x; then
27316    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27317    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27318  fi
27319
27320
27321  windows_path="$new_path"
27322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27323    unix_path=`$CYGPATH -u "$windows_path"`
27324    new_path="$unix_path"
27325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27326    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27327    new_path="$unix_path"
27328  fi
27329
27330  if test "x$path" != "x$new_path"; then
27331    BOOT_JDK="$new_path"
27332    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27333$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27334  fi
27335
27336  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27337  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27338
27339    else
27340      # We're on a unix platform. Hooray! :)
27341      path="$BOOT_JDK"
27342      has_space=`$ECHO "$path" | $GREP " "`
27343      if test "x$has_space" != x; then
27344        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27345$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27346        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27347      fi
27348
27349      # Use eval to expand a potential ~
27350      eval path="$path"
27351      if test ! -f "$path" && test ! -d "$path"; then
27352        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27353      fi
27354
27355      if test -d "$path"; then
27356        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27357      else
27358        dir="`$DIRNAME "$path"`"
27359        base="`$BASENAME "$path"`"
27360        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27361      fi
27362    fi
27363  fi
27364
27365            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27366$as_echo_n "checking for Boot JDK... " >&6; }
27367            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27368$as_echo "$BOOT_JDK" >&6; }
27369            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27370$as_echo_n "checking Boot JDK version... " >&6; }
27371            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27372            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27373$as_echo "$BOOT_JDK_VERSION" >&6; }
27374          fi # end check jdk version
27375        fi # end check javac
27376      fi # end check java
27377    fi # end check boot jdk found
27378  fi
27379
27380
27381  # Test: Is there a JDK installed in default, well-known locations?
27382
27383  if test "x$BOOT_JDK_FOUND" = xno; then
27384    # Now execute the test
27385
27386  if test "x$OPENJDK_TARGET_OS" = xwindows; then
27387
27388  if test "x$BOOT_JDK_FOUND" = xno; then
27389    # Now execute the test
27390
27391  if test "x$ProgramW6432" != x; then
27392    VIRTUAL_DIR="$ProgramW6432/Java"
27393
27394  windows_path="$VIRTUAL_DIR"
27395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27396    unix_path=`$CYGPATH -u "$windows_path"`
27397    VIRTUAL_DIR="$unix_path"
27398  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27399    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27400    VIRTUAL_DIR="$unix_path"
27401  fi
27402
27403
27404  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27405  BOOT_JDK_SUFFIX=""
27406  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27407  if test "x$ALL_JDKS_FOUND" != x; then
27408    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27409
27410  if test "x$BOOT_JDK_FOUND" = xno; then
27411    # Now execute the test
27412
27413        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27414        if test -d "$BOOT_JDK"; then
27415          BOOT_JDK_FOUND=maybe
27416          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27417$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27418        fi
27419
27420
27421    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27422    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27423      # Do we have a bin/java?
27424      if test ! -x "$BOOT_JDK/bin/java"; then
27425        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27426$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27427        BOOT_JDK_FOUND=no
27428      else
27429        # Do we have a bin/javac?
27430        if test ! -x "$BOOT_JDK/bin/javac"; then
27431          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27432$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27433          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27434$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27435          BOOT_JDK_FOUND=no
27436        else
27437          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27438          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27439
27440          # Extra M4 quote needed to protect [] in grep expression.
27441          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27442          if test "x$FOUND_CORRECT_VERSION" = x; then
27443            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27444$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27445            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27446$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27447            BOOT_JDK_FOUND=no
27448          else
27449            # We're done! :-)
27450            BOOT_JDK_FOUND=yes
27451
27452  # Only process if variable expands to non-empty
27453
27454  if test "x$BOOT_JDK" != x; then
27455    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27456
27457  # Input might be given as Windows format, start by converting to
27458  # unix format.
27459  path="$BOOT_JDK"
27460  new_path=`$CYGPATH -u "$path"`
27461
27462  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27463  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27464  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27465  # "foo.exe" is OK but "foo" is an error.
27466  #
27467  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27468  # It is also a way to make sure we got the proper file name for the real test later on.
27469  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27470  if test "x$test_shortpath" = x; then
27471    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27472$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27473    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27474  fi
27475
27476  # Call helper function which possibly converts this using DOS-style short mode.
27477  # If so, the updated path is stored in $new_path.
27478
27479  input_path="$new_path"
27480  # Check if we need to convert this using DOS-style short mode. If the path
27481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27482  # take no chances and rewrite it.
27483  # Note: m4 eats our [], so we need to use [ and ] instead.
27484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27485  if test "x$has_forbidden_chars" != x; then
27486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27487    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27488    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27489    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27490      # Going to short mode and back again did indeed matter. Since short mode is
27491      # case insensitive, let's make it lowercase to improve readability.
27492      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27493      # Now convert it back to Unix-style (cygpath)
27494      input_path=`$CYGPATH -u "$shortmode_path"`
27495      new_path="$input_path"
27496    fi
27497  fi
27498
27499  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27500  if test "x$test_cygdrive_prefix" = x; then
27501    # As a simple fix, exclude /usr/bin since it's not a real path.
27502    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27503      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27504      # a path prefixed by /cygdrive for fixpath to work.
27505      new_path="$CYGWIN_ROOT_PATH$input_path"
27506    fi
27507  fi
27508
27509
27510  if test "x$path" != "x$new_path"; then
27511    BOOT_JDK="$new_path"
27512    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27513$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27514  fi
27515
27516    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27517
27518  path="$BOOT_JDK"
27519  has_colon=`$ECHO $path | $GREP ^.:`
27520  new_path="$path"
27521  if test "x$has_colon" = x; then
27522    # Not in mixed or Windows style, start by that.
27523    new_path=`cmd //c echo $path`
27524  fi
27525
27526
27527  input_path="$new_path"
27528  # Check if we need to convert this using DOS-style short mode. If the path
27529  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27530  # take no chances and rewrite it.
27531  # Note: m4 eats our [], so we need to use [ and ] instead.
27532  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27533  if test "x$has_forbidden_chars" != x; then
27534    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27535    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27536  fi
27537
27538
27539  windows_path="$new_path"
27540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27541    unix_path=`$CYGPATH -u "$windows_path"`
27542    new_path="$unix_path"
27543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27544    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27545    new_path="$unix_path"
27546  fi
27547
27548  if test "x$path" != "x$new_path"; then
27549    BOOT_JDK="$new_path"
27550    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27551$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27552  fi
27553
27554  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27555  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27556
27557    else
27558      # We're on a unix platform. Hooray! :)
27559      path="$BOOT_JDK"
27560      has_space=`$ECHO "$path" | $GREP " "`
27561      if test "x$has_space" != x; then
27562        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27563$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27564        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27565      fi
27566
27567      # Use eval to expand a potential ~
27568      eval path="$path"
27569      if test ! -f "$path" && test ! -d "$path"; then
27570        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27571      fi
27572
27573      if test -d "$path"; then
27574        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27575      else
27576        dir="`$DIRNAME "$path"`"
27577        base="`$BASENAME "$path"`"
27578        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27579      fi
27580    fi
27581  fi
27582
27583            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27584$as_echo_n "checking for Boot JDK... " >&6; }
27585            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27586$as_echo "$BOOT_JDK" >&6; }
27587            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27588$as_echo_n "checking Boot JDK version... " >&6; }
27589            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27590            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27591$as_echo "$BOOT_JDK_VERSION" >&6; }
27592          fi # end check jdk version
27593        fi # end check javac
27594      fi # end check java
27595    fi # end check boot jdk found
27596  fi
27597
27598    done
27599  fi
27600
27601  fi
27602
27603
27604    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27605    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27606      # Do we have a bin/java?
27607      if test ! -x "$BOOT_JDK/bin/java"; then
27608        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27609$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27610        BOOT_JDK_FOUND=no
27611      else
27612        # Do we have a bin/javac?
27613        if test ! -x "$BOOT_JDK/bin/javac"; then
27614          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27615$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27616          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27617$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27618          BOOT_JDK_FOUND=no
27619        else
27620          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27621          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27622
27623          # Extra M4 quote needed to protect [] in grep expression.
27624          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27625          if test "x$FOUND_CORRECT_VERSION" = x; then
27626            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27627$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27628            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27629$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27630            BOOT_JDK_FOUND=no
27631          else
27632            # We're done! :-)
27633            BOOT_JDK_FOUND=yes
27634
27635  # Only process if variable expands to non-empty
27636
27637  if test "x$BOOT_JDK" != x; then
27638    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27639
27640  # Input might be given as Windows format, start by converting to
27641  # unix format.
27642  path="$BOOT_JDK"
27643  new_path=`$CYGPATH -u "$path"`
27644
27645  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27646  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27647  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27648  # "foo.exe" is OK but "foo" is an error.
27649  #
27650  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27651  # It is also a way to make sure we got the proper file name for the real test later on.
27652  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27653  if test "x$test_shortpath" = x; then
27654    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27655$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27656    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27657  fi
27658
27659  # Call helper function which possibly converts this using DOS-style short mode.
27660  # If so, the updated path is stored in $new_path.
27661
27662  input_path="$new_path"
27663  # Check if we need to convert this using DOS-style short mode. If the path
27664  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27665  # take no chances and rewrite it.
27666  # Note: m4 eats our [], so we need to use [ and ] instead.
27667  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27668  if test "x$has_forbidden_chars" != x; then
27669    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27670    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27671    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27672    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27673      # Going to short mode and back again did indeed matter. Since short mode is
27674      # case insensitive, let's make it lowercase to improve readability.
27675      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27676      # Now convert it back to Unix-style (cygpath)
27677      input_path=`$CYGPATH -u "$shortmode_path"`
27678      new_path="$input_path"
27679    fi
27680  fi
27681
27682  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27683  if test "x$test_cygdrive_prefix" = x; then
27684    # As a simple fix, exclude /usr/bin since it's not a real path.
27685    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27686      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27687      # a path prefixed by /cygdrive for fixpath to work.
27688      new_path="$CYGWIN_ROOT_PATH$input_path"
27689    fi
27690  fi
27691
27692
27693  if test "x$path" != "x$new_path"; then
27694    BOOT_JDK="$new_path"
27695    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27696$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27697  fi
27698
27699    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27700
27701  path="$BOOT_JDK"
27702  has_colon=`$ECHO $path | $GREP ^.:`
27703  new_path="$path"
27704  if test "x$has_colon" = x; then
27705    # Not in mixed or Windows style, start by that.
27706    new_path=`cmd //c echo $path`
27707  fi
27708
27709
27710  input_path="$new_path"
27711  # Check if we need to convert this using DOS-style short mode. If the path
27712  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27713  # take no chances and rewrite it.
27714  # Note: m4 eats our [], so we need to use [ and ] instead.
27715  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27716  if test "x$has_forbidden_chars" != x; then
27717    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27718    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27719  fi
27720
27721
27722  windows_path="$new_path"
27723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27724    unix_path=`$CYGPATH -u "$windows_path"`
27725    new_path="$unix_path"
27726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27727    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27728    new_path="$unix_path"
27729  fi
27730
27731  if test "x$path" != "x$new_path"; then
27732    BOOT_JDK="$new_path"
27733    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27734$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27735  fi
27736
27737  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27738  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27739
27740    else
27741      # We're on a unix platform. Hooray! :)
27742      path="$BOOT_JDK"
27743      has_space=`$ECHO "$path" | $GREP " "`
27744      if test "x$has_space" != x; then
27745        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27746$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27747        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27748      fi
27749
27750      # Use eval to expand a potential ~
27751      eval path="$path"
27752      if test ! -f "$path" && test ! -d "$path"; then
27753        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27754      fi
27755
27756      if test -d "$path"; then
27757        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27758      else
27759        dir="`$DIRNAME "$path"`"
27760        base="`$BASENAME "$path"`"
27761        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27762      fi
27763    fi
27764  fi
27765
27766            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27767$as_echo_n "checking for Boot JDK... " >&6; }
27768            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27769$as_echo "$BOOT_JDK" >&6; }
27770            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27771$as_echo_n "checking Boot JDK version... " >&6; }
27772            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27773            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27774$as_echo "$BOOT_JDK_VERSION" >&6; }
27775          fi # end check jdk version
27776        fi # end check javac
27777      fi # end check java
27778    fi # end check boot jdk found
27779  fi
27780
27781
27782  if test "x$BOOT_JDK_FOUND" = xno; then
27783    # Now execute the test
27784
27785  if test "x$PROGRAMW6432" != x; then
27786    VIRTUAL_DIR="$PROGRAMW6432/Java"
27787
27788  windows_path="$VIRTUAL_DIR"
27789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27790    unix_path=`$CYGPATH -u "$windows_path"`
27791    VIRTUAL_DIR="$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    VIRTUAL_DIR="$unix_path"
27795  fi
27796
27797
27798  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27799  BOOT_JDK_SUFFIX=""
27800  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27801  if test "x$ALL_JDKS_FOUND" != x; then
27802    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27803
27804  if test "x$BOOT_JDK_FOUND" = xno; then
27805    # Now execute the test
27806
27807        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27808        if test -d "$BOOT_JDK"; then
27809          BOOT_JDK_FOUND=maybe
27810          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27811$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27812        fi
27813
27814
27815    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27816    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27817      # Do we have a bin/java?
27818      if test ! -x "$BOOT_JDK/bin/java"; then
27819        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27820$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27821        BOOT_JDK_FOUND=no
27822      else
27823        # Do we have a bin/javac?
27824        if test ! -x "$BOOT_JDK/bin/javac"; then
27825          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27826$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27827          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27828$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27829          BOOT_JDK_FOUND=no
27830        else
27831          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27832          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27833
27834          # Extra M4 quote needed to protect [] in grep expression.
27835          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27836          if test "x$FOUND_CORRECT_VERSION" = x; then
27837            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27838$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27839            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27840$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27841            BOOT_JDK_FOUND=no
27842          else
27843            # We're done! :-)
27844            BOOT_JDK_FOUND=yes
27845
27846  # Only process if variable expands to non-empty
27847
27848  if test "x$BOOT_JDK" != x; then
27849    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27850
27851  # Input might be given as Windows format, start by converting to
27852  # unix format.
27853  path="$BOOT_JDK"
27854  new_path=`$CYGPATH -u "$path"`
27855
27856  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27857  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27858  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27859  # "foo.exe" is OK but "foo" is an error.
27860  #
27861  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27862  # It is also a way to make sure we got the proper file name for the real test later on.
27863  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27864  if test "x$test_shortpath" = x; then
27865    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27866$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27867    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27868  fi
27869
27870  # Call helper function which possibly converts this using DOS-style short mode.
27871  # If so, the updated path is stored in $new_path.
27872
27873  input_path="$new_path"
27874  # Check if we need to convert this using DOS-style short mode. If the path
27875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27876  # take no chances and rewrite it.
27877  # Note: m4 eats our [], so we need to use [ and ] instead.
27878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27879  if test "x$has_forbidden_chars" != x; then
27880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27881    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27882    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27883    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27884      # Going to short mode and back again did indeed matter. Since short mode is
27885      # case insensitive, let's make it lowercase to improve readability.
27886      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27887      # Now convert it back to Unix-style (cygpath)
27888      input_path=`$CYGPATH -u "$shortmode_path"`
27889      new_path="$input_path"
27890    fi
27891  fi
27892
27893  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27894  if test "x$test_cygdrive_prefix" = x; then
27895    # As a simple fix, exclude /usr/bin since it's not a real path.
27896    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27897      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27898      # a path prefixed by /cygdrive for fixpath to work.
27899      new_path="$CYGWIN_ROOT_PATH$input_path"
27900    fi
27901  fi
27902
27903
27904  if test "x$path" != "x$new_path"; then
27905    BOOT_JDK="$new_path"
27906    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27907$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27908  fi
27909
27910    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27911
27912  path="$BOOT_JDK"
27913  has_colon=`$ECHO $path | $GREP ^.:`
27914  new_path="$path"
27915  if test "x$has_colon" = x; then
27916    # Not in mixed or Windows style, start by that.
27917    new_path=`cmd //c echo $path`
27918  fi
27919
27920
27921  input_path="$new_path"
27922  # Check if we need to convert this using DOS-style short mode. If the path
27923  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27924  # take no chances and rewrite it.
27925  # Note: m4 eats our [], so we need to use [ and ] instead.
27926  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27927  if test "x$has_forbidden_chars" != x; then
27928    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27929    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27930  fi
27931
27932
27933  windows_path="$new_path"
27934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27935    unix_path=`$CYGPATH -u "$windows_path"`
27936    new_path="$unix_path"
27937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27939    new_path="$unix_path"
27940  fi
27941
27942  if test "x$path" != "x$new_path"; then
27943    BOOT_JDK="$new_path"
27944    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27945$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27946  fi
27947
27948  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27949  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27950
27951    else
27952      # We're on a unix platform. Hooray! :)
27953      path="$BOOT_JDK"
27954      has_space=`$ECHO "$path" | $GREP " "`
27955      if test "x$has_space" != x; then
27956        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27957$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27958        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27959      fi
27960
27961      # Use eval to expand a potential ~
27962      eval path="$path"
27963      if test ! -f "$path" && test ! -d "$path"; then
27964        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27965      fi
27966
27967      if test -d "$path"; then
27968        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27969      else
27970        dir="`$DIRNAME "$path"`"
27971        base="`$BASENAME "$path"`"
27972        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27973      fi
27974    fi
27975  fi
27976
27977            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27978$as_echo_n "checking for Boot JDK... " >&6; }
27979            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27980$as_echo "$BOOT_JDK" >&6; }
27981            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27982$as_echo_n "checking Boot JDK version... " >&6; }
27983            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27984            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27985$as_echo "$BOOT_JDK_VERSION" >&6; }
27986          fi # end check jdk version
27987        fi # end check javac
27988      fi # end check java
27989    fi # end check boot jdk found
27990  fi
27991
27992    done
27993  fi
27994
27995  fi
27996
27997
27998    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27999    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28000      # Do we have a bin/java?
28001      if test ! -x "$BOOT_JDK/bin/java"; then
28002        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28003$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28004        BOOT_JDK_FOUND=no
28005      else
28006        # Do we have a bin/javac?
28007        if test ! -x "$BOOT_JDK/bin/javac"; then
28008          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28009$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28010          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28011$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28012          BOOT_JDK_FOUND=no
28013        else
28014          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28015          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28016
28017          # Extra M4 quote needed to protect [] in grep expression.
28018          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28019          if test "x$FOUND_CORRECT_VERSION" = x; then
28020            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28021$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28022            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28023$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28024            BOOT_JDK_FOUND=no
28025          else
28026            # We're done! :-)
28027            BOOT_JDK_FOUND=yes
28028
28029  # Only process if variable expands to non-empty
28030
28031  if test "x$BOOT_JDK" != x; then
28032    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28033
28034  # Input might be given as Windows format, start by converting to
28035  # unix format.
28036  path="$BOOT_JDK"
28037  new_path=`$CYGPATH -u "$path"`
28038
28039  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28040  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28041  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28042  # "foo.exe" is OK but "foo" is an error.
28043  #
28044  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28045  # It is also a way to make sure we got the proper file name for the real test later on.
28046  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28047  if test "x$test_shortpath" = x; then
28048    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28049$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28050    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28051  fi
28052
28053  # Call helper function which possibly converts this using DOS-style short mode.
28054  # If so, the updated path is stored in $new_path.
28055
28056  input_path="$new_path"
28057  # Check if we need to convert this using DOS-style short mode. If the path
28058  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28059  # take no chances and rewrite it.
28060  # Note: m4 eats our [], so we need to use [ and ] instead.
28061  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28062  if test "x$has_forbidden_chars" != x; then
28063    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28064    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28065    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28066    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28067      # Going to short mode and back again did indeed matter. Since short mode is
28068      # case insensitive, let's make it lowercase to improve readability.
28069      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28070      # Now convert it back to Unix-style (cygpath)
28071      input_path=`$CYGPATH -u "$shortmode_path"`
28072      new_path="$input_path"
28073    fi
28074  fi
28075
28076  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28077  if test "x$test_cygdrive_prefix" = x; then
28078    # As a simple fix, exclude /usr/bin since it's not a real path.
28079    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28080      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28081      # a path prefixed by /cygdrive for fixpath to work.
28082      new_path="$CYGWIN_ROOT_PATH$input_path"
28083    fi
28084  fi
28085
28086
28087  if test "x$path" != "x$new_path"; then
28088    BOOT_JDK="$new_path"
28089    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28090$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28091  fi
28092
28093    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28094
28095  path="$BOOT_JDK"
28096  has_colon=`$ECHO $path | $GREP ^.:`
28097  new_path="$path"
28098  if test "x$has_colon" = x; then
28099    # Not in mixed or Windows style, start by that.
28100    new_path=`cmd //c echo $path`
28101  fi
28102
28103
28104  input_path="$new_path"
28105  # Check if we need to convert this using DOS-style short mode. If the path
28106  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28107  # take no chances and rewrite it.
28108  # Note: m4 eats our [], so we need to use [ and ] instead.
28109  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28110  if test "x$has_forbidden_chars" != x; then
28111    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28112    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28113  fi
28114
28115
28116  windows_path="$new_path"
28117  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28118    unix_path=`$CYGPATH -u "$windows_path"`
28119    new_path="$unix_path"
28120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28121    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28122    new_path="$unix_path"
28123  fi
28124
28125  if test "x$path" != "x$new_path"; then
28126    BOOT_JDK="$new_path"
28127    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28128$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28129  fi
28130
28131  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28132  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28133
28134    else
28135      # We're on a unix platform. Hooray! :)
28136      path="$BOOT_JDK"
28137      has_space=`$ECHO "$path" | $GREP " "`
28138      if test "x$has_space" != x; then
28139        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28140$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28141        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28142      fi
28143
28144      # Use eval to expand a potential ~
28145      eval path="$path"
28146      if test ! -f "$path" && test ! -d "$path"; then
28147        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28148      fi
28149
28150      if test -d "$path"; then
28151        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28152      else
28153        dir="`$DIRNAME "$path"`"
28154        base="`$BASENAME "$path"`"
28155        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28156      fi
28157    fi
28158  fi
28159
28160            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28161$as_echo_n "checking for Boot JDK... " >&6; }
28162            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28163$as_echo "$BOOT_JDK" >&6; }
28164            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28165$as_echo_n "checking Boot JDK version... " >&6; }
28166            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28167            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28168$as_echo "$BOOT_JDK_VERSION" >&6; }
28169          fi # end check jdk version
28170        fi # end check javac
28171      fi # end check java
28172    fi # end check boot jdk found
28173  fi
28174
28175
28176  if test "x$BOOT_JDK_FOUND" = xno; then
28177    # Now execute the test
28178
28179  if test "x$PROGRAMFILES" != x; then
28180    VIRTUAL_DIR="$PROGRAMFILES/Java"
28181
28182  windows_path="$VIRTUAL_DIR"
28183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28184    unix_path=`$CYGPATH -u "$windows_path"`
28185    VIRTUAL_DIR="$unix_path"
28186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28187    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28188    VIRTUAL_DIR="$unix_path"
28189  fi
28190
28191
28192  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
28193  BOOT_JDK_SUFFIX=""
28194  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28195  if test "x$ALL_JDKS_FOUND" != x; then
28196    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28197
28198  if test "x$BOOT_JDK_FOUND" = xno; then
28199    # Now execute the test
28200
28201        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28202        if test -d "$BOOT_JDK"; then
28203          BOOT_JDK_FOUND=maybe
28204          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28205$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28206        fi
28207
28208
28209    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28210    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28211      # Do we have a bin/java?
28212      if test ! -x "$BOOT_JDK/bin/java"; then
28213        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28214$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28215        BOOT_JDK_FOUND=no
28216      else
28217        # Do we have a bin/javac?
28218        if test ! -x "$BOOT_JDK/bin/javac"; then
28219          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28220$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28221          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28222$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28223          BOOT_JDK_FOUND=no
28224        else
28225          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28226          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28227
28228          # Extra M4 quote needed to protect [] in grep expression.
28229          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28230          if test "x$FOUND_CORRECT_VERSION" = x; then
28231            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28232$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28233            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28234$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28235            BOOT_JDK_FOUND=no
28236          else
28237            # We're done! :-)
28238            BOOT_JDK_FOUND=yes
28239
28240  # Only process if variable expands to non-empty
28241
28242  if test "x$BOOT_JDK" != x; then
28243    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28244
28245  # Input might be given as Windows format, start by converting to
28246  # unix format.
28247  path="$BOOT_JDK"
28248  new_path=`$CYGPATH -u "$path"`
28249
28250  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28251  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28252  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28253  # "foo.exe" is OK but "foo" is an error.
28254  #
28255  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28256  # It is also a way to make sure we got the proper file name for the real test later on.
28257  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28258  if test "x$test_shortpath" = x; then
28259    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28260$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28261    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28262  fi
28263
28264  # Call helper function which possibly converts this using DOS-style short mode.
28265  # If so, the updated path is stored in $new_path.
28266
28267  input_path="$new_path"
28268  # Check if we need to convert this using DOS-style short mode. If the path
28269  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28270  # take no chances and rewrite it.
28271  # Note: m4 eats our [], so we need to use [ and ] instead.
28272  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28273  if test "x$has_forbidden_chars" != x; then
28274    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28275    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28276    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28277    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28278      # Going to short mode and back again did indeed matter. Since short mode is
28279      # case insensitive, let's make it lowercase to improve readability.
28280      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28281      # Now convert it back to Unix-style (cygpath)
28282      input_path=`$CYGPATH -u "$shortmode_path"`
28283      new_path="$input_path"
28284    fi
28285  fi
28286
28287  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28288  if test "x$test_cygdrive_prefix" = x; then
28289    # As a simple fix, exclude /usr/bin since it's not a real path.
28290    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28291      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28292      # a path prefixed by /cygdrive for fixpath to work.
28293      new_path="$CYGWIN_ROOT_PATH$input_path"
28294    fi
28295  fi
28296
28297
28298  if test "x$path" != "x$new_path"; then
28299    BOOT_JDK="$new_path"
28300    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28301$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28302  fi
28303
28304    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28305
28306  path="$BOOT_JDK"
28307  has_colon=`$ECHO $path | $GREP ^.:`
28308  new_path="$path"
28309  if test "x$has_colon" = x; then
28310    # Not in mixed or Windows style, start by that.
28311    new_path=`cmd //c echo $path`
28312  fi
28313
28314
28315  input_path="$new_path"
28316  # Check if we need to convert this using DOS-style short mode. If the path
28317  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28318  # take no chances and rewrite it.
28319  # Note: m4 eats our [], so we need to use [ and ] instead.
28320  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28321  if test "x$has_forbidden_chars" != x; then
28322    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28323    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28324  fi
28325
28326
28327  windows_path="$new_path"
28328  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28329    unix_path=`$CYGPATH -u "$windows_path"`
28330    new_path="$unix_path"
28331  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28332    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28333    new_path="$unix_path"
28334  fi
28335
28336  if test "x$path" != "x$new_path"; then
28337    BOOT_JDK="$new_path"
28338    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28339$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28340  fi
28341
28342  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28343  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28344
28345    else
28346      # We're on a unix platform. Hooray! :)
28347      path="$BOOT_JDK"
28348      has_space=`$ECHO "$path" | $GREP " "`
28349      if test "x$has_space" != x; then
28350        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28351$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28352        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28353      fi
28354
28355      # Use eval to expand a potential ~
28356      eval path="$path"
28357      if test ! -f "$path" && test ! -d "$path"; then
28358        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28359      fi
28360
28361      if test -d "$path"; then
28362        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28363      else
28364        dir="`$DIRNAME "$path"`"
28365        base="`$BASENAME "$path"`"
28366        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28367      fi
28368    fi
28369  fi
28370
28371            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28372$as_echo_n "checking for Boot JDK... " >&6; }
28373            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28374$as_echo "$BOOT_JDK" >&6; }
28375            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28376$as_echo_n "checking Boot JDK version... " >&6; }
28377            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28378            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28379$as_echo "$BOOT_JDK_VERSION" >&6; }
28380          fi # end check jdk version
28381        fi # end check javac
28382      fi # end check java
28383    fi # end check boot jdk found
28384  fi
28385
28386    done
28387  fi
28388
28389  fi
28390
28391
28392    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28393    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28394      # Do we have a bin/java?
28395      if test ! -x "$BOOT_JDK/bin/java"; then
28396        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28397$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28398        BOOT_JDK_FOUND=no
28399      else
28400        # Do we have a bin/javac?
28401        if test ! -x "$BOOT_JDK/bin/javac"; then
28402          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28403$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28404          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28405$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28406          BOOT_JDK_FOUND=no
28407        else
28408          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28409          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28410
28411          # Extra M4 quote needed to protect [] in grep expression.
28412          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28413          if test "x$FOUND_CORRECT_VERSION" = x; then
28414            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28415$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28416            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28417$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28418            BOOT_JDK_FOUND=no
28419          else
28420            # We're done! :-)
28421            BOOT_JDK_FOUND=yes
28422
28423  # Only process if variable expands to non-empty
28424
28425  if test "x$BOOT_JDK" != x; then
28426    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28427
28428  # Input might be given as Windows format, start by converting to
28429  # unix format.
28430  path="$BOOT_JDK"
28431  new_path=`$CYGPATH -u "$path"`
28432
28433  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28434  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28435  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28436  # "foo.exe" is OK but "foo" is an error.
28437  #
28438  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28439  # It is also a way to make sure we got the proper file name for the real test later on.
28440  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28441  if test "x$test_shortpath" = x; then
28442    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28443$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28444    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28445  fi
28446
28447  # Call helper function which possibly converts this using DOS-style short mode.
28448  # If so, the updated path is stored in $new_path.
28449
28450  input_path="$new_path"
28451  # Check if we need to convert this using DOS-style short mode. If the path
28452  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28453  # take no chances and rewrite it.
28454  # Note: m4 eats our [], so we need to use [ and ] instead.
28455  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28456  if test "x$has_forbidden_chars" != x; then
28457    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28458    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28459    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28460    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28461      # Going to short mode and back again did indeed matter. Since short mode is
28462      # case insensitive, let's make it lowercase to improve readability.
28463      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28464      # Now convert it back to Unix-style (cygpath)
28465      input_path=`$CYGPATH -u "$shortmode_path"`
28466      new_path="$input_path"
28467    fi
28468  fi
28469
28470  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28471  if test "x$test_cygdrive_prefix" = x; then
28472    # As a simple fix, exclude /usr/bin since it's not a real path.
28473    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28474      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28475      # a path prefixed by /cygdrive for fixpath to work.
28476      new_path="$CYGWIN_ROOT_PATH$input_path"
28477    fi
28478  fi
28479
28480
28481  if test "x$path" != "x$new_path"; then
28482    BOOT_JDK="$new_path"
28483    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28484$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28485  fi
28486
28487    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28488
28489  path="$BOOT_JDK"
28490  has_colon=`$ECHO $path | $GREP ^.:`
28491  new_path="$path"
28492  if test "x$has_colon" = x; then
28493    # Not in mixed or Windows style, start by that.
28494    new_path=`cmd //c echo $path`
28495  fi
28496
28497
28498  input_path="$new_path"
28499  # Check if we need to convert this using DOS-style short mode. If the path
28500  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28501  # take no chances and rewrite it.
28502  # Note: m4 eats our [], so we need to use [ and ] instead.
28503  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28504  if test "x$has_forbidden_chars" != x; then
28505    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28506    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28507  fi
28508
28509
28510  windows_path="$new_path"
28511  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28512    unix_path=`$CYGPATH -u "$windows_path"`
28513    new_path="$unix_path"
28514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28515    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28516    new_path="$unix_path"
28517  fi
28518
28519  if test "x$path" != "x$new_path"; then
28520    BOOT_JDK="$new_path"
28521    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28522$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28523  fi
28524
28525  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28526  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28527
28528    else
28529      # We're on a unix platform. Hooray! :)
28530      path="$BOOT_JDK"
28531      has_space=`$ECHO "$path" | $GREP " "`
28532      if test "x$has_space" != x; then
28533        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28534$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28535        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28536      fi
28537
28538      # Use eval to expand a potential ~
28539      eval path="$path"
28540      if test ! -f "$path" && test ! -d "$path"; then
28541        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28542      fi
28543
28544      if test -d "$path"; then
28545        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28546      else
28547        dir="`$DIRNAME "$path"`"
28548        base="`$BASENAME "$path"`"
28549        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28550      fi
28551    fi
28552  fi
28553
28554            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28555$as_echo_n "checking for Boot JDK... " >&6; }
28556            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28557$as_echo "$BOOT_JDK" >&6; }
28558            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28559$as_echo_n "checking Boot JDK version... " >&6; }
28560            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28561            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28562$as_echo "$BOOT_JDK_VERSION" >&6; }
28563          fi # end check jdk version
28564        fi # end check javac
28565      fi # end check java
28566    fi # end check boot jdk found
28567  fi
28568
28569
28570  if test "x$BOOT_JDK_FOUND" = xno; then
28571    # Now execute the test
28572
28573  if test "x$ProgramFiles" != x; then
28574    VIRTUAL_DIR="$ProgramFiles/Java"
28575
28576  windows_path="$VIRTUAL_DIR"
28577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28578    unix_path=`$CYGPATH -u "$windows_path"`
28579    VIRTUAL_DIR="$unix_path"
28580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28581    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28582    VIRTUAL_DIR="$unix_path"
28583  fi
28584
28585
28586  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
28587  BOOT_JDK_SUFFIX=""
28588  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28589  if test "x$ALL_JDKS_FOUND" != x; then
28590    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28591
28592  if test "x$BOOT_JDK_FOUND" = xno; then
28593    # Now execute the test
28594
28595        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28596        if test -d "$BOOT_JDK"; then
28597          BOOT_JDK_FOUND=maybe
28598          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28599$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28600        fi
28601
28602
28603    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28604    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28605      # Do we have a bin/java?
28606      if test ! -x "$BOOT_JDK/bin/java"; then
28607        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28608$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28609        BOOT_JDK_FOUND=no
28610      else
28611        # Do we have a bin/javac?
28612        if test ! -x "$BOOT_JDK/bin/javac"; then
28613          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28614$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28615          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28616$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28617          BOOT_JDK_FOUND=no
28618        else
28619          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28620          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28621
28622          # Extra M4 quote needed to protect [] in grep expression.
28623          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28624          if test "x$FOUND_CORRECT_VERSION" = x; then
28625            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28626$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28627            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28628$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28629            BOOT_JDK_FOUND=no
28630          else
28631            # We're done! :-)
28632            BOOT_JDK_FOUND=yes
28633
28634  # Only process if variable expands to non-empty
28635
28636  if test "x$BOOT_JDK" != x; then
28637    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28638
28639  # Input might be given as Windows format, start by converting to
28640  # unix format.
28641  path="$BOOT_JDK"
28642  new_path=`$CYGPATH -u "$path"`
28643
28644  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28645  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28646  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28647  # "foo.exe" is OK but "foo" is an error.
28648  #
28649  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28650  # It is also a way to make sure we got the proper file name for the real test later on.
28651  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28652  if test "x$test_shortpath" = x; then
28653    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28654$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28655    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28656  fi
28657
28658  # Call helper function which possibly converts this using DOS-style short mode.
28659  # If so, the updated path is stored in $new_path.
28660
28661  input_path="$new_path"
28662  # Check if we need to convert this using DOS-style short mode. If the path
28663  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28664  # take no chances and rewrite it.
28665  # Note: m4 eats our [], so we need to use [ and ] instead.
28666  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28667  if test "x$has_forbidden_chars" != x; then
28668    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28669    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28670    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28671    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28672      # Going to short mode and back again did indeed matter. Since short mode is
28673      # case insensitive, let's make it lowercase to improve readability.
28674      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28675      # Now convert it back to Unix-style (cygpath)
28676      input_path=`$CYGPATH -u "$shortmode_path"`
28677      new_path="$input_path"
28678    fi
28679  fi
28680
28681  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28682  if test "x$test_cygdrive_prefix" = x; then
28683    # As a simple fix, exclude /usr/bin since it's not a real path.
28684    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28685      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28686      # a path prefixed by /cygdrive for fixpath to work.
28687      new_path="$CYGWIN_ROOT_PATH$input_path"
28688    fi
28689  fi
28690
28691
28692  if test "x$path" != "x$new_path"; then
28693    BOOT_JDK="$new_path"
28694    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28695$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28696  fi
28697
28698    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28699
28700  path="$BOOT_JDK"
28701  has_colon=`$ECHO $path | $GREP ^.:`
28702  new_path="$path"
28703  if test "x$has_colon" = x; then
28704    # Not in mixed or Windows style, start by that.
28705    new_path=`cmd //c echo $path`
28706  fi
28707
28708
28709  input_path="$new_path"
28710  # Check if we need to convert this using DOS-style short mode. If the path
28711  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28712  # take no chances and rewrite it.
28713  # Note: m4 eats our [], so we need to use [ and ] instead.
28714  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28715  if test "x$has_forbidden_chars" != x; then
28716    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28717    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28718  fi
28719
28720
28721  windows_path="$new_path"
28722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28723    unix_path=`$CYGPATH -u "$windows_path"`
28724    new_path="$unix_path"
28725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28726    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28727    new_path="$unix_path"
28728  fi
28729
28730  if test "x$path" != "x$new_path"; then
28731    BOOT_JDK="$new_path"
28732    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28733$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28734  fi
28735
28736  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28737  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28738
28739    else
28740      # We're on a unix platform. Hooray! :)
28741      path="$BOOT_JDK"
28742      has_space=`$ECHO "$path" | $GREP " "`
28743      if test "x$has_space" != x; then
28744        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28745$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28746        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28747      fi
28748
28749      # Use eval to expand a potential ~
28750      eval path="$path"
28751      if test ! -f "$path" && test ! -d "$path"; then
28752        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28753      fi
28754
28755      if test -d "$path"; then
28756        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28757      else
28758        dir="`$DIRNAME "$path"`"
28759        base="`$BASENAME "$path"`"
28760        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28761      fi
28762    fi
28763  fi
28764
28765            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28766$as_echo_n "checking for Boot JDK... " >&6; }
28767            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28768$as_echo "$BOOT_JDK" >&6; }
28769            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28770$as_echo_n "checking Boot JDK version... " >&6; }
28771            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28772            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28773$as_echo "$BOOT_JDK_VERSION" >&6; }
28774          fi # end check jdk version
28775        fi # end check javac
28776      fi # end check java
28777    fi # end check boot jdk found
28778  fi
28779
28780    done
28781  fi
28782
28783  fi
28784
28785
28786    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28787    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28788      # Do we have a bin/java?
28789      if test ! -x "$BOOT_JDK/bin/java"; then
28790        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28791$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28792        BOOT_JDK_FOUND=no
28793      else
28794        # Do we have a bin/javac?
28795        if test ! -x "$BOOT_JDK/bin/javac"; then
28796          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28797$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28798          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28799$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28800          BOOT_JDK_FOUND=no
28801        else
28802          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28803          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28804
28805          # Extra M4 quote needed to protect [] in grep expression.
28806          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28807          if test "x$FOUND_CORRECT_VERSION" = x; then
28808            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28809$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28810            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28811$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28812            BOOT_JDK_FOUND=no
28813          else
28814            # We're done! :-)
28815            BOOT_JDK_FOUND=yes
28816
28817  # Only process if variable expands to non-empty
28818
28819  if test "x$BOOT_JDK" != x; then
28820    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28821
28822  # Input might be given as Windows format, start by converting to
28823  # unix format.
28824  path="$BOOT_JDK"
28825  new_path=`$CYGPATH -u "$path"`
28826
28827  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28828  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28829  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28830  # "foo.exe" is OK but "foo" is an error.
28831  #
28832  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28833  # It is also a way to make sure we got the proper file name for the real test later on.
28834  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28835  if test "x$test_shortpath" = x; then
28836    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28837$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28838    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28839  fi
28840
28841  # Call helper function which possibly converts this using DOS-style short mode.
28842  # If so, the updated path is stored in $new_path.
28843
28844  input_path="$new_path"
28845  # Check if we need to convert this using DOS-style short mode. If the path
28846  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28847  # take no chances and rewrite it.
28848  # Note: m4 eats our [], so we need to use [ and ] instead.
28849  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28850  if test "x$has_forbidden_chars" != x; then
28851    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28852    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28853    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28854    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28855      # Going to short mode and back again did indeed matter. Since short mode is
28856      # case insensitive, let's make it lowercase to improve readability.
28857      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28858      # Now convert it back to Unix-style (cygpath)
28859      input_path=`$CYGPATH -u "$shortmode_path"`
28860      new_path="$input_path"
28861    fi
28862  fi
28863
28864  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28865  if test "x$test_cygdrive_prefix" = x; then
28866    # As a simple fix, exclude /usr/bin since it's not a real path.
28867    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28868      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28869      # a path prefixed by /cygdrive for fixpath to work.
28870      new_path="$CYGWIN_ROOT_PATH$input_path"
28871    fi
28872  fi
28873
28874
28875  if test "x$path" != "x$new_path"; then
28876    BOOT_JDK="$new_path"
28877    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28878$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28879  fi
28880
28881    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28882
28883  path="$BOOT_JDK"
28884  has_colon=`$ECHO $path | $GREP ^.:`
28885  new_path="$path"
28886  if test "x$has_colon" = x; then
28887    # Not in mixed or Windows style, start by that.
28888    new_path=`cmd //c echo $path`
28889  fi
28890
28891
28892  input_path="$new_path"
28893  # Check if we need to convert this using DOS-style short mode. If the path
28894  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28895  # take no chances and rewrite it.
28896  # Note: m4 eats our [], so we need to use [ and ] instead.
28897  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28898  if test "x$has_forbidden_chars" != x; then
28899    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28900    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28901  fi
28902
28903
28904  windows_path="$new_path"
28905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28906    unix_path=`$CYGPATH -u "$windows_path"`
28907    new_path="$unix_path"
28908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28910    new_path="$unix_path"
28911  fi
28912
28913  if test "x$path" != "x$new_path"; then
28914    BOOT_JDK="$new_path"
28915    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28916$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28917  fi
28918
28919  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28920  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28921
28922    else
28923      # We're on a unix platform. Hooray! :)
28924      path="$BOOT_JDK"
28925      has_space=`$ECHO "$path" | $GREP " "`
28926      if test "x$has_space" != x; then
28927        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28928$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28929        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28930      fi
28931
28932      # Use eval to expand a potential ~
28933      eval path="$path"
28934      if test ! -f "$path" && test ! -d "$path"; then
28935        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28936      fi
28937
28938      if test -d "$path"; then
28939        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28940      else
28941        dir="`$DIRNAME "$path"`"
28942        base="`$BASENAME "$path"`"
28943        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28944      fi
28945    fi
28946  fi
28947
28948            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28949$as_echo_n "checking for Boot JDK... " >&6; }
28950            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28951$as_echo "$BOOT_JDK" >&6; }
28952            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28953$as_echo_n "checking Boot JDK version... " >&6; }
28954            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28955            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28956$as_echo "$BOOT_JDK_VERSION" >&6; }
28957          fi # end check jdk version
28958        fi # end check javac
28959      fi # end check java
28960    fi # end check boot jdk found
28961  fi
28962
28963
28964  if test "x$BOOT_JDK_FOUND" = xno; then
28965    # Now execute the test
28966
28967  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28968  BOOT_JDK_SUFFIX=""
28969  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28970  if test "x$ALL_JDKS_FOUND" != x; then
28971    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28972
28973  if test "x$BOOT_JDK_FOUND" = xno; then
28974    # Now execute the test
28975
28976        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28977        if test -d "$BOOT_JDK"; then
28978          BOOT_JDK_FOUND=maybe
28979          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28980$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28981        fi
28982
28983
28984    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28985    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28986      # Do we have a bin/java?
28987      if test ! -x "$BOOT_JDK/bin/java"; then
28988        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28989$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28990        BOOT_JDK_FOUND=no
28991      else
28992        # Do we have a bin/javac?
28993        if test ! -x "$BOOT_JDK/bin/javac"; then
28994          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28995$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28996          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28997$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28998          BOOT_JDK_FOUND=no
28999        else
29000          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29001          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29002
29003          # Extra M4 quote needed to protect [] in grep expression.
29004          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29005          if test "x$FOUND_CORRECT_VERSION" = x; then
29006            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29007$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29008            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29009$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29010            BOOT_JDK_FOUND=no
29011          else
29012            # We're done! :-)
29013            BOOT_JDK_FOUND=yes
29014
29015  # Only process if variable expands to non-empty
29016
29017  if test "x$BOOT_JDK" != x; then
29018    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29019
29020  # Input might be given as Windows format, start by converting to
29021  # unix format.
29022  path="$BOOT_JDK"
29023  new_path=`$CYGPATH -u "$path"`
29024
29025  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29026  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29027  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29028  # "foo.exe" is OK but "foo" is an error.
29029  #
29030  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29031  # It is also a way to make sure we got the proper file name for the real test later on.
29032  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29033  if test "x$test_shortpath" = x; then
29034    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29035$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29036    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29037  fi
29038
29039  # Call helper function which possibly converts this using DOS-style short mode.
29040  # If so, the updated path is stored in $new_path.
29041
29042  input_path="$new_path"
29043  # Check if we need to convert this using DOS-style short mode. If the path
29044  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29045  # take no chances and rewrite it.
29046  # Note: m4 eats our [], so we need to use [ and ] instead.
29047  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29048  if test "x$has_forbidden_chars" != x; then
29049    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29050    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29051    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29052    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29053      # Going to short mode and back again did indeed matter. Since short mode is
29054      # case insensitive, let's make it lowercase to improve readability.
29055      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29056      # Now convert it back to Unix-style (cygpath)
29057      input_path=`$CYGPATH -u "$shortmode_path"`
29058      new_path="$input_path"
29059    fi
29060  fi
29061
29062  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29063  if test "x$test_cygdrive_prefix" = x; then
29064    # As a simple fix, exclude /usr/bin since it's not a real path.
29065    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29066      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29067      # a path prefixed by /cygdrive for fixpath to work.
29068      new_path="$CYGWIN_ROOT_PATH$input_path"
29069    fi
29070  fi
29071
29072
29073  if test "x$path" != "x$new_path"; then
29074    BOOT_JDK="$new_path"
29075    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29076$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29077  fi
29078
29079    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29080
29081  path="$BOOT_JDK"
29082  has_colon=`$ECHO $path | $GREP ^.:`
29083  new_path="$path"
29084  if test "x$has_colon" = x; then
29085    # Not in mixed or Windows style, start by that.
29086    new_path=`cmd //c echo $path`
29087  fi
29088
29089
29090  input_path="$new_path"
29091  # Check if we need to convert this using DOS-style short mode. If the path
29092  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29093  # take no chances and rewrite it.
29094  # Note: m4 eats our [], so we need to use [ and ] instead.
29095  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29096  if test "x$has_forbidden_chars" != x; then
29097    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29098    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29099  fi
29100
29101
29102  windows_path="$new_path"
29103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29104    unix_path=`$CYGPATH -u "$windows_path"`
29105    new_path="$unix_path"
29106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29107    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29108    new_path="$unix_path"
29109  fi
29110
29111  if test "x$path" != "x$new_path"; then
29112    BOOT_JDK="$new_path"
29113    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29114$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29115  fi
29116
29117  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29118  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29119
29120    else
29121      # We're on a unix platform. Hooray! :)
29122      path="$BOOT_JDK"
29123      has_space=`$ECHO "$path" | $GREP " "`
29124      if test "x$has_space" != x; then
29125        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29126$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29127        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29128      fi
29129
29130      # Use eval to expand a potential ~
29131      eval path="$path"
29132      if test ! -f "$path" && test ! -d "$path"; then
29133        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29134      fi
29135
29136      if test -d "$path"; then
29137        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29138      else
29139        dir="`$DIRNAME "$path"`"
29140        base="`$BASENAME "$path"`"
29141        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29142      fi
29143    fi
29144  fi
29145
29146            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29147$as_echo_n "checking for Boot JDK... " >&6; }
29148            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29149$as_echo "$BOOT_JDK" >&6; }
29150            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29151$as_echo_n "checking Boot JDK version... " >&6; }
29152            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29153            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29154$as_echo "$BOOT_JDK_VERSION" >&6; }
29155          fi # end check jdk version
29156        fi # end check javac
29157      fi # end check java
29158    fi # end check boot jdk found
29159  fi
29160
29161    done
29162  fi
29163
29164
29165    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29166    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29167      # Do we have a bin/java?
29168      if test ! -x "$BOOT_JDK/bin/java"; then
29169        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29170$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29171        BOOT_JDK_FOUND=no
29172      else
29173        # Do we have a bin/javac?
29174        if test ! -x "$BOOT_JDK/bin/javac"; then
29175          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29176$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29177          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29178$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29179          BOOT_JDK_FOUND=no
29180        else
29181          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29182          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29183
29184          # Extra M4 quote needed to protect [] in grep expression.
29185          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29186          if test "x$FOUND_CORRECT_VERSION" = x; then
29187            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29188$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29189            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29190$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29191            BOOT_JDK_FOUND=no
29192          else
29193            # We're done! :-)
29194            BOOT_JDK_FOUND=yes
29195
29196  # Only process if variable expands to non-empty
29197
29198  if test "x$BOOT_JDK" != x; then
29199    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29200
29201  # Input might be given as Windows format, start by converting to
29202  # unix format.
29203  path="$BOOT_JDK"
29204  new_path=`$CYGPATH -u "$path"`
29205
29206  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29207  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29208  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29209  # "foo.exe" is OK but "foo" is an error.
29210  #
29211  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29212  # It is also a way to make sure we got the proper file name for the real test later on.
29213  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29214  if test "x$test_shortpath" = x; then
29215    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29216$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29217    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29218  fi
29219
29220  # Call helper function which possibly converts this using DOS-style short mode.
29221  # If so, the updated path is stored in $new_path.
29222
29223  input_path="$new_path"
29224  # Check if we need to convert this using DOS-style short mode. If the path
29225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29226  # take no chances and rewrite it.
29227  # Note: m4 eats our [], so we need to use [ and ] instead.
29228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29229  if test "x$has_forbidden_chars" != x; then
29230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29231    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29232    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29233    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29234      # Going to short mode and back again did indeed matter. Since short mode is
29235      # case insensitive, let's make it lowercase to improve readability.
29236      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29237      # Now convert it back to Unix-style (cygpath)
29238      input_path=`$CYGPATH -u "$shortmode_path"`
29239      new_path="$input_path"
29240    fi
29241  fi
29242
29243  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29244  if test "x$test_cygdrive_prefix" = x; then
29245    # As a simple fix, exclude /usr/bin since it's not a real path.
29246    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29247      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29248      # a path prefixed by /cygdrive for fixpath to work.
29249      new_path="$CYGWIN_ROOT_PATH$input_path"
29250    fi
29251  fi
29252
29253
29254  if test "x$path" != "x$new_path"; then
29255    BOOT_JDK="$new_path"
29256    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29257$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29258  fi
29259
29260    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29261
29262  path="$BOOT_JDK"
29263  has_colon=`$ECHO $path | $GREP ^.:`
29264  new_path="$path"
29265  if test "x$has_colon" = x; then
29266    # Not in mixed or Windows style, start by that.
29267    new_path=`cmd //c echo $path`
29268  fi
29269
29270
29271  input_path="$new_path"
29272  # Check if we need to convert this using DOS-style short mode. If the path
29273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29274  # take no chances and rewrite it.
29275  # Note: m4 eats our [], so we need to use [ and ] instead.
29276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29277  if test "x$has_forbidden_chars" != x; then
29278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29279    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29280  fi
29281
29282
29283  windows_path="$new_path"
29284  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29285    unix_path=`$CYGPATH -u "$windows_path"`
29286    new_path="$unix_path"
29287  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29288    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29289    new_path="$unix_path"
29290  fi
29291
29292  if test "x$path" != "x$new_path"; then
29293    BOOT_JDK="$new_path"
29294    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29295$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29296  fi
29297
29298  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29299  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29300
29301    else
29302      # We're on a unix platform. Hooray! :)
29303      path="$BOOT_JDK"
29304      has_space=`$ECHO "$path" | $GREP " "`
29305      if test "x$has_space" != x; then
29306        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29307$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29308        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29309      fi
29310
29311      # Use eval to expand a potential ~
29312      eval path="$path"
29313      if test ! -f "$path" && test ! -d "$path"; then
29314        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29315      fi
29316
29317      if test -d "$path"; then
29318        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29319      else
29320        dir="`$DIRNAME "$path"`"
29321        base="`$BASENAME "$path"`"
29322        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29323      fi
29324    fi
29325  fi
29326
29327            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29328$as_echo_n "checking for Boot JDK... " >&6; }
29329            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29330$as_echo "$BOOT_JDK" >&6; }
29331            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29332$as_echo_n "checking Boot JDK version... " >&6; }
29333            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29334            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29335$as_echo "$BOOT_JDK_VERSION" >&6; }
29336          fi # end check jdk version
29337        fi # end check javac
29338      fi # end check java
29339    fi # end check boot jdk found
29340  fi
29341
29342  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
29343
29344  if test "x$BOOT_JDK_FOUND" = xno; then
29345    # Now execute the test
29346
29347  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
29348  BOOT_JDK_SUFFIX="/Contents/Home"
29349  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29350  if test "x$ALL_JDKS_FOUND" != x; then
29351    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29352
29353  if test "x$BOOT_JDK_FOUND" = xno; then
29354    # Now execute the test
29355
29356        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29357        if test -d "$BOOT_JDK"; then
29358          BOOT_JDK_FOUND=maybe
29359          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29360$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29361        fi
29362
29363
29364    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29365    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29366      # Do we have a bin/java?
29367      if test ! -x "$BOOT_JDK/bin/java"; then
29368        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29369$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29370        BOOT_JDK_FOUND=no
29371      else
29372        # Do we have a bin/javac?
29373        if test ! -x "$BOOT_JDK/bin/javac"; then
29374          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29375$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29376          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29377$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29378          BOOT_JDK_FOUND=no
29379        else
29380          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29381          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29382
29383          # Extra M4 quote needed to protect [] in grep expression.
29384          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29385          if test "x$FOUND_CORRECT_VERSION" = x; then
29386            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29387$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29388            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29389$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29390            BOOT_JDK_FOUND=no
29391          else
29392            # We're done! :-)
29393            BOOT_JDK_FOUND=yes
29394
29395  # Only process if variable expands to non-empty
29396
29397  if test "x$BOOT_JDK" != x; then
29398    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29399
29400  # Input might be given as Windows format, start by converting to
29401  # unix format.
29402  path="$BOOT_JDK"
29403  new_path=`$CYGPATH -u "$path"`
29404
29405  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29406  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29407  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29408  # "foo.exe" is OK but "foo" is an error.
29409  #
29410  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29411  # It is also a way to make sure we got the proper file name for the real test later on.
29412  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29413  if test "x$test_shortpath" = x; then
29414    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29415$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29416    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29417  fi
29418
29419  # Call helper function which possibly converts this using DOS-style short mode.
29420  # If so, the updated path is stored in $new_path.
29421
29422  input_path="$new_path"
29423  # Check if we need to convert this using DOS-style short mode. If the path
29424  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29425  # take no chances and rewrite it.
29426  # Note: m4 eats our [], so we need to use [ and ] instead.
29427  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29428  if test "x$has_forbidden_chars" != x; then
29429    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29430    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29431    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29432    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29433      # Going to short mode and back again did indeed matter. Since short mode is
29434      # case insensitive, let's make it lowercase to improve readability.
29435      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29436      # Now convert it back to Unix-style (cygpath)
29437      input_path=`$CYGPATH -u "$shortmode_path"`
29438      new_path="$input_path"
29439    fi
29440  fi
29441
29442  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29443  if test "x$test_cygdrive_prefix" = x; then
29444    # As a simple fix, exclude /usr/bin since it's not a real path.
29445    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29446      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29447      # a path prefixed by /cygdrive for fixpath to work.
29448      new_path="$CYGWIN_ROOT_PATH$input_path"
29449    fi
29450  fi
29451
29452
29453  if test "x$path" != "x$new_path"; then
29454    BOOT_JDK="$new_path"
29455    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29456$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29457  fi
29458
29459    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29460
29461  path="$BOOT_JDK"
29462  has_colon=`$ECHO $path | $GREP ^.:`
29463  new_path="$path"
29464  if test "x$has_colon" = x; then
29465    # Not in mixed or Windows style, start by that.
29466    new_path=`cmd //c echo $path`
29467  fi
29468
29469
29470  input_path="$new_path"
29471  # Check if we need to convert this using DOS-style short mode. If the path
29472  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29473  # take no chances and rewrite it.
29474  # Note: m4 eats our [], so we need to use [ and ] instead.
29475  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29476  if test "x$has_forbidden_chars" != x; then
29477    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29478    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29479  fi
29480
29481
29482  windows_path="$new_path"
29483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29484    unix_path=`$CYGPATH -u "$windows_path"`
29485    new_path="$unix_path"
29486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29487    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29488    new_path="$unix_path"
29489  fi
29490
29491  if test "x$path" != "x$new_path"; then
29492    BOOT_JDK="$new_path"
29493    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29494$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29495  fi
29496
29497  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29498  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29499
29500    else
29501      # We're on a unix platform. Hooray! :)
29502      path="$BOOT_JDK"
29503      has_space=`$ECHO "$path" | $GREP " "`
29504      if test "x$has_space" != x; then
29505        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29506$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29507        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29508      fi
29509
29510      # Use eval to expand a potential ~
29511      eval path="$path"
29512      if test ! -f "$path" && test ! -d "$path"; then
29513        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29514      fi
29515
29516      if test -d "$path"; then
29517        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29518      else
29519        dir="`$DIRNAME "$path"`"
29520        base="`$BASENAME "$path"`"
29521        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29522      fi
29523    fi
29524  fi
29525
29526            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29527$as_echo_n "checking for Boot JDK... " >&6; }
29528            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29529$as_echo "$BOOT_JDK" >&6; }
29530            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29531$as_echo_n "checking Boot JDK version... " >&6; }
29532            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29533            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29534$as_echo "$BOOT_JDK_VERSION" >&6; }
29535          fi # end check jdk version
29536        fi # end check javac
29537      fi # end check java
29538    fi # end check boot jdk found
29539  fi
29540
29541    done
29542  fi
29543
29544
29545    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29546    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29547      # Do we have a bin/java?
29548      if test ! -x "$BOOT_JDK/bin/java"; then
29549        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29550$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29551        BOOT_JDK_FOUND=no
29552      else
29553        # Do we have a bin/javac?
29554        if test ! -x "$BOOT_JDK/bin/javac"; then
29555          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29556$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29557          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29558$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29559          BOOT_JDK_FOUND=no
29560        else
29561          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29562          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29563
29564          # Extra M4 quote needed to protect [] in grep expression.
29565          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29566          if test "x$FOUND_CORRECT_VERSION" = x; then
29567            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29568$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29569            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29570$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29571            BOOT_JDK_FOUND=no
29572          else
29573            # We're done! :-)
29574            BOOT_JDK_FOUND=yes
29575
29576  # Only process if variable expands to non-empty
29577
29578  if test "x$BOOT_JDK" != x; then
29579    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29580
29581  # Input might be given as Windows format, start by converting to
29582  # unix format.
29583  path="$BOOT_JDK"
29584  new_path=`$CYGPATH -u "$path"`
29585
29586  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29587  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29588  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29589  # "foo.exe" is OK but "foo" is an error.
29590  #
29591  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29592  # It is also a way to make sure we got the proper file name for the real test later on.
29593  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29594  if test "x$test_shortpath" = x; then
29595    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29596$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29597    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29598  fi
29599
29600  # Call helper function which possibly converts this using DOS-style short mode.
29601  # If so, the updated path is stored in $new_path.
29602
29603  input_path="$new_path"
29604  # Check if we need to convert this using DOS-style short mode. If the path
29605  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29606  # take no chances and rewrite it.
29607  # Note: m4 eats our [], so we need to use [ and ] instead.
29608  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29609  if test "x$has_forbidden_chars" != x; then
29610    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29611    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29612    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29613    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29614      # Going to short mode and back again did indeed matter. Since short mode is
29615      # case insensitive, let's make it lowercase to improve readability.
29616      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29617      # Now convert it back to Unix-style (cygpath)
29618      input_path=`$CYGPATH -u "$shortmode_path"`
29619      new_path="$input_path"
29620    fi
29621  fi
29622
29623  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29624  if test "x$test_cygdrive_prefix" = x; then
29625    # As a simple fix, exclude /usr/bin since it's not a real path.
29626    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29627      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29628      # a path prefixed by /cygdrive for fixpath to work.
29629      new_path="$CYGWIN_ROOT_PATH$input_path"
29630    fi
29631  fi
29632
29633
29634  if test "x$path" != "x$new_path"; then
29635    BOOT_JDK="$new_path"
29636    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29637$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29638  fi
29639
29640    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29641
29642  path="$BOOT_JDK"
29643  has_colon=`$ECHO $path | $GREP ^.:`
29644  new_path="$path"
29645  if test "x$has_colon" = x; then
29646    # Not in mixed or Windows style, start by that.
29647    new_path=`cmd //c echo $path`
29648  fi
29649
29650
29651  input_path="$new_path"
29652  # Check if we need to convert this using DOS-style short mode. If the path
29653  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29654  # take no chances and rewrite it.
29655  # Note: m4 eats our [], so we need to use [ and ] instead.
29656  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29657  if test "x$has_forbidden_chars" != x; then
29658    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29659    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29660  fi
29661
29662
29663  windows_path="$new_path"
29664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29665    unix_path=`$CYGPATH -u "$windows_path"`
29666    new_path="$unix_path"
29667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29668    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29669    new_path="$unix_path"
29670  fi
29671
29672  if test "x$path" != "x$new_path"; then
29673    BOOT_JDK="$new_path"
29674    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29675$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29676  fi
29677
29678  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29679  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29680
29681    else
29682      # We're on a unix platform. Hooray! :)
29683      path="$BOOT_JDK"
29684      has_space=`$ECHO "$path" | $GREP " "`
29685      if test "x$has_space" != x; then
29686        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29687$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29688        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29689      fi
29690
29691      # Use eval to expand a potential ~
29692      eval path="$path"
29693      if test ! -f "$path" && test ! -d "$path"; then
29694        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29695      fi
29696
29697      if test -d "$path"; then
29698        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29699      else
29700        dir="`$DIRNAME "$path"`"
29701        base="`$BASENAME "$path"`"
29702        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29703      fi
29704    fi
29705  fi
29706
29707            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29708$as_echo_n "checking for Boot JDK... " >&6; }
29709            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29710$as_echo "$BOOT_JDK" >&6; }
29711            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29712$as_echo_n "checking Boot JDK version... " >&6; }
29713            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29714            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29715$as_echo "$BOOT_JDK_VERSION" >&6; }
29716          fi # end check jdk version
29717        fi # end check javac
29718      fi # end check java
29719    fi # end check boot jdk found
29720  fi
29721
29722
29723  if test "x$BOOT_JDK_FOUND" = xno; then
29724    # Now execute the test
29725
29726  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
29727  BOOT_JDK_SUFFIX="/Contents/Home"
29728  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29729  if test "x$ALL_JDKS_FOUND" != x; then
29730    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29731
29732  if test "x$BOOT_JDK_FOUND" = xno; then
29733    # Now execute the test
29734
29735        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29736        if test -d "$BOOT_JDK"; then
29737          BOOT_JDK_FOUND=maybe
29738          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29739$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29740        fi
29741
29742
29743    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29744    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29745      # Do we have a bin/java?
29746      if test ! -x "$BOOT_JDK/bin/java"; then
29747        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29748$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29749        BOOT_JDK_FOUND=no
29750      else
29751        # Do we have a bin/javac?
29752        if test ! -x "$BOOT_JDK/bin/javac"; then
29753          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29754$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29755          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29756$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29757          BOOT_JDK_FOUND=no
29758        else
29759          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29760          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29761
29762          # Extra M4 quote needed to protect [] in grep expression.
29763          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29764          if test "x$FOUND_CORRECT_VERSION" = x; then
29765            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29766$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29767            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29768$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29769            BOOT_JDK_FOUND=no
29770          else
29771            # We're done! :-)
29772            BOOT_JDK_FOUND=yes
29773
29774  # Only process if variable expands to non-empty
29775
29776  if test "x$BOOT_JDK" != x; then
29777    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29778
29779  # Input might be given as Windows format, start by converting to
29780  # unix format.
29781  path="$BOOT_JDK"
29782  new_path=`$CYGPATH -u "$path"`
29783
29784  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29785  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29786  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29787  # "foo.exe" is OK but "foo" is an error.
29788  #
29789  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29790  # It is also a way to make sure we got the proper file name for the real test later on.
29791  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29792  if test "x$test_shortpath" = x; then
29793    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29794$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29795    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29796  fi
29797
29798  # Call helper function which possibly converts this using DOS-style short mode.
29799  # If so, the updated path is stored in $new_path.
29800
29801  input_path="$new_path"
29802  # Check if we need to convert this using DOS-style short mode. If the path
29803  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29804  # take no chances and rewrite it.
29805  # Note: m4 eats our [], so we need to use [ and ] instead.
29806  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29807  if test "x$has_forbidden_chars" != x; then
29808    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29809    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29810    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29811    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29812      # Going to short mode and back again did indeed matter. Since short mode is
29813      # case insensitive, let's make it lowercase to improve readability.
29814      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29815      # Now convert it back to Unix-style (cygpath)
29816      input_path=`$CYGPATH -u "$shortmode_path"`
29817      new_path="$input_path"
29818    fi
29819  fi
29820
29821  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29822  if test "x$test_cygdrive_prefix" = x; then
29823    # As a simple fix, exclude /usr/bin since it's not a real path.
29824    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29825      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29826      # a path prefixed by /cygdrive for fixpath to work.
29827      new_path="$CYGWIN_ROOT_PATH$input_path"
29828    fi
29829  fi
29830
29831
29832  if test "x$path" != "x$new_path"; then
29833    BOOT_JDK="$new_path"
29834    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29835$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29836  fi
29837
29838    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29839
29840  path="$BOOT_JDK"
29841  has_colon=`$ECHO $path | $GREP ^.:`
29842  new_path="$path"
29843  if test "x$has_colon" = x; then
29844    # Not in mixed or Windows style, start by that.
29845    new_path=`cmd //c echo $path`
29846  fi
29847
29848
29849  input_path="$new_path"
29850  # Check if we need to convert this using DOS-style short mode. If the path
29851  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29852  # take no chances and rewrite it.
29853  # Note: m4 eats our [], so we need to use [ and ] instead.
29854  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29855  if test "x$has_forbidden_chars" != x; then
29856    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29857    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29858  fi
29859
29860
29861  windows_path="$new_path"
29862  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29863    unix_path=`$CYGPATH -u "$windows_path"`
29864    new_path="$unix_path"
29865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29866    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29867    new_path="$unix_path"
29868  fi
29869
29870  if test "x$path" != "x$new_path"; then
29871    BOOT_JDK="$new_path"
29872    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29873$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29874  fi
29875
29876  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29877  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29878
29879    else
29880      # We're on a unix platform. Hooray! :)
29881      path="$BOOT_JDK"
29882      has_space=`$ECHO "$path" | $GREP " "`
29883      if test "x$has_space" != x; then
29884        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29885$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29886        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29887      fi
29888
29889      # Use eval to expand a potential ~
29890      eval path="$path"
29891      if test ! -f "$path" && test ! -d "$path"; then
29892        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29893      fi
29894
29895      if test -d "$path"; then
29896        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29897      else
29898        dir="`$DIRNAME "$path"`"
29899        base="`$BASENAME "$path"`"
29900        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29901      fi
29902    fi
29903  fi
29904
29905            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29906$as_echo_n "checking for Boot JDK... " >&6; }
29907            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29908$as_echo "$BOOT_JDK" >&6; }
29909            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29910$as_echo_n "checking Boot JDK version... " >&6; }
29911            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29912            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29913$as_echo "$BOOT_JDK_VERSION" >&6; }
29914          fi # end check jdk version
29915        fi # end check javac
29916      fi # end check java
29917    fi # end check boot jdk found
29918  fi
29919
29920    done
29921  fi
29922
29923
29924    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29925    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29926      # Do we have a bin/java?
29927      if test ! -x "$BOOT_JDK/bin/java"; then
29928        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29929$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29930        BOOT_JDK_FOUND=no
29931      else
29932        # Do we have a bin/javac?
29933        if test ! -x "$BOOT_JDK/bin/javac"; then
29934          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29935$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29936          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29937$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29938          BOOT_JDK_FOUND=no
29939        else
29940          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29941          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29942
29943          # Extra M4 quote needed to protect [] in grep expression.
29944          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29945          if test "x$FOUND_CORRECT_VERSION" = x; then
29946            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29947$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29948            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29949$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29950            BOOT_JDK_FOUND=no
29951          else
29952            # We're done! :-)
29953            BOOT_JDK_FOUND=yes
29954
29955  # Only process if variable expands to non-empty
29956
29957  if test "x$BOOT_JDK" != x; then
29958    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29959
29960  # Input might be given as Windows format, start by converting to
29961  # unix format.
29962  path="$BOOT_JDK"
29963  new_path=`$CYGPATH -u "$path"`
29964
29965  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29966  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29967  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29968  # "foo.exe" is OK but "foo" is an error.
29969  #
29970  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29971  # It is also a way to make sure we got the proper file name for the real test later on.
29972  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29973  if test "x$test_shortpath" = x; then
29974    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29975$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29976    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29977  fi
29978
29979  # Call helper function which possibly converts this using DOS-style short mode.
29980  # If so, the updated path is stored in $new_path.
29981
29982  input_path="$new_path"
29983  # Check if we need to convert this using DOS-style short mode. If the path
29984  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29985  # take no chances and rewrite it.
29986  # Note: m4 eats our [], so we need to use [ and ] instead.
29987  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29988  if test "x$has_forbidden_chars" != x; then
29989    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29990    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29991    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29992    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29993      # Going to short mode and back again did indeed matter. Since short mode is
29994      # case insensitive, let's make it lowercase to improve readability.
29995      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29996      # Now convert it back to Unix-style (cygpath)
29997      input_path=`$CYGPATH -u "$shortmode_path"`
29998      new_path="$input_path"
29999    fi
30000  fi
30001
30002  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30003  if test "x$test_cygdrive_prefix" = x; then
30004    # As a simple fix, exclude /usr/bin since it's not a real path.
30005    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30006      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30007      # a path prefixed by /cygdrive for fixpath to work.
30008      new_path="$CYGWIN_ROOT_PATH$input_path"
30009    fi
30010  fi
30011
30012
30013  if test "x$path" != "x$new_path"; then
30014    BOOT_JDK="$new_path"
30015    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30016$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30017  fi
30018
30019    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30020
30021  path="$BOOT_JDK"
30022  has_colon=`$ECHO $path | $GREP ^.:`
30023  new_path="$path"
30024  if test "x$has_colon" = x; then
30025    # Not in mixed or Windows style, start by that.
30026    new_path=`cmd //c echo $path`
30027  fi
30028
30029
30030  input_path="$new_path"
30031  # Check if we need to convert this using DOS-style short mode. If the path
30032  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30033  # take no chances and rewrite it.
30034  # Note: m4 eats our [], so we need to use [ and ] instead.
30035  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30036  if test "x$has_forbidden_chars" != x; then
30037    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30038    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30039  fi
30040
30041
30042  windows_path="$new_path"
30043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30044    unix_path=`$CYGPATH -u "$windows_path"`
30045    new_path="$unix_path"
30046  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30047    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30048    new_path="$unix_path"
30049  fi
30050
30051  if test "x$path" != "x$new_path"; then
30052    BOOT_JDK="$new_path"
30053    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30054$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30055  fi
30056
30057  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30058  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30059
30060    else
30061      # We're on a unix platform. Hooray! :)
30062      path="$BOOT_JDK"
30063      has_space=`$ECHO "$path" | $GREP " "`
30064      if test "x$has_space" != x; then
30065        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30066$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30067        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30068      fi
30069
30070      # Use eval to expand a potential ~
30071      eval path="$path"
30072      if test ! -f "$path" && test ! -d "$path"; then
30073        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30074      fi
30075
30076      if test -d "$path"; then
30077        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30078      else
30079        dir="`$DIRNAME "$path"`"
30080        base="`$BASENAME "$path"`"
30081        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30082      fi
30083    fi
30084  fi
30085
30086            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30087$as_echo_n "checking for Boot JDK... " >&6; }
30088            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30089$as_echo "$BOOT_JDK" >&6; }
30090            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30091$as_echo_n "checking Boot JDK version... " >&6; }
30092            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30093            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30094$as_echo "$BOOT_JDK_VERSION" >&6; }
30095          fi # end check jdk version
30096        fi # end check javac
30097      fi # end check java
30098    fi # end check boot jdk found
30099  fi
30100
30101  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
30102
30103  if test "x$BOOT_JDK_FOUND" = xno; then
30104    # Now execute the test
30105
30106  BOOT_JDK_PREFIX="/usr/lib/jvm"
30107  BOOT_JDK_SUFFIX=""
30108  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
30109  if test "x$ALL_JDKS_FOUND" != x; then
30110    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
30111
30112  if test "x$BOOT_JDK_FOUND" = xno; then
30113    # Now execute the test
30114
30115        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
30116        if test -d "$BOOT_JDK"; then
30117          BOOT_JDK_FOUND=maybe
30118          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
30119$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
30120        fi
30121
30122
30123    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30124    if test "x$BOOT_JDK_FOUND" = xmaybe; then
30125      # Do we have a bin/java?
30126      if test ! -x "$BOOT_JDK/bin/java"; then
30127        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30128$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30129        BOOT_JDK_FOUND=no
30130      else
30131        # Do we have a bin/javac?
30132        if test ! -x "$BOOT_JDK/bin/javac"; then
30133          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30134$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30135          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30136$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30137          BOOT_JDK_FOUND=no
30138        else
30139          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30140          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30141
30142          # Extra M4 quote needed to protect [] in grep expression.
30143          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30144          if test "x$FOUND_CORRECT_VERSION" = x; then
30145            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30146$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30147            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30148$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30149            BOOT_JDK_FOUND=no
30150          else
30151            # We're done! :-)
30152            BOOT_JDK_FOUND=yes
30153
30154  # Only process if variable expands to non-empty
30155
30156  if test "x$BOOT_JDK" != x; then
30157    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30158
30159  # Input might be given as Windows format, start by converting to
30160  # unix format.
30161  path="$BOOT_JDK"
30162  new_path=`$CYGPATH -u "$path"`
30163
30164  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30165  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30166  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30167  # "foo.exe" is OK but "foo" is an error.
30168  #
30169  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30170  # It is also a way to make sure we got the proper file name for the real test later on.
30171  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30172  if test "x$test_shortpath" = x; then
30173    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30174$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30175    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30176  fi
30177
30178  # Call helper function which possibly converts this using DOS-style short mode.
30179  # If so, the updated path is stored in $new_path.
30180
30181  input_path="$new_path"
30182  # Check if we need to convert this using DOS-style short mode. If the path
30183  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30184  # take no chances and rewrite it.
30185  # Note: m4 eats our [], so we need to use [ and ] instead.
30186  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30187  if test "x$has_forbidden_chars" != x; then
30188    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30189    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30190    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30191    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30192      # Going to short mode and back again did indeed matter. Since short mode is
30193      # case insensitive, let's make it lowercase to improve readability.
30194      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30195      # Now convert it back to Unix-style (cygpath)
30196      input_path=`$CYGPATH -u "$shortmode_path"`
30197      new_path="$input_path"
30198    fi
30199  fi
30200
30201  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30202  if test "x$test_cygdrive_prefix" = x; then
30203    # As a simple fix, exclude /usr/bin since it's not a real path.
30204    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30205      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30206      # a path prefixed by /cygdrive for fixpath to work.
30207      new_path="$CYGWIN_ROOT_PATH$input_path"
30208    fi
30209  fi
30210
30211
30212  if test "x$path" != "x$new_path"; then
30213    BOOT_JDK="$new_path"
30214    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30215$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30216  fi
30217
30218    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30219
30220  path="$BOOT_JDK"
30221  has_colon=`$ECHO $path | $GREP ^.:`
30222  new_path="$path"
30223  if test "x$has_colon" = x; then
30224    # Not in mixed or Windows style, start by that.
30225    new_path=`cmd //c echo $path`
30226  fi
30227
30228
30229  input_path="$new_path"
30230  # Check if we need to convert this using DOS-style short mode. If the path
30231  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30232  # take no chances and rewrite it.
30233  # Note: m4 eats our [], so we need to use [ and ] instead.
30234  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30235  if test "x$has_forbidden_chars" != x; then
30236    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30237    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30238  fi
30239
30240
30241  windows_path="$new_path"
30242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30243    unix_path=`$CYGPATH -u "$windows_path"`
30244    new_path="$unix_path"
30245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30246    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30247    new_path="$unix_path"
30248  fi
30249
30250  if test "x$path" != "x$new_path"; then
30251    BOOT_JDK="$new_path"
30252    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30253$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30254  fi
30255
30256  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30257  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30258
30259    else
30260      # We're on a unix platform. Hooray! :)
30261      path="$BOOT_JDK"
30262      has_space=`$ECHO "$path" | $GREP " "`
30263      if test "x$has_space" != x; then
30264        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30265$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30266        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30267      fi
30268
30269      # Use eval to expand a potential ~
30270      eval path="$path"
30271      if test ! -f "$path" && test ! -d "$path"; then
30272        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30273      fi
30274
30275      if test -d "$path"; then
30276        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30277      else
30278        dir="`$DIRNAME "$path"`"
30279        base="`$BASENAME "$path"`"
30280        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30281      fi
30282    fi
30283  fi
30284
30285            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30286$as_echo_n "checking for Boot JDK... " >&6; }
30287            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30288$as_echo "$BOOT_JDK" >&6; }
30289            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30290$as_echo_n "checking Boot JDK version... " >&6; }
30291            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30292            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30293$as_echo "$BOOT_JDK_VERSION" >&6; }
30294          fi # end check jdk version
30295        fi # end check javac
30296      fi # end check java
30297    fi # end check boot jdk found
30298  fi
30299
30300    done
30301  fi
30302
30303
30304    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30305    if test "x$BOOT_JDK_FOUND" = xmaybe; then
30306      # Do we have a bin/java?
30307      if test ! -x "$BOOT_JDK/bin/java"; then
30308        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30309$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30310        BOOT_JDK_FOUND=no
30311      else
30312        # Do we have a bin/javac?
30313        if test ! -x "$BOOT_JDK/bin/javac"; then
30314          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30315$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30316          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30317$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30318          BOOT_JDK_FOUND=no
30319        else
30320          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30321          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30322
30323          # Extra M4 quote needed to protect [] in grep expression.
30324          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30325          if test "x$FOUND_CORRECT_VERSION" = x; then
30326            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30327$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30328            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30329$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30330            BOOT_JDK_FOUND=no
30331          else
30332            # We're done! :-)
30333            BOOT_JDK_FOUND=yes
30334
30335  # Only process if variable expands to non-empty
30336
30337  if test "x$BOOT_JDK" != x; then
30338    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30339
30340  # Input might be given as Windows format, start by converting to
30341  # unix format.
30342  path="$BOOT_JDK"
30343  new_path=`$CYGPATH -u "$path"`
30344
30345  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30346  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30347  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30348  # "foo.exe" is OK but "foo" is an error.
30349  #
30350  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30351  # It is also a way to make sure we got the proper file name for the real test later on.
30352  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30353  if test "x$test_shortpath" = x; then
30354    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30355$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30356    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30357  fi
30358
30359  # Call helper function which possibly converts this using DOS-style short mode.
30360  # If so, the updated path is stored in $new_path.
30361
30362  input_path="$new_path"
30363  # Check if we need to convert this using DOS-style short mode. If the path
30364  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30365  # take no chances and rewrite it.
30366  # Note: m4 eats our [], so we need to use [ and ] instead.
30367  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30368  if test "x$has_forbidden_chars" != x; then
30369    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30370    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30371    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30372    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30373      # Going to short mode and back again did indeed matter. Since short mode is
30374      # case insensitive, let's make it lowercase to improve readability.
30375      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30376      # Now convert it back to Unix-style (cygpath)
30377      input_path=`$CYGPATH -u "$shortmode_path"`
30378      new_path="$input_path"
30379    fi
30380  fi
30381
30382  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30383  if test "x$test_cygdrive_prefix" = x; then
30384    # As a simple fix, exclude /usr/bin since it's not a real path.
30385    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30386      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30387      # a path prefixed by /cygdrive for fixpath to work.
30388      new_path="$CYGWIN_ROOT_PATH$input_path"
30389    fi
30390  fi
30391
30392
30393  if test "x$path" != "x$new_path"; then
30394    BOOT_JDK="$new_path"
30395    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30396$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30397  fi
30398
30399    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30400
30401  path="$BOOT_JDK"
30402  has_colon=`$ECHO $path | $GREP ^.:`
30403  new_path="$path"
30404  if test "x$has_colon" = x; then
30405    # Not in mixed or Windows style, start by that.
30406    new_path=`cmd //c echo $path`
30407  fi
30408
30409
30410  input_path="$new_path"
30411  # Check if we need to convert this using DOS-style short mode. If the path
30412  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30413  # take no chances and rewrite it.
30414  # Note: m4 eats our [], so we need to use [ and ] instead.
30415  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30416  if test "x$has_forbidden_chars" != x; then
30417    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30418    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30419  fi
30420
30421
30422  windows_path="$new_path"
30423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30424    unix_path=`$CYGPATH -u "$windows_path"`
30425    new_path="$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    new_path="$unix_path"
30429  fi
30430
30431  if test "x$path" != "x$new_path"; then
30432    BOOT_JDK="$new_path"
30433    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30434$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30435  fi
30436
30437  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30438  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30439
30440    else
30441      # We're on a unix platform. Hooray! :)
30442      path="$BOOT_JDK"
30443      has_space=`$ECHO "$path" | $GREP " "`
30444      if test "x$has_space" != x; then
30445        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30446$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30447        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30448      fi
30449
30450      # Use eval to expand a potential ~
30451      eval path="$path"
30452      if test ! -f "$path" && test ! -d "$path"; then
30453        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30454      fi
30455
30456      if test -d "$path"; then
30457        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30458      else
30459        dir="`$DIRNAME "$path"`"
30460        base="`$BASENAME "$path"`"
30461        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30462      fi
30463    fi
30464  fi
30465
30466            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30467$as_echo_n "checking for Boot JDK... " >&6; }
30468            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30469$as_echo "$BOOT_JDK" >&6; }
30470            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30471$as_echo_n "checking Boot JDK version... " >&6; }
30472            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30473            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30474$as_echo "$BOOT_JDK_VERSION" >&6; }
30475          fi # end check jdk version
30476        fi # end check javac
30477      fi # end check java
30478    fi # end check boot jdk found
30479  fi
30480
30481  fi
30482
30483
30484    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30485    if test "x$BOOT_JDK_FOUND" = xmaybe; then
30486      # Do we have a bin/java?
30487      if test ! -x "$BOOT_JDK/bin/java"; then
30488        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30489$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30490        BOOT_JDK_FOUND=no
30491      else
30492        # Do we have a bin/javac?
30493        if test ! -x "$BOOT_JDK/bin/javac"; then
30494          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30495$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30496          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30497$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30498          BOOT_JDK_FOUND=no
30499        else
30500          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30501          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30502
30503          # Extra M4 quote needed to protect [] in grep expression.
30504          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30505          if test "x$FOUND_CORRECT_VERSION" = x; then
30506            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30507$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30508            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30509$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30510            BOOT_JDK_FOUND=no
30511          else
30512            # We're done! :-)
30513            BOOT_JDK_FOUND=yes
30514
30515  # Only process if variable expands to non-empty
30516
30517  if test "x$BOOT_JDK" != x; then
30518    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30519
30520  # Input might be given as Windows format, start by converting to
30521  # unix format.
30522  path="$BOOT_JDK"
30523  new_path=`$CYGPATH -u "$path"`
30524
30525  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30526  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30527  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30528  # "foo.exe" is OK but "foo" is an error.
30529  #
30530  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30531  # It is also a way to make sure we got the proper file name for the real test later on.
30532  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30533  if test "x$test_shortpath" = x; then
30534    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30535$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30536    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30537  fi
30538
30539  # Call helper function which possibly converts this using DOS-style short mode.
30540  # If so, the updated path is stored in $new_path.
30541
30542  input_path="$new_path"
30543  # Check if we need to convert this using DOS-style short mode. If the path
30544  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30545  # take no chances and rewrite it.
30546  # Note: m4 eats our [], so we need to use [ and ] instead.
30547  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30548  if test "x$has_forbidden_chars" != x; then
30549    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30550    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30551    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30552    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30553      # Going to short mode and back again did indeed matter. Since short mode is
30554      # case insensitive, let's make it lowercase to improve readability.
30555      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30556      # Now convert it back to Unix-style (cygpath)
30557      input_path=`$CYGPATH -u "$shortmode_path"`
30558      new_path="$input_path"
30559    fi
30560  fi
30561
30562  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30563  if test "x$test_cygdrive_prefix" = x; then
30564    # As a simple fix, exclude /usr/bin since it's not a real path.
30565    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30566      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30567      # a path prefixed by /cygdrive for fixpath to work.
30568      new_path="$CYGWIN_ROOT_PATH$input_path"
30569    fi
30570  fi
30571
30572
30573  if test "x$path" != "x$new_path"; then
30574    BOOT_JDK="$new_path"
30575    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30576$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30577  fi
30578
30579    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30580
30581  path="$BOOT_JDK"
30582  has_colon=`$ECHO $path | $GREP ^.:`
30583  new_path="$path"
30584  if test "x$has_colon" = x; then
30585    # Not in mixed or Windows style, start by that.
30586    new_path=`cmd //c echo $path`
30587  fi
30588
30589
30590  input_path="$new_path"
30591  # Check if we need to convert this using DOS-style short mode. If the path
30592  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30593  # take no chances and rewrite it.
30594  # Note: m4 eats our [], so we need to use [ and ] instead.
30595  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30596  if test "x$has_forbidden_chars" != x; then
30597    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30598    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30599  fi
30600
30601
30602  windows_path="$new_path"
30603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30604    unix_path=`$CYGPATH -u "$windows_path"`
30605    new_path="$unix_path"
30606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30607    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30608    new_path="$unix_path"
30609  fi
30610
30611  if test "x$path" != "x$new_path"; then
30612    BOOT_JDK="$new_path"
30613    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30614$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30615  fi
30616
30617  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30618  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30619
30620    else
30621      # We're on a unix platform. Hooray! :)
30622      path="$BOOT_JDK"
30623      has_space=`$ECHO "$path" | $GREP " "`
30624      if test "x$has_space" != x; then
30625        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30626$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30627        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30628      fi
30629
30630      # Use eval to expand a potential ~
30631      eval path="$path"
30632      if test ! -f "$path" && test ! -d "$path"; then
30633        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30634      fi
30635
30636      if test -d "$path"; then
30637        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30638      else
30639        dir="`$DIRNAME "$path"`"
30640        base="`$BASENAME "$path"`"
30641        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30642      fi
30643    fi
30644  fi
30645
30646            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30647$as_echo_n "checking for Boot JDK... " >&6; }
30648            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30649$as_echo "$BOOT_JDK" >&6; }
30650            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30651$as_echo_n "checking Boot JDK version... " >&6; }
30652            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30653            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30654$as_echo "$BOOT_JDK_VERSION" >&6; }
30655          fi # end check jdk version
30656        fi # end check javac
30657      fi # end check java
30658    fi # end check boot jdk found
30659  fi
30660
30661
30662  # If we haven't found anything yet, we've truly lost. Give up.
30663  if test "x$BOOT_JDK_FOUND" = xno; then
30664
30665  # Print a helpful message on how to acquire the necessary build dependency.
30666  # openjdk is the help tag: freetype, cups, alsa etc
30667  MISSING_DEPENDENCY=openjdk
30668
30669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30670    cygwin_help $MISSING_DEPENDENCY
30671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30672    msys_help $MISSING_DEPENDENCY
30673  else
30674    PKGHANDLER_COMMAND=
30675
30676    case $PKGHANDLER in
30677      apt-get)
30678        apt_help     $MISSING_DEPENDENCY ;;
30679      yum)
30680        yum_help     $MISSING_DEPENDENCY ;;
30681      brew)
30682        brew_help    $MISSING_DEPENDENCY ;;
30683      port)
30684        port_help    $MISSING_DEPENDENCY ;;
30685      pkgutil)
30686        pkgutil_help $MISSING_DEPENDENCY ;;
30687      pkgadd)
30688        pkgadd_help  $MISSING_DEPENDENCY ;;
30689    esac
30690
30691    if test "x$PKGHANDLER_COMMAND" != x; then
30692      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30693    fi
30694  fi
30695
30696    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
30697$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
30698    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitly setting --with-boot-jdk" >&5
30699$as_echo "$as_me: This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30700    as_fn_error $? "Cannot continue" "$LINENO" 5
30701  fi
30702
30703
30704
30705  # Setup tools from the Boot JDK.
30706
30707  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30708
30709  # Publish this variable in the help.
30710
30711
30712  if [ -z "${JAVA+x}" ]; then
30713    # The variable is not set by user, try to locate tool using the code snippet
30714
30715      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30716$as_echo_n "checking for java in Boot JDK... " >&6; }
30717      JAVA=$BOOT_JDK/bin/java
30718      if test ! -x $JAVA; then
30719        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30720$as_echo "not found" >&6; }
30721        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30722$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30723        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30724      fi
30725      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30726$as_echo "ok" >&6; }
30727
30728
30729  else
30730    # The variable is set, but is it from the command line or the environment?
30731
30732    # Try to remove the string !JAVA! from our list.
30733    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
30734    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30735      # If it failed, the variable was not from the command line. Ignore it,
30736      # but warn the user (except for BASH, which is always set by the calling BASH).
30737      if test "xJAVA" != xBASH; then
30738        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
30739$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
30740      fi
30741      # Try to locate tool using the code snippet
30742
30743      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30744$as_echo_n "checking for java in Boot JDK... " >&6; }
30745      JAVA=$BOOT_JDK/bin/java
30746      if test ! -x $JAVA; then
30747        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30748$as_echo "not found" >&6; }
30749        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30750$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30751        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30752      fi
30753      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30754$as_echo "ok" >&6; }
30755
30756
30757    else
30758      # If it succeeded, then it was overridden by the user. We will use it
30759      # for the tool.
30760
30761      # First remove it from the list of overridden variables, so we can test
30762      # for unknown variables in the end.
30763      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30764
30765      # Check if we try to supply an empty value
30766      if test "x$JAVA" = x; then
30767        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
30768$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
30769        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30770$as_echo_n "checking for JAVA... " >&6; }
30771        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30772$as_echo "disabled" >&6; }
30773      else
30774        # Check if the provided tool contains a complete path.
30775        tool_specified="$JAVA"
30776        tool_basename="${tool_specified##*/}"
30777        if test "x$tool_basename" = "x$tool_specified"; then
30778          # A command without a complete path is provided, search $PATH.
30779          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
30780$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
30781          # Extract the first word of "$tool_basename", so it can be a program name with args.
30782set dummy $tool_basename; ac_word=$2
30783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30784$as_echo_n "checking for $ac_word... " >&6; }
30785if ${ac_cv_path_JAVA+:} false; then :
30786  $as_echo_n "(cached) " >&6
30787else
30788  case $JAVA in
30789  [\\/]* | ?:[\\/]*)
30790  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
30791  ;;
30792  *)
30793  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30794for as_dir in $PATH
30795do
30796  IFS=$as_save_IFS
30797  test -z "$as_dir" && as_dir=.
30798    for ac_exec_ext in '' $ac_executable_extensions; do
30799  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30800    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
30801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30802    break 2
30803  fi
30804done
30805  done
30806IFS=$as_save_IFS
30807
30808  ;;
30809esac
30810fi
30811JAVA=$ac_cv_path_JAVA
30812if test -n "$JAVA"; then
30813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30814$as_echo "$JAVA" >&6; }
30815else
30816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30817$as_echo "no" >&6; }
30818fi
30819
30820
30821          if test "x$JAVA" = x; then
30822            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30823          fi
30824        else
30825          # Otherwise we believe it is a complete path. Use it as it is.
30826          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30827$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30828          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30829$as_echo_n "checking for JAVA... " >&6; }
30830          if test ! -x "$tool_specified"; then
30831            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30832$as_echo "not found" >&6; }
30833            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30834          fi
30835          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30836$as_echo "$tool_specified" >&6; }
30837        fi
30838      fi
30839    fi
30840
30841  fi
30842
30843
30844
30845  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30846
30847  # Publish this variable in the help.
30848
30849
30850  if [ -z "${JAVAC+x}" ]; then
30851    # The variable is not set by user, try to locate tool using the code snippet
30852
30853      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30854$as_echo_n "checking for javac in Boot JDK... " >&6; }
30855      JAVAC=$BOOT_JDK/bin/javac
30856      if test ! -x $JAVAC; then
30857        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30858$as_echo "not found" >&6; }
30859        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30860$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30861        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30862      fi
30863      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30864$as_echo "ok" >&6; }
30865
30866
30867  else
30868    # The variable is set, but is it from the command line or the environment?
30869
30870    # Try to remove the string !JAVAC! from our list.
30871    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30872    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30873      # If it failed, the variable was not from the command line. Ignore it,
30874      # but warn the user (except for BASH, which is always set by the calling BASH).
30875      if test "xJAVAC" != xBASH; then
30876        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30877$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30878      fi
30879      # Try to locate tool using the code snippet
30880
30881      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30882$as_echo_n "checking for javac in Boot JDK... " >&6; }
30883      JAVAC=$BOOT_JDK/bin/javac
30884      if test ! -x $JAVAC; then
30885        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30886$as_echo "not found" >&6; }
30887        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30888$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30889        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30890      fi
30891      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30892$as_echo "ok" >&6; }
30893
30894
30895    else
30896      # If it succeeded, then it was overridden by the user. We will use it
30897      # for the tool.
30898
30899      # First remove it from the list of overridden variables, so we can test
30900      # for unknown variables in the end.
30901      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30902
30903      # Check if we try to supply an empty value
30904      if test "x$JAVAC" = x; then
30905        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30906$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30907        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30908$as_echo_n "checking for JAVAC... " >&6; }
30909        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30910$as_echo "disabled" >&6; }
30911      else
30912        # Check if the provided tool contains a complete path.
30913        tool_specified="$JAVAC"
30914        tool_basename="${tool_specified##*/}"
30915        if test "x$tool_basename" = "x$tool_specified"; then
30916          # A command without a complete path is provided, search $PATH.
30917          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30918$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30919          # Extract the first word of "$tool_basename", so it can be a program name with args.
30920set dummy $tool_basename; ac_word=$2
30921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30922$as_echo_n "checking for $ac_word... " >&6; }
30923if ${ac_cv_path_JAVAC+:} false; then :
30924  $as_echo_n "(cached) " >&6
30925else
30926  case $JAVAC in
30927  [\\/]* | ?:[\\/]*)
30928  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30929  ;;
30930  *)
30931  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30932for as_dir in $PATH
30933do
30934  IFS=$as_save_IFS
30935  test -z "$as_dir" && as_dir=.
30936    for ac_exec_ext in '' $ac_executable_extensions; do
30937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30938    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30940    break 2
30941  fi
30942done
30943  done
30944IFS=$as_save_IFS
30945
30946  ;;
30947esac
30948fi
30949JAVAC=$ac_cv_path_JAVAC
30950if test -n "$JAVAC"; then
30951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30952$as_echo "$JAVAC" >&6; }
30953else
30954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30955$as_echo "no" >&6; }
30956fi
30957
30958
30959          if test "x$JAVAC" = x; then
30960            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30961          fi
30962        else
30963          # Otherwise we believe it is a complete path. Use it as it is.
30964          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30965$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30966          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30967$as_echo_n "checking for JAVAC... " >&6; }
30968          if test ! -x "$tool_specified"; then
30969            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30970$as_echo "not found" >&6; }
30971            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30972          fi
30973          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30974$as_echo "$tool_specified" >&6; }
30975        fi
30976      fi
30977    fi
30978
30979  fi
30980
30981
30982
30983  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30984
30985  # Publish this variable in the help.
30986
30987
30988  if [ -z "${JAVAH+x}" ]; then
30989    # The variable is not set by user, try to locate tool using the code snippet
30990
30991      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30992$as_echo_n "checking for javah in Boot JDK... " >&6; }
30993      JAVAH=$BOOT_JDK/bin/javah
30994      if test ! -x $JAVAH; then
30995        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30996$as_echo "not found" >&6; }
30997        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30998$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30999        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
31000      fi
31001      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31002$as_echo "ok" >&6; }
31003
31004
31005  else
31006    # The variable is set, but is it from the command line or the environment?
31007
31008    # Try to remove the string !JAVAH! from our list.
31009    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
31010    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31011      # If it failed, the variable was not from the command line. Ignore it,
31012      # but warn the user (except for BASH, which is always set by the calling BASH).
31013      if test "xJAVAH" != xBASH; then
31014        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
31015$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
31016      fi
31017      # Try to locate tool using the code snippet
31018
31019      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
31020$as_echo_n "checking for javah in Boot JDK... " >&6; }
31021      JAVAH=$BOOT_JDK/bin/javah
31022      if test ! -x $JAVAH; then
31023        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31024$as_echo "not found" >&6; }
31025        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31026$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31027        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
31028      fi
31029      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31030$as_echo "ok" >&6; }
31031
31032
31033    else
31034      # If it succeeded, then it was overridden by the user. We will use it
31035      # for the tool.
31036
31037      # First remove it from the list of overridden variables, so we can test
31038      # for unknown variables in the end.
31039      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31040
31041      # Check if we try to supply an empty value
31042      if test "x$JAVAH" = x; then
31043        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
31044$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
31045        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
31046$as_echo_n "checking for JAVAH... " >&6; }
31047        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31048$as_echo "disabled" >&6; }
31049      else
31050        # Check if the provided tool contains a complete path.
31051        tool_specified="$JAVAH"
31052        tool_basename="${tool_specified##*/}"
31053        if test "x$tool_basename" = "x$tool_specified"; then
31054          # A command without a complete path is provided, search $PATH.
31055          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
31056$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
31057          # Extract the first word of "$tool_basename", so it can be a program name with args.
31058set dummy $tool_basename; ac_word=$2
31059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31060$as_echo_n "checking for $ac_word... " >&6; }
31061if ${ac_cv_path_JAVAH+:} false; then :
31062  $as_echo_n "(cached) " >&6
31063else
31064  case $JAVAH in
31065  [\\/]* | ?:[\\/]*)
31066  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
31067  ;;
31068  *)
31069  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31070for as_dir in $PATH
31071do
31072  IFS=$as_save_IFS
31073  test -z "$as_dir" && as_dir=.
31074    for ac_exec_ext in '' $ac_executable_extensions; do
31075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31076    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
31077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31078    break 2
31079  fi
31080done
31081  done
31082IFS=$as_save_IFS
31083
31084  ;;
31085esac
31086fi
31087JAVAH=$ac_cv_path_JAVAH
31088if test -n "$JAVAH"; then
31089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
31090$as_echo "$JAVAH" >&6; }
31091else
31092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31093$as_echo "no" >&6; }
31094fi
31095
31096
31097          if test "x$JAVAH" = x; then
31098            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31099          fi
31100        else
31101          # Otherwise we believe it is a complete path. Use it as it is.
31102          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
31103$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
31104          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
31105$as_echo_n "checking for JAVAH... " >&6; }
31106          if test ! -x "$tool_specified"; then
31107            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31108$as_echo "not found" >&6; }
31109            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
31110          fi
31111          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31112$as_echo "$tool_specified" >&6; }
31113        fi
31114      fi
31115    fi
31116
31117  fi
31118
31119
31120
31121  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
31122
31123  # Publish this variable in the help.
31124
31125
31126  if [ -z "${JAR+x}" ]; then
31127    # The variable is not set by user, try to locate tool using the code snippet
31128
31129      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
31130$as_echo_n "checking for jar in Boot JDK... " >&6; }
31131      JAR=$BOOT_JDK/bin/jar
31132      if test ! -x $JAR; then
31133        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31134$as_echo "not found" >&6; }
31135        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31136$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31137        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
31138      fi
31139      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31140$as_echo "ok" >&6; }
31141
31142
31143  else
31144    # The variable is set, but is it from the command line or the environment?
31145
31146    # Try to remove the string !JAR! from our list.
31147    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
31148    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31149      # If it failed, the variable was not from the command line. Ignore it,
31150      # but warn the user (except for BASH, which is always set by the calling BASH).
31151      if test "xJAR" != xBASH; then
31152        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
31153$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
31154      fi
31155      # Try to locate tool using the code snippet
31156
31157      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
31158$as_echo_n "checking for jar in Boot JDK... " >&6; }
31159      JAR=$BOOT_JDK/bin/jar
31160      if test ! -x $JAR; then
31161        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31162$as_echo "not found" >&6; }
31163        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31164$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31165        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
31166      fi
31167      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31168$as_echo "ok" >&6; }
31169
31170
31171    else
31172      # If it succeeded, then it was overridden by the user. We will use it
31173      # for the tool.
31174
31175      # First remove it from the list of overridden variables, so we can test
31176      # for unknown variables in the end.
31177      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31178
31179      # Check if we try to supply an empty value
31180      if test "x$JAR" = x; then
31181        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
31182$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
31183        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
31184$as_echo_n "checking for JAR... " >&6; }
31185        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31186$as_echo "disabled" >&6; }
31187      else
31188        # Check if the provided tool contains a complete path.
31189        tool_specified="$JAR"
31190        tool_basename="${tool_specified##*/}"
31191        if test "x$tool_basename" = "x$tool_specified"; then
31192          # A command without a complete path is provided, search $PATH.
31193          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
31194$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
31195          # Extract the first word of "$tool_basename", so it can be a program name with args.
31196set dummy $tool_basename; ac_word=$2
31197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31198$as_echo_n "checking for $ac_word... " >&6; }
31199if ${ac_cv_path_JAR+:} false; then :
31200  $as_echo_n "(cached) " >&6
31201else
31202  case $JAR in
31203  [\\/]* | ?:[\\/]*)
31204  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
31205  ;;
31206  *)
31207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31208for as_dir in $PATH
31209do
31210  IFS=$as_save_IFS
31211  test -z "$as_dir" && as_dir=.
31212    for ac_exec_ext in '' $ac_executable_extensions; do
31213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31214    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
31215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31216    break 2
31217  fi
31218done
31219  done
31220IFS=$as_save_IFS
31221
31222  ;;
31223esac
31224fi
31225JAR=$ac_cv_path_JAR
31226if test -n "$JAR"; then
31227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
31228$as_echo "$JAR" >&6; }
31229else
31230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31231$as_echo "no" >&6; }
31232fi
31233
31234
31235          if test "x$JAR" = x; then
31236            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31237          fi
31238        else
31239          # Otherwise we believe it is a complete path. Use it as it is.
31240          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
31241$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
31242          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
31243$as_echo_n "checking for JAR... " >&6; }
31244          if test ! -x "$tool_specified"; then
31245            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31246$as_echo "not found" >&6; }
31247            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
31248          fi
31249          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31250$as_echo "$tool_specified" >&6; }
31251        fi
31252      fi
31253    fi
31254
31255  fi
31256
31257
31258
31259  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
31260
31261  # Publish this variable in the help.
31262
31263
31264  if [ -z "${JARSIGNER+x}" ]; then
31265    # The variable is not set by user, try to locate tool using the code snippet
31266
31267      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
31268$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
31269      JARSIGNER=$BOOT_JDK/bin/jarsigner
31270      if test ! -x $JARSIGNER; then
31271        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31272$as_echo "not found" >&6; }
31273        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31274$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31275        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
31276      fi
31277      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31278$as_echo "ok" >&6; }
31279
31280
31281  else
31282    # The variable is set, but is it from the command line or the environment?
31283
31284    # Try to remove the string !JARSIGNER! from our list.
31285    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
31286    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31287      # If it failed, the variable was not from the command line. Ignore it,
31288      # but warn the user (except for BASH, which is always set by the calling BASH).
31289      if test "xJARSIGNER" != xBASH; then
31290        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
31291$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
31292      fi
31293      # Try to locate tool using the code snippet
31294
31295      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
31296$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
31297      JARSIGNER=$BOOT_JDK/bin/jarsigner
31298      if test ! -x $JARSIGNER; then
31299        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31300$as_echo "not found" >&6; }
31301        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31302$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31303        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
31304      fi
31305      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31306$as_echo "ok" >&6; }
31307
31308
31309    else
31310      # If it succeeded, then it was overridden by the user. We will use it
31311      # for the tool.
31312
31313      # First remove it from the list of overridden variables, so we can test
31314      # for unknown variables in the end.
31315      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31316
31317      # Check if we try to supply an empty value
31318      if test "x$JARSIGNER" = x; then
31319        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
31320$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
31321        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31322$as_echo_n "checking for JARSIGNER... " >&6; }
31323        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31324$as_echo "disabled" >&6; }
31325      else
31326        # Check if the provided tool contains a complete path.
31327        tool_specified="$JARSIGNER"
31328        tool_basename="${tool_specified##*/}"
31329        if test "x$tool_basename" = "x$tool_specified"; then
31330          # A command without a complete path is provided, search $PATH.
31331          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
31332$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
31333          # Extract the first word of "$tool_basename", so it can be a program name with args.
31334set dummy $tool_basename; ac_word=$2
31335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31336$as_echo_n "checking for $ac_word... " >&6; }
31337if ${ac_cv_path_JARSIGNER+:} false; then :
31338  $as_echo_n "(cached) " >&6
31339else
31340  case $JARSIGNER in
31341  [\\/]* | ?:[\\/]*)
31342  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
31343  ;;
31344  *)
31345  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31346for as_dir in $PATH
31347do
31348  IFS=$as_save_IFS
31349  test -z "$as_dir" && as_dir=.
31350    for ac_exec_ext in '' $ac_executable_extensions; do
31351  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31352    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
31353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31354    break 2
31355  fi
31356done
31357  done
31358IFS=$as_save_IFS
31359
31360  ;;
31361esac
31362fi
31363JARSIGNER=$ac_cv_path_JARSIGNER
31364if test -n "$JARSIGNER"; then
31365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
31366$as_echo "$JARSIGNER" >&6; }
31367else
31368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31369$as_echo "no" >&6; }
31370fi
31371
31372
31373          if test "x$JARSIGNER" = x; then
31374            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31375          fi
31376        else
31377          # Otherwise we believe it is a complete path. Use it as it is.
31378          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
31379$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
31380          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31381$as_echo_n "checking for JARSIGNER... " >&6; }
31382          if test ! -x "$tool_specified"; then
31383            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31384$as_echo "not found" >&6; }
31385            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
31386          fi
31387          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31388$as_echo "$tool_specified" >&6; }
31389        fi
31390      fi
31391    fi
31392
31393  fi
31394
31395
31396
31397  # Finally, set some other options...
31398
31399  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
31400  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
31401
31402
31403  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
31404$as_echo_n "checking if Boot JDK supports modules... " >&6; }
31405  if "$JAVA" --list-modules > /dev/null 2>&1; then
31406    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31407$as_echo "yes" >&6; }
31408    BOOT_JDK_MODULAR="true"
31409  else
31410    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31411$as_echo "no" >&6; }
31412    BOOT_JDK_MODULAR="false"
31413  fi
31414
31415
31416
31417
31418  # Check if the boot jdk is 32 or 64 bit
31419  if "$JAVA" -d64 -version > /dev/null 2>&1; then
31420    BOOT_JDK_BITS="64"
31421  else
31422    BOOT_JDK_BITS="32"
31423  fi
31424  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
31425$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
31426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
31427$as_echo "$BOOT_JDK_BITS" >&6; }
31428
31429
31430
31431# Check whether --with-build-jdk was given.
31432if test "${with_build_jdk+set}" = set; then :
31433  withval=$with_build_jdk;
31434fi
31435
31436
31437  CREATE_BUILDJDK=false
31438  EXTERNAL_BUILDJDK=false
31439  BUILD_JDK_FOUND="no"
31440  if test "x$with_build_jdk" != "x"; then
31441
31442  if test "x$BUILD_JDK_FOUND" = xno; then
31443    # Execute the test
31444
31445       if test "x$with_build_jdk" != x; then
31446         BUILD_JDK=$with_build_jdk
31447         BUILD_JDK_FOUND=maybe
31448         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
31449$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
31450       fi
31451
31452    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
31453    if test "x$BUILD_JDK_FOUND" = xmaybe; then
31454      # Do we have a bin/java?
31455      if test ! -x "$BUILD_JDK/bin/java"; then
31456        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
31457$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
31458        BUILD_JDK_FOUND=no
31459      elif test ! -x "$BUILD_JDK/bin/jlink"; then
31460        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
31461$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
31462        BUILD_JDK_FOUND=no
31463      elif test ! -x "$BUILD_JDK/bin/jmod"; then
31464        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
31465$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
31466        BUILD_JDK_FOUND=no
31467      elif test ! -x "$BUILD_JDK/bin/javac"; then
31468        # Do we have a bin/javac?
31469        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
31470$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
31471        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
31472$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
31473        BUILD_JDK_FOUND=no
31474      else
31475        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
31476        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
31477
31478        # Extra M4 quote needed to protect [] in grep expression.
31479        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
31480        if test "x$FOUND_CORRECT_VERSION" = x; then
31481          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
31482$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
31483          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
31484$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
31485          BUILD_JDK_FOUND=no
31486        else
31487          # We're done!
31488          BUILD_JDK_FOUND=yes
31489
31490  # Only process if variable expands to non-empty
31491
31492  if test "x$BUILD_JDK" != x; then
31493    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31494
31495  # Input might be given as Windows format, start by converting to
31496  # unix format.
31497  path="$BUILD_JDK"
31498  new_path=`$CYGPATH -u "$path"`
31499
31500  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31501  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31502  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31503  # "foo.exe" is OK but "foo" is an error.
31504  #
31505  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31506  # It is also a way to make sure we got the proper file name for the real test later on.
31507  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31508  if test "x$test_shortpath" = x; then
31509    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31510$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31511    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
31512  fi
31513
31514  # Call helper function which possibly converts this using DOS-style short mode.
31515  # If so, the updated path is stored in $new_path.
31516
31517  input_path="$new_path"
31518  # Check if we need to convert this using DOS-style short mode. If the path
31519  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31520  # take no chances and rewrite it.
31521  # Note: m4 eats our [], so we need to use [ and ] instead.
31522  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31523  if test "x$has_forbidden_chars" != x; then
31524    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31525    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31526    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31527    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31528      # Going to short mode and back again did indeed matter. Since short mode is
31529      # case insensitive, let's make it lowercase to improve readability.
31530      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31531      # Now convert it back to Unix-style (cygpath)
31532      input_path=`$CYGPATH -u "$shortmode_path"`
31533      new_path="$input_path"
31534    fi
31535  fi
31536
31537  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31538  if test "x$test_cygdrive_prefix" = x; then
31539    # As a simple fix, exclude /usr/bin since it's not a real path.
31540    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31541      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31542      # a path prefixed by /cygdrive for fixpath to work.
31543      new_path="$CYGWIN_ROOT_PATH$input_path"
31544    fi
31545  fi
31546
31547
31548  if test "x$path" != "x$new_path"; then
31549    BUILD_JDK="$new_path"
31550    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31551$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31552  fi
31553
31554    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31555
31556  path="$BUILD_JDK"
31557  has_colon=`$ECHO $path | $GREP ^.:`
31558  new_path="$path"
31559  if test "x$has_colon" = x; then
31560    # Not in mixed or Windows style, start by that.
31561    new_path=`cmd //c echo $path`
31562  fi
31563
31564
31565  input_path="$new_path"
31566  # Check if we need to convert this using DOS-style short mode. If the path
31567  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31568  # take no chances and rewrite it.
31569  # Note: m4 eats our [], so we need to use [ and ] instead.
31570  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31571  if test "x$has_forbidden_chars" != x; then
31572    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31573    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31574  fi
31575
31576
31577  windows_path="$new_path"
31578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31579    unix_path=`$CYGPATH -u "$windows_path"`
31580    new_path="$unix_path"
31581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31582    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31583    new_path="$unix_path"
31584  fi
31585
31586  if test "x$path" != "x$new_path"; then
31587    BUILD_JDK="$new_path"
31588    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31589$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31590  fi
31591
31592  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31593  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31594
31595    else
31596      # We're on a unix platform. Hooray! :)
31597      path="$BUILD_JDK"
31598      has_space=`$ECHO "$path" | $GREP " "`
31599      if test "x$has_space" != x; then
31600        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31601$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31602        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31603      fi
31604
31605      # Use eval to expand a potential ~
31606      eval path="$path"
31607      if test ! -f "$path" && test ! -d "$path"; then
31608        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
31609      fi
31610
31611      if test -d "$path"; then
31612        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
31613      else
31614        dir="`$DIRNAME "$path"`"
31615        base="`$BASENAME "$path"`"
31616        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
31617      fi
31618    fi
31619  fi
31620
31621          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31622$as_echo_n "checking for Build JDK... " >&6; }
31623          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
31624$as_echo "$BUILD_JDK" >&6; }
31625          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
31626$as_echo_n "checking Build JDK version... " >&6; }
31627          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
31628          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
31629$as_echo "$BUILD_JDK_VERSION" >&6; }
31630        fi # end check jdk version
31631      fi # end check java
31632    fi # end check build jdk found
31633  fi
31634
31635    EXTERNAL_BUILDJDK=true
31636  else
31637    if test "x$COMPILE_TYPE" = "xcross"; then
31638      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
31639      BUILD_JDK_FOUND=yes
31640      CREATE_BUILDJDK=true
31641      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31642$as_echo_n "checking for Build JDK... " >&6; }
31643      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
31644$as_echo "yes, will build it for the host platform" >&6; }
31645    else
31646      BUILD_JDK="\$(JDK_OUTPUTDIR)"
31647      BUILD_JDK_FOUND=yes
31648      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31649$as_echo_n "checking for Build JDK... " >&6; }
31650      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
31651$as_echo "yes, will use output dir" >&6; }
31652    fi
31653  fi
31654
31655  JMOD="$BUILD_JDK/bin/jmod"
31656  JLINK="$BUILD_JDK/bin/jlink"
31657
31658
31659
31660  if test "x$BUILD_JDK_FOUND" != "xyes"; then
31661    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31662$as_echo_n "checking for Build JDK... " >&6; }
31663    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31664$as_echo "no" >&6; }
31665    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
31666  fi
31667
31668
31669
31670
31671
31672
31673###############################################################################
31674#
31675# Configure the sources to use. We can add or override individual directories.
31676#
31677###############################################################################
31678
31679
31680  # Where are the sources.
31681  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
31682  CORBA_TOPDIR="$SRC_ROOT/corba"
31683  JAXP_TOPDIR="$SRC_ROOT/jaxp"
31684  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
31685  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
31686  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
31687  JDK_TOPDIR="$SRC_ROOT/jdk"
31688
31689
31690
31691
31692
31693
31694
31695
31696
31697  # This feature is no longer supported.
31698
31699
31700
31701# Check whether --with-add-source-root was given.
31702if test "${with_add_source_root+set}" = set; then :
31703  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
31704$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
31705fi
31706
31707
31708
31709
31710# Check whether --with-override-source-root was given.
31711if test "${with_override_source_root+set}" = set; then :
31712  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
31713$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
31714fi
31715
31716
31717
31718
31719# Check whether --with-adds-and-overrides was given.
31720if test "${with_adds_and_overrides+set}" = set; then :
31721  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
31722$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
31723fi
31724
31725
31726
31727
31728# Check whether --with-override-langtools was given.
31729if test "${with_override_langtools+set}" = set; then :
31730  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
31731$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
31732fi
31733
31734
31735
31736
31737# Check whether --with-override-corba was given.
31738if test "${with_override_corba+set}" = set; then :
31739  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
31740$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
31741fi
31742
31743
31744
31745
31746# Check whether --with-override-jaxp was given.
31747if test "${with_override_jaxp+set}" = set; then :
31748  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
31749$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
31750fi
31751
31752
31753
31754
31755# Check whether --with-override-jaxws was given.
31756if test "${with_override_jaxws+set}" = set; then :
31757  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
31758$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
31759fi
31760
31761
31762
31763
31764# Check whether --with-override-hotspot was given.
31765if test "${with_override_hotspot+set}" = set; then :
31766  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
31767$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
31768fi
31769
31770
31771
31772
31773# Check whether --with-override-nashorn was given.
31774if test "${with_override_nashorn+set}" = set; then :
31775  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
31776$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
31777fi
31778
31779
31780
31781
31782# Check whether --with-override-jdk was given.
31783if test "${with_override_jdk+set}" = set; then :
31784  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
31785$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
31786fi
31787
31788
31789
31790
31791  BUILD_OUTPUT="$OUTPUT_ROOT"
31792
31793  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31794
31795
31796
31797# Check whether --with-import_hotspot was given.
31798if test "${with_import_hotspot+set}" = set; then :
31799  withval=$with_import_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&5
31800$as_echo "$as_me: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&2;}
31801fi
31802
31803
31804
31805
31806
31807
31808# Check whether --with-import-modules was given.
31809if test "${with_import_modules+set}" = set; then :
31810  withval=$with_import_modules;
31811fi
31812
31813
31814  if test "x$with_import_modules" != x \
31815      && test "x$with_import_modules" != "xno"; then
31816    if test -d "$with_import_modules"; then
31817      IMPORT_MODULES_TOPDIR="$with_import_modules"
31818
31819  # Only process if variable expands to non-empty
31820
31821  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31822    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31823
31824  # Input might be given as Windows format, start by converting to
31825  # unix format.
31826  path="$IMPORT_MODULES_TOPDIR"
31827  new_path=`$CYGPATH -u "$path"`
31828
31829  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31830  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31831  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31832  # "foo.exe" is OK but "foo" is an error.
31833  #
31834  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31835  # It is also a way to make sure we got the proper file name for the real test later on.
31836  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31837  if test "x$test_shortpath" = x; then
31838    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31839$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31840    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31841  fi
31842
31843  # Call helper function which possibly converts this using DOS-style short mode.
31844  # If so, the updated path is stored in $new_path.
31845
31846  input_path="$new_path"
31847  # Check if we need to convert this using DOS-style short mode. If the path
31848  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31849  # take no chances and rewrite it.
31850  # Note: m4 eats our [], so we need to use [ and ] instead.
31851  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31852  if test "x$has_forbidden_chars" != x; then
31853    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31854    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31855    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31856    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31857      # Going to short mode and back again did indeed matter. Since short mode is
31858      # case insensitive, let's make it lowercase to improve readability.
31859      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31860      # Now convert it back to Unix-style (cygpath)
31861      input_path=`$CYGPATH -u "$shortmode_path"`
31862      new_path="$input_path"
31863    fi
31864  fi
31865
31866  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31867  if test "x$test_cygdrive_prefix" = x; then
31868    # As a simple fix, exclude /usr/bin since it's not a real path.
31869    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31870      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31871      # a path prefixed by /cygdrive for fixpath to work.
31872      new_path="$CYGWIN_ROOT_PATH$input_path"
31873    fi
31874  fi
31875
31876
31877  if test "x$path" != "x$new_path"; then
31878    IMPORT_MODULES_TOPDIR="$new_path"
31879    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31880$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31881  fi
31882
31883    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31884
31885  path="$IMPORT_MODULES_TOPDIR"
31886  has_colon=`$ECHO $path | $GREP ^.:`
31887  new_path="$path"
31888  if test "x$has_colon" = x; then
31889    # Not in mixed or Windows style, start by that.
31890    new_path=`cmd //c echo $path`
31891  fi
31892
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
31906  windows_path="$new_path"
31907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31908    unix_path=`$CYGPATH -u "$windows_path"`
31909    new_path="$unix_path"
31910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31912    new_path="$unix_path"
31913  fi
31914
31915  if test "x$path" != "x$new_path"; then
31916    IMPORT_MODULES_TOPDIR="$new_path"
31917    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31918$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31919  fi
31920
31921  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31922  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31923
31924    else
31925      # We're on a unix platform. Hooray! :)
31926      path="$IMPORT_MODULES_TOPDIR"
31927      has_space=`$ECHO "$path" | $GREP " "`
31928      if test "x$has_space" != x; then
31929        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31930$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31931        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31932      fi
31933
31934      # Use eval to expand a potential ~
31935      eval path="$path"
31936      if test ! -f "$path" && test ! -d "$path"; then
31937        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31938      fi
31939
31940      if test -d "$path"; then
31941        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31942      else
31943        dir="`$DIRNAME "$path"`"
31944        base="`$BASENAME "$path"`"
31945        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31946      fi
31947    fi
31948  fi
31949
31950    elif test -e "$with_import_modules"; then
31951      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31952      $RM -rf "$IMPORT_MODULES_TOPDIR"
31953      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31954      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31955        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31956      fi
31957    else
31958      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31959    fi
31960  fi
31961
31962  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31963    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31964  fi
31965  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31966    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31967  fi
31968  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31969    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31970  fi
31971  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31972    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31973  fi
31974  if test -d "$IMPORT_MODULES_TOPDIR/modules_legal"; then
31975    IMPORT_MODULES_LEGAL="$IMPORT_MODULES_TOPDIR/modules_legal"
31976  fi
31977  if test -d "$IMPORT_MODULES_TOPDIR/modules_man"; then
31978    IMPORT_MODULES_MAN="$IMPORT_MODULES_TOPDIR/modules_man"
31979  fi
31980  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31981    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31982  fi
31983  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31984    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31985  fi
31986
31987
31988
31989
31990
31991
31992
31993
31994
31995
31996
31997###############################################################################
31998#
31999# Setup the toolchain (compilers etc), i.e. tools used to compile and process
32000# native code.
32001#
32002###############################################################################
32003
32004# See if we are doing a complete static build or not
32005
32006  # Check whether --enable-static-build was given.
32007if test "${enable_static_build+set}" = set; then :
32008  enableval=$enable_static_build;
32009fi
32010
32011  STATIC_BUILD=false
32012  if test "x$enable_static_build" = "xyes"; then
32013    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
32014$as_echo_n "checking if static build is enabled... " >&6; }
32015    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32016$as_echo "yes" >&6; }
32017    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
32018      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
32019    fi
32020    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
32021    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
32022    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
32023    STATIC_BUILD=true
32024  elif test "x$enable_static_build" = "xno"; then
32025    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
32026$as_echo_n "checking if static build is enabled... " >&6; }
32027    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32028$as_echo "no" >&6; }
32029  elif test "x$enable_static_build" != "x"; then
32030    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
32031  fi
32032
32033
32034
32035
32036# First determine the toolchain type (compiler family)
32037
32038
32039# Check whether --with-toolchain-type was given.
32040if test "${with_toolchain_type+set}" = set; then :
32041  withval=$with_toolchain_type;
32042fi
32043
32044
32045  # Use indirect variable referencing
32046  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
32047  VALID_TOOLCHAINS=${!toolchain_var_name}
32048
32049  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32050    if test -n "$XCODEBUILD"; then
32051      # On Mac OS X, default toolchain to clang after Xcode 5
32052      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
32053      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
32054      if test $? -ne 0; then
32055        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
32056      fi
32057      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
32058          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
32059          $CUT -f 1 -d .`
32060      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
32061$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
32062      if test $XCODE_MAJOR_VERSION -ge 5; then
32063          DEFAULT_TOOLCHAIN="clang"
32064      else
32065          DEFAULT_TOOLCHAIN="gcc"
32066      fi
32067    else
32068      # If Xcode is not installed, but the command line tools are
32069      # then we can't run xcodebuild. On these systems we should
32070      # default to clang
32071      DEFAULT_TOOLCHAIN="clang"
32072    fi
32073  else
32074    # First toolchain type in the list is the default
32075    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
32076  fi
32077
32078  if test "x$with_toolchain_type" = xlist; then
32079    # List all toolchains
32080    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
32081$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
32082    for toolchain in $VALID_TOOLCHAINS; do
32083      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
32084      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
32085      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
32086    done
32087
32088    exit 0
32089  elif test "x$with_toolchain_type" != x; then
32090    # User override; check that it is valid
32091    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
32092      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
32093$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
32094      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
32095$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
32096      as_fn_error $? "Cannot continue." "$LINENO" 5
32097    fi
32098    TOOLCHAIN_TYPE=$with_toolchain_type
32099  else
32100    # No flag given, use default
32101    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
32102  fi
32103
32104
32105  TOOLCHAIN_CC_BINARY_clang="clang"
32106  TOOLCHAIN_CC_BINARY_gcc="gcc"
32107  TOOLCHAIN_CC_BINARY_microsoft="cl"
32108  TOOLCHAIN_CC_BINARY_solstudio="cc"
32109  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
32110
32111  TOOLCHAIN_CXX_BINARY_clang="clang++"
32112  TOOLCHAIN_CXX_BINARY_gcc="g++"
32113  TOOLCHAIN_CXX_BINARY_microsoft="cl"
32114  TOOLCHAIN_CXX_BINARY_solstudio="CC"
32115  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
32116
32117  # Use indirect variable referencing
32118  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
32119  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
32120  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
32121  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
32122  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
32123  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
32124  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
32125  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
32126
32127
32128  # Define filename patterns
32129  if test "x$OPENJDK_TARGET_OS" = xwindows; then
32130    LIBRARY_PREFIX=
32131    SHARED_LIBRARY_SUFFIX='.dll'
32132    STATIC_LIBRARY_SUFFIX='.lib'
32133    SHARED_LIBRARY='$1.dll'
32134    STATIC_LIBRARY='$1.lib'
32135    OBJ_SUFFIX='.obj'
32136    EXE_SUFFIX='.exe'
32137  else
32138    LIBRARY_PREFIX=lib
32139    SHARED_LIBRARY_SUFFIX='.so'
32140    STATIC_LIBRARY_SUFFIX='.a'
32141    SHARED_LIBRARY='lib$1.so'
32142    STATIC_LIBRARY='lib$1.a'
32143    OBJ_SUFFIX='.o'
32144    EXE_SUFFIX=''
32145    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32146      # For full static builds, we're overloading the SHARED_LIBRARY
32147      # variables in order to limit the amount of changes required.
32148      # It would be better to remove SHARED and just use LIBRARY and
32149      # LIBRARY_SUFFIX for libraries that can be built either
32150      # shared or static and use STATIC_* for libraries that are
32151      # always built statically.
32152      if test "x$STATIC_BUILD" = xtrue; then
32153        SHARED_LIBRARY='lib$1.a'
32154        SHARED_LIBRARY_SUFFIX='.a'
32155      else
32156        SHARED_LIBRARY='lib$1.dylib'
32157        SHARED_LIBRARY_SUFFIX='.dylib'
32158      fi
32159    fi
32160  fi
32161
32162
32163
32164
32165
32166
32167
32168
32169
32170
32171  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
32172    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
32173$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
32174  else
32175    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
32176$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
32177  fi
32178
32179
32180# User supplied flags should be used when configure detects compilers
32181
32182  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
32183    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
32184$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
32185  fi
32186
32187  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
32188    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
32189$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
32190  fi
32191
32192  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
32193    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
32194$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
32195  fi
32196
32197
32198# Check whether --with-extra-cflags was given.
32199if test "${with_extra_cflags+set}" = set; then :
32200  withval=$with_extra_cflags;
32201fi
32202
32203
32204
32205# Check whether --with-extra-cxxflags was given.
32206if test "${with_extra_cxxflags+set}" = set; then :
32207  withval=$with_extra_cxxflags;
32208fi
32209
32210
32211
32212# Check whether --with-extra-ldflags was given.
32213if test "${with_extra_ldflags+set}" = set; then :
32214  withval=$with_extra_ldflags;
32215fi
32216
32217
32218  EXTRA_CFLAGS="$with_extra_cflags"
32219  EXTRA_CXXFLAGS="$with_extra_cxxflags"
32220  EXTRA_LDFLAGS="$with_extra_ldflags"
32221
32222
32223
32224
32225
32226  # The global CFLAGS and LDLAGS variables are used by configure tests and
32227  # should include the extra parameters
32228  CFLAGS="$EXTRA_CFLAGS"
32229  CXXFLAGS="$EXTRA_CXXFLAGS"
32230  LDFLAGS="$EXTRA_LDFLAGS"
32231  CPPFLAGS=""
32232
32233# The sysroot cflags are needed for configure to be able to run the compilers
32234
32235  if test "x$SYSROOT" != "x"; then
32236    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
32237      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32238        # Solaris Studio does not have a concept of sysroot. Instead we must
32239        # make sure the default include and lib dirs are appended to each
32240        # compile and link command line. Must also add -I-xbuiltin to enable
32241        # inlining of system functions and intrinsics.
32242        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
32243        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
32244            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
32245      fi
32246    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
32247      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
32248      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
32249    elif test "x$TOOLCHAIN_TYPE" = xclang; then
32250      SYSROOT_CFLAGS="-isysroot $SYSROOT"
32251      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
32252    fi
32253    # The global CFLAGS and LDFLAGS variables need these for configure to function
32254    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
32255    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
32256    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
32257    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
32258  fi
32259
32260  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32261    # We also need -iframework<path>/System/Library/Frameworks
32262    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
32263    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
32264    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
32265    # set this here so it doesn't have to be peppered throughout the forest
32266    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
32267    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
32268  fi
32269
32270
32271
32272
32273
32274# Then detect the actual binaries needed
32275
32276  # FIXME: Is this needed?
32277  ac_ext=cpp
32278ac_cpp='$CXXCPP $CPPFLAGS'
32279ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32280ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32281ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32282
32283
32284  # Store the CFLAGS etc passed to the configure script.
32285  ORG_CFLAGS="$CFLAGS"
32286  ORG_CXXFLAGS="$CXXFLAGS"
32287
32288  # autoconf magic only relies on PATH, so update it if tools dir is specified
32289  OLD_PATH="$PATH"
32290
32291  # On Windows, we need to detect the visual studio installation first.
32292  # This will change the PATH, but we need to keep that new PATH even
32293  # after toolchain detection is done, since the compiler (on x86) uses
32294  # it for DLL resolution in runtime.
32295  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
32296      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
32297
32298  # Store path to cygwin link.exe to help excluding it when searching for
32299  # VS linker. This must be done before changing the PATH when looking for VS.
32300  # Extract the first word of "link", so it can be a program name with args.
32301set dummy link; ac_word=$2
32302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32303$as_echo_n "checking for $ac_word... " >&6; }
32304if ${ac_cv_path_CYGWIN_LINK+:} false; then :
32305  $as_echo_n "(cached) " >&6
32306else
32307  case $CYGWIN_LINK in
32308  [\\/]* | ?:[\\/]*)
32309  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
32310  ;;
32311  *)
32312  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32313for as_dir in $PATH
32314do
32315  IFS=$as_save_IFS
32316  test -z "$as_dir" && as_dir=.
32317    for ac_exec_ext in '' $ac_executable_extensions; do
32318  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32319    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
32320    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32321    break 2
32322  fi
32323done
32324  done
32325IFS=$as_save_IFS
32326
32327  ;;
32328esac
32329fi
32330CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
32331if test -n "$CYGWIN_LINK"; then
32332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
32333$as_echo "$CYGWIN_LINK" >&6; }
32334else
32335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32336$as_echo "no" >&6; }
32337fi
32338
32339
32340  if test "x$CYGWIN_LINK" != x; then
32341    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
32342$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
32343    "$CYGWIN_LINK" --version > /dev/null
32344    if test $? -eq 0 ; then
32345      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32346$as_echo "yes" >&6; }
32347    else
32348      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32349$as_echo "no" >&6; }
32350      # This might be the VS linker. Don't exclude it later on.
32351      CYGWIN_LINK=""
32352    fi
32353  fi
32354
32355  # First-hand choice is to locate and run the vsvars bat file.
32356
32357
32358# Check whether --with-toolchain-version was given.
32359if test "${with_toolchain_version+set}" = set; then :
32360  withval=$with_toolchain_version;
32361fi
32362
32363
32364  if test "x$with_toolchain_version" = xlist; then
32365    # List all toolchains
32366    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
32367$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
32368    for version in $VALID_VS_VERSIONS; do
32369      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
32370      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
32371    done
32372
32373    exit 0
32374  elif test "x$DEVKIT_VS_VERSION" != x; then
32375    VS_VERSION=$DEVKIT_VS_VERSION
32376    TOOLCHAIN_VERSION=$VS_VERSION
32377    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32378    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32379    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32380    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32381    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32382    VS_PATH="$TOOLCHAIN_PATH:$PATH"
32383
32384    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
32385    # can still be exported as INCLUDE for compiler invocations without
32386    # SYSROOT_CFLAGS
32387    OLDIFS="$IFS"
32388    IFS=";"
32389    for i in $DEVKIT_VS_INCLUDE; do
32390      ipath=$i
32391
32392  unix_path="$ipath"
32393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32394    windows_path=`$CYGPATH -m "$unix_path"`
32395    ipath="$windows_path"
32396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32397    windows_path=`cmd //c echo $unix_path`
32398    ipath="$windows_path"
32399  fi
32400
32401      VS_INCLUDE="$VS_INCLUDE;$ipath"
32402    done
32403    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
32404    # as LIB for compiler invocations without SYSROOT_LDFLAGS
32405    for i in $DEVKIT_VS_LIB; do
32406      libpath=$i
32407
32408  unix_path="$libpath"
32409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32410    windows_path=`$CYGPATH -m "$unix_path"`
32411    libpath="$windows_path"
32412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32413    windows_path=`cmd //c echo $unix_path`
32414    libpath="$windows_path"
32415  fi
32416
32417      VS_LIB="$VS_LIB;$libpath"
32418    done
32419    IFS="$OLDIFS"
32420
32421    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
32422$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
32423
32424  elif test "x$with_toolchain_version" != x; then
32425    # User override; check that it is valid
32426    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
32427      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
32428$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
32429      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
32430$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
32431      as_fn_error $? "Cannot continue." "$LINENO" 5
32432    fi
32433    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
32434  else
32435    # No flag given, use default
32436    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
32437  fi
32438
32439  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
32440
32441  VS_VERSION="$VS_VERSION"
32442  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
32443  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
32444  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
32445  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
32446
32447  # When using --with-tools-dir, assume it points to the correct and default
32448  # version of Visual Studio or that --with-toolchain-version was also set.
32449  if test "x$with_tools_dir" != x; then
32450
32451  if test "x$VS_ENV_CMD" = x; then
32452    VS_VERSION="${VS_VERSION}"
32453    VS_BASE="$with_tools_dir/../.."
32454    METHOD="--with-tools-dir"
32455
32456    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32457      VCVARSFILE="vc/bin/vcvars32.bat"
32458    else
32459      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32460    fi
32461
32462
32463  windows_path="$VS_BASE"
32464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32465    unix_path=`$CYGPATH -u "$windows_path"`
32466    VS_BASE="$unix_path"
32467  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32468    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32469    VS_BASE="$unix_path"
32470  fi
32471
32472    if test -d "$VS_BASE"; then
32473      if test -f "$VS_BASE/$VCVARSFILE"; then
32474        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32475$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32476        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32477        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32478        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32479        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32480      else
32481        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32482$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32483        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32484$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32485      fi
32486    fi
32487  fi
32488
32489
32490  if test "x$VS_ENV_CMD" = x; then
32491    VS_VERSION="${VS_VERSION}"
32492    VS_BASE="$with_tools_dir/../../.."
32493    METHOD="--with-tools-dir"
32494
32495    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32496      VCVARSFILE="vc/bin/vcvars32.bat"
32497    else
32498      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32499    fi
32500
32501
32502  windows_path="$VS_BASE"
32503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32504    unix_path=`$CYGPATH -u "$windows_path"`
32505    VS_BASE="$unix_path"
32506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32507    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32508    VS_BASE="$unix_path"
32509  fi
32510
32511    if test -d "$VS_BASE"; then
32512      if test -f "$VS_BASE/$VCVARSFILE"; then
32513        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32514$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32515        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32516        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32517        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32518        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32519      else
32520        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32521$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32522        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32523$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32524      fi
32525    fi
32526  fi
32527
32528    if test "x$VS_ENV_CMD" = x; then
32529      # Having specified an argument which is incorrect will produce an instant failure;
32530      # we should not go on looking
32531      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
32532$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
32533      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
32534$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
32535      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
32536$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
32537      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
32538    fi
32539  fi
32540
32541  VS_ENV_CMD=""
32542  VS_ENV_ARGS=""
32543
32544  if test "x$VS_COMNTOOLS" != x; then
32545
32546  if test "x$VS_ENV_CMD" = x; then
32547    VS_VERSION="${VS_VERSION}"
32548    VS_BASE="$VS_COMNTOOLS/../.."
32549    METHOD="$VS_COMNTOOLS_VAR variable"
32550
32551    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32552      VCVARSFILE="vc/bin/vcvars32.bat"
32553    else
32554      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32555    fi
32556
32557
32558  windows_path="$VS_BASE"
32559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32560    unix_path=`$CYGPATH -u "$windows_path"`
32561    VS_BASE="$unix_path"
32562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32563    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32564    VS_BASE="$unix_path"
32565  fi
32566
32567    if test -d "$VS_BASE"; then
32568      if test -f "$VS_BASE/$VCVARSFILE"; then
32569        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32570$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32571        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32572        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32573        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32574        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32575      else
32576        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32577$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32578        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32579$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32580      fi
32581    fi
32582  fi
32583
32584  fi
32585  if test "x$PROGRAMFILES" != x; then
32586
32587  if test "x$VS_ENV_CMD" = x; then
32588    VS_VERSION="${VS_VERSION}"
32589    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
32590    METHOD="well-known name"
32591
32592    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32593      VCVARSFILE="vc/bin/vcvars32.bat"
32594    else
32595      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32596    fi
32597
32598
32599  windows_path="$VS_BASE"
32600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32601    unix_path=`$CYGPATH -u "$windows_path"`
32602    VS_BASE="$unix_path"
32603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32605    VS_BASE="$unix_path"
32606  fi
32607
32608    if test -d "$VS_BASE"; then
32609      if test -f "$VS_BASE/$VCVARSFILE"; then
32610        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32611$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32612        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32613        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32614        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32615        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32616      else
32617        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32618$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32619        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32620$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32621      fi
32622    fi
32623  fi
32624
32625  fi
32626  # Work around the insanely named ProgramFiles(x86) env variable
32627  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
32628  if test "x$PROGRAMFILES_X86" != x; then
32629
32630  if test "x$VS_ENV_CMD" = x; then
32631    VS_VERSION="${VS_VERSION}"
32632    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
32633    METHOD="well-known name"
32634
32635    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32636      VCVARSFILE="vc/bin/vcvars32.bat"
32637    else
32638      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32639    fi
32640
32641
32642  windows_path="$VS_BASE"
32643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32644    unix_path=`$CYGPATH -u "$windows_path"`
32645    VS_BASE="$unix_path"
32646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32648    VS_BASE="$unix_path"
32649  fi
32650
32651    if test -d "$VS_BASE"; then
32652      if test -f "$VS_BASE/$VCVARSFILE"; then
32653        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32654$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32655        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32656        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32657        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32658        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32659      else
32660        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32661$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32662        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32663$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32664      fi
32665    fi
32666  fi
32667
32668  fi
32669
32670  if test "x$VS_ENV_CMD" = x; then
32671    VS_VERSION="${VS_VERSION}"
32672    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
32673    METHOD="well-known name"
32674
32675    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32676      VCVARSFILE="vc/bin/vcvars32.bat"
32677    else
32678      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32679    fi
32680
32681
32682  windows_path="$VS_BASE"
32683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32684    unix_path=`$CYGPATH -u "$windows_path"`
32685    VS_BASE="$unix_path"
32686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32688    VS_BASE="$unix_path"
32689  fi
32690
32691    if test -d "$VS_BASE"; then
32692      if test -f "$VS_BASE/$VCVARSFILE"; then
32693        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32694$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32695        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32696        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32697        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32698        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32699      else
32700        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32701$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32702        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32703$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32704      fi
32705    fi
32706  fi
32707
32708
32709  if test "x$VS_ENV_CMD" = x; then
32710    VS_VERSION="${VS_VERSION}"
32711    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
32712    METHOD="well-known name"
32713
32714    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32715      VCVARSFILE="vc/bin/vcvars32.bat"
32716    else
32717      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32718    fi
32719
32720
32721  windows_path="$VS_BASE"
32722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32723    unix_path=`$CYGPATH -u "$windows_path"`
32724    VS_BASE="$unix_path"
32725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32726    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32727    VS_BASE="$unix_path"
32728  fi
32729
32730    if test -d "$VS_BASE"; then
32731      if test -f "$VS_BASE/$VCVARSFILE"; then
32732        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32733$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32734        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32735        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32736        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32737        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32738      else
32739        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32740$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32741        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32742$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32743      fi
32744    fi
32745  fi
32746
32747
32748  if test "x$SDK_INSTALL_DIR" != x; then
32749    if test "x$ProgramW6432" != x; then
32750
32751  if test "x$VS_ENV_CMD" = x; then
32752    VS_VERSION="${VS_VERSION}"
32753    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
32754    METHOD="well-known name"
32755
32756  windows_path="$WIN_SDK_BASE"
32757  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32758    unix_path=`$CYGPATH -u "$windows_path"`
32759    WIN_SDK_BASE="$unix_path"
32760  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32761    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32762    WIN_SDK_BASE="$unix_path"
32763  fi
32764
32765    if test -d "$WIN_SDK_BASE"; then
32766      # There have been cases of partial or broken SDK installations. A missing
32767      # lib dir is not going to work.
32768      if test ! -d "$WIN_SDK_BASE/lib"; then
32769        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32770$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32771        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32772$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32773      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32774        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32775$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32776        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32777        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32778          VS_ENV_ARGS="/x86"
32779        else
32780          VS_ENV_ARGS="/x64"
32781        fi
32782        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32783        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32784        # TODO: improve detection for other versions of SDK
32785        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32786      else
32787        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32788$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32789        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32790$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32791      fi
32792    fi
32793  fi
32794
32795    fi
32796    if test "x$PROGRAMW6432" != x; then
32797
32798  if test "x$VS_ENV_CMD" = x; then
32799    VS_VERSION="${VS_VERSION}"
32800    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32801    METHOD="well-known name"
32802
32803  windows_path="$WIN_SDK_BASE"
32804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32805    unix_path=`$CYGPATH -u "$windows_path"`
32806    WIN_SDK_BASE="$unix_path"
32807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32808    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32809    WIN_SDK_BASE="$unix_path"
32810  fi
32811
32812    if test -d "$WIN_SDK_BASE"; then
32813      # There have been cases of partial or broken SDK installations. A missing
32814      # lib dir is not going to work.
32815      if test ! -d "$WIN_SDK_BASE/lib"; then
32816        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32817$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32818        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32819$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32820      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32821        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32822$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32823        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32824        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32825          VS_ENV_ARGS="/x86"
32826        else
32827          VS_ENV_ARGS="/x64"
32828        fi
32829        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32830        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32831        # TODO: improve detection for other versions of SDK
32832        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32833      else
32834        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32835$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32836        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32837$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32838      fi
32839    fi
32840  fi
32841
32842    fi
32843    if test "x$PROGRAMFILES" != x; then
32844
32845  if test "x$VS_ENV_CMD" = x; then
32846    VS_VERSION="${VS_VERSION}"
32847    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32848    METHOD="well-known name"
32849
32850  windows_path="$WIN_SDK_BASE"
32851  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32852    unix_path=`$CYGPATH -u "$windows_path"`
32853    WIN_SDK_BASE="$unix_path"
32854  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32855    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32856    WIN_SDK_BASE="$unix_path"
32857  fi
32858
32859    if test -d "$WIN_SDK_BASE"; then
32860      # There have been cases of partial or broken SDK installations. A missing
32861      # lib dir is not going to work.
32862      if test ! -d "$WIN_SDK_BASE/lib"; then
32863        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32864$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32865        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32866$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32867      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32868        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32869$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32870        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32871        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32872          VS_ENV_ARGS="/x86"
32873        else
32874          VS_ENV_ARGS="/x64"
32875        fi
32876        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32877        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32878        # TODO: improve detection for other versions of SDK
32879        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32880      else
32881        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32882$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32883        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32884$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32885      fi
32886    fi
32887  fi
32888
32889    fi
32890
32891  if test "x$VS_ENV_CMD" = x; then
32892    VS_VERSION="${VS_VERSION}"
32893    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32894    METHOD="well-known name"
32895
32896  windows_path="$WIN_SDK_BASE"
32897  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32898    unix_path=`$CYGPATH -u "$windows_path"`
32899    WIN_SDK_BASE="$unix_path"
32900  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32901    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32902    WIN_SDK_BASE="$unix_path"
32903  fi
32904
32905    if test -d "$WIN_SDK_BASE"; then
32906      # There have been cases of partial or broken SDK installations. A missing
32907      # lib dir is not going to work.
32908      if test ! -d "$WIN_SDK_BASE/lib"; then
32909        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32910$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32911        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32912$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32913      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32914        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32915$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32916        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32917        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32918          VS_ENV_ARGS="/x86"
32919        else
32920          VS_ENV_ARGS="/x64"
32921        fi
32922        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32923        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32924        # TODO: improve detection for other versions of SDK
32925        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32926      else
32927        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32928$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32929        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32930$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32931      fi
32932    fi
32933  fi
32934
32935
32936  if test "x$VS_ENV_CMD" = x; then
32937    VS_VERSION="${VS_VERSION}"
32938    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32939    METHOD="well-known name"
32940
32941  windows_path="$WIN_SDK_BASE"
32942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32943    unix_path=`$CYGPATH -u "$windows_path"`
32944    WIN_SDK_BASE="$unix_path"
32945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32946    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32947    WIN_SDK_BASE="$unix_path"
32948  fi
32949
32950    if test -d "$WIN_SDK_BASE"; then
32951      # There have been cases of partial or broken SDK installations. A missing
32952      # lib dir is not going to work.
32953      if test ! -d "$WIN_SDK_BASE/lib"; then
32954        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32955$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32956        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32957$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32958      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32959        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32960$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32961        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32962        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32963          VS_ENV_ARGS="/x86"
32964        else
32965          VS_ENV_ARGS="/x64"
32966        fi
32967        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32968        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32969        # TODO: improve detection for other versions of SDK
32970        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32971      else
32972        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32973$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32974        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32975$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32976      fi
32977    fi
32978  fi
32979
32980  fi
32981
32982    if test "x$VS_ENV_CMD" != x; then
32983      TOOLCHAIN_VERSION=$VS_VERSION
32984      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32985      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32986      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32987      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32988      # The rest of the variables are already evaled while probing
32989      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32990$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32991      break
32992    fi
32993  done
32994
32995
32996  # If we have a devkit, skip all of the below.
32997  if test "x$DEVKIT_VS_VERSION" = x; then
32998    if test "x$VS_ENV_CMD" != x; then
32999      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
33000
33001  # Only process if variable expands to non-empty
33002
33003  if test "x$VS_ENV_CMD" != x; then
33004    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33005
33006  # First separate the path from the arguments. This will split at the first
33007  # space.
33008  complete="$VS_ENV_CMD"
33009  path="${complete%% *}"
33010  tmp="$complete EOL"
33011  arguments="${tmp#* }"
33012
33013  # Input might be given as Windows format, start by converting to
33014  # unix format.
33015  new_path=`$CYGPATH -u "$path"`
33016
33017  # Now try to locate executable using which
33018  new_path=`$WHICH "$new_path" 2> /dev/null`
33019  # bat and cmd files are not always considered executable in cygwin causing which
33020  # to not find them
33021  if test "x$new_path" = x \
33022      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33023      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33024    new_path=`$CYGPATH -u "$path"`
33025  fi
33026  if test "x$new_path" = x; then
33027    # Oops. Which didn't find the executable.
33028    # The splitting of arguments from the executable at a space might have been incorrect,
33029    # since paths with space are more likely in Windows. Give it another try with the whole
33030    # argument.
33031    path="$complete"
33032    arguments="EOL"
33033    new_path=`$CYGPATH -u "$path"`
33034    new_path=`$WHICH "$new_path" 2> /dev/null`
33035    # bat and cmd files are not always considered executable in cygwin causing which
33036    # to not find them
33037    if test "x$new_path" = x \
33038        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33039        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33040      new_path=`$CYGPATH -u "$path"`
33041    fi
33042    if test "x$new_path" = x; then
33043      # It's still not found. Now this is an unrecoverable error.
33044      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33045$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33046      has_space=`$ECHO "$complete" | $GREP " "`
33047      if test "x$has_space" != x; then
33048        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33049$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33050      fi
33051      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33052    fi
33053  fi
33054
33055  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33056  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33057  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33058  # "foo.exe" is OK but "foo" is an error.
33059  #
33060  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33061  # It is also a way to make sure we got the proper file name for the real test later on.
33062  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33063  if test "x$test_shortpath" = x; then
33064    # Short path failed, file does not exist as specified.
33065    # Try adding .exe or .cmd
33066    if test -f "${new_path}.exe"; then
33067      input_to_shortpath="${new_path}.exe"
33068    elif test -f "${new_path}.cmd"; then
33069      input_to_shortpath="${new_path}.cmd"
33070    else
33071      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
33072$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
33073      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33074$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33075      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33076    fi
33077  else
33078    input_to_shortpath="$new_path"
33079  fi
33080
33081  # Call helper function which possibly converts this using DOS-style short mode.
33082  # If so, the updated path is stored in $new_path.
33083  new_path="$input_to_shortpath"
33084
33085  input_path="$input_to_shortpath"
33086  # Check if we need to convert this using DOS-style short mode. If the path
33087  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33088  # take no chances and rewrite it.
33089  # Note: m4 eats our [], so we need to use [ and ] instead.
33090  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33091  if test "x$has_forbidden_chars" != x; then
33092    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33093    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33094    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33095    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33096      # Going to short mode and back again did indeed matter. Since short mode is
33097      # case insensitive, let's make it lowercase to improve readability.
33098      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33099      # Now convert it back to Unix-style (cygpath)
33100      input_path=`$CYGPATH -u "$shortmode_path"`
33101      new_path="$input_path"
33102    fi
33103  fi
33104
33105  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33106  if test "x$test_cygdrive_prefix" = x; then
33107    # As a simple fix, exclude /usr/bin since it's not a real path.
33108    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33109      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33110      # a path prefixed by /cygdrive for fixpath to work.
33111      new_path="$CYGWIN_ROOT_PATH$input_path"
33112    fi
33113  fi
33114
33115  # remove trailing .exe if any
33116  new_path="${new_path/%.exe/}"
33117
33118    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33119
33120  # First separate the path from the arguments. This will split at the first
33121  # space.
33122  complete="$VS_ENV_CMD"
33123  path="${complete%% *}"
33124  tmp="$complete EOL"
33125  arguments="${tmp#* }"
33126
33127  # Input might be given as Windows format, start by converting to
33128  # unix format.
33129  new_path="$path"
33130
33131  windows_path="$new_path"
33132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33133    unix_path=`$CYGPATH -u "$windows_path"`
33134    new_path="$unix_path"
33135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33136    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33137    new_path="$unix_path"
33138  fi
33139
33140
33141  # Now try to locate executable using which
33142  new_path=`$WHICH "$new_path" 2> /dev/null`
33143
33144  if test "x$new_path" = x; then
33145    # Oops. Which didn't find the executable.
33146    # The splitting of arguments from the executable at a space might have been incorrect,
33147    # since paths with space are more likely in Windows. Give it another try with the whole
33148    # argument.
33149    path="$complete"
33150    arguments="EOL"
33151    new_path="$path"
33152
33153  windows_path="$new_path"
33154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33155    unix_path=`$CYGPATH -u "$windows_path"`
33156    new_path="$unix_path"
33157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33159    new_path="$unix_path"
33160  fi
33161
33162
33163    new_path=`$WHICH "$new_path" 2> /dev/null`
33164    # bat and cmd files are not always considered executable in MSYS causing which
33165    # to not find them
33166    if test "x$new_path" = x \
33167        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33168        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33169      new_path="$path"
33170
33171  windows_path="$new_path"
33172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33173    unix_path=`$CYGPATH -u "$windows_path"`
33174    new_path="$unix_path"
33175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33177    new_path="$unix_path"
33178  fi
33179
33180    fi
33181
33182    if test "x$new_path" = x; then
33183      # It's still not found. Now this is an unrecoverable error.
33184      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33185$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33186      has_space=`$ECHO "$complete" | $GREP " "`
33187      if test "x$has_space" != x; then
33188        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33189$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33190      fi
33191      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33192    fi
33193  fi
33194
33195  # Now new_path has a complete unix path to the binary
33196  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33197    # Keep paths in /bin as-is, but remove trailing .exe if any
33198    new_path="${new_path/%.exe/}"
33199    # Do not save /bin paths to all_fixpath_prefixes!
33200  else
33201    # Not in mixed or Windows style, start by that.
33202    new_path=`cmd //c echo $new_path`
33203
33204  input_path="$new_path"
33205  # Check if we need to convert this using DOS-style short mode. If the path
33206  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33207  # take no chances and rewrite it.
33208  # Note: m4 eats our [], so we need to use [ and ] instead.
33209  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33210  if test "x$has_forbidden_chars" != x; then
33211    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33212    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33213  fi
33214
33215    # Output is in $new_path
33216
33217  windows_path="$new_path"
33218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33219    unix_path=`$CYGPATH -u "$windows_path"`
33220    new_path="$unix_path"
33221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33222    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33223    new_path="$unix_path"
33224  fi
33225
33226    # remove trailing .exe if any
33227    new_path="${new_path/%.exe/}"
33228
33229    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33230    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33231  fi
33232
33233    else
33234      # We're on a unix platform. Hooray! :)
33235      # First separate the path from the arguments. This will split at the first
33236      # space.
33237      complete="$VS_ENV_CMD"
33238      path="${complete%% *}"
33239      tmp="$complete EOL"
33240      arguments="${tmp#* }"
33241
33242      # Cannot rely on the command "which" here since it doesn't always work.
33243      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33244      if test -z "$is_absolute_path"; then
33245        # Path to executable is not absolute. Find it.
33246        IFS_save="$IFS"
33247        IFS=:
33248        for p in $PATH; do
33249          if test -f "$p/$path" && test -x "$p/$path"; then
33250            new_path="$p/$path"
33251            break
33252          fi
33253        done
33254        IFS="$IFS_save"
33255      else
33256        # This is an absolute path, we can use it without further modifications.
33257        new_path="$path"
33258      fi
33259
33260      if test "x$new_path" = x; then
33261        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33262$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33263        has_space=`$ECHO "$complete" | $GREP " "`
33264        if test "x$has_space" != x; then
33265          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33266$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33267        fi
33268        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33269      fi
33270    fi
33271
33272    # Now join together the path and the arguments once again
33273    if test "x$arguments" != xEOL; then
33274      new_complete="$new_path ${arguments% *}"
33275    else
33276      new_complete="$new_path"
33277    fi
33278
33279    if test "x$complete" != "x$new_complete"; then
33280      VS_ENV_CMD="$new_complete"
33281      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
33282$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
33283    fi
33284  fi
33285
33286
33287      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
33288      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
33289$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
33290
33291      # We need to create a couple of temporary files.
33292      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
33293      $MKDIR -p $VS_ENV_TMP_DIR
33294
33295      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
33296      # Instead create a shell script which will set the relevant variables when run.
33297      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
33298
33299  unix_path="$WINPATH_VS_ENV_CMD"
33300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33301    windows_path=`$CYGPATH -m "$unix_path"`
33302    WINPATH_VS_ENV_CMD="$windows_path"
33303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33304    windows_path=`cmd //c echo $unix_path`
33305    WINPATH_VS_ENV_CMD="$windows_path"
33306  fi
33307
33308      WINPATH_BASH="$BASH"
33309
33310  unix_path="$WINPATH_BASH"
33311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33312    windows_path=`$CYGPATH -m "$unix_path"`
33313    WINPATH_BASH="$windows_path"
33314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33315    windows_path=`cmd //c echo $unix_path`
33316    WINPATH_BASH="$windows_path"
33317  fi
33318
33319
33320      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
33321      # script (executable by bash) that will setup the important variables.
33322      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
33323      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
33324      # This will end up something like:
33325      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
33326      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
33327      # These will end up something like:
33328      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
33329      # The trailing space for everyone except PATH is no typo, but is needed due
33330      # to trailing \ in the Windows paths. These will be stripped later.
33331      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
33332          >> $EXTRACT_VC_ENV_BAT_FILE
33333      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
33334          >> $EXTRACT_VC_ENV_BAT_FILE
33335      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
33336          >> $EXTRACT_VC_ENV_BAT_FILE
33337      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
33338          >> $EXTRACT_VC_ENV_BAT_FILE
33339      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
33340          >> $EXTRACT_VC_ENV_BAT_FILE
33341      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
33342          >> $EXTRACT_VC_ENV_BAT_FILE
33343
33344      # Now execute the newly created bat file.
33345      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
33346      # Change directory so we don't need to mess with Windows paths in redirects.
33347      cd $VS_ENV_TMP_DIR
33348      cmd /c extract-vs-env.bat | $CAT
33349      cd $CURDIR
33350
33351      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
33352        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
33353$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
33354        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33355$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33356        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33357$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33358        as_fn_error $? "Cannot continue" "$LINENO" 5
33359      fi
33360
33361      # Now set all paths and other env variables. This will allow the rest of
33362      # the configure script to find and run the compiler in the proper way.
33363      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
33364$as_echo "$as_me: Setting extracted environment variables" >&6;}
33365      . $VS_ENV_TMP_DIR/set-vs-env.sh
33366      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
33367      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
33368    else
33369      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
33370      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
33371$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
33372    fi
33373  fi
33374
33375  # At this point, we should have correct variables in the environment, or we can't continue.
33376  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
33377$as_echo_n "checking for Visual Studio variables... " >&6; }
33378
33379  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
33380      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
33381    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
33382      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
33383$as_echo "present but broken" >&6; }
33384      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
33385    else
33386      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
33387$as_echo "ok" >&6; }
33388      # Remove any trailing "\" ";" and " " from the variables.
33389      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
33390      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
33391      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
33392      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
33393      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
33394      # Remove any paths containing # (typically F#) as that messes up make. This
33395      # is needed if visual studio was installed with F# support.
33396      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
33397
33398
33399
33400
33401
33402      # Convert VS_INCLUDE into SYSROOT_CFLAGS
33403      OLDIFS="$IFS"
33404      IFS=";"
33405      for i in $VS_INCLUDE; do
33406        ipath=$i
33407        # Only process non-empty elements
33408        if test "x$ipath" != x; then
33409          IFS="$OLDIFS"
33410          # Check that directory exists before calling fixup_path
33411          testpath=$ipath
33412
33413  windows_path="$testpath"
33414  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33415    unix_path=`$CYGPATH -u "$windows_path"`
33416    testpath="$unix_path"
33417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33418    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33419    testpath="$unix_path"
33420  fi
33421
33422          if test -d "$testpath"; then
33423
33424  # Only process if variable expands to non-empty
33425
33426  if test "x$ipath" != x; then
33427    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33428
33429  # Input might be given as Windows format, start by converting to
33430  # unix format.
33431  path="$ipath"
33432  new_path=`$CYGPATH -u "$path"`
33433
33434  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33435  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33436  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33437  # "foo.exe" is OK but "foo" is an error.
33438  #
33439  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33440  # It is also a way to make sure we got the proper file name for the real test later on.
33441  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33442  if test "x$test_shortpath" = x; then
33443    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33444$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33445    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
33446  fi
33447
33448  # Call helper function which possibly converts this using DOS-style short mode.
33449  # If so, the updated path is stored in $new_path.
33450
33451  input_path="$new_path"
33452  # Check if we need to convert this using DOS-style short mode. If the path
33453  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33454  # take no chances and rewrite it.
33455  # Note: m4 eats our [], so we need to use [ and ] instead.
33456  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33457  if test "x$has_forbidden_chars" != x; then
33458    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33459    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33460    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33461    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33462      # Going to short mode and back again did indeed matter. Since short mode is
33463      # case insensitive, let's make it lowercase to improve readability.
33464      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33465      # Now convert it back to Unix-style (cygpath)
33466      input_path=`$CYGPATH -u "$shortmode_path"`
33467      new_path="$input_path"
33468    fi
33469  fi
33470
33471  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33472  if test "x$test_cygdrive_prefix" = x; then
33473    # As a simple fix, exclude /usr/bin since it's not a real path.
33474    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33475      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33476      # a path prefixed by /cygdrive for fixpath to work.
33477      new_path="$CYGWIN_ROOT_PATH$input_path"
33478    fi
33479  fi
33480
33481
33482  if test "x$path" != "x$new_path"; then
33483    ipath="$new_path"
33484    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33485$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33486  fi
33487
33488    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33489
33490  path="$ipath"
33491  has_colon=`$ECHO $path | $GREP ^.:`
33492  new_path="$path"
33493  if test "x$has_colon" = x; then
33494    # Not in mixed or Windows style, start by that.
33495    new_path=`cmd //c echo $path`
33496  fi
33497
33498
33499  input_path="$new_path"
33500  # Check if we need to convert this using DOS-style short mode. If the path
33501  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33502  # take no chances and rewrite it.
33503  # Note: m4 eats our [], so we need to use [ and ] instead.
33504  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33505  if test "x$has_forbidden_chars" != x; then
33506    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33507    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33508  fi
33509
33510
33511  windows_path="$new_path"
33512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33513    unix_path=`$CYGPATH -u "$windows_path"`
33514    new_path="$unix_path"
33515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33516    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33517    new_path="$unix_path"
33518  fi
33519
33520  if test "x$path" != "x$new_path"; then
33521    ipath="$new_path"
33522    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33523$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33524  fi
33525
33526  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33527  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33528
33529    else
33530      # We're on a unix platform. Hooray! :)
33531      path="$ipath"
33532      has_space=`$ECHO "$path" | $GREP " "`
33533      if test "x$has_space" != x; then
33534        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33535$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33536        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33537      fi
33538
33539      # Use eval to expand a potential ~
33540      eval path="$path"
33541      if test ! -f "$path" && test ! -d "$path"; then
33542        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
33543      fi
33544
33545      if test -d "$path"; then
33546        ipath="`cd "$path"; $THEPWDCMD -L`"
33547      else
33548        dir="`$DIRNAME "$path"`"
33549        base="`$BASENAME "$path"`"
33550        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
33551      fi
33552    fi
33553  fi
33554
33555            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
33556          fi
33557          IFS=";"
33558        fi
33559      done
33560      # Convert VS_LIB into SYSROOT_LDFLAGS
33561      for i in $VS_LIB; do
33562        libpath=$i
33563        # Only process non-empty elements
33564        if test "x$libpath" != x; then
33565          IFS="$OLDIFS"
33566          # Check that directory exists before calling fixup_path
33567          testpath=$libpath
33568
33569  windows_path="$testpath"
33570  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33571    unix_path=`$CYGPATH -u "$windows_path"`
33572    testpath="$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    testpath="$unix_path"
33576  fi
33577
33578          if test -d "$testpath"; then
33579
33580  # Only process if variable expands to non-empty
33581
33582  if test "x$libpath" != x; then
33583    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33584
33585  # Input might be given as Windows format, start by converting to
33586  # unix format.
33587  path="$libpath"
33588  new_path=`$CYGPATH -u "$path"`
33589
33590  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33591  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33592  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33593  # "foo.exe" is OK but "foo" is an error.
33594  #
33595  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33596  # It is also a way to make sure we got the proper file name for the real test later on.
33597  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33598  if test "x$test_shortpath" = x; then
33599    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33600$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33601    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
33602  fi
33603
33604  # Call helper function which possibly converts this using DOS-style short mode.
33605  # If so, the updated path is stored in $new_path.
33606
33607  input_path="$new_path"
33608  # Check if we need to convert this using DOS-style short mode. If the path
33609  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33610  # take no chances and rewrite it.
33611  # Note: m4 eats our [], so we need to use [ and ] instead.
33612  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33613  if test "x$has_forbidden_chars" != x; then
33614    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33615    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33616    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33617    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33618      # Going to short mode and back again did indeed matter. Since short mode is
33619      # case insensitive, let's make it lowercase to improve readability.
33620      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33621      # Now convert it back to Unix-style (cygpath)
33622      input_path=`$CYGPATH -u "$shortmode_path"`
33623      new_path="$input_path"
33624    fi
33625  fi
33626
33627  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33628  if test "x$test_cygdrive_prefix" = x; then
33629    # As a simple fix, exclude /usr/bin since it's not a real path.
33630    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33631      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33632      # a path prefixed by /cygdrive for fixpath to work.
33633      new_path="$CYGWIN_ROOT_PATH$input_path"
33634    fi
33635  fi
33636
33637
33638  if test "x$path" != "x$new_path"; then
33639    libpath="$new_path"
33640    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33641$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33642  fi
33643
33644    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33645
33646  path="$libpath"
33647  has_colon=`$ECHO $path | $GREP ^.:`
33648  new_path="$path"
33649  if test "x$has_colon" = x; then
33650    # Not in mixed or Windows style, start by that.
33651    new_path=`cmd //c echo $path`
33652  fi
33653
33654
33655  input_path="$new_path"
33656  # Check if we need to convert this using DOS-style short mode. If the path
33657  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33658  # take no chances and rewrite it.
33659  # Note: m4 eats our [], so we need to use [ and ] instead.
33660  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33661  if test "x$has_forbidden_chars" != x; then
33662    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33663    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33664  fi
33665
33666
33667  windows_path="$new_path"
33668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33669    unix_path=`$CYGPATH -u "$windows_path"`
33670    new_path="$unix_path"
33671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33672    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33673    new_path="$unix_path"
33674  fi
33675
33676  if test "x$path" != "x$new_path"; then
33677    libpath="$new_path"
33678    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33679$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33680  fi
33681
33682  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33683  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33684
33685    else
33686      # We're on a unix platform. Hooray! :)
33687      path="$libpath"
33688      has_space=`$ECHO "$path" | $GREP " "`
33689      if test "x$has_space" != x; then
33690        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33691$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33692        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33693      fi
33694
33695      # Use eval to expand a potential ~
33696      eval path="$path"
33697      if test ! -f "$path" && test ! -d "$path"; then
33698        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
33699      fi
33700
33701      if test -d "$path"; then
33702        libpath="`cd "$path"; $THEPWDCMD -L`"
33703      else
33704        dir="`$DIRNAME "$path"`"
33705        base="`$BASENAME "$path"`"
33706        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
33707      fi
33708    fi
33709  fi
33710
33711            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
33712          fi
33713          IFS=";"
33714        fi
33715      done
33716      IFS="$OLDIFS"
33717    fi
33718  else
33719    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33720$as_echo "not found" >&6; }
33721
33722    if test "x$VS_ENV_CMD" = x; then
33723      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
33724$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
33725      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
33726$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
33727    else
33728      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
33729$as_echo "$as_me: Running the extraction script failed." >&6;}
33730    fi
33731    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33732$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33733    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33734$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33735    as_fn_error $? "Cannot continue" "$LINENO" 5
33736  fi
33737
33738    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
33739    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
33740    PATH="$VS_PATH"
33741    # The microsoft toolchain also requires INCLUDE and LIB to be set.
33742    export INCLUDE="$VS_INCLUDE"
33743    export LIB="$VS_LIB"
33744  else
33745    if test "x$XCODE_VERSION_OUTPUT" != x; then
33746      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
33747      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
33748      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
33749    else
33750      # Currently we do not define this for other toolchains. This might change as the need arise.
33751      TOOLCHAIN_VERSION=
33752    fi
33753  fi
33754
33755
33756  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
33757  # override all other locations.
33758  if test "x$TOOLCHAIN_PATH" != x; then
33759    PATH=$TOOLCHAIN_PATH:$PATH
33760  fi
33761
33762
33763  #
33764  # Setup the compilers (CC and CXX)
33765  #
33766
33767  COMPILER_NAME=C
33768  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33769
33770  if test "x$CC" != x; then
33771    # User has supplied compiler name already, always let that override.
33772    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33773$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33774    if test "x`basename $CC`" = "x$CC"; then
33775      # A command without a complete path is provided, search $PATH.
33776
33777      for ac_prog in $CC
33778do
33779  # Extract the first word of "$ac_prog", so it can be a program name with args.
33780set dummy $ac_prog; ac_word=$2
33781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33782$as_echo_n "checking for $ac_word... " >&6; }
33783if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33784  $as_echo_n "(cached) " >&6
33785else
33786  case $POTENTIAL_CC in
33787  [\\/]* | ?:[\\/]*)
33788  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33789  ;;
33790  *)
33791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33792for as_dir in $PATH
33793do
33794  IFS=$as_save_IFS
33795  test -z "$as_dir" && as_dir=.
33796    for ac_exec_ext in '' $ac_executable_extensions; do
33797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33798    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33800    break 2
33801  fi
33802done
33803  done
33804IFS=$as_save_IFS
33805
33806  ;;
33807esac
33808fi
33809POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33810if test -n "$POTENTIAL_CC"; then
33811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33812$as_echo "$POTENTIAL_CC" >&6; }
33813else
33814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33815$as_echo "no" >&6; }
33816fi
33817
33818
33819  test -n "$POTENTIAL_CC" && break
33820done
33821
33822      if test "x$POTENTIAL_CC" != x; then
33823        CC=$POTENTIAL_CC
33824      else
33825        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33826      fi
33827    else
33828      # Otherwise it might already be a complete path
33829      if test ! -x "$CC"; then
33830        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33831      fi
33832    fi
33833  else
33834    # No user supplied value. Locate compiler ourselves.
33835
33836    # If we are cross compiling, assume cross compilation tools follows the
33837    # cross compilation standard where they are prefixed with the autoconf
33838    # standard name for the target. For example the binary
33839    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33840    # If we are not cross compiling, then the default compiler name will be
33841    # used.
33842
33843    CC=
33844    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33845    # before checking the rest of the PATH.
33846    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33847    # step, this should not be necessary.
33848    if test -n "$TOOLCHAIN_PATH"; then
33849      PATH_save="$PATH"
33850      PATH="$TOOLCHAIN_PATH"
33851      if test -n "$ac_tool_prefix"; then
33852  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33853set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33855$as_echo_n "checking for $ac_word... " >&6; }
33856if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33857  $as_echo_n "(cached) " >&6
33858else
33859  case $TOOLCHAIN_PATH_CC in
33860  [\\/]* | ?:[\\/]*)
33861  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33862  ;;
33863  *)
33864  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33865for as_dir in $PATH
33866do
33867  IFS=$as_save_IFS
33868  test -z "$as_dir" && as_dir=.
33869    for ac_exec_ext in '' $ac_executable_extensions; do
33870  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33871    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33872    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33873    break 2
33874  fi
33875done
33876  done
33877IFS=$as_save_IFS
33878
33879  ;;
33880esac
33881fi
33882TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33883if test -n "$TOOLCHAIN_PATH_CC"; then
33884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33885$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33886else
33887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33888$as_echo "no" >&6; }
33889fi
33890
33891
33892fi
33893if test -z "$ac_cv_path_TOOLCHAIN_PATH_CC"; then
33894  ac_pt_TOOLCHAIN_PATH_CC=$TOOLCHAIN_PATH_CC
33895  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33896set dummy $SEARCH_LIST; ac_word=$2
33897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33898$as_echo_n "checking for $ac_word... " >&6; }
33899if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC+:} false; then :
33900  $as_echo_n "(cached) " >&6
33901else
33902  case $ac_pt_TOOLCHAIN_PATH_CC in
33903  [\\/]* | ?:[\\/]*)
33904  ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$ac_pt_TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33905  ;;
33906  *)
33907  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33908for as_dir in $PATH
33909do
33910  IFS=$as_save_IFS
33911  test -z "$as_dir" && as_dir=.
33912    for ac_exec_ext in '' $ac_executable_extensions; do
33913  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33914    ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33916    break 2
33917  fi
33918done
33919  done
33920IFS=$as_save_IFS
33921
33922  ;;
33923esac
33924fi
33925ac_pt_TOOLCHAIN_PATH_CC=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC
33926if test -n "$ac_pt_TOOLCHAIN_PATH_CC"; then
33927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CC" >&5
33928$as_echo "$ac_pt_TOOLCHAIN_PATH_CC" >&6; }
33929else
33930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33931$as_echo "no" >&6; }
33932fi
33933
33934  if test "x$ac_pt_TOOLCHAIN_PATH_CC" = x; then
33935    TOOLCHAIN_PATH_CC=""
33936  else
33937    case $cross_compiling:$ac_tool_warned in
33938yes:)
33939{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33940$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33941ac_tool_warned=yes ;;
33942esac
33943    TOOLCHAIN_PATH_CC=$ac_pt_TOOLCHAIN_PATH_CC
33944  fi
33945else
33946  TOOLCHAIN_PATH_CC="$ac_cv_path_TOOLCHAIN_PATH_CC"
33947fi
33948
33949      CC=$TOOLCHAIN_PATH_CC
33950      PATH="$PATH_save"
33951    fi
33952
33953    # AC_PATH_TOOL can't be run multiple times with the same variable,
33954    # so create a new name for this run.
33955    if test "x$CC" = x; then
33956      if test -n "$ac_tool_prefix"; then
33957  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33958set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33960$as_echo_n "checking for $ac_word... " >&6; }
33961if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33962  $as_echo_n "(cached) " >&6
33963else
33964  case $POTENTIAL_CC in
33965  [\\/]* | ?:[\\/]*)
33966  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33967  ;;
33968  *)
33969  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33970for as_dir in $PATH
33971do
33972  IFS=$as_save_IFS
33973  test -z "$as_dir" && as_dir=.
33974    for ac_exec_ext in '' $ac_executable_extensions; do
33975  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33976    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33978    break 2
33979  fi
33980done
33981  done
33982IFS=$as_save_IFS
33983
33984  ;;
33985esac
33986fi
33987POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33988if test -n "$POTENTIAL_CC"; then
33989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33990$as_echo "$POTENTIAL_CC" >&6; }
33991else
33992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33993$as_echo "no" >&6; }
33994fi
33995
33996
33997fi
33998if test -z "$ac_cv_path_POTENTIAL_CC"; then
33999  ac_pt_POTENTIAL_CC=$POTENTIAL_CC
34000  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
34001set dummy $SEARCH_LIST; ac_word=$2
34002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34003$as_echo_n "checking for $ac_word... " >&6; }
34004if ${ac_cv_path_ac_pt_POTENTIAL_CC+:} false; then :
34005  $as_echo_n "(cached) " >&6
34006else
34007  case $ac_pt_POTENTIAL_CC in
34008  [\\/]* | ?:[\\/]*)
34009  ac_cv_path_ac_pt_POTENTIAL_CC="$ac_pt_POTENTIAL_CC" # Let the user override the test with a path.
34010  ;;
34011  *)
34012  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34013for as_dir in $PATH
34014do
34015  IFS=$as_save_IFS
34016  test -z "$as_dir" && as_dir=.
34017    for ac_exec_ext in '' $ac_executable_extensions; do
34018  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34019    ac_cv_path_ac_pt_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
34020    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34021    break 2
34022  fi
34023done
34024  done
34025IFS=$as_save_IFS
34026
34027  ;;
34028esac
34029fi
34030ac_pt_POTENTIAL_CC=$ac_cv_path_ac_pt_POTENTIAL_CC
34031if test -n "$ac_pt_POTENTIAL_CC"; then
34032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CC" >&5
34033$as_echo "$ac_pt_POTENTIAL_CC" >&6; }
34034else
34035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34036$as_echo "no" >&6; }
34037fi
34038
34039  if test "x$ac_pt_POTENTIAL_CC" = x; then
34040    POTENTIAL_CC=""
34041  else
34042    case $cross_compiling:$ac_tool_warned in
34043yes:)
34044{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34045$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34046ac_tool_warned=yes ;;
34047esac
34048    POTENTIAL_CC=$ac_pt_POTENTIAL_CC
34049  fi
34050else
34051  POTENTIAL_CC="$ac_cv_path_POTENTIAL_CC"
34052fi
34053
34054      CC=$POTENTIAL_CC
34055    fi
34056
34057    if test "x$CC" = x; then
34058
34059  # Print a helpful message on how to acquire the necessary build dependency.
34060  # devkit is the help tag: freetype, cups, alsa etc
34061  MISSING_DEPENDENCY=devkit
34062
34063  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34064    cygwin_help $MISSING_DEPENDENCY
34065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34066    msys_help $MISSING_DEPENDENCY
34067  else
34068    PKGHANDLER_COMMAND=
34069
34070    case $PKGHANDLER in
34071      apt-get)
34072        apt_help     $MISSING_DEPENDENCY ;;
34073      yum)
34074        yum_help     $MISSING_DEPENDENCY ;;
34075      brew)
34076        brew_help    $MISSING_DEPENDENCY ;;
34077      port)
34078        port_help    $MISSING_DEPENDENCY ;;
34079      pkgutil)
34080        pkgutil_help $MISSING_DEPENDENCY ;;
34081      pkgadd)
34082        pkgadd_help  $MISSING_DEPENDENCY ;;
34083    esac
34084
34085    if test "x$PKGHANDLER_COMMAND" != x; then
34086      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34087    fi
34088  fi
34089
34090      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34091    fi
34092  fi
34093
34094  # Now we have a compiler binary in CC. Make sure it's okay.
34095
34096  # Only process if variable expands to non-empty
34097
34098  if test "x$CC" != x; then
34099    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34100
34101  # First separate the path from the arguments. This will split at the first
34102  # space.
34103  complete="$CC"
34104  path="${complete%% *}"
34105  tmp="$complete EOL"
34106  arguments="${tmp#* }"
34107
34108  # Input might be given as Windows format, start by converting to
34109  # unix format.
34110  new_path=`$CYGPATH -u "$path"`
34111
34112  # Now try to locate executable using which
34113  new_path=`$WHICH "$new_path" 2> /dev/null`
34114  # bat and cmd files are not always considered executable in cygwin causing which
34115  # to not find them
34116  if test "x$new_path" = x \
34117      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34118      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34119    new_path=`$CYGPATH -u "$path"`
34120  fi
34121  if test "x$new_path" = x; then
34122    # Oops. Which didn't find the executable.
34123    # The splitting of arguments from the executable at a space might have been incorrect,
34124    # since paths with space are more likely in Windows. Give it another try with the whole
34125    # argument.
34126    path="$complete"
34127    arguments="EOL"
34128    new_path=`$CYGPATH -u "$path"`
34129    new_path=`$WHICH "$new_path" 2> /dev/null`
34130    # bat and cmd files are not always considered executable in cygwin causing which
34131    # to not find them
34132    if test "x$new_path" = x \
34133        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34134        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34135      new_path=`$CYGPATH -u "$path"`
34136    fi
34137    if test "x$new_path" = x; then
34138      # It's still not found. Now this is an unrecoverable error.
34139      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34140$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34141      has_space=`$ECHO "$complete" | $GREP " "`
34142      if test "x$has_space" != x; then
34143        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34144$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34145      fi
34146      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34147    fi
34148  fi
34149
34150  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34151  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34152  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34153  # "foo.exe" is OK but "foo" is an error.
34154  #
34155  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34156  # It is also a way to make sure we got the proper file name for the real test later on.
34157  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34158  if test "x$test_shortpath" = x; then
34159    # Short path failed, file does not exist as specified.
34160    # Try adding .exe or .cmd
34161    if test -f "${new_path}.exe"; then
34162      input_to_shortpath="${new_path}.exe"
34163    elif test -f "${new_path}.cmd"; then
34164      input_to_shortpath="${new_path}.cmd"
34165    else
34166      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
34167$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
34168      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34169$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34170      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34171    fi
34172  else
34173    input_to_shortpath="$new_path"
34174  fi
34175
34176  # Call helper function which possibly converts this using DOS-style short mode.
34177  # If so, the updated path is stored in $new_path.
34178  new_path="$input_to_shortpath"
34179
34180  input_path="$input_to_shortpath"
34181  # Check if we need to convert this using DOS-style short mode. If the path
34182  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34183  # take no chances and rewrite it.
34184  # Note: m4 eats our [], so we need to use [ and ] instead.
34185  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34186  if test "x$has_forbidden_chars" != x; then
34187    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34188    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34189    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34190    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34191      # Going to short mode and back again did indeed matter. Since short mode is
34192      # case insensitive, let's make it lowercase to improve readability.
34193      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34194      # Now convert it back to Unix-style (cygpath)
34195      input_path=`$CYGPATH -u "$shortmode_path"`
34196      new_path="$input_path"
34197    fi
34198  fi
34199
34200  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34201  if test "x$test_cygdrive_prefix" = x; then
34202    # As a simple fix, exclude /usr/bin since it's not a real path.
34203    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34204      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34205      # a path prefixed by /cygdrive for fixpath to work.
34206      new_path="$CYGWIN_ROOT_PATH$input_path"
34207    fi
34208  fi
34209
34210  # remove trailing .exe if any
34211  new_path="${new_path/%.exe/}"
34212
34213    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34214
34215  # First separate the path from the arguments. This will split at the first
34216  # space.
34217  complete="$CC"
34218  path="${complete%% *}"
34219  tmp="$complete EOL"
34220  arguments="${tmp#* }"
34221
34222  # Input might be given as Windows format, start by converting to
34223  # unix format.
34224  new_path="$path"
34225
34226  windows_path="$new_path"
34227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34228    unix_path=`$CYGPATH -u "$windows_path"`
34229    new_path="$unix_path"
34230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34231    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34232    new_path="$unix_path"
34233  fi
34234
34235
34236  # Now try to locate executable using which
34237  new_path=`$WHICH "$new_path" 2> /dev/null`
34238
34239  if test "x$new_path" = x; then
34240    # Oops. Which didn't find the executable.
34241    # The splitting of arguments from the executable at a space might have been incorrect,
34242    # since paths with space are more likely in Windows. Give it another try with the whole
34243    # argument.
34244    path="$complete"
34245    arguments="EOL"
34246    new_path="$path"
34247
34248  windows_path="$new_path"
34249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34250    unix_path=`$CYGPATH -u "$windows_path"`
34251    new_path="$unix_path"
34252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34253    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34254    new_path="$unix_path"
34255  fi
34256
34257
34258    new_path=`$WHICH "$new_path" 2> /dev/null`
34259    # bat and cmd files are not always considered executable in MSYS causing which
34260    # to not find them
34261    if test "x$new_path" = x \
34262        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34263        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34264      new_path="$path"
34265
34266  windows_path="$new_path"
34267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34268    unix_path=`$CYGPATH -u "$windows_path"`
34269    new_path="$unix_path"
34270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34271    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34272    new_path="$unix_path"
34273  fi
34274
34275    fi
34276
34277    if test "x$new_path" = x; then
34278      # It's still not found. Now this is an unrecoverable error.
34279      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34280$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34281      has_space=`$ECHO "$complete" | $GREP " "`
34282      if test "x$has_space" != x; then
34283        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34284$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34285      fi
34286      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34287    fi
34288  fi
34289
34290  # Now new_path has a complete unix path to the binary
34291  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34292    # Keep paths in /bin as-is, but remove trailing .exe if any
34293    new_path="${new_path/%.exe/}"
34294    # Do not save /bin paths to all_fixpath_prefixes!
34295  else
34296    # Not in mixed or Windows style, start by that.
34297    new_path=`cmd //c echo $new_path`
34298
34299  input_path="$new_path"
34300  # Check if we need to convert this using DOS-style short mode. If the path
34301  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34302  # take no chances and rewrite it.
34303  # Note: m4 eats our [], so we need to use [ and ] instead.
34304  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34305  if test "x$has_forbidden_chars" != x; then
34306    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34307    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34308  fi
34309
34310    # Output is in $new_path
34311
34312  windows_path="$new_path"
34313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34314    unix_path=`$CYGPATH -u "$windows_path"`
34315    new_path="$unix_path"
34316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34317    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34318    new_path="$unix_path"
34319  fi
34320
34321    # remove trailing .exe if any
34322    new_path="${new_path/%.exe/}"
34323
34324    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34325    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34326  fi
34327
34328    else
34329      # We're on a unix platform. Hooray! :)
34330      # First separate the path from the arguments. This will split at the first
34331      # space.
34332      complete="$CC"
34333      path="${complete%% *}"
34334      tmp="$complete EOL"
34335      arguments="${tmp#* }"
34336
34337      # Cannot rely on the command "which" here since it doesn't always work.
34338      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34339      if test -z "$is_absolute_path"; then
34340        # Path to executable is not absolute. Find it.
34341        IFS_save="$IFS"
34342        IFS=:
34343        for p in $PATH; do
34344          if test -f "$p/$path" && test -x "$p/$path"; then
34345            new_path="$p/$path"
34346            break
34347          fi
34348        done
34349        IFS="$IFS_save"
34350      else
34351        # This is an absolute path, we can use it without further modifications.
34352        new_path="$path"
34353      fi
34354
34355      if test "x$new_path" = x; then
34356        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34357$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34358        has_space=`$ECHO "$complete" | $GREP " "`
34359        if test "x$has_space" != x; then
34360          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34361$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34362        fi
34363        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34364      fi
34365    fi
34366
34367    # Now join together the path and the arguments once again
34368    if test "x$arguments" != xEOL; then
34369      new_complete="$new_path ${arguments% *}"
34370    else
34371      new_complete="$new_path"
34372    fi
34373
34374    if test "x$complete" != "x$new_complete"; then
34375      CC="$new_complete"
34376      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
34377$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
34378    fi
34379  fi
34380
34381  TEST_COMPILER="$CC"
34382
34383  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
34384$as_echo_n "checking resolved symbolic links for CC... " >&6; }
34385  SYMLINK_ORIGINAL="$TEST_COMPILER"
34386
34387  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34388    # Follow a chain of symbolic links. Use readlink
34389    # where it exists, else fall back to horribly
34390    # complicated shell code.
34391    if test "x$READLINK_TESTED" != yes; then
34392      # On MacOSX there is a readlink tool with a different
34393      # purpose than the GNU readlink tool. Check the found readlink.
34394      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34395      if test "x$ISGNU" = x; then
34396        # A readlink that we do not know how to use.
34397        # Are there other non-GNU readlinks out there?
34398        READLINK_TESTED=yes
34399        READLINK=
34400      fi
34401    fi
34402
34403    if test "x$READLINK" != x; then
34404      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34405    else
34406      # Save the current directory for restoring afterwards
34407      STARTDIR=$PWD
34408      COUNTER=0
34409      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34410      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34411      cd $sym_link_dir
34412      # Use -P flag to resolve symlinks in directories.
34413      cd `$THEPWDCMD -P`
34414      sym_link_dir=`$THEPWDCMD -P`
34415      # Resolve file symlinks
34416      while test $COUNTER -lt 20; do
34417        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34418        if test "x$ISLINK" == x; then
34419          # This is not a symbolic link! We are done!
34420          break
34421        fi
34422        # Again resolve directory symlinks since the target of the just found
34423        # link could be in a different directory
34424        cd `$DIRNAME $ISLINK`
34425        sym_link_dir=`$THEPWDCMD -P`
34426        sym_link_file=`$BASENAME $ISLINK`
34427        let COUNTER=COUNTER+1
34428      done
34429      cd $STARTDIR
34430      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34431    fi
34432  fi
34433
34434  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34435    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34436$as_echo "no symlink" >&6; }
34437  else
34438    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34439$as_echo "$SYMLINK_ORIGINAL" >&6; }
34440
34441    # We can't handle ccache by gcc wrappers, since we need to know if we're
34442    # using ccache. Instead ccache usage must be controlled by a configure option.
34443    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34444    if test "x$COMPILER_BASENAME" = "xccache"; then
34445      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34446$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34447      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34448    fi
34449  fi
34450
34451
34452  COMPILER=$CC
34453  COMPILER_NAME=$COMPILER_NAME
34454
34455  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34456    # cc -V output typically looks like
34457    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34458    # or
34459    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
34460    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34461    # Check that this is likely to be the Solaris Studio cc.
34462    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
34463    if test $? -ne 0; then
34464      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34465      { $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
34466$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34467      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34468$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34469      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34470$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34471      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34472    fi
34473    # Remove usage instructions (if present), and
34474    # collapse compiler output into a single line
34475    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34476        $SED -e 's/ *[Uu]sage:.*//'`
34477    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34478        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34479  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34480    # xlc -qversion output typically looks like
34481    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34482    #     Version: 11.01.0000.0015
34483    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34484    # Check that this is likely to be the IBM XL C compiler.
34485    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34486    if test $? -ne 0; then
34487      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34488      { $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
34489$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34490      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34491$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34492      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34493$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34494      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34495    fi
34496    # Collapse compiler output into a single line
34497    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34498    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34499        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34500  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34501    # There is no specific version flag, but all output starts with a version string.
34502    # First line typically looks something like:
34503    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34504    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34505    # Check that this is likely to be Microsoft CL.EXE.
34506    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34507    if test $? -ne 0; then
34508      { $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
34509$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34510      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34511$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34512      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34513    fi
34514    # Collapse compiler output into a single line
34515    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34516    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34517        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34518  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34519    # gcc --version output typically looks like
34520    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34521    #     Copyright (C) 2013 Free Software Foundation, Inc.
34522    #     This is free software; see the source for copying conditions.  There is NO
34523    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34524    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34525    # Check that this is likely to be GCC.
34526    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34527    if test $? -ne 0; then
34528      { $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
34529$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34530      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34531$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34532      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34533    fi
34534    # Remove Copyright and legalese from version string, and
34535    # collapse into a single line
34536    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34537        $SED -e 's/ *Copyright .*//'`
34538    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34539        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34540  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34541    # clang --version output typically looks like
34542    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34543    #    clang version 3.3 (tags/RELEASE_33/final)
34544    # or
34545    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34546    #    Target: x86_64-pc-linux-gnu
34547    #    Thread model: posix
34548    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34549    # Check that this is likely to be clang
34550    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34551    if test $? -ne 0; then
34552      { $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
34553$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34554      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34555$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34556      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34557    fi
34558    # Collapse compiler output into a single line
34559    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34560    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34561        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34562  else
34563      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34564  fi
34565  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34566  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34567  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34568  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
34569
34570  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34571$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34572
34573
34574  # Now that we have resolved CC ourself, let autoconf have its go at it
34575  ac_ext=c
34576ac_cpp='$CPP $CPPFLAGS'
34577ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34578ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34579ac_compiler_gnu=$ac_cv_c_compiler_gnu
34580if test -n "$ac_tool_prefix"; then
34581  for ac_prog in $CC
34582  do
34583    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34584set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34586$as_echo_n "checking for $ac_word... " >&6; }
34587if ${ac_cv_prog_CC+:} false; then :
34588  $as_echo_n "(cached) " >&6
34589else
34590  if test -n "$CC"; then
34591  ac_cv_prog_CC="$CC" # Let the user override the test.
34592else
34593as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34594for as_dir in $PATH
34595do
34596  IFS=$as_save_IFS
34597  test -z "$as_dir" && as_dir=.
34598    for ac_exec_ext in '' $ac_executable_extensions; do
34599  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34600    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
34601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34602    break 2
34603  fi
34604done
34605  done
34606IFS=$as_save_IFS
34607
34608fi
34609fi
34610CC=$ac_cv_prog_CC
34611if test -n "$CC"; then
34612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
34613$as_echo "$CC" >&6; }
34614else
34615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34616$as_echo "no" >&6; }
34617fi
34618
34619
34620    test -n "$CC" && break
34621  done
34622fi
34623if test -z "$CC"; then
34624  ac_ct_CC=$CC
34625  for ac_prog in $CC
34626do
34627  # Extract the first word of "$ac_prog", so it can be a program name with args.
34628set dummy $ac_prog; ac_word=$2
34629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34630$as_echo_n "checking for $ac_word... " >&6; }
34631if ${ac_cv_prog_ac_ct_CC+:} false; then :
34632  $as_echo_n "(cached) " >&6
34633else
34634  if test -n "$ac_ct_CC"; then
34635  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
34636else
34637as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34638for as_dir in $PATH
34639do
34640  IFS=$as_save_IFS
34641  test -z "$as_dir" && as_dir=.
34642    for ac_exec_ext in '' $ac_executable_extensions; do
34643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34644    ac_cv_prog_ac_ct_CC="$ac_prog"
34645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34646    break 2
34647  fi
34648done
34649  done
34650IFS=$as_save_IFS
34651
34652fi
34653fi
34654ac_ct_CC=$ac_cv_prog_ac_ct_CC
34655if test -n "$ac_ct_CC"; then
34656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
34657$as_echo "$ac_ct_CC" >&6; }
34658else
34659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34660$as_echo "no" >&6; }
34661fi
34662
34663
34664  test -n "$ac_ct_CC" && break
34665done
34666
34667  if test "x$ac_ct_CC" = x; then
34668    CC=""
34669  else
34670    case $cross_compiling:$ac_tool_warned in
34671yes:)
34672{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34673$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34674ac_tool_warned=yes ;;
34675esac
34676    CC=$ac_ct_CC
34677  fi
34678fi
34679
34680
34681test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34682$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34683as_fn_error $? "no acceptable C compiler found in \$PATH
34684See \`config.log' for more details" "$LINENO" 5; }
34685
34686# Provide some information about the compiler.
34687$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
34688set X $ac_compile
34689ac_compiler=$2
34690for ac_option in --version -v -V -qversion; do
34691  { { ac_try="$ac_compiler $ac_option >&5"
34692case "(($ac_try" in
34693  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34694  *) ac_try_echo=$ac_try;;
34695esac
34696eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34697$as_echo "$ac_try_echo"; } >&5
34698  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34699  ac_status=$?
34700  if test -s conftest.err; then
34701    sed '10a\
34702... rest of stderr output deleted ...
34703         10q' conftest.err >conftest.er1
34704    cat conftest.er1 >&5
34705  fi
34706  rm -f conftest.er1 conftest.err
34707  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34708  test $ac_status = 0; }
34709done
34710
34711cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34712/* end confdefs.h.  */
34713
34714int
34715main ()
34716{
34717
34718  ;
34719  return 0;
34720}
34721_ACEOF
34722ac_clean_files_save=$ac_clean_files
34723ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
34724# Try to create an executable without -o first, disregard a.out.
34725# It will help us diagnose broken compilers, and finding out an intuition
34726# of exeext.
34727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
34728$as_echo_n "checking whether the C compiler works... " >&6; }
34729ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
34730
34731# The possible output files:
34732ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
34733
34734ac_rmfiles=
34735for ac_file in $ac_files
34736do
34737  case $ac_file in
34738    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34739    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
34740  esac
34741done
34742rm -f $ac_rmfiles
34743
34744if { { ac_try="$ac_link_default"
34745case "(($ac_try" in
34746  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34747  *) ac_try_echo=$ac_try;;
34748esac
34749eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34750$as_echo "$ac_try_echo"; } >&5
34751  (eval "$ac_link_default") 2>&5
34752  ac_status=$?
34753  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34754  test $ac_status = 0; }; then :
34755  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
34756# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
34757# in a Makefile.  We should not override ac_cv_exeext if it was cached,
34758# so that the user can short-circuit this test for compilers unknown to
34759# Autoconf.
34760for ac_file in $ac_files ''
34761do
34762  test -f "$ac_file" || continue
34763  case $ac_file in
34764    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
34765	;;
34766    [ab].out )
34767	# We found the default executable, but exeext='' is most
34768	# certainly right.
34769	break;;
34770    *.* )
34771	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
34772	then :; else
34773	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34774	fi
34775	# We set ac_cv_exeext here because the later test for it is not
34776	# safe: cross compilers may not add the suffix if given an `-o'
34777	# argument, so we may need to know it at that point already.
34778	# Even if this section looks crufty: it has the advantage of
34779	# actually working.
34780	break;;
34781    * )
34782	break;;
34783  esac
34784done
34785test "$ac_cv_exeext" = no && ac_cv_exeext=
34786
34787else
34788  ac_file=''
34789fi
34790if test -z "$ac_file"; then :
34791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34792$as_echo "no" >&6; }
34793$as_echo "$as_me: failed program was:" >&5
34794sed 's/^/| /' conftest.$ac_ext >&5
34795
34796{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34797$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34798as_fn_error 77 "C compiler cannot create executables
34799See \`config.log' for more details" "$LINENO" 5; }
34800else
34801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34802$as_echo "yes" >&6; }
34803fi
34804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
34805$as_echo_n "checking for C compiler default output file name... " >&6; }
34806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
34807$as_echo "$ac_file" >&6; }
34808ac_exeext=$ac_cv_exeext
34809
34810rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
34811ac_clean_files=$ac_clean_files_save
34812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
34813$as_echo_n "checking for suffix of executables... " >&6; }
34814if { { ac_try="$ac_link"
34815case "(($ac_try" in
34816  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34817  *) ac_try_echo=$ac_try;;
34818esac
34819eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34820$as_echo "$ac_try_echo"; } >&5
34821  (eval "$ac_link") 2>&5
34822  ac_status=$?
34823  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34824  test $ac_status = 0; }; then :
34825  # If both `conftest.exe' and `conftest' are `present' (well, observable)
34826# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
34827# work properly (i.e., refer to `conftest.exe'), while it won't with
34828# `rm'.
34829for ac_file in conftest.exe conftest conftest.*; do
34830  test -f "$ac_file" || continue
34831  case $ac_file in
34832    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34833    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34834	  break;;
34835    * ) break;;
34836  esac
34837done
34838else
34839  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34840$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34841as_fn_error $? "cannot compute suffix of executables: cannot compile and link
34842See \`config.log' for more details" "$LINENO" 5; }
34843fi
34844rm -f conftest conftest$ac_cv_exeext
34845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
34846$as_echo "$ac_cv_exeext" >&6; }
34847
34848rm -f conftest.$ac_ext
34849EXEEXT=$ac_cv_exeext
34850ac_exeext=$EXEEXT
34851cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34852/* end confdefs.h.  */
34853#include <stdio.h>
34854int
34855main ()
34856{
34857FILE *f = fopen ("conftest.out", "w");
34858 return ferror (f) || fclose (f) != 0;
34859
34860  ;
34861  return 0;
34862}
34863_ACEOF
34864ac_clean_files="$ac_clean_files conftest.out"
34865# Check that the compiler produces executables we can run.  If not, either
34866# the compiler is broken, or we cross compile.
34867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34868$as_echo_n "checking whether we are cross compiling... " >&6; }
34869if test "$cross_compiling" != yes; then
34870  { { ac_try="$ac_link"
34871case "(($ac_try" in
34872  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34873  *) ac_try_echo=$ac_try;;
34874esac
34875eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34876$as_echo "$ac_try_echo"; } >&5
34877  (eval "$ac_link") 2>&5
34878  ac_status=$?
34879  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34880  test $ac_status = 0; }
34881  if { ac_try='./conftest$ac_cv_exeext'
34882  { { case "(($ac_try" in
34883  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34884  *) ac_try_echo=$ac_try;;
34885esac
34886eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34887$as_echo "$ac_try_echo"; } >&5
34888  (eval "$ac_try") 2>&5
34889  ac_status=$?
34890  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34891  test $ac_status = 0; }; }; then
34892    cross_compiling=no
34893  else
34894    if test "$cross_compiling" = maybe; then
34895	cross_compiling=yes
34896    else
34897	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34898$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34899as_fn_error $? "cannot run C compiled programs.
34900If you meant to cross compile, use \`--host'.
34901See \`config.log' for more details" "$LINENO" 5; }
34902    fi
34903  fi
34904fi
34905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34906$as_echo "$cross_compiling" >&6; }
34907
34908rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34909ac_clean_files=$ac_clean_files_save
34910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34911$as_echo_n "checking for suffix of object files... " >&6; }
34912if ${ac_cv_objext+:} false; then :
34913  $as_echo_n "(cached) " >&6
34914else
34915  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34916/* end confdefs.h.  */
34917
34918int
34919main ()
34920{
34921
34922  ;
34923  return 0;
34924}
34925_ACEOF
34926rm -f conftest.o conftest.obj
34927if { { ac_try="$ac_compile"
34928case "(($ac_try" in
34929  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34930  *) ac_try_echo=$ac_try;;
34931esac
34932eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34933$as_echo "$ac_try_echo"; } >&5
34934  (eval "$ac_compile") 2>&5
34935  ac_status=$?
34936  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34937  test $ac_status = 0; }; then :
34938  for ac_file in conftest.o conftest.obj conftest.*; do
34939  test -f "$ac_file" || continue;
34940  case $ac_file in
34941    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34942    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34943       break;;
34944  esac
34945done
34946else
34947  $as_echo "$as_me: failed program was:" >&5
34948sed 's/^/| /' conftest.$ac_ext >&5
34949
34950{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34951$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34952as_fn_error $? "cannot compute suffix of object files: cannot compile
34953See \`config.log' for more details" "$LINENO" 5; }
34954fi
34955rm -f conftest.$ac_cv_objext conftest.$ac_ext
34956fi
34957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34958$as_echo "$ac_cv_objext" >&6; }
34959OBJEXT=$ac_cv_objext
34960ac_objext=$OBJEXT
34961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34962$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34963if ${ac_cv_c_compiler_gnu+:} false; then :
34964  $as_echo_n "(cached) " >&6
34965else
34966  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34967/* end confdefs.h.  */
34968
34969int
34970main ()
34971{
34972#ifndef __GNUC__
34973       choke me
34974#endif
34975
34976  ;
34977  return 0;
34978}
34979_ACEOF
34980if ac_fn_c_try_compile "$LINENO"; then :
34981  ac_compiler_gnu=yes
34982else
34983  ac_compiler_gnu=no
34984fi
34985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34986ac_cv_c_compiler_gnu=$ac_compiler_gnu
34987
34988fi
34989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34990$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34991if test $ac_compiler_gnu = yes; then
34992  GCC=yes
34993else
34994  GCC=
34995fi
34996ac_test_CFLAGS=${CFLAGS+set}
34997ac_save_CFLAGS=$CFLAGS
34998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34999$as_echo_n "checking whether $CC accepts -g... " >&6; }
35000if ${ac_cv_prog_cc_g+:} false; then :
35001  $as_echo_n "(cached) " >&6
35002else
35003  ac_save_c_werror_flag=$ac_c_werror_flag
35004   ac_c_werror_flag=yes
35005   ac_cv_prog_cc_g=no
35006   CFLAGS="-g"
35007   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35008/* end confdefs.h.  */
35009
35010int
35011main ()
35012{
35013
35014  ;
35015  return 0;
35016}
35017_ACEOF
35018if ac_fn_c_try_compile "$LINENO"; then :
35019  ac_cv_prog_cc_g=yes
35020else
35021  CFLAGS=""
35022      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35023/* end confdefs.h.  */
35024
35025int
35026main ()
35027{
35028
35029  ;
35030  return 0;
35031}
35032_ACEOF
35033if ac_fn_c_try_compile "$LINENO"; then :
35034
35035else
35036  ac_c_werror_flag=$ac_save_c_werror_flag
35037	 CFLAGS="-g"
35038	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35039/* end confdefs.h.  */
35040
35041int
35042main ()
35043{
35044
35045  ;
35046  return 0;
35047}
35048_ACEOF
35049if ac_fn_c_try_compile "$LINENO"; then :
35050  ac_cv_prog_cc_g=yes
35051fi
35052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35053fi
35054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35055fi
35056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35057   ac_c_werror_flag=$ac_save_c_werror_flag
35058fi
35059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
35060$as_echo "$ac_cv_prog_cc_g" >&6; }
35061if test "$ac_test_CFLAGS" = set; then
35062  CFLAGS=$ac_save_CFLAGS
35063elif test $ac_cv_prog_cc_g = yes; then
35064  if test "$GCC" = yes; then
35065    CFLAGS="-g -O2"
35066  else
35067    CFLAGS="-g"
35068  fi
35069else
35070  if test "$GCC" = yes; then
35071    CFLAGS="-O2"
35072  else
35073    CFLAGS=
35074  fi
35075fi
35076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
35077$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
35078if ${ac_cv_prog_cc_c89+:} false; then :
35079  $as_echo_n "(cached) " >&6
35080else
35081  ac_cv_prog_cc_c89=no
35082ac_save_CC=$CC
35083cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35084/* end confdefs.h.  */
35085#include <stdarg.h>
35086#include <stdio.h>
35087struct stat;
35088/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
35089struct buf { int x; };
35090FILE * (*rcsopen) (struct buf *, struct stat *, int);
35091static char *e (p, i)
35092     char **p;
35093     int i;
35094{
35095  return p[i];
35096}
35097static char *f (char * (*g) (char **, int), char **p, ...)
35098{
35099  char *s;
35100  va_list v;
35101  va_start (v,p);
35102  s = g (p, va_arg (v,int));
35103  va_end (v);
35104  return s;
35105}
35106
35107/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
35108   function prototypes and stuff, but not '\xHH' hex character constants.
35109   These don't provoke an error unfortunately, instead are silently treated
35110   as 'x'.  The following induces an error, until -std is added to get
35111   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
35112   array size at least.  It's necessary to write '\x00'==0 to get something
35113   that's true only with -std.  */
35114int osf4_cc_array ['\x00' == 0 ? 1 : -1];
35115
35116/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
35117   inside strings and character constants.  */
35118#define FOO(x) 'x'
35119int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
35120
35121int test (int i, double x);
35122struct s1 {int (*f) (int a);};
35123struct s2 {int (*f) (double a);};
35124int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
35125int argc;
35126char **argv;
35127int
35128main ()
35129{
35130return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
35131  ;
35132  return 0;
35133}
35134_ACEOF
35135for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
35136	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
35137do
35138  CC="$ac_save_CC $ac_arg"
35139  if ac_fn_c_try_compile "$LINENO"; then :
35140  ac_cv_prog_cc_c89=$ac_arg
35141fi
35142rm -f core conftest.err conftest.$ac_objext
35143  test "x$ac_cv_prog_cc_c89" != "xno" && break
35144done
35145rm -f conftest.$ac_ext
35146CC=$ac_save_CC
35147
35148fi
35149# AC_CACHE_VAL
35150case "x$ac_cv_prog_cc_c89" in
35151  x)
35152    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
35153$as_echo "none needed" >&6; } ;;
35154  xno)
35155    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
35156$as_echo "unsupported" >&6; } ;;
35157  *)
35158    CC="$CC $ac_cv_prog_cc_c89"
35159    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
35160$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
35161esac
35162if test "x$ac_cv_prog_cc_c89" != xno; then :
35163
35164fi
35165
35166ac_ext=cpp
35167ac_cpp='$CXXCPP $CPPFLAGS'
35168ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35169ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35170ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35171
35172
35173
35174  COMPILER_NAME=C++
35175  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
35176
35177  if test "x$CXX" != x; then
35178    # User has supplied compiler name already, always let that override.
35179    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
35180$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
35181    if test "x`basename $CXX`" = "x$CXX"; then
35182      # A command without a complete path is provided, search $PATH.
35183
35184      for ac_prog in $CXX
35185do
35186  # Extract the first word of "$ac_prog", so it can be a program name with args.
35187set dummy $ac_prog; ac_word=$2
35188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35189$as_echo_n "checking for $ac_word... " >&6; }
35190if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
35191  $as_echo_n "(cached) " >&6
35192else
35193  case $POTENTIAL_CXX in
35194  [\\/]* | ?:[\\/]*)
35195  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
35196  ;;
35197  *)
35198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35199for as_dir in $PATH
35200do
35201  IFS=$as_save_IFS
35202  test -z "$as_dir" && as_dir=.
35203    for ac_exec_ext in '' $ac_executable_extensions; do
35204  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35205    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35207    break 2
35208  fi
35209done
35210  done
35211IFS=$as_save_IFS
35212
35213  ;;
35214esac
35215fi
35216POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
35217if test -n "$POTENTIAL_CXX"; then
35218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
35219$as_echo "$POTENTIAL_CXX" >&6; }
35220else
35221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35222$as_echo "no" >&6; }
35223fi
35224
35225
35226  test -n "$POTENTIAL_CXX" && break
35227done
35228
35229      if test "x$POTENTIAL_CXX" != x; then
35230        CXX=$POTENTIAL_CXX
35231      else
35232        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
35233      fi
35234    else
35235      # Otherwise it might already be a complete path
35236      if test ! -x "$CXX"; then
35237        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
35238      fi
35239    fi
35240  else
35241    # No user supplied value. Locate compiler ourselves.
35242
35243    # If we are cross compiling, assume cross compilation tools follows the
35244    # cross compilation standard where they are prefixed with the autoconf
35245    # standard name for the target. For example the binary
35246    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
35247    # If we are not cross compiling, then the default compiler name will be
35248    # used.
35249
35250    CXX=
35251    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
35252    # before checking the rest of the PATH.
35253    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
35254    # step, this should not be necessary.
35255    if test -n "$TOOLCHAIN_PATH"; then
35256      PATH_save="$PATH"
35257      PATH="$TOOLCHAIN_PATH"
35258      if test -n "$ac_tool_prefix"; then
35259  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
35260set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
35261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35262$as_echo_n "checking for $ac_word... " >&6; }
35263if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
35264  $as_echo_n "(cached) " >&6
35265else
35266  case $TOOLCHAIN_PATH_CXX in
35267  [\\/]* | ?:[\\/]*)
35268  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
35269  ;;
35270  *)
35271  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35272for as_dir in $PATH
35273do
35274  IFS=$as_save_IFS
35275  test -z "$as_dir" && as_dir=.
35276    for ac_exec_ext in '' $ac_executable_extensions; do
35277  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35278    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
35279    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35280    break 2
35281  fi
35282done
35283  done
35284IFS=$as_save_IFS
35285
35286  ;;
35287esac
35288fi
35289TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
35290if test -n "$TOOLCHAIN_PATH_CXX"; then
35291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
35292$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
35293else
35294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35295$as_echo "no" >&6; }
35296fi
35297
35298
35299fi
35300if test -z "$ac_cv_path_TOOLCHAIN_PATH_CXX"; then
35301  ac_pt_TOOLCHAIN_PATH_CXX=$TOOLCHAIN_PATH_CXX
35302  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
35303set dummy $SEARCH_LIST; ac_word=$2
35304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35305$as_echo_n "checking for $ac_word... " >&6; }
35306if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX+:} false; then :
35307  $as_echo_n "(cached) " >&6
35308else
35309  case $ac_pt_TOOLCHAIN_PATH_CXX in
35310  [\\/]* | ?:[\\/]*)
35311  ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$ac_pt_TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
35312  ;;
35313  *)
35314  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35315for as_dir in $PATH
35316do
35317  IFS=$as_save_IFS
35318  test -z "$as_dir" && as_dir=.
35319    for ac_exec_ext in '' $ac_executable_extensions; do
35320  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35321    ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
35322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35323    break 2
35324  fi
35325done
35326  done
35327IFS=$as_save_IFS
35328
35329  ;;
35330esac
35331fi
35332ac_pt_TOOLCHAIN_PATH_CXX=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX
35333if test -n "$ac_pt_TOOLCHAIN_PATH_CXX"; then
35334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CXX" >&5
35335$as_echo "$ac_pt_TOOLCHAIN_PATH_CXX" >&6; }
35336else
35337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35338$as_echo "no" >&6; }
35339fi
35340
35341  if test "x$ac_pt_TOOLCHAIN_PATH_CXX" = x; then
35342    TOOLCHAIN_PATH_CXX=""
35343  else
35344    case $cross_compiling:$ac_tool_warned in
35345yes:)
35346{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35347$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35348ac_tool_warned=yes ;;
35349esac
35350    TOOLCHAIN_PATH_CXX=$ac_pt_TOOLCHAIN_PATH_CXX
35351  fi
35352else
35353  TOOLCHAIN_PATH_CXX="$ac_cv_path_TOOLCHAIN_PATH_CXX"
35354fi
35355
35356      CXX=$TOOLCHAIN_PATH_CXX
35357      PATH="$PATH_save"
35358    fi
35359
35360    # AC_PATH_TOOL can't be run multiple times with the same variable,
35361    # so create a new name for this run.
35362    if test "x$CXX" = x; then
35363      if test -n "$ac_tool_prefix"; then
35364  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
35365set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
35366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35367$as_echo_n "checking for $ac_word... " >&6; }
35368if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
35369  $as_echo_n "(cached) " >&6
35370else
35371  case $POTENTIAL_CXX in
35372  [\\/]* | ?:[\\/]*)
35373  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
35374  ;;
35375  *)
35376  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35377for as_dir in $PATH
35378do
35379  IFS=$as_save_IFS
35380  test -z "$as_dir" && as_dir=.
35381    for ac_exec_ext in '' $ac_executable_extensions; do
35382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35383    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35385    break 2
35386  fi
35387done
35388  done
35389IFS=$as_save_IFS
35390
35391  ;;
35392esac
35393fi
35394POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
35395if test -n "$POTENTIAL_CXX"; then
35396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
35397$as_echo "$POTENTIAL_CXX" >&6; }
35398else
35399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35400$as_echo "no" >&6; }
35401fi
35402
35403
35404fi
35405if test -z "$ac_cv_path_POTENTIAL_CXX"; then
35406  ac_pt_POTENTIAL_CXX=$POTENTIAL_CXX
35407  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
35408set dummy $SEARCH_LIST; ac_word=$2
35409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35410$as_echo_n "checking for $ac_word... " >&6; }
35411if ${ac_cv_path_ac_pt_POTENTIAL_CXX+:} false; then :
35412  $as_echo_n "(cached) " >&6
35413else
35414  case $ac_pt_POTENTIAL_CXX in
35415  [\\/]* | ?:[\\/]*)
35416  ac_cv_path_ac_pt_POTENTIAL_CXX="$ac_pt_POTENTIAL_CXX" # Let the user override the test with a path.
35417  ;;
35418  *)
35419  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35420for as_dir in $PATH
35421do
35422  IFS=$as_save_IFS
35423  test -z "$as_dir" && as_dir=.
35424    for ac_exec_ext in '' $ac_executable_extensions; do
35425  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35426    ac_cv_path_ac_pt_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35427    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35428    break 2
35429  fi
35430done
35431  done
35432IFS=$as_save_IFS
35433
35434  ;;
35435esac
35436fi
35437ac_pt_POTENTIAL_CXX=$ac_cv_path_ac_pt_POTENTIAL_CXX
35438if test -n "$ac_pt_POTENTIAL_CXX"; then
35439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CXX" >&5
35440$as_echo "$ac_pt_POTENTIAL_CXX" >&6; }
35441else
35442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35443$as_echo "no" >&6; }
35444fi
35445
35446  if test "x$ac_pt_POTENTIAL_CXX" = x; then
35447    POTENTIAL_CXX=""
35448  else
35449    case $cross_compiling:$ac_tool_warned in
35450yes:)
35451{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35452$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35453ac_tool_warned=yes ;;
35454esac
35455    POTENTIAL_CXX=$ac_pt_POTENTIAL_CXX
35456  fi
35457else
35458  POTENTIAL_CXX="$ac_cv_path_POTENTIAL_CXX"
35459fi
35460
35461      CXX=$POTENTIAL_CXX
35462    fi
35463
35464    if test "x$CXX" = x; then
35465
35466  # Print a helpful message on how to acquire the necessary build dependency.
35467  # devkit is the help tag: freetype, cups, alsa etc
35468  MISSING_DEPENDENCY=devkit
35469
35470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35471    cygwin_help $MISSING_DEPENDENCY
35472  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35473    msys_help $MISSING_DEPENDENCY
35474  else
35475    PKGHANDLER_COMMAND=
35476
35477    case $PKGHANDLER in
35478      apt-get)
35479        apt_help     $MISSING_DEPENDENCY ;;
35480      yum)
35481        yum_help     $MISSING_DEPENDENCY ;;
35482      brew)
35483        brew_help    $MISSING_DEPENDENCY ;;
35484      port)
35485        port_help    $MISSING_DEPENDENCY ;;
35486      pkgutil)
35487        pkgutil_help $MISSING_DEPENDENCY ;;
35488      pkgadd)
35489        pkgadd_help  $MISSING_DEPENDENCY ;;
35490    esac
35491
35492    if test "x$PKGHANDLER_COMMAND" != x; then
35493      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
35494    fi
35495  fi
35496
35497      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
35498    fi
35499  fi
35500
35501  # Now we have a compiler binary in CXX. Make sure it's okay.
35502
35503  # Only process if variable expands to non-empty
35504
35505  if test "x$CXX" != x; then
35506    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35507
35508  # First separate the path from the arguments. This will split at the first
35509  # space.
35510  complete="$CXX"
35511  path="${complete%% *}"
35512  tmp="$complete EOL"
35513  arguments="${tmp#* }"
35514
35515  # Input might be given as Windows format, start by converting to
35516  # unix format.
35517  new_path=`$CYGPATH -u "$path"`
35518
35519  # Now try to locate executable using which
35520  new_path=`$WHICH "$new_path" 2> /dev/null`
35521  # bat and cmd files are not always considered executable in cygwin causing which
35522  # to not find them
35523  if test "x$new_path" = x \
35524      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35525      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35526    new_path=`$CYGPATH -u "$path"`
35527  fi
35528  if test "x$new_path" = x; then
35529    # Oops. Which didn't find the executable.
35530    # The splitting of arguments from the executable at a space might have been incorrect,
35531    # since paths with space are more likely in Windows. Give it another try with the whole
35532    # argument.
35533    path="$complete"
35534    arguments="EOL"
35535    new_path=`$CYGPATH -u "$path"`
35536    new_path=`$WHICH "$new_path" 2> /dev/null`
35537    # bat and cmd files are not always considered executable in cygwin causing which
35538    # to not find them
35539    if test "x$new_path" = x \
35540        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35541        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35542      new_path=`$CYGPATH -u "$path"`
35543    fi
35544    if test "x$new_path" = x; then
35545      # It's still not found. Now this is an unrecoverable error.
35546      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35547$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35548      has_space=`$ECHO "$complete" | $GREP " "`
35549      if test "x$has_space" != x; then
35550        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35551$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35552      fi
35553      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35554    fi
35555  fi
35556
35557  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35558  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35559  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35560  # "foo.exe" is OK but "foo" is an error.
35561  #
35562  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35563  # It is also a way to make sure we got the proper file name for the real test later on.
35564  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35565  if test "x$test_shortpath" = x; then
35566    # Short path failed, file does not exist as specified.
35567    # Try adding .exe or .cmd
35568    if test -f "${new_path}.exe"; then
35569      input_to_shortpath="${new_path}.exe"
35570    elif test -f "${new_path}.cmd"; then
35571      input_to_shortpath="${new_path}.cmd"
35572    else
35573      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
35574$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
35575      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35576$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35577      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35578    fi
35579  else
35580    input_to_shortpath="$new_path"
35581  fi
35582
35583  # Call helper function which possibly converts this using DOS-style short mode.
35584  # If so, the updated path is stored in $new_path.
35585  new_path="$input_to_shortpath"
35586
35587  input_path="$input_to_shortpath"
35588  # Check if we need to convert this using DOS-style short mode. If the path
35589  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35590  # take no chances and rewrite it.
35591  # Note: m4 eats our [], so we need to use [ and ] instead.
35592  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35593  if test "x$has_forbidden_chars" != x; then
35594    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35595    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35596    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35597    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35598      # Going to short mode and back again did indeed matter. Since short mode is
35599      # case insensitive, let's make it lowercase to improve readability.
35600      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35601      # Now convert it back to Unix-style (cygpath)
35602      input_path=`$CYGPATH -u "$shortmode_path"`
35603      new_path="$input_path"
35604    fi
35605  fi
35606
35607  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35608  if test "x$test_cygdrive_prefix" = x; then
35609    # As a simple fix, exclude /usr/bin since it's not a real path.
35610    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35611      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35612      # a path prefixed by /cygdrive for fixpath to work.
35613      new_path="$CYGWIN_ROOT_PATH$input_path"
35614    fi
35615  fi
35616
35617  # remove trailing .exe if any
35618  new_path="${new_path/%.exe/}"
35619
35620    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35621
35622  # First separate the path from the arguments. This will split at the first
35623  # space.
35624  complete="$CXX"
35625  path="${complete%% *}"
35626  tmp="$complete EOL"
35627  arguments="${tmp#* }"
35628
35629  # Input might be given as Windows format, start by converting to
35630  # unix format.
35631  new_path="$path"
35632
35633  windows_path="$new_path"
35634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35635    unix_path=`$CYGPATH -u "$windows_path"`
35636    new_path="$unix_path"
35637  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35638    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35639    new_path="$unix_path"
35640  fi
35641
35642
35643  # Now try to locate executable using which
35644  new_path=`$WHICH "$new_path" 2> /dev/null`
35645
35646  if test "x$new_path" = x; then
35647    # Oops. Which didn't find the executable.
35648    # The splitting of arguments from the executable at a space might have been incorrect,
35649    # since paths with space are more likely in Windows. Give it another try with the whole
35650    # argument.
35651    path="$complete"
35652    arguments="EOL"
35653    new_path="$path"
35654
35655  windows_path="$new_path"
35656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35657    unix_path=`$CYGPATH -u "$windows_path"`
35658    new_path="$unix_path"
35659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35660    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35661    new_path="$unix_path"
35662  fi
35663
35664
35665    new_path=`$WHICH "$new_path" 2> /dev/null`
35666    # bat and cmd files are not always considered executable in MSYS causing which
35667    # to not find them
35668    if test "x$new_path" = x \
35669        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35670        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35671      new_path="$path"
35672
35673  windows_path="$new_path"
35674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35675    unix_path=`$CYGPATH -u "$windows_path"`
35676    new_path="$unix_path"
35677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35679    new_path="$unix_path"
35680  fi
35681
35682    fi
35683
35684    if test "x$new_path" = x; then
35685      # It's still not found. Now this is an unrecoverable error.
35686      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35687$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35688      has_space=`$ECHO "$complete" | $GREP " "`
35689      if test "x$has_space" != x; then
35690        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35691$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35692      fi
35693      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35694    fi
35695  fi
35696
35697  # Now new_path has a complete unix path to the binary
35698  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35699    # Keep paths in /bin as-is, but remove trailing .exe if any
35700    new_path="${new_path/%.exe/}"
35701    # Do not save /bin paths to all_fixpath_prefixes!
35702  else
35703    # Not in mixed or Windows style, start by that.
35704    new_path=`cmd //c echo $new_path`
35705
35706  input_path="$new_path"
35707  # Check if we need to convert this using DOS-style short mode. If the path
35708  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35709  # take no chances and rewrite it.
35710  # Note: m4 eats our [], so we need to use [ and ] instead.
35711  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35712  if test "x$has_forbidden_chars" != x; then
35713    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35714    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35715  fi
35716
35717    # Output is in $new_path
35718
35719  windows_path="$new_path"
35720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35721    unix_path=`$CYGPATH -u "$windows_path"`
35722    new_path="$unix_path"
35723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35724    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35725    new_path="$unix_path"
35726  fi
35727
35728    # remove trailing .exe if any
35729    new_path="${new_path/%.exe/}"
35730
35731    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35732    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35733  fi
35734
35735    else
35736      # We're on a unix platform. Hooray! :)
35737      # First separate the path from the arguments. This will split at the first
35738      # space.
35739      complete="$CXX"
35740      path="${complete%% *}"
35741      tmp="$complete EOL"
35742      arguments="${tmp#* }"
35743
35744      # Cannot rely on the command "which" here since it doesn't always work.
35745      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35746      if test -z "$is_absolute_path"; then
35747        # Path to executable is not absolute. Find it.
35748        IFS_save="$IFS"
35749        IFS=:
35750        for p in $PATH; do
35751          if test -f "$p/$path" && test -x "$p/$path"; then
35752            new_path="$p/$path"
35753            break
35754          fi
35755        done
35756        IFS="$IFS_save"
35757      else
35758        # This is an absolute path, we can use it without further modifications.
35759        new_path="$path"
35760      fi
35761
35762      if test "x$new_path" = x; then
35763        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35764$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35765        has_space=`$ECHO "$complete" | $GREP " "`
35766        if test "x$has_space" != x; then
35767          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35768$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35769        fi
35770        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35771      fi
35772    fi
35773
35774    # Now join together the path and the arguments once again
35775    if test "x$arguments" != xEOL; then
35776      new_complete="$new_path ${arguments% *}"
35777    else
35778      new_complete="$new_path"
35779    fi
35780
35781    if test "x$complete" != "x$new_complete"; then
35782      CXX="$new_complete"
35783      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
35784$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
35785    fi
35786  fi
35787
35788  TEST_COMPILER="$CXX"
35789
35790  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
35791$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
35792  SYMLINK_ORIGINAL="$TEST_COMPILER"
35793
35794  if test "x$OPENJDK_BUILD_OS" != xwindows; then
35795    # Follow a chain of symbolic links. Use readlink
35796    # where it exists, else fall back to horribly
35797    # complicated shell code.
35798    if test "x$READLINK_TESTED" != yes; then
35799      # On MacOSX there is a readlink tool with a different
35800      # purpose than the GNU readlink tool. Check the found readlink.
35801      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
35802      if test "x$ISGNU" = x; then
35803        # A readlink that we do not know how to use.
35804        # Are there other non-GNU readlinks out there?
35805        READLINK_TESTED=yes
35806        READLINK=
35807      fi
35808    fi
35809
35810    if test "x$READLINK" != x; then
35811      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
35812    else
35813      # Save the current directory for restoring afterwards
35814      STARTDIR=$PWD
35815      COUNTER=0
35816      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
35817      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
35818      cd $sym_link_dir
35819      # Use -P flag to resolve symlinks in directories.
35820      cd `$THEPWDCMD -P`
35821      sym_link_dir=`$THEPWDCMD -P`
35822      # Resolve file symlinks
35823      while test $COUNTER -lt 20; do
35824        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
35825        if test "x$ISLINK" == x; then
35826          # This is not a symbolic link! We are done!
35827          break
35828        fi
35829        # Again resolve directory symlinks since the target of the just found
35830        # link could be in a different directory
35831        cd `$DIRNAME $ISLINK`
35832        sym_link_dir=`$THEPWDCMD -P`
35833        sym_link_file=`$BASENAME $ISLINK`
35834        let COUNTER=COUNTER+1
35835      done
35836      cd $STARTDIR
35837      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
35838    fi
35839  fi
35840
35841  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
35842    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
35843$as_echo "no symlink" >&6; }
35844  else
35845    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
35846$as_echo "$SYMLINK_ORIGINAL" >&6; }
35847
35848    # We can't handle ccache by gcc wrappers, since we need to know if we're
35849    # using ccache. Instead ccache usage must be controlled by a configure option.
35850    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
35851    if test "x$COMPILER_BASENAME" = "xccache"; then
35852      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
35853$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
35854      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
35855    fi
35856  fi
35857
35858
35859  COMPILER=$CXX
35860  COMPILER_NAME=$COMPILER_NAME
35861
35862  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
35863    # cc -V output typically looks like
35864    #     cc: Sun C 5.12 Linux_i386 2011/11/16
35865    # or
35866    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
35867    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
35868    # Check that this is likely to be the Solaris Studio cc.
35869    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
35870    if test $? -ne 0; then
35871      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35872      { $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
35873$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35874      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35875$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35876      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35877$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35878      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35879    fi
35880    # Remove usage instructions (if present), and
35881    # collapse compiler output into a single line
35882    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35883        $SED -e 's/ *[Uu]sage:.*//'`
35884    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35885        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
35886  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
35887    # xlc -qversion output typically looks like
35888    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
35889    #     Version: 11.01.0000.0015
35890    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
35891    # Check that this is likely to be the IBM XL C compiler.
35892    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
35893    if test $? -ne 0; then
35894      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35895      { $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
35896$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35897      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35898$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35899      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35900$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35901      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35902    fi
35903    # Collapse compiler output into a single line
35904    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35905    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35906        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
35907  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35908    # There is no specific version flag, but all output starts with a version string.
35909    # First line typically looks something like:
35910    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
35911    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
35912    # Check that this is likely to be Microsoft CL.EXE.
35913    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
35914    if test $? -ne 0; then
35915      { $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
35916$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35917      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35918$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35919      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35920    fi
35921    # Collapse compiler output into a single line
35922    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35923    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35924        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
35925  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
35926    # gcc --version output typically looks like
35927    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
35928    #     Copyright (C) 2013 Free Software Foundation, Inc.
35929    #     This is free software; see the source for copying conditions.  There is NO
35930    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
35931    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35932    # Check that this is likely to be GCC.
35933    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
35934    if test $? -ne 0; then
35935      { $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
35936$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35937      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
35938$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
35939      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35940    fi
35941    # Remove Copyright and legalese from version string, and
35942    # collapse into a single line
35943    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35944        $SED -e 's/ *Copyright .*//'`
35945    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35946        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
35947  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
35948    # clang --version output typically looks like
35949    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
35950    #    clang version 3.3 (tags/RELEASE_33/final)
35951    # or
35952    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
35953    #    Target: x86_64-pc-linux-gnu
35954    #    Thread model: posix
35955    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35956    # Check that this is likely to be clang
35957    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
35958    if test $? -ne 0; then
35959      { $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
35960$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35961      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35962$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35963      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35964    fi
35965    # Collapse compiler output into a single line
35966    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35967    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35968        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
35969  else
35970      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
35971  fi
35972  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
35973  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
35974  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
35975  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
35976
35977  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
35978$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
35979
35980
35981  # Now that we have resolved CXX ourself, let autoconf have its go at it
35982  ac_ext=cpp
35983ac_cpp='$CXXCPP $CPPFLAGS'
35984ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35985ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35986ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35987if test -z "$CXX"; then
35988  if test -n "$CCC"; then
35989    CXX=$CCC
35990  else
35991    if test -n "$ac_tool_prefix"; then
35992  for ac_prog in $CXX
35993  do
35994    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35995set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35997$as_echo_n "checking for $ac_word... " >&6; }
35998if ${ac_cv_prog_CXX+:} false; then :
35999  $as_echo_n "(cached) " >&6
36000else
36001  if test -n "$CXX"; then
36002  ac_cv_prog_CXX="$CXX" # Let the user override the test.
36003else
36004as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36005for as_dir in $PATH
36006do
36007  IFS=$as_save_IFS
36008  test -z "$as_dir" && as_dir=.
36009    for ac_exec_ext in '' $ac_executable_extensions; do
36010  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36011    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
36012    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36013    break 2
36014  fi
36015done
36016  done
36017IFS=$as_save_IFS
36018
36019fi
36020fi
36021CXX=$ac_cv_prog_CXX
36022if test -n "$CXX"; then
36023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
36024$as_echo "$CXX" >&6; }
36025else
36026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36027$as_echo "no" >&6; }
36028fi
36029
36030
36031    test -n "$CXX" && break
36032  done
36033fi
36034if test -z "$CXX"; then
36035  ac_ct_CXX=$CXX
36036  for ac_prog in $CXX
36037do
36038  # Extract the first word of "$ac_prog", so it can be a program name with args.
36039set dummy $ac_prog; ac_word=$2
36040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36041$as_echo_n "checking for $ac_word... " >&6; }
36042if ${ac_cv_prog_ac_ct_CXX+:} false; then :
36043  $as_echo_n "(cached) " >&6
36044else
36045  if test -n "$ac_ct_CXX"; then
36046  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
36047else
36048as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36049for as_dir in $PATH
36050do
36051  IFS=$as_save_IFS
36052  test -z "$as_dir" && as_dir=.
36053    for ac_exec_ext in '' $ac_executable_extensions; do
36054  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36055    ac_cv_prog_ac_ct_CXX="$ac_prog"
36056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36057    break 2
36058  fi
36059done
36060  done
36061IFS=$as_save_IFS
36062
36063fi
36064fi
36065ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
36066if test -n "$ac_ct_CXX"; then
36067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
36068$as_echo "$ac_ct_CXX" >&6; }
36069else
36070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36071$as_echo "no" >&6; }
36072fi
36073
36074
36075  test -n "$ac_ct_CXX" && break
36076done
36077
36078  if test "x$ac_ct_CXX" = x; then
36079    CXX="g++"
36080  else
36081    case $cross_compiling:$ac_tool_warned in
36082yes:)
36083{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36084$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36085ac_tool_warned=yes ;;
36086esac
36087    CXX=$ac_ct_CXX
36088  fi
36089fi
36090
36091  fi
36092fi
36093# Provide some information about the compiler.
36094$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
36095set X $ac_compile
36096ac_compiler=$2
36097for ac_option in --version -v -V -qversion; do
36098  { { ac_try="$ac_compiler $ac_option >&5"
36099case "(($ac_try" in
36100  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
36101  *) ac_try_echo=$ac_try;;
36102esac
36103eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
36104$as_echo "$ac_try_echo"; } >&5
36105  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
36106  ac_status=$?
36107  if test -s conftest.err; then
36108    sed '10a\
36109... rest of stderr output deleted ...
36110         10q' conftest.err >conftest.er1
36111    cat conftest.er1 >&5
36112  fi
36113  rm -f conftest.er1 conftest.err
36114  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36115  test $ac_status = 0; }
36116done
36117
36118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
36119$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
36120if ${ac_cv_cxx_compiler_gnu+:} false; then :
36121  $as_echo_n "(cached) " >&6
36122else
36123  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36124/* end confdefs.h.  */
36125
36126int
36127main ()
36128{
36129#ifndef __GNUC__
36130       choke me
36131#endif
36132
36133  ;
36134  return 0;
36135}
36136_ACEOF
36137if ac_fn_cxx_try_compile "$LINENO"; then :
36138  ac_compiler_gnu=yes
36139else
36140  ac_compiler_gnu=no
36141fi
36142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36143ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
36144
36145fi
36146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
36147$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
36148if test $ac_compiler_gnu = yes; then
36149  GXX=yes
36150else
36151  GXX=
36152fi
36153ac_test_CXXFLAGS=${CXXFLAGS+set}
36154ac_save_CXXFLAGS=$CXXFLAGS
36155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
36156$as_echo_n "checking whether $CXX accepts -g... " >&6; }
36157if ${ac_cv_prog_cxx_g+:} false; then :
36158  $as_echo_n "(cached) " >&6
36159else
36160  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
36161   ac_cxx_werror_flag=yes
36162   ac_cv_prog_cxx_g=no
36163   CXXFLAGS="-g"
36164   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36165/* end confdefs.h.  */
36166
36167int
36168main ()
36169{
36170
36171  ;
36172  return 0;
36173}
36174_ACEOF
36175if ac_fn_cxx_try_compile "$LINENO"; then :
36176  ac_cv_prog_cxx_g=yes
36177else
36178  CXXFLAGS=""
36179      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36180/* end confdefs.h.  */
36181
36182int
36183main ()
36184{
36185
36186  ;
36187  return 0;
36188}
36189_ACEOF
36190if ac_fn_cxx_try_compile "$LINENO"; then :
36191
36192else
36193  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
36194	 CXXFLAGS="-g"
36195	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36196/* end confdefs.h.  */
36197
36198int
36199main ()
36200{
36201
36202  ;
36203  return 0;
36204}
36205_ACEOF
36206if ac_fn_cxx_try_compile "$LINENO"; then :
36207  ac_cv_prog_cxx_g=yes
36208fi
36209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36210fi
36211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36212fi
36213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36214   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
36215fi
36216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
36217$as_echo "$ac_cv_prog_cxx_g" >&6; }
36218if test "$ac_test_CXXFLAGS" = set; then
36219  CXXFLAGS=$ac_save_CXXFLAGS
36220elif test $ac_cv_prog_cxx_g = yes; then
36221  if test "$GXX" = yes; then
36222    CXXFLAGS="-g -O2"
36223  else
36224    CXXFLAGS="-g"
36225  fi
36226else
36227  if test "$GXX" = yes; then
36228    CXXFLAGS="-O2"
36229  else
36230    CXXFLAGS=
36231  fi
36232fi
36233ac_ext=cpp
36234ac_cpp='$CXXCPP $CPPFLAGS'
36235ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36236ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36237ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36238
36239
36240  # This is the compiler version number on the form X.Y[.Z]
36241
36242
36243
36244
36245  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
36246    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
36247$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
36248    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
36249$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
36250  fi
36251
36252  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
36253  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
36254    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
36255$as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
36256  fi
36257
36258  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
36259    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
36260$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
36261  fi
36262
36263  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
36264
36265
36266  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
36267
36268
36269
36270
36271
36272
36273
36274
36275
36276
36277
36278
36279
36280
36281
36282
36283
36284
36285
36286
36287
36288
36289
36290
36291
36292
36293
36294
36295
36296
36297
36298
36299
36300
36301
36302
36303
36304
36305
36306
36307
36308
36309
36310
36311
36312
36313
36314
36315
36316    # Execute function body
36317
36318  # Need to assign to a variable since m4 is blocked from modifying parts in [].
36319  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
36320
36321  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
36322    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
36323  fi
36324
36325  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
36326    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
36327  fi
36328
36329  # Version comparison method inspired by http://stackoverflow.com/a/24067243
36330  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
36331
36332  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
36333    :
36334
36335  else
36336    :
36337
36338          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&5
36339$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
36340
36341
36342  fi
36343
36344
36345
36346
36347
36348
36349
36350
36351
36352
36353
36354
36355
36356
36357  fi
36358
36359  #
36360  # Setup the preprocessor (CPP and CXXCPP)
36361  #
36362  ac_ext=c
36363ac_cpp='$CPP $CPPFLAGS'
36364ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36365ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36366ac_compiler_gnu=$ac_cv_c_compiler_gnu
36367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
36368$as_echo_n "checking how to run the C preprocessor... " >&6; }
36369# On Suns, sometimes $CPP names a directory.
36370if test -n "$CPP" && test -d "$CPP"; then
36371  CPP=
36372fi
36373if test -z "$CPP"; then
36374  if ${ac_cv_prog_CPP+:} false; then :
36375  $as_echo_n "(cached) " >&6
36376else
36377      # Double quotes because CPP needs to be expanded
36378    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
36379    do
36380      ac_preproc_ok=false
36381for ac_c_preproc_warn_flag in '' yes
36382do
36383  # Use a header file that comes with gcc, so configuring glibc
36384  # with a fresh cross-compiler works.
36385  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36386  # <limits.h> exists even on freestanding compilers.
36387  # On the NeXT, cc -E runs the code through the compiler's parser,
36388  # not just through cpp. "Syntax error" is here to catch this case.
36389  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36390/* end confdefs.h.  */
36391#ifdef __STDC__
36392# include <limits.h>
36393#else
36394# include <assert.h>
36395#endif
36396		     Syntax error
36397_ACEOF
36398if ac_fn_c_try_cpp "$LINENO"; then :
36399
36400else
36401  # Broken: fails on valid input.
36402continue
36403fi
36404rm -f conftest.err conftest.i conftest.$ac_ext
36405
36406  # OK, works on sane cases.  Now check whether nonexistent headers
36407  # can be detected and how.
36408  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36409/* end confdefs.h.  */
36410#include <ac_nonexistent.h>
36411_ACEOF
36412if ac_fn_c_try_cpp "$LINENO"; then :
36413  # Broken: success on invalid input.
36414continue
36415else
36416  # Passes both tests.
36417ac_preproc_ok=:
36418break
36419fi
36420rm -f conftest.err conftest.i conftest.$ac_ext
36421
36422done
36423# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36424rm -f conftest.i conftest.err conftest.$ac_ext
36425if $ac_preproc_ok; then :
36426  break
36427fi
36428
36429    done
36430    ac_cv_prog_CPP=$CPP
36431
36432fi
36433  CPP=$ac_cv_prog_CPP
36434else
36435  ac_cv_prog_CPP=$CPP
36436fi
36437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
36438$as_echo "$CPP" >&6; }
36439ac_preproc_ok=false
36440for ac_c_preproc_warn_flag in '' yes
36441do
36442  # Use a header file that comes with gcc, so configuring glibc
36443  # with a fresh cross-compiler works.
36444  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36445  # <limits.h> exists even on freestanding compilers.
36446  # On the NeXT, cc -E runs the code through the compiler's parser,
36447  # not just through cpp. "Syntax error" is here to catch this case.
36448  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36449/* end confdefs.h.  */
36450#ifdef __STDC__
36451# include <limits.h>
36452#else
36453# include <assert.h>
36454#endif
36455		     Syntax error
36456_ACEOF
36457if ac_fn_c_try_cpp "$LINENO"; then :
36458
36459else
36460  # Broken: fails on valid input.
36461continue
36462fi
36463rm -f conftest.err conftest.i conftest.$ac_ext
36464
36465  # OK, works on sane cases.  Now check whether nonexistent headers
36466  # can be detected and how.
36467  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36468/* end confdefs.h.  */
36469#include <ac_nonexistent.h>
36470_ACEOF
36471if ac_fn_c_try_cpp "$LINENO"; then :
36472  # Broken: success on invalid input.
36473continue
36474else
36475  # Passes both tests.
36476ac_preproc_ok=:
36477break
36478fi
36479rm -f conftest.err conftest.i conftest.$ac_ext
36480
36481done
36482# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36483rm -f conftest.i conftest.err conftest.$ac_ext
36484if $ac_preproc_ok; then :
36485
36486else
36487  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36488$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36489as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
36490See \`config.log' for more details" "$LINENO" 5; }
36491fi
36492
36493ac_ext=cpp
36494ac_cpp='$CXXCPP $CPPFLAGS'
36495ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36496ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36497ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36498
36499
36500  # Only process if variable expands to non-empty
36501
36502  if test "x$CPP" != x; then
36503    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36504
36505  # First separate the path from the arguments. This will split at the first
36506  # space.
36507  complete="$CPP"
36508  path="${complete%% *}"
36509  tmp="$complete EOL"
36510  arguments="${tmp#* }"
36511
36512  # Input might be given as Windows format, start by converting to
36513  # unix format.
36514  new_path=`$CYGPATH -u "$path"`
36515
36516  # Now try to locate executable using which
36517  new_path=`$WHICH "$new_path" 2> /dev/null`
36518  # bat and cmd files are not always considered executable in cygwin causing which
36519  # to not find them
36520  if test "x$new_path" = x \
36521      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36522      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36523    new_path=`$CYGPATH -u "$path"`
36524  fi
36525  if test "x$new_path" = x; then
36526    # Oops. Which didn't find the executable.
36527    # The splitting of arguments from the executable at a space might have been incorrect,
36528    # since paths with space are more likely in Windows. Give it another try with the whole
36529    # argument.
36530    path="$complete"
36531    arguments="EOL"
36532    new_path=`$CYGPATH -u "$path"`
36533    new_path=`$WHICH "$new_path" 2> /dev/null`
36534    # bat and cmd files are not always considered executable in cygwin causing which
36535    # to not find them
36536    if test "x$new_path" = x \
36537        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36538        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36539      new_path=`$CYGPATH -u "$path"`
36540    fi
36541    if test "x$new_path" = x; then
36542      # It's still not found. Now this is an unrecoverable error.
36543      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36544$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36545      has_space=`$ECHO "$complete" | $GREP " "`
36546      if test "x$has_space" != x; then
36547        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36548$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36549      fi
36550      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36551    fi
36552  fi
36553
36554  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36555  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36556  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36557  # "foo.exe" is OK but "foo" is an error.
36558  #
36559  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36560  # It is also a way to make sure we got the proper file name for the real test later on.
36561  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36562  if test "x$test_shortpath" = x; then
36563    # Short path failed, file does not exist as specified.
36564    # Try adding .exe or .cmd
36565    if test -f "${new_path}.exe"; then
36566      input_to_shortpath="${new_path}.exe"
36567    elif test -f "${new_path}.cmd"; then
36568      input_to_shortpath="${new_path}.cmd"
36569    else
36570      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
36571$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
36572      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36573$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36574      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36575    fi
36576  else
36577    input_to_shortpath="$new_path"
36578  fi
36579
36580  # Call helper function which possibly converts this using DOS-style short mode.
36581  # If so, the updated path is stored in $new_path.
36582  new_path="$input_to_shortpath"
36583
36584  input_path="$input_to_shortpath"
36585  # Check if we need to convert this using DOS-style short mode. If the path
36586  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36587  # take no chances and rewrite it.
36588  # Note: m4 eats our [], so we need to use [ and ] instead.
36589  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36590  if test "x$has_forbidden_chars" != x; then
36591    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36592    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36593    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36594    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36595      # Going to short mode and back again did indeed matter. Since short mode is
36596      # case insensitive, let's make it lowercase to improve readability.
36597      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36598      # Now convert it back to Unix-style (cygpath)
36599      input_path=`$CYGPATH -u "$shortmode_path"`
36600      new_path="$input_path"
36601    fi
36602  fi
36603
36604  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36605  if test "x$test_cygdrive_prefix" = x; then
36606    # As a simple fix, exclude /usr/bin since it's not a real path.
36607    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36608      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36609      # a path prefixed by /cygdrive for fixpath to work.
36610      new_path="$CYGWIN_ROOT_PATH$input_path"
36611    fi
36612  fi
36613
36614  # remove trailing .exe if any
36615  new_path="${new_path/%.exe/}"
36616
36617    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36618
36619  # First separate the path from the arguments. This will split at the first
36620  # space.
36621  complete="$CPP"
36622  path="${complete%% *}"
36623  tmp="$complete EOL"
36624  arguments="${tmp#* }"
36625
36626  # Input might be given as Windows format, start by converting to
36627  # unix format.
36628  new_path="$path"
36629
36630  windows_path="$new_path"
36631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36632    unix_path=`$CYGPATH -u "$windows_path"`
36633    new_path="$unix_path"
36634  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36635    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36636    new_path="$unix_path"
36637  fi
36638
36639
36640  # Now try to locate executable using which
36641  new_path=`$WHICH "$new_path" 2> /dev/null`
36642
36643  if test "x$new_path" = x; then
36644    # Oops. Which didn't find the executable.
36645    # The splitting of arguments from the executable at a space might have been incorrect,
36646    # since paths with space are more likely in Windows. Give it another try with the whole
36647    # argument.
36648    path="$complete"
36649    arguments="EOL"
36650    new_path="$path"
36651
36652  windows_path="$new_path"
36653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36654    unix_path=`$CYGPATH -u "$windows_path"`
36655    new_path="$unix_path"
36656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36658    new_path="$unix_path"
36659  fi
36660
36661
36662    new_path=`$WHICH "$new_path" 2> /dev/null`
36663    # bat and cmd files are not always considered executable in MSYS causing which
36664    # to not find them
36665    if test "x$new_path" = x \
36666        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36667        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36668      new_path="$path"
36669
36670  windows_path="$new_path"
36671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36672    unix_path=`$CYGPATH -u "$windows_path"`
36673    new_path="$unix_path"
36674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36675    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36676    new_path="$unix_path"
36677  fi
36678
36679    fi
36680
36681    if test "x$new_path" = x; then
36682      # It's still not found. Now this is an unrecoverable error.
36683      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36684$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36685      has_space=`$ECHO "$complete" | $GREP " "`
36686      if test "x$has_space" != x; then
36687        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36688$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36689      fi
36690      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36691    fi
36692  fi
36693
36694  # Now new_path has a complete unix path to the binary
36695  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36696    # Keep paths in /bin as-is, but remove trailing .exe if any
36697    new_path="${new_path/%.exe/}"
36698    # Do not save /bin paths to all_fixpath_prefixes!
36699  else
36700    # Not in mixed or Windows style, start by that.
36701    new_path=`cmd //c echo $new_path`
36702
36703  input_path="$new_path"
36704  # Check if we need to convert this using DOS-style short mode. If the path
36705  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36706  # take no chances and rewrite it.
36707  # Note: m4 eats our [], so we need to use [ and ] instead.
36708  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36709  if test "x$has_forbidden_chars" != x; then
36710    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36711    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36712  fi
36713
36714    # Output is in $new_path
36715
36716  windows_path="$new_path"
36717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36718    unix_path=`$CYGPATH -u "$windows_path"`
36719    new_path="$unix_path"
36720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36721    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36722    new_path="$unix_path"
36723  fi
36724
36725    # remove trailing .exe if any
36726    new_path="${new_path/%.exe/}"
36727
36728    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36729    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36730  fi
36731
36732    else
36733      # We're on a unix platform. Hooray! :)
36734      # First separate the path from the arguments. This will split at the first
36735      # space.
36736      complete="$CPP"
36737      path="${complete%% *}"
36738      tmp="$complete EOL"
36739      arguments="${tmp#* }"
36740
36741      # Cannot rely on the command "which" here since it doesn't always work.
36742      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36743      if test -z "$is_absolute_path"; then
36744        # Path to executable is not absolute. Find it.
36745        IFS_save="$IFS"
36746        IFS=:
36747        for p in $PATH; do
36748          if test -f "$p/$path" && test -x "$p/$path"; then
36749            new_path="$p/$path"
36750            break
36751          fi
36752        done
36753        IFS="$IFS_save"
36754      else
36755        # This is an absolute path, we can use it without further modifications.
36756        new_path="$path"
36757      fi
36758
36759      if test "x$new_path" = x; then
36760        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36761$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36762        has_space=`$ECHO "$complete" | $GREP " "`
36763        if test "x$has_space" != x; then
36764          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36765$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36766        fi
36767        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36768      fi
36769    fi
36770
36771    # Now join together the path and the arguments once again
36772    if test "x$arguments" != xEOL; then
36773      new_complete="$new_path ${arguments% *}"
36774    else
36775      new_complete="$new_path"
36776    fi
36777
36778    if test "x$complete" != "x$new_complete"; then
36779      CPP="$new_complete"
36780      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
36781$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
36782    fi
36783  fi
36784
36785  ac_ext=cpp
36786ac_cpp='$CXXCPP $CPPFLAGS'
36787ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36788ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36789ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
36791$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
36792if test -z "$CXXCPP"; then
36793  if ${ac_cv_prog_CXXCPP+:} false; then :
36794  $as_echo_n "(cached) " >&6
36795else
36796      # Double quotes because CXXCPP needs to be expanded
36797    for CXXCPP in "$CXX -E" "/lib/cpp"
36798    do
36799      ac_preproc_ok=false
36800for ac_cxx_preproc_warn_flag in '' yes
36801do
36802  # Use a header file that comes with gcc, so configuring glibc
36803  # with a fresh cross-compiler works.
36804  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36805  # <limits.h> exists even on freestanding compilers.
36806  # On the NeXT, cc -E runs the code through the compiler's parser,
36807  # not just through cpp. "Syntax error" is here to catch this case.
36808  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36809/* end confdefs.h.  */
36810#ifdef __STDC__
36811# include <limits.h>
36812#else
36813# include <assert.h>
36814#endif
36815		     Syntax error
36816_ACEOF
36817if ac_fn_cxx_try_cpp "$LINENO"; then :
36818
36819else
36820  # Broken: fails on valid input.
36821continue
36822fi
36823rm -f conftest.err conftest.i conftest.$ac_ext
36824
36825  # OK, works on sane cases.  Now check whether nonexistent headers
36826  # can be detected and how.
36827  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36828/* end confdefs.h.  */
36829#include <ac_nonexistent.h>
36830_ACEOF
36831if ac_fn_cxx_try_cpp "$LINENO"; then :
36832  # Broken: success on invalid input.
36833continue
36834else
36835  # Passes both tests.
36836ac_preproc_ok=:
36837break
36838fi
36839rm -f conftest.err conftest.i conftest.$ac_ext
36840
36841done
36842# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36843rm -f conftest.i conftest.err conftest.$ac_ext
36844if $ac_preproc_ok; then :
36845  break
36846fi
36847
36848    done
36849    ac_cv_prog_CXXCPP=$CXXCPP
36850
36851fi
36852  CXXCPP=$ac_cv_prog_CXXCPP
36853else
36854  ac_cv_prog_CXXCPP=$CXXCPP
36855fi
36856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
36857$as_echo "$CXXCPP" >&6; }
36858ac_preproc_ok=false
36859for ac_cxx_preproc_warn_flag in '' yes
36860do
36861  # Use a header file that comes with gcc, so configuring glibc
36862  # with a fresh cross-compiler works.
36863  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36864  # <limits.h> exists even on freestanding compilers.
36865  # On the NeXT, cc -E runs the code through the compiler's parser,
36866  # not just through cpp. "Syntax error" is here to catch this case.
36867  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36868/* end confdefs.h.  */
36869#ifdef __STDC__
36870# include <limits.h>
36871#else
36872# include <assert.h>
36873#endif
36874		     Syntax error
36875_ACEOF
36876if ac_fn_cxx_try_cpp "$LINENO"; then :
36877
36878else
36879  # Broken: fails on valid input.
36880continue
36881fi
36882rm -f conftest.err conftest.i conftest.$ac_ext
36883
36884  # OK, works on sane cases.  Now check whether nonexistent headers
36885  # can be detected and how.
36886  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36887/* end confdefs.h.  */
36888#include <ac_nonexistent.h>
36889_ACEOF
36890if ac_fn_cxx_try_cpp "$LINENO"; then :
36891  # Broken: success on invalid input.
36892continue
36893else
36894  # Passes both tests.
36895ac_preproc_ok=:
36896break
36897fi
36898rm -f conftest.err conftest.i conftest.$ac_ext
36899
36900done
36901# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36902rm -f conftest.i conftest.err conftest.$ac_ext
36903if $ac_preproc_ok; then :
36904
36905else
36906  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36907$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36908as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
36909See \`config.log' for more details" "$LINENO" 5; }
36910fi
36911
36912ac_ext=cpp
36913ac_cpp='$CXXCPP $CPPFLAGS'
36914ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36915ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36916ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36917
36918
36919  # Only process if variable expands to non-empty
36920
36921  if test "x$CXXCPP" != x; then
36922    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36923
36924  # First separate the path from the arguments. This will split at the first
36925  # space.
36926  complete="$CXXCPP"
36927  path="${complete%% *}"
36928  tmp="$complete EOL"
36929  arguments="${tmp#* }"
36930
36931  # Input might be given as Windows format, start by converting to
36932  # unix format.
36933  new_path=`$CYGPATH -u "$path"`
36934
36935  # Now try to locate executable using which
36936  new_path=`$WHICH "$new_path" 2> /dev/null`
36937  # bat and cmd files are not always considered executable in cygwin causing which
36938  # to not find them
36939  if test "x$new_path" = x \
36940      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36941      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36942    new_path=`$CYGPATH -u "$path"`
36943  fi
36944  if test "x$new_path" = x; then
36945    # Oops. Which didn't find the executable.
36946    # The splitting of arguments from the executable at a space might have been incorrect,
36947    # since paths with space are more likely in Windows. Give it another try with the whole
36948    # argument.
36949    path="$complete"
36950    arguments="EOL"
36951    new_path=`$CYGPATH -u "$path"`
36952    new_path=`$WHICH "$new_path" 2> /dev/null`
36953    # bat and cmd files are not always considered executable in cygwin causing which
36954    # to not find them
36955    if test "x$new_path" = x \
36956        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36957        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36958      new_path=`$CYGPATH -u "$path"`
36959    fi
36960    if test "x$new_path" = x; then
36961      # It's still not found. Now this is an unrecoverable error.
36962      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36963$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36964      has_space=`$ECHO "$complete" | $GREP " "`
36965      if test "x$has_space" != x; then
36966        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36967$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36968      fi
36969      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36970    fi
36971  fi
36972
36973  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36974  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36975  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36976  # "foo.exe" is OK but "foo" is an error.
36977  #
36978  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36979  # It is also a way to make sure we got the proper file name for the real test later on.
36980  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36981  if test "x$test_shortpath" = x; then
36982    # Short path failed, file does not exist as specified.
36983    # Try adding .exe or .cmd
36984    if test -f "${new_path}.exe"; then
36985      input_to_shortpath="${new_path}.exe"
36986    elif test -f "${new_path}.cmd"; then
36987      input_to_shortpath="${new_path}.cmd"
36988    else
36989      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36990$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36991      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36992$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36993      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36994    fi
36995  else
36996    input_to_shortpath="$new_path"
36997  fi
36998
36999  # Call helper function which possibly converts this using DOS-style short mode.
37000  # If so, the updated path is stored in $new_path.
37001  new_path="$input_to_shortpath"
37002
37003  input_path="$input_to_shortpath"
37004  # Check if we need to convert this using DOS-style short mode. If the path
37005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37006  # take no chances and rewrite it.
37007  # Note: m4 eats our [], so we need to use [ and ] instead.
37008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37009  if test "x$has_forbidden_chars" != x; then
37010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37011    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37012    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37013    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37014      # Going to short mode and back again did indeed matter. Since short mode is
37015      # case insensitive, let's make it lowercase to improve readability.
37016      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37017      # Now convert it back to Unix-style (cygpath)
37018      input_path=`$CYGPATH -u "$shortmode_path"`
37019      new_path="$input_path"
37020    fi
37021  fi
37022
37023  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37024  if test "x$test_cygdrive_prefix" = x; then
37025    # As a simple fix, exclude /usr/bin since it's not a real path.
37026    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37027      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37028      # a path prefixed by /cygdrive for fixpath to work.
37029      new_path="$CYGWIN_ROOT_PATH$input_path"
37030    fi
37031  fi
37032
37033  # remove trailing .exe if any
37034  new_path="${new_path/%.exe/}"
37035
37036    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37037
37038  # First separate the path from the arguments. This will split at the first
37039  # space.
37040  complete="$CXXCPP"
37041  path="${complete%% *}"
37042  tmp="$complete EOL"
37043  arguments="${tmp#* }"
37044
37045  # Input might be given as Windows format, start by converting to
37046  # unix format.
37047  new_path="$path"
37048
37049  windows_path="$new_path"
37050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37051    unix_path=`$CYGPATH -u "$windows_path"`
37052    new_path="$unix_path"
37053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37054    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37055    new_path="$unix_path"
37056  fi
37057
37058
37059  # Now try to locate executable using which
37060  new_path=`$WHICH "$new_path" 2> /dev/null`
37061
37062  if test "x$new_path" = x; then
37063    # Oops. Which didn't find the executable.
37064    # The splitting of arguments from the executable at a space might have been incorrect,
37065    # since paths with space are more likely in Windows. Give it another try with the whole
37066    # argument.
37067    path="$complete"
37068    arguments="EOL"
37069    new_path="$path"
37070
37071  windows_path="$new_path"
37072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37073    unix_path=`$CYGPATH -u "$windows_path"`
37074    new_path="$unix_path"
37075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37076    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37077    new_path="$unix_path"
37078  fi
37079
37080
37081    new_path=`$WHICH "$new_path" 2> /dev/null`
37082    # bat and cmd files are not always considered executable in MSYS causing which
37083    # to not find them
37084    if test "x$new_path" = x \
37085        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37086        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37087      new_path="$path"
37088
37089  windows_path="$new_path"
37090  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37091    unix_path=`$CYGPATH -u "$windows_path"`
37092    new_path="$unix_path"
37093  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37094    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37095    new_path="$unix_path"
37096  fi
37097
37098    fi
37099
37100    if test "x$new_path" = x; then
37101      # It's still not found. Now this is an unrecoverable error.
37102      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
37103$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
37104      has_space=`$ECHO "$complete" | $GREP " "`
37105      if test "x$has_space" != x; then
37106        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37107$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37108      fi
37109      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
37110    fi
37111  fi
37112
37113  # Now new_path has a complete unix path to the binary
37114  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37115    # Keep paths in /bin as-is, but remove trailing .exe if any
37116    new_path="${new_path/%.exe/}"
37117    # Do not save /bin paths to all_fixpath_prefixes!
37118  else
37119    # Not in mixed or Windows style, start by that.
37120    new_path=`cmd //c echo $new_path`
37121
37122  input_path="$new_path"
37123  # Check if we need to convert this using DOS-style short mode. If the path
37124  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37125  # take no chances and rewrite it.
37126  # Note: m4 eats our [], so we need to use [ and ] instead.
37127  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37128  if test "x$has_forbidden_chars" != x; then
37129    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37130    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37131  fi
37132
37133    # Output is in $new_path
37134
37135  windows_path="$new_path"
37136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37137    unix_path=`$CYGPATH -u "$windows_path"`
37138    new_path="$unix_path"
37139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37141    new_path="$unix_path"
37142  fi
37143
37144    # remove trailing .exe if any
37145    new_path="${new_path/%.exe/}"
37146
37147    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37148    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37149  fi
37150
37151    else
37152      # We're on a unix platform. Hooray! :)
37153      # First separate the path from the arguments. This will split at the first
37154      # space.
37155      complete="$CXXCPP"
37156      path="${complete%% *}"
37157      tmp="$complete EOL"
37158      arguments="${tmp#* }"
37159
37160      # Cannot rely on the command "which" here since it doesn't always work.
37161      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37162      if test -z "$is_absolute_path"; then
37163        # Path to executable is not absolute. Find it.
37164        IFS_save="$IFS"
37165        IFS=:
37166        for p in $PATH; do
37167          if test -f "$p/$path" && test -x "$p/$path"; then
37168            new_path="$p/$path"
37169            break
37170          fi
37171        done
37172        IFS="$IFS_save"
37173      else
37174        # This is an absolute path, we can use it without further modifications.
37175        new_path="$path"
37176      fi
37177
37178      if test "x$new_path" = x; then
37179        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
37180$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
37181        has_space=`$ECHO "$complete" | $GREP " "`
37182        if test "x$has_space" != x; then
37183          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37184$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37185        fi
37186        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
37187      fi
37188    fi
37189
37190    # Now join together the path and the arguments once again
37191    if test "x$arguments" != xEOL; then
37192      new_complete="$new_path ${arguments% *}"
37193    else
37194      new_complete="$new_path"
37195    fi
37196
37197    if test "x$complete" != "x$new_complete"; then
37198      CXXCPP="$new_complete"
37199      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
37200$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
37201    fi
37202  fi
37203
37204
37205  #
37206  # Setup the linker (LD)
37207  #
37208  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37209    # In the Microsoft toolchain we have a separate LD command "link".
37210    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
37211    # a cygwin program for something completely different.
37212    # Extract the first word of "link", so it can be a program name with args.
37213set dummy link; ac_word=$2
37214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37215$as_echo_n "checking for $ac_word... " >&6; }
37216if ${ac_cv_prog_LD+:} false; then :
37217  $as_echo_n "(cached) " >&6
37218else
37219  if test -n "$LD"; then
37220  ac_cv_prog_LD="$LD" # Let the user override the test.
37221else
37222  ac_prog_rejected=no
37223as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37224for as_dir in $PATH
37225do
37226  IFS=$as_save_IFS
37227  test -z "$as_dir" && as_dir=.
37228    for ac_exec_ext in '' $ac_executable_extensions; do
37229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37230    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
37231       ac_prog_rejected=yes
37232       continue
37233     fi
37234    ac_cv_prog_LD="link"
37235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37236    break 2
37237  fi
37238done
37239  done
37240IFS=$as_save_IFS
37241
37242if test $ac_prog_rejected = yes; then
37243  # We found a bogon in the path, so make sure we never use it.
37244  set dummy $ac_cv_prog_LD
37245  shift
37246  if test $# != 0; then
37247    # We chose a different compiler from the bogus one.
37248    # However, it has the same basename, so the bogon will be chosen
37249    # first if we set LD to just the basename; use the full file name.
37250    shift
37251    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
37252  fi
37253fi
37254fi
37255fi
37256LD=$ac_cv_prog_LD
37257if test -n "$LD"; then
37258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
37259$as_echo "$LD" >&6; }
37260else
37261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37262$as_echo "no" >&6; }
37263fi
37264
37265
37266
37267  # Only process if variable expands to non-empty
37268
37269  if test "x$LD" != x; then
37270    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37271
37272  # First separate the path from the arguments. This will split at the first
37273  # space.
37274  complete="$LD"
37275  path="${complete%% *}"
37276  tmp="$complete EOL"
37277  arguments="${tmp#* }"
37278
37279  # Input might be given as Windows format, start by converting to
37280  # unix format.
37281  new_path=`$CYGPATH -u "$path"`
37282
37283  # Now try to locate executable using which
37284  new_path=`$WHICH "$new_path" 2> /dev/null`
37285  # bat and cmd files are not always considered executable in cygwin causing which
37286  # to not find them
37287  if test "x$new_path" = x \
37288      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37289      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37290    new_path=`$CYGPATH -u "$path"`
37291  fi
37292  if test "x$new_path" = x; then
37293    # Oops. Which didn't find the executable.
37294    # The splitting of arguments from the executable at a space might have been incorrect,
37295    # since paths with space are more likely in Windows. Give it another try with the whole
37296    # argument.
37297    path="$complete"
37298    arguments="EOL"
37299    new_path=`$CYGPATH -u "$path"`
37300    new_path=`$WHICH "$new_path" 2> /dev/null`
37301    # bat and cmd files are not always considered executable in cygwin causing which
37302    # to not find them
37303    if test "x$new_path" = x \
37304        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37305        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37306      new_path=`$CYGPATH -u "$path"`
37307    fi
37308    if test "x$new_path" = x; then
37309      # It's still not found. Now this is an unrecoverable error.
37310      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37311$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37312      has_space=`$ECHO "$complete" | $GREP " "`
37313      if test "x$has_space" != x; then
37314        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37315$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37316      fi
37317      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37318    fi
37319  fi
37320
37321  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37322  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37323  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37324  # "foo.exe" is OK but "foo" is an error.
37325  #
37326  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37327  # It is also a way to make sure we got the proper file name for the real test later on.
37328  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37329  if test "x$test_shortpath" = x; then
37330    # Short path failed, file does not exist as specified.
37331    # Try adding .exe or .cmd
37332    if test -f "${new_path}.exe"; then
37333      input_to_shortpath="${new_path}.exe"
37334    elif test -f "${new_path}.cmd"; then
37335      input_to_shortpath="${new_path}.cmd"
37336    else
37337      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
37338$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
37339      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37340$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37341      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37342    fi
37343  else
37344    input_to_shortpath="$new_path"
37345  fi
37346
37347  # Call helper function which possibly converts this using DOS-style short mode.
37348  # If so, the updated path is stored in $new_path.
37349  new_path="$input_to_shortpath"
37350
37351  input_path="$input_to_shortpath"
37352  # Check if we need to convert this using DOS-style short mode. If the path
37353  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37354  # take no chances and rewrite it.
37355  # Note: m4 eats our [], so we need to use [ and ] instead.
37356  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37357  if test "x$has_forbidden_chars" != x; then
37358    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37359    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37360    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37361    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37362      # Going to short mode and back again did indeed matter. Since short mode is
37363      # case insensitive, let's make it lowercase to improve readability.
37364      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37365      # Now convert it back to Unix-style (cygpath)
37366      input_path=`$CYGPATH -u "$shortmode_path"`
37367      new_path="$input_path"
37368    fi
37369  fi
37370
37371  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37372  if test "x$test_cygdrive_prefix" = x; then
37373    # As a simple fix, exclude /usr/bin since it's not a real path.
37374    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37375      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37376      # a path prefixed by /cygdrive for fixpath to work.
37377      new_path="$CYGWIN_ROOT_PATH$input_path"
37378    fi
37379  fi
37380
37381  # remove trailing .exe if any
37382  new_path="${new_path/%.exe/}"
37383
37384    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37385
37386  # First separate the path from the arguments. This will split at the first
37387  # space.
37388  complete="$LD"
37389  path="${complete%% *}"
37390  tmp="$complete EOL"
37391  arguments="${tmp#* }"
37392
37393  # Input might be given as Windows format, start by converting to
37394  # unix format.
37395  new_path="$path"
37396
37397  windows_path="$new_path"
37398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37399    unix_path=`$CYGPATH -u "$windows_path"`
37400    new_path="$unix_path"
37401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37403    new_path="$unix_path"
37404  fi
37405
37406
37407  # Now try to locate executable using which
37408  new_path=`$WHICH "$new_path" 2> /dev/null`
37409
37410  if test "x$new_path" = x; then
37411    # Oops. Which didn't find the executable.
37412    # The splitting of arguments from the executable at a space might have been incorrect,
37413    # since paths with space are more likely in Windows. Give it another try with the whole
37414    # argument.
37415    path="$complete"
37416    arguments="EOL"
37417    new_path="$path"
37418
37419  windows_path="$new_path"
37420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37421    unix_path=`$CYGPATH -u "$windows_path"`
37422    new_path="$unix_path"
37423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37424    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37425    new_path="$unix_path"
37426  fi
37427
37428
37429    new_path=`$WHICH "$new_path" 2> /dev/null`
37430    # bat and cmd files are not always considered executable in MSYS causing which
37431    # to not find them
37432    if test "x$new_path" = x \
37433        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37434        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37435      new_path="$path"
37436
37437  windows_path="$new_path"
37438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37439    unix_path=`$CYGPATH -u "$windows_path"`
37440    new_path="$unix_path"
37441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37443    new_path="$unix_path"
37444  fi
37445
37446    fi
37447
37448    if test "x$new_path" = x; then
37449      # It's still not found. Now this is an unrecoverable error.
37450      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37451$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37452      has_space=`$ECHO "$complete" | $GREP " "`
37453      if test "x$has_space" != x; then
37454        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37455$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37456      fi
37457      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37458    fi
37459  fi
37460
37461  # Now new_path has a complete unix path to the binary
37462  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37463    # Keep paths in /bin as-is, but remove trailing .exe if any
37464    new_path="${new_path/%.exe/}"
37465    # Do not save /bin paths to all_fixpath_prefixes!
37466  else
37467    # Not in mixed or Windows style, start by that.
37468    new_path=`cmd //c echo $new_path`
37469
37470  input_path="$new_path"
37471  # Check if we need to convert this using DOS-style short mode. If the path
37472  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37473  # take no chances and rewrite it.
37474  # Note: m4 eats our [], so we need to use [ and ] instead.
37475  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37476  if test "x$has_forbidden_chars" != x; then
37477    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37478    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37479  fi
37480
37481    # Output is in $new_path
37482
37483  windows_path="$new_path"
37484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37485    unix_path=`$CYGPATH -u "$windows_path"`
37486    new_path="$unix_path"
37487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37488    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37489    new_path="$unix_path"
37490  fi
37491
37492    # remove trailing .exe if any
37493    new_path="${new_path/%.exe/}"
37494
37495    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37496    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37497  fi
37498
37499    else
37500      # We're on a unix platform. Hooray! :)
37501      # First separate the path from the arguments. This will split at the first
37502      # space.
37503      complete="$LD"
37504      path="${complete%% *}"
37505      tmp="$complete EOL"
37506      arguments="${tmp#* }"
37507
37508      # Cannot rely on the command "which" here since it doesn't always work.
37509      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37510      if test -z "$is_absolute_path"; then
37511        # Path to executable is not absolute. Find it.
37512        IFS_save="$IFS"
37513        IFS=:
37514        for p in $PATH; do
37515          if test -f "$p/$path" && test -x "$p/$path"; then
37516            new_path="$p/$path"
37517            break
37518          fi
37519        done
37520        IFS="$IFS_save"
37521      else
37522        # This is an absolute path, we can use it without further modifications.
37523        new_path="$path"
37524      fi
37525
37526      if test "x$new_path" = x; then
37527        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37528$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37529        has_space=`$ECHO "$complete" | $GREP " "`
37530        if test "x$has_space" != x; then
37531          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37532$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37533        fi
37534        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37535      fi
37536    fi
37537
37538    # Now join together the path and the arguments once again
37539    if test "x$arguments" != xEOL; then
37540      new_complete="$new_path ${arguments% *}"
37541    else
37542      new_complete="$new_path"
37543    fi
37544
37545    if test "x$complete" != "x$new_complete"; then
37546      LD="$new_complete"
37547      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
37548$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
37549    fi
37550  fi
37551
37552    # Verify that we indeed succeeded with this trick.
37553    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
37554$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
37555    "$LD" --version > /dev/null
37556    if test $? -eq 0 ; then
37557      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37558$as_echo "no" >&6; }
37559      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
37560    else
37561      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37562$as_echo "yes" >&6; }
37563    fi
37564    LDCXX="$LD"
37565  else
37566    # All other toolchains use the compiler to link.
37567    LD="$CC"
37568    LDCXX="$CXX"
37569  fi
37570
37571  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
37572
37573
37574  #
37575  # Setup the assembler (AS)
37576  #
37577  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
37578
37579
37580  # Publish this variable in the help.
37581
37582
37583  if [ -z "${AS+x}" ]; then
37584    # The variable is not set by user, try to locate tool using the code snippet
37585    for ac_prog in as
37586do
37587  # Extract the first word of "$ac_prog", so it can be a program name with args.
37588set dummy $ac_prog; ac_word=$2
37589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37590$as_echo_n "checking for $ac_word... " >&6; }
37591if ${ac_cv_path_AS+:} false; then :
37592  $as_echo_n "(cached) " >&6
37593else
37594  case $AS in
37595  [\\/]* | ?:[\\/]*)
37596  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37597  ;;
37598  *)
37599  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37600for as_dir in $PATH
37601do
37602  IFS=$as_save_IFS
37603  test -z "$as_dir" && as_dir=.
37604    for ac_exec_ext in '' $ac_executable_extensions; do
37605  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37606    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37608    break 2
37609  fi
37610done
37611  done
37612IFS=$as_save_IFS
37613
37614  ;;
37615esac
37616fi
37617AS=$ac_cv_path_AS
37618if test -n "$AS"; then
37619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37620$as_echo "$AS" >&6; }
37621else
37622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37623$as_echo "no" >&6; }
37624fi
37625
37626
37627  test -n "$AS" && break
37628done
37629
37630  else
37631    # The variable is set, but is it from the command line or the environment?
37632
37633    # Try to remove the string !AS! from our list.
37634    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
37635    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37636      # If it failed, the variable was not from the command line. Ignore it,
37637      # but warn the user (except for BASH, which is always set by the calling BASH).
37638      if test "xAS" != xBASH; then
37639        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
37640$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
37641      fi
37642      # Try to locate tool using the code snippet
37643      for ac_prog in as
37644do
37645  # Extract the first word of "$ac_prog", so it can be a program name with args.
37646set dummy $ac_prog; ac_word=$2
37647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37648$as_echo_n "checking for $ac_word... " >&6; }
37649if ${ac_cv_path_AS+:} false; then :
37650  $as_echo_n "(cached) " >&6
37651else
37652  case $AS in
37653  [\\/]* | ?:[\\/]*)
37654  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37655  ;;
37656  *)
37657  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37658for as_dir in $PATH
37659do
37660  IFS=$as_save_IFS
37661  test -z "$as_dir" && as_dir=.
37662    for ac_exec_ext in '' $ac_executable_extensions; do
37663  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37664    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37665    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37666    break 2
37667  fi
37668done
37669  done
37670IFS=$as_save_IFS
37671
37672  ;;
37673esac
37674fi
37675AS=$ac_cv_path_AS
37676if test -n "$AS"; then
37677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37678$as_echo "$AS" >&6; }
37679else
37680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37681$as_echo "no" >&6; }
37682fi
37683
37684
37685  test -n "$AS" && break
37686done
37687
37688    else
37689      # If it succeeded, then it was overridden by the user. We will use it
37690      # for the tool.
37691
37692      # First remove it from the list of overridden variables, so we can test
37693      # for unknown variables in the end.
37694      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37695
37696      # Check if we try to supply an empty value
37697      if test "x$AS" = x; then
37698        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
37699$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
37700        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37701$as_echo_n "checking for AS... " >&6; }
37702        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37703$as_echo "disabled" >&6; }
37704      else
37705        # Check if the provided tool contains a complete path.
37706        tool_specified="$AS"
37707        tool_basename="${tool_specified##*/}"
37708        if test "x$tool_basename" = "x$tool_specified"; then
37709          # A command without a complete path is provided, search $PATH.
37710          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
37711$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
37712          # Extract the first word of "$tool_basename", so it can be a program name with args.
37713set dummy $tool_basename; ac_word=$2
37714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37715$as_echo_n "checking for $ac_word... " >&6; }
37716if ${ac_cv_path_AS+:} false; then :
37717  $as_echo_n "(cached) " >&6
37718else
37719  case $AS in
37720  [\\/]* | ?:[\\/]*)
37721  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37722  ;;
37723  *)
37724  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37725for as_dir in $PATH
37726do
37727  IFS=$as_save_IFS
37728  test -z "$as_dir" && as_dir=.
37729    for ac_exec_ext in '' $ac_executable_extensions; do
37730  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37731    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37733    break 2
37734  fi
37735done
37736  done
37737IFS=$as_save_IFS
37738
37739  ;;
37740esac
37741fi
37742AS=$ac_cv_path_AS
37743if test -n "$AS"; then
37744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37745$as_echo "$AS" >&6; }
37746else
37747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37748$as_echo "no" >&6; }
37749fi
37750
37751
37752          if test "x$AS" = x; then
37753            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37754          fi
37755        else
37756          # Otherwise we believe it is a complete path. Use it as it is.
37757          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
37758$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
37759          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37760$as_echo_n "checking for AS... " >&6; }
37761          if test ! -x "$tool_specified"; then
37762            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37763$as_echo "not found" >&6; }
37764            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
37765          fi
37766          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37767$as_echo "$tool_specified" >&6; }
37768        fi
37769      fi
37770    fi
37771
37772  fi
37773
37774
37775
37776  # Only process if variable expands to non-empty
37777
37778  if test "x$AS" != x; then
37779    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37780
37781  # First separate the path from the arguments. This will split at the first
37782  # space.
37783  complete="$AS"
37784  path="${complete%% *}"
37785  tmp="$complete EOL"
37786  arguments="${tmp#* }"
37787
37788  # Input might be given as Windows format, start by converting to
37789  # unix format.
37790  new_path=`$CYGPATH -u "$path"`
37791
37792  # Now try to locate executable using which
37793  new_path=`$WHICH "$new_path" 2> /dev/null`
37794  # bat and cmd files are not always considered executable in cygwin causing which
37795  # to not find them
37796  if test "x$new_path" = x \
37797      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37798      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37799    new_path=`$CYGPATH -u "$path"`
37800  fi
37801  if test "x$new_path" = x; then
37802    # Oops. Which didn't find the executable.
37803    # The splitting of arguments from the executable at a space might have been incorrect,
37804    # since paths with space are more likely in Windows. Give it another try with the whole
37805    # argument.
37806    path="$complete"
37807    arguments="EOL"
37808    new_path=`$CYGPATH -u "$path"`
37809    new_path=`$WHICH "$new_path" 2> /dev/null`
37810    # bat and cmd files are not always considered executable in cygwin causing which
37811    # to not find them
37812    if test "x$new_path" = x \
37813        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37814        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37815      new_path=`$CYGPATH -u "$path"`
37816    fi
37817    if test "x$new_path" = x; then
37818      # It's still not found. Now this is an unrecoverable error.
37819      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37820$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37821      has_space=`$ECHO "$complete" | $GREP " "`
37822      if test "x$has_space" != x; then
37823        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37824$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37825      fi
37826      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37827    fi
37828  fi
37829
37830  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37831  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37832  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37833  # "foo.exe" is OK but "foo" is an error.
37834  #
37835  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37836  # It is also a way to make sure we got the proper file name for the real test later on.
37837  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37838  if test "x$test_shortpath" = x; then
37839    # Short path failed, file does not exist as specified.
37840    # Try adding .exe or .cmd
37841    if test -f "${new_path}.exe"; then
37842      input_to_shortpath="${new_path}.exe"
37843    elif test -f "${new_path}.cmd"; then
37844      input_to_shortpath="${new_path}.cmd"
37845    else
37846      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
37847$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
37848      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37849$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37850      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37851    fi
37852  else
37853    input_to_shortpath="$new_path"
37854  fi
37855
37856  # Call helper function which possibly converts this using DOS-style short mode.
37857  # If so, the updated path is stored in $new_path.
37858  new_path="$input_to_shortpath"
37859
37860  input_path="$input_to_shortpath"
37861  # Check if we need to convert this using DOS-style short mode. If the path
37862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37863  # take no chances and rewrite it.
37864  # Note: m4 eats our [], so we need to use [ and ] instead.
37865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37866  if test "x$has_forbidden_chars" != x; then
37867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37868    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37869    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37870    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37871      # Going to short mode and back again did indeed matter. Since short mode is
37872      # case insensitive, let's make it lowercase to improve readability.
37873      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37874      # Now convert it back to Unix-style (cygpath)
37875      input_path=`$CYGPATH -u "$shortmode_path"`
37876      new_path="$input_path"
37877    fi
37878  fi
37879
37880  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37881  if test "x$test_cygdrive_prefix" = x; then
37882    # As a simple fix, exclude /usr/bin since it's not a real path.
37883    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37884      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37885      # a path prefixed by /cygdrive for fixpath to work.
37886      new_path="$CYGWIN_ROOT_PATH$input_path"
37887    fi
37888  fi
37889
37890  # remove trailing .exe if any
37891  new_path="${new_path/%.exe/}"
37892
37893    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37894
37895  # First separate the path from the arguments. This will split at the first
37896  # space.
37897  complete="$AS"
37898  path="${complete%% *}"
37899  tmp="$complete EOL"
37900  arguments="${tmp#* }"
37901
37902  # Input might be given as Windows format, start by converting to
37903  # unix format.
37904  new_path="$path"
37905
37906  windows_path="$new_path"
37907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37908    unix_path=`$CYGPATH -u "$windows_path"`
37909    new_path="$unix_path"
37910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37912    new_path="$unix_path"
37913  fi
37914
37915
37916  # Now try to locate executable using which
37917  new_path=`$WHICH "$new_path" 2> /dev/null`
37918
37919  if test "x$new_path" = x; then
37920    # Oops. Which didn't find the executable.
37921    # The splitting of arguments from the executable at a space might have been incorrect,
37922    # since paths with space are more likely in Windows. Give it another try with the whole
37923    # argument.
37924    path="$complete"
37925    arguments="EOL"
37926    new_path="$path"
37927
37928  windows_path="$new_path"
37929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37930    unix_path=`$CYGPATH -u "$windows_path"`
37931    new_path="$unix_path"
37932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37934    new_path="$unix_path"
37935  fi
37936
37937
37938    new_path=`$WHICH "$new_path" 2> /dev/null`
37939    # bat and cmd files are not always considered executable in MSYS causing which
37940    # to not find them
37941    if test "x$new_path" = x \
37942        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37943        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37944      new_path="$path"
37945
37946  windows_path="$new_path"
37947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37948    unix_path=`$CYGPATH -u "$windows_path"`
37949    new_path="$unix_path"
37950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37952    new_path="$unix_path"
37953  fi
37954
37955    fi
37956
37957    if test "x$new_path" = x; then
37958      # It's still not found. Now this is an unrecoverable error.
37959      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37960$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37961      has_space=`$ECHO "$complete" | $GREP " "`
37962      if test "x$has_space" != x; then
37963        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37964$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37965      fi
37966      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37967    fi
37968  fi
37969
37970  # Now new_path has a complete unix path to the binary
37971  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37972    # Keep paths in /bin as-is, but remove trailing .exe if any
37973    new_path="${new_path/%.exe/}"
37974    # Do not save /bin paths to all_fixpath_prefixes!
37975  else
37976    # Not in mixed or Windows style, start by that.
37977    new_path=`cmd //c echo $new_path`
37978
37979  input_path="$new_path"
37980  # Check if we need to convert this using DOS-style short mode. If the path
37981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37982  # take no chances and rewrite it.
37983  # Note: m4 eats our [], so we need to use [ and ] instead.
37984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37985  if test "x$has_forbidden_chars" != x; then
37986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37987    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37988  fi
37989
37990    # Output is in $new_path
37991
37992  windows_path="$new_path"
37993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37994    unix_path=`$CYGPATH -u "$windows_path"`
37995    new_path="$unix_path"
37996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37998    new_path="$unix_path"
37999  fi
38000
38001    # remove trailing .exe if any
38002    new_path="${new_path/%.exe/}"
38003
38004    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38005    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38006  fi
38007
38008    else
38009      # We're on a unix platform. Hooray! :)
38010      # First separate the path from the arguments. This will split at the first
38011      # space.
38012      complete="$AS"
38013      path="${complete%% *}"
38014      tmp="$complete EOL"
38015      arguments="${tmp#* }"
38016
38017      # Cannot rely on the command "which" here since it doesn't always work.
38018      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38019      if test -z "$is_absolute_path"; then
38020        # Path to executable is not absolute. Find it.
38021        IFS_save="$IFS"
38022        IFS=:
38023        for p in $PATH; do
38024          if test -f "$p/$path" && test -x "$p/$path"; then
38025            new_path="$p/$path"
38026            break
38027          fi
38028        done
38029        IFS="$IFS_save"
38030      else
38031        # This is an absolute path, we can use it without further modifications.
38032        new_path="$path"
38033      fi
38034
38035      if test "x$new_path" = x; then
38036        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
38037$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
38038        has_space=`$ECHO "$complete" | $GREP " "`
38039        if test "x$has_space" != x; then
38040          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38041$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38042        fi
38043        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
38044      fi
38045    fi
38046
38047    # Now join together the path and the arguments once again
38048    if test "x$arguments" != xEOL; then
38049      new_complete="$new_path ${arguments% *}"
38050    else
38051      new_complete="$new_path"
38052    fi
38053
38054    if test "x$complete" != "x$new_complete"; then
38055      AS="$new_complete"
38056      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
38057$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
38058    fi
38059  fi
38060
38061    if test "x$AS" = x; then
38062      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
38063    fi
38064  else
38065    # FIXME: is this correct for microsoft?
38066    AS="$CC -c"
38067  fi
38068
38069
38070  #
38071  # Setup the archiver (AR)
38072  #
38073  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38074    # The corresponding ar tool is lib.exe (used to create static libraries)
38075    # Extract the first word of "lib", so it can be a program name with args.
38076set dummy lib; ac_word=$2
38077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38078$as_echo_n "checking for $ac_word... " >&6; }
38079if ${ac_cv_prog_AR+:} false; then :
38080  $as_echo_n "(cached) " >&6
38081else
38082  if test -n "$AR"; then
38083  ac_cv_prog_AR="$AR" # Let the user override the test.
38084else
38085as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38086for as_dir in $PATH
38087do
38088  IFS=$as_save_IFS
38089  test -z "$as_dir" && as_dir=.
38090    for ac_exec_ext in '' $ac_executable_extensions; do
38091  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38092    ac_cv_prog_AR="lib"
38093    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38094    break 2
38095  fi
38096done
38097  done
38098IFS=$as_save_IFS
38099
38100fi
38101fi
38102AR=$ac_cv_prog_AR
38103if test -n "$AR"; then
38104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38105$as_echo "$AR" >&6; }
38106else
38107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38108$as_echo "no" >&6; }
38109fi
38110
38111
38112  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
38113
38114
38115  # Publish this variable in the help.
38116
38117
38118  if [ -z "${AR+x}" ]; then
38119    # The variable is not set by user, try to locate tool using the code snippet
38120    if test -n "$ac_tool_prefix"; then
38121  for ac_prog in ar gcc-ar
38122  do
38123    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38124set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38126$as_echo_n "checking for $ac_word... " >&6; }
38127if ${ac_cv_prog_AR+:} false; then :
38128  $as_echo_n "(cached) " >&6
38129else
38130  if test -n "$AR"; then
38131  ac_cv_prog_AR="$AR" # Let the user override the test.
38132else
38133as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38134for as_dir in $PATH
38135do
38136  IFS=$as_save_IFS
38137  test -z "$as_dir" && as_dir=.
38138    for ac_exec_ext in '' $ac_executable_extensions; do
38139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38140    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38142    break 2
38143  fi
38144done
38145  done
38146IFS=$as_save_IFS
38147
38148fi
38149fi
38150AR=$ac_cv_prog_AR
38151if test -n "$AR"; then
38152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38153$as_echo "$AR" >&6; }
38154else
38155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38156$as_echo "no" >&6; }
38157fi
38158
38159
38160    test -n "$AR" && break
38161  done
38162fi
38163if test -z "$AR"; then
38164  ac_ct_AR=$AR
38165  for ac_prog in ar gcc-ar
38166do
38167  # Extract the first word of "$ac_prog", so it can be a program name with args.
38168set dummy $ac_prog; ac_word=$2
38169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38170$as_echo_n "checking for $ac_word... " >&6; }
38171if ${ac_cv_prog_ac_ct_AR+:} false; then :
38172  $as_echo_n "(cached) " >&6
38173else
38174  if test -n "$ac_ct_AR"; then
38175  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38176else
38177as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38178for as_dir in $PATH
38179do
38180  IFS=$as_save_IFS
38181  test -z "$as_dir" && as_dir=.
38182    for ac_exec_ext in '' $ac_executable_extensions; do
38183  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38184    ac_cv_prog_ac_ct_AR="$ac_prog"
38185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38186    break 2
38187  fi
38188done
38189  done
38190IFS=$as_save_IFS
38191
38192fi
38193fi
38194ac_ct_AR=$ac_cv_prog_ac_ct_AR
38195if test -n "$ac_ct_AR"; then
38196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38197$as_echo "$ac_ct_AR" >&6; }
38198else
38199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38200$as_echo "no" >&6; }
38201fi
38202
38203
38204  test -n "$ac_ct_AR" && break
38205done
38206
38207  if test "x$ac_ct_AR" = x; then
38208    AR=""
38209  else
38210    case $cross_compiling:$ac_tool_warned in
38211yes:)
38212{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38213$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38214ac_tool_warned=yes ;;
38215esac
38216    AR=$ac_ct_AR
38217  fi
38218fi
38219
38220  else
38221    # The variable is set, but is it from the command line or the environment?
38222
38223    # Try to remove the string !AR! from our list.
38224    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
38225    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38226      # If it failed, the variable was not from the command line. Ignore it,
38227      # but warn the user (except for BASH, which is always set by the calling BASH).
38228      if test "xAR" != xBASH; then
38229        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
38230$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
38231      fi
38232      # Try to locate tool using the code snippet
38233      if test -n "$ac_tool_prefix"; then
38234  for ac_prog in ar gcc-ar
38235  do
38236    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38237set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38239$as_echo_n "checking for $ac_word... " >&6; }
38240if ${ac_cv_prog_AR+:} false; then :
38241  $as_echo_n "(cached) " >&6
38242else
38243  if test -n "$AR"; then
38244  ac_cv_prog_AR="$AR" # Let the user override the test.
38245else
38246as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38247for as_dir in $PATH
38248do
38249  IFS=$as_save_IFS
38250  test -z "$as_dir" && as_dir=.
38251    for ac_exec_ext in '' $ac_executable_extensions; do
38252  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38253    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38254    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38255    break 2
38256  fi
38257done
38258  done
38259IFS=$as_save_IFS
38260
38261fi
38262fi
38263AR=$ac_cv_prog_AR
38264if test -n "$AR"; then
38265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38266$as_echo "$AR" >&6; }
38267else
38268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38269$as_echo "no" >&6; }
38270fi
38271
38272
38273    test -n "$AR" && break
38274  done
38275fi
38276if test -z "$AR"; then
38277  ac_ct_AR=$AR
38278  for ac_prog in ar gcc-ar
38279do
38280  # Extract the first word of "$ac_prog", so it can be a program name with args.
38281set dummy $ac_prog; ac_word=$2
38282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38283$as_echo_n "checking for $ac_word... " >&6; }
38284if ${ac_cv_prog_ac_ct_AR+:} false; then :
38285  $as_echo_n "(cached) " >&6
38286else
38287  if test -n "$ac_ct_AR"; then
38288  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38289else
38290as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38291for as_dir in $PATH
38292do
38293  IFS=$as_save_IFS
38294  test -z "$as_dir" && as_dir=.
38295    for ac_exec_ext in '' $ac_executable_extensions; do
38296  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38297    ac_cv_prog_ac_ct_AR="$ac_prog"
38298    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38299    break 2
38300  fi
38301done
38302  done
38303IFS=$as_save_IFS
38304
38305fi
38306fi
38307ac_ct_AR=$ac_cv_prog_ac_ct_AR
38308if test -n "$ac_ct_AR"; then
38309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38310$as_echo "$ac_ct_AR" >&6; }
38311else
38312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38313$as_echo "no" >&6; }
38314fi
38315
38316
38317  test -n "$ac_ct_AR" && break
38318done
38319
38320  if test "x$ac_ct_AR" = x; then
38321    AR=""
38322  else
38323    case $cross_compiling:$ac_tool_warned in
38324yes:)
38325{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38326$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38327ac_tool_warned=yes ;;
38328esac
38329    AR=$ac_ct_AR
38330  fi
38331fi
38332
38333    else
38334      # If it succeeded, then it was overridden by the user. We will use it
38335      # for the tool.
38336
38337      # First remove it from the list of overridden variables, so we can test
38338      # for unknown variables in the end.
38339      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38340
38341      # Check if we try to supply an empty value
38342      if test "x$AR" = x; then
38343        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38344$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38345        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38346$as_echo_n "checking for AR... " >&6; }
38347        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38348$as_echo "disabled" >&6; }
38349      else
38350        # Check if the provided tool contains a complete path.
38351        tool_specified="$AR"
38352        tool_basename="${tool_specified##*/}"
38353        if test "x$tool_basename" = "x$tool_specified"; then
38354          # A command without a complete path is provided, search $PATH.
38355          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38356$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38357          # Extract the first word of "$tool_basename", so it can be a program name with args.
38358set dummy $tool_basename; ac_word=$2
38359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38360$as_echo_n "checking for $ac_word... " >&6; }
38361if ${ac_cv_path_AR+:} false; then :
38362  $as_echo_n "(cached) " >&6
38363else
38364  case $AR in
38365  [\\/]* | ?:[\\/]*)
38366  ac_cv_path_AR="$AR" # Let the user override the test with a path.
38367  ;;
38368  *)
38369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38370for as_dir in $PATH
38371do
38372  IFS=$as_save_IFS
38373  test -z "$as_dir" && as_dir=.
38374    for ac_exec_ext in '' $ac_executable_extensions; do
38375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38376    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38378    break 2
38379  fi
38380done
38381  done
38382IFS=$as_save_IFS
38383
38384  ;;
38385esac
38386fi
38387AR=$ac_cv_path_AR
38388if test -n "$AR"; then
38389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38390$as_echo "$AR" >&6; }
38391else
38392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38393$as_echo "no" >&6; }
38394fi
38395
38396
38397          if test "x$AR" = x; then
38398            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38399          fi
38400        else
38401          # Otherwise we believe it is a complete path. Use it as it is.
38402          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38403$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38404          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38405$as_echo_n "checking for AR... " >&6; }
38406          if test ! -x "$tool_specified"; then
38407            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38408$as_echo "not found" >&6; }
38409            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38410          fi
38411          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38412$as_echo "$tool_specified" >&6; }
38413        fi
38414      fi
38415    fi
38416
38417  fi
38418
38419
38420  else
38421
38422
38423  # Publish this variable in the help.
38424
38425
38426  if [ -z "${AR+x}" ]; then
38427    # The variable is not set by user, try to locate tool using the code snippet
38428    if test -n "$ac_tool_prefix"; then
38429  for ac_prog in ar
38430  do
38431    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38432set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38434$as_echo_n "checking for $ac_word... " >&6; }
38435if ${ac_cv_prog_AR+:} false; then :
38436  $as_echo_n "(cached) " >&6
38437else
38438  if test -n "$AR"; then
38439  ac_cv_prog_AR="$AR" # Let the user override the test.
38440else
38441as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38442for as_dir in $PATH
38443do
38444  IFS=$as_save_IFS
38445  test -z "$as_dir" && as_dir=.
38446    for ac_exec_ext in '' $ac_executable_extensions; do
38447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38448    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38450    break 2
38451  fi
38452done
38453  done
38454IFS=$as_save_IFS
38455
38456fi
38457fi
38458AR=$ac_cv_prog_AR
38459if test -n "$AR"; then
38460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38461$as_echo "$AR" >&6; }
38462else
38463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38464$as_echo "no" >&6; }
38465fi
38466
38467
38468    test -n "$AR" && break
38469  done
38470fi
38471if test -z "$AR"; then
38472  ac_ct_AR=$AR
38473  for ac_prog in ar
38474do
38475  # Extract the first word of "$ac_prog", so it can be a program name with args.
38476set dummy $ac_prog; ac_word=$2
38477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38478$as_echo_n "checking for $ac_word... " >&6; }
38479if ${ac_cv_prog_ac_ct_AR+:} false; then :
38480  $as_echo_n "(cached) " >&6
38481else
38482  if test -n "$ac_ct_AR"; then
38483  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38484else
38485as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38486for as_dir in $PATH
38487do
38488  IFS=$as_save_IFS
38489  test -z "$as_dir" && as_dir=.
38490    for ac_exec_ext in '' $ac_executable_extensions; do
38491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38492    ac_cv_prog_ac_ct_AR="$ac_prog"
38493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38494    break 2
38495  fi
38496done
38497  done
38498IFS=$as_save_IFS
38499
38500fi
38501fi
38502ac_ct_AR=$ac_cv_prog_ac_ct_AR
38503if test -n "$ac_ct_AR"; then
38504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38505$as_echo "$ac_ct_AR" >&6; }
38506else
38507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38508$as_echo "no" >&6; }
38509fi
38510
38511
38512  test -n "$ac_ct_AR" && break
38513done
38514
38515  if test "x$ac_ct_AR" = x; then
38516    AR=""
38517  else
38518    case $cross_compiling:$ac_tool_warned in
38519yes:)
38520{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38521$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38522ac_tool_warned=yes ;;
38523esac
38524    AR=$ac_ct_AR
38525  fi
38526fi
38527
38528  else
38529    # The variable is set, but is it from the command line or the environment?
38530
38531    # Try to remove the string !AR! from our list.
38532    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
38533    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38534      # If it failed, the variable was not from the command line. Ignore it,
38535      # but warn the user (except for BASH, which is always set by the calling BASH).
38536      if test "xAR" != xBASH; then
38537        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
38538$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
38539      fi
38540      # Try to locate tool using the code snippet
38541      if test -n "$ac_tool_prefix"; then
38542  for ac_prog in ar
38543  do
38544    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38545set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38547$as_echo_n "checking for $ac_word... " >&6; }
38548if ${ac_cv_prog_AR+:} false; then :
38549  $as_echo_n "(cached) " >&6
38550else
38551  if test -n "$AR"; then
38552  ac_cv_prog_AR="$AR" # Let the user override the test.
38553else
38554as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38555for as_dir in $PATH
38556do
38557  IFS=$as_save_IFS
38558  test -z "$as_dir" && as_dir=.
38559    for ac_exec_ext in '' $ac_executable_extensions; do
38560  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38561    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38562    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38563    break 2
38564  fi
38565done
38566  done
38567IFS=$as_save_IFS
38568
38569fi
38570fi
38571AR=$ac_cv_prog_AR
38572if test -n "$AR"; then
38573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38574$as_echo "$AR" >&6; }
38575else
38576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38577$as_echo "no" >&6; }
38578fi
38579
38580
38581    test -n "$AR" && break
38582  done
38583fi
38584if test -z "$AR"; then
38585  ac_ct_AR=$AR
38586  for ac_prog in ar
38587do
38588  # Extract the first word of "$ac_prog", so it can be a program name with args.
38589set dummy $ac_prog; ac_word=$2
38590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38591$as_echo_n "checking for $ac_word... " >&6; }
38592if ${ac_cv_prog_ac_ct_AR+:} false; then :
38593  $as_echo_n "(cached) " >&6
38594else
38595  if test -n "$ac_ct_AR"; then
38596  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38597else
38598as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38599for as_dir in $PATH
38600do
38601  IFS=$as_save_IFS
38602  test -z "$as_dir" && as_dir=.
38603    for ac_exec_ext in '' $ac_executable_extensions; do
38604  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38605    ac_cv_prog_ac_ct_AR="$ac_prog"
38606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38607    break 2
38608  fi
38609done
38610  done
38611IFS=$as_save_IFS
38612
38613fi
38614fi
38615ac_ct_AR=$ac_cv_prog_ac_ct_AR
38616if test -n "$ac_ct_AR"; then
38617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38618$as_echo "$ac_ct_AR" >&6; }
38619else
38620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38621$as_echo "no" >&6; }
38622fi
38623
38624
38625  test -n "$ac_ct_AR" && break
38626done
38627
38628  if test "x$ac_ct_AR" = x; then
38629    AR=""
38630  else
38631    case $cross_compiling:$ac_tool_warned in
38632yes:)
38633{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38634$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38635ac_tool_warned=yes ;;
38636esac
38637    AR=$ac_ct_AR
38638  fi
38639fi
38640
38641    else
38642      # If it succeeded, then it was overridden by the user. We will use it
38643      # for the tool.
38644
38645      # First remove it from the list of overridden variables, so we can test
38646      # for unknown variables in the end.
38647      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38648
38649      # Check if we try to supply an empty value
38650      if test "x$AR" = x; then
38651        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38652$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38653        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38654$as_echo_n "checking for AR... " >&6; }
38655        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38656$as_echo "disabled" >&6; }
38657      else
38658        # Check if the provided tool contains a complete path.
38659        tool_specified="$AR"
38660        tool_basename="${tool_specified##*/}"
38661        if test "x$tool_basename" = "x$tool_specified"; then
38662          # A command without a complete path is provided, search $PATH.
38663          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38664$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38665          # Extract the first word of "$tool_basename", so it can be a program name with args.
38666set dummy $tool_basename; ac_word=$2
38667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38668$as_echo_n "checking for $ac_word... " >&6; }
38669if ${ac_cv_path_AR+:} false; then :
38670  $as_echo_n "(cached) " >&6
38671else
38672  case $AR in
38673  [\\/]* | ?:[\\/]*)
38674  ac_cv_path_AR="$AR" # Let the user override the test with a path.
38675  ;;
38676  *)
38677  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38678for as_dir in $PATH
38679do
38680  IFS=$as_save_IFS
38681  test -z "$as_dir" && as_dir=.
38682    for ac_exec_ext in '' $ac_executable_extensions; do
38683  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38684    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38685    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38686    break 2
38687  fi
38688done
38689  done
38690IFS=$as_save_IFS
38691
38692  ;;
38693esac
38694fi
38695AR=$ac_cv_path_AR
38696if test -n "$AR"; then
38697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38698$as_echo "$AR" >&6; }
38699else
38700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38701$as_echo "no" >&6; }
38702fi
38703
38704
38705          if test "x$AR" = x; then
38706            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38707          fi
38708        else
38709          # Otherwise we believe it is a complete path. Use it as it is.
38710          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38711$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38712          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38713$as_echo_n "checking for AR... " >&6; }
38714          if test ! -x "$tool_specified"; then
38715            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38716$as_echo "not found" >&6; }
38717            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38718          fi
38719          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38720$as_echo "$tool_specified" >&6; }
38721        fi
38722      fi
38723    fi
38724
38725  fi
38726
38727
38728  fi
38729
38730  # Only process if variable expands to non-empty
38731
38732  if test "x$AR" != x; then
38733    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38734
38735  # First separate the path from the arguments. This will split at the first
38736  # space.
38737  complete="$AR"
38738  path="${complete%% *}"
38739  tmp="$complete EOL"
38740  arguments="${tmp#* }"
38741
38742  # Input might be given as Windows format, start by converting to
38743  # unix format.
38744  new_path=`$CYGPATH -u "$path"`
38745
38746  # Now try to locate executable using which
38747  new_path=`$WHICH "$new_path" 2> /dev/null`
38748  # bat and cmd files are not always considered executable in cygwin causing which
38749  # to not find them
38750  if test "x$new_path" = x \
38751      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38752      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38753    new_path=`$CYGPATH -u "$path"`
38754  fi
38755  if test "x$new_path" = x; then
38756    # Oops. Which didn't find the executable.
38757    # The splitting of arguments from the executable at a space might have been incorrect,
38758    # since paths with space are more likely in Windows. Give it another try with the whole
38759    # argument.
38760    path="$complete"
38761    arguments="EOL"
38762    new_path=`$CYGPATH -u "$path"`
38763    new_path=`$WHICH "$new_path" 2> /dev/null`
38764    # bat and cmd files are not always considered executable in cygwin causing which
38765    # to not find them
38766    if test "x$new_path" = x \
38767        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38768        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38769      new_path=`$CYGPATH -u "$path"`
38770    fi
38771    if test "x$new_path" = x; then
38772      # It's still not found. Now this is an unrecoverable error.
38773      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38774$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38775      has_space=`$ECHO "$complete" | $GREP " "`
38776      if test "x$has_space" != x; then
38777        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38778$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38779      fi
38780      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38781    fi
38782  fi
38783
38784  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38785  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38786  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38787  # "foo.exe" is OK but "foo" is an error.
38788  #
38789  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38790  # It is also a way to make sure we got the proper file name for the real test later on.
38791  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38792  if test "x$test_shortpath" = x; then
38793    # Short path failed, file does not exist as specified.
38794    # Try adding .exe or .cmd
38795    if test -f "${new_path}.exe"; then
38796      input_to_shortpath="${new_path}.exe"
38797    elif test -f "${new_path}.cmd"; then
38798      input_to_shortpath="${new_path}.cmd"
38799    else
38800      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
38801$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
38802      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38803$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38804      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38805    fi
38806  else
38807    input_to_shortpath="$new_path"
38808  fi
38809
38810  # Call helper function which possibly converts this using DOS-style short mode.
38811  # If so, the updated path is stored in $new_path.
38812  new_path="$input_to_shortpath"
38813
38814  input_path="$input_to_shortpath"
38815  # Check if we need to convert this using DOS-style short mode. If the path
38816  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38817  # take no chances and rewrite it.
38818  # Note: m4 eats our [], so we need to use [ and ] instead.
38819  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38820  if test "x$has_forbidden_chars" != x; then
38821    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38822    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38823    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38824    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38825      # Going to short mode and back again did indeed matter. Since short mode is
38826      # case insensitive, let's make it lowercase to improve readability.
38827      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38828      # Now convert it back to Unix-style (cygpath)
38829      input_path=`$CYGPATH -u "$shortmode_path"`
38830      new_path="$input_path"
38831    fi
38832  fi
38833
38834  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38835  if test "x$test_cygdrive_prefix" = x; then
38836    # As a simple fix, exclude /usr/bin since it's not a real path.
38837    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38838      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38839      # a path prefixed by /cygdrive for fixpath to work.
38840      new_path="$CYGWIN_ROOT_PATH$input_path"
38841    fi
38842  fi
38843
38844  # remove trailing .exe if any
38845  new_path="${new_path/%.exe/}"
38846
38847    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38848
38849  # First separate the path from the arguments. This will split at the first
38850  # space.
38851  complete="$AR"
38852  path="${complete%% *}"
38853  tmp="$complete EOL"
38854  arguments="${tmp#* }"
38855
38856  # Input might be given as Windows format, start by converting to
38857  # unix format.
38858  new_path="$path"
38859
38860  windows_path="$new_path"
38861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38862    unix_path=`$CYGPATH -u "$windows_path"`
38863    new_path="$unix_path"
38864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38865    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38866    new_path="$unix_path"
38867  fi
38868
38869
38870  # Now try to locate executable using which
38871  new_path=`$WHICH "$new_path" 2> /dev/null`
38872
38873  if test "x$new_path" = x; then
38874    # Oops. Which didn't find the executable.
38875    # The splitting of arguments from the executable at a space might have been incorrect,
38876    # since paths with space are more likely in Windows. Give it another try with the whole
38877    # argument.
38878    path="$complete"
38879    arguments="EOL"
38880    new_path="$path"
38881
38882  windows_path="$new_path"
38883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38884    unix_path=`$CYGPATH -u "$windows_path"`
38885    new_path="$unix_path"
38886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38887    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38888    new_path="$unix_path"
38889  fi
38890
38891
38892    new_path=`$WHICH "$new_path" 2> /dev/null`
38893    # bat and cmd files are not always considered executable in MSYS causing which
38894    # to not find them
38895    if test "x$new_path" = x \
38896        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38897        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38898      new_path="$path"
38899
38900  windows_path="$new_path"
38901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38902    unix_path=`$CYGPATH -u "$windows_path"`
38903    new_path="$unix_path"
38904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38905    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38906    new_path="$unix_path"
38907  fi
38908
38909    fi
38910
38911    if test "x$new_path" = x; then
38912      # It's still not found. Now this is an unrecoverable error.
38913      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38914$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38915      has_space=`$ECHO "$complete" | $GREP " "`
38916      if test "x$has_space" != x; then
38917        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38918$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38919      fi
38920      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38921    fi
38922  fi
38923
38924  # Now new_path has a complete unix path to the binary
38925  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38926    # Keep paths in /bin as-is, but remove trailing .exe if any
38927    new_path="${new_path/%.exe/}"
38928    # Do not save /bin paths to all_fixpath_prefixes!
38929  else
38930    # Not in mixed or Windows style, start by that.
38931    new_path=`cmd //c echo $new_path`
38932
38933  input_path="$new_path"
38934  # Check if we need to convert this using DOS-style short mode. If the path
38935  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38936  # take no chances and rewrite it.
38937  # Note: m4 eats our [], so we need to use [ and ] instead.
38938  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38939  if test "x$has_forbidden_chars" != x; then
38940    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38941    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38942  fi
38943
38944    # Output is in $new_path
38945
38946  windows_path="$new_path"
38947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38948    unix_path=`$CYGPATH -u "$windows_path"`
38949    new_path="$unix_path"
38950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38952    new_path="$unix_path"
38953  fi
38954
38955    # remove trailing .exe if any
38956    new_path="${new_path/%.exe/}"
38957
38958    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38959    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38960  fi
38961
38962    else
38963      # We're on a unix platform. Hooray! :)
38964      # First separate the path from the arguments. This will split at the first
38965      # space.
38966      complete="$AR"
38967      path="${complete%% *}"
38968      tmp="$complete EOL"
38969      arguments="${tmp#* }"
38970
38971      # Cannot rely on the command "which" here since it doesn't always work.
38972      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38973      if test -z "$is_absolute_path"; then
38974        # Path to executable is not absolute. Find it.
38975        IFS_save="$IFS"
38976        IFS=:
38977        for p in $PATH; do
38978          if test -f "$p/$path" && test -x "$p/$path"; then
38979            new_path="$p/$path"
38980            break
38981          fi
38982        done
38983        IFS="$IFS_save"
38984      else
38985        # This is an absolute path, we can use it without further modifications.
38986        new_path="$path"
38987      fi
38988
38989      if test "x$new_path" = x; then
38990        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38991$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38992        has_space=`$ECHO "$complete" | $GREP " "`
38993        if test "x$has_space" != x; then
38994          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38995$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38996        fi
38997        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38998      fi
38999    fi
39000
39001    # Now join together the path and the arguments once again
39002    if test "x$arguments" != xEOL; then
39003      new_complete="$new_path ${arguments% *}"
39004    else
39005      new_complete="$new_path"
39006    fi
39007
39008    if test "x$complete" != "x$new_complete"; then
39009      AR="$new_complete"
39010      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
39011$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
39012    fi
39013  fi
39014
39015
39016
39017  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
39018
39019
39020  # Publish this variable in the help.
39021
39022
39023  if [ -z "${LIPO+x}" ]; then
39024    # The variable is not set by user, try to locate tool using the code snippet
39025    for ac_prog in lipo
39026do
39027  # Extract the first word of "$ac_prog", so it can be a program name with args.
39028set dummy $ac_prog; ac_word=$2
39029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39030$as_echo_n "checking for $ac_word... " >&6; }
39031if ${ac_cv_path_LIPO+:} false; then :
39032  $as_echo_n "(cached) " >&6
39033else
39034  case $LIPO in
39035  [\\/]* | ?:[\\/]*)
39036  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39037  ;;
39038  *)
39039  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39040for as_dir in $PATH
39041do
39042  IFS=$as_save_IFS
39043  test -z "$as_dir" && as_dir=.
39044    for ac_exec_ext in '' $ac_executable_extensions; do
39045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39046    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39048    break 2
39049  fi
39050done
39051  done
39052IFS=$as_save_IFS
39053
39054  ;;
39055esac
39056fi
39057LIPO=$ac_cv_path_LIPO
39058if test -n "$LIPO"; then
39059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39060$as_echo "$LIPO" >&6; }
39061else
39062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39063$as_echo "no" >&6; }
39064fi
39065
39066
39067  test -n "$LIPO" && break
39068done
39069
39070  else
39071    # The variable is set, but is it from the command line or the environment?
39072
39073    # Try to remove the string !LIPO! from our list.
39074    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
39075    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39076      # If it failed, the variable was not from the command line. Ignore it,
39077      # but warn the user (except for BASH, which is always set by the calling BASH).
39078      if test "xLIPO" != xBASH; then
39079        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
39080$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
39081      fi
39082      # Try to locate tool using the code snippet
39083      for ac_prog in lipo
39084do
39085  # Extract the first word of "$ac_prog", so it can be a program name with args.
39086set dummy $ac_prog; ac_word=$2
39087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39088$as_echo_n "checking for $ac_word... " >&6; }
39089if ${ac_cv_path_LIPO+:} false; then :
39090  $as_echo_n "(cached) " >&6
39091else
39092  case $LIPO in
39093  [\\/]* | ?:[\\/]*)
39094  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39095  ;;
39096  *)
39097  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39098for as_dir in $PATH
39099do
39100  IFS=$as_save_IFS
39101  test -z "$as_dir" && as_dir=.
39102    for ac_exec_ext in '' $ac_executable_extensions; do
39103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39104    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39106    break 2
39107  fi
39108done
39109  done
39110IFS=$as_save_IFS
39111
39112  ;;
39113esac
39114fi
39115LIPO=$ac_cv_path_LIPO
39116if test -n "$LIPO"; then
39117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39118$as_echo "$LIPO" >&6; }
39119else
39120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39121$as_echo "no" >&6; }
39122fi
39123
39124
39125  test -n "$LIPO" && break
39126done
39127
39128    else
39129      # If it succeeded, then it was overridden by the user. We will use it
39130      # for the tool.
39131
39132      # First remove it from the list of overridden variables, so we can test
39133      # for unknown variables in the end.
39134      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39135
39136      # Check if we try to supply an empty value
39137      if test "x$LIPO" = x; then
39138        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
39139$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
39140        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
39141$as_echo_n "checking for LIPO... " >&6; }
39142        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39143$as_echo "disabled" >&6; }
39144      else
39145        # Check if the provided tool contains a complete path.
39146        tool_specified="$LIPO"
39147        tool_basename="${tool_specified##*/}"
39148        if test "x$tool_basename" = "x$tool_specified"; then
39149          # A command without a complete path is provided, search $PATH.
39150          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
39151$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
39152          # Extract the first word of "$tool_basename", so it can be a program name with args.
39153set dummy $tool_basename; ac_word=$2
39154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39155$as_echo_n "checking for $ac_word... " >&6; }
39156if ${ac_cv_path_LIPO+:} false; then :
39157  $as_echo_n "(cached) " >&6
39158else
39159  case $LIPO in
39160  [\\/]* | ?:[\\/]*)
39161  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39162  ;;
39163  *)
39164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39165for as_dir in $PATH
39166do
39167  IFS=$as_save_IFS
39168  test -z "$as_dir" && as_dir=.
39169    for ac_exec_ext in '' $ac_executable_extensions; do
39170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39171    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39173    break 2
39174  fi
39175done
39176  done
39177IFS=$as_save_IFS
39178
39179  ;;
39180esac
39181fi
39182LIPO=$ac_cv_path_LIPO
39183if test -n "$LIPO"; then
39184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39185$as_echo "$LIPO" >&6; }
39186else
39187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39188$as_echo "no" >&6; }
39189fi
39190
39191
39192          if test "x$LIPO" = x; then
39193            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39194          fi
39195        else
39196          # Otherwise we believe it is a complete path. Use it as it is.
39197          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
39198$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
39199          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
39200$as_echo_n "checking for LIPO... " >&6; }
39201          if test ! -x "$tool_specified"; then
39202            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39203$as_echo "not found" >&6; }
39204            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
39205          fi
39206          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39207$as_echo "$tool_specified" >&6; }
39208        fi
39209      fi
39210    fi
39211
39212  fi
39213
39214
39215
39216  # Only process if variable expands to non-empty
39217
39218  if test "x$LIPO" != x; then
39219    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39220
39221  # First separate the path from the arguments. This will split at the first
39222  # space.
39223  complete="$LIPO"
39224  path="${complete%% *}"
39225  tmp="$complete EOL"
39226  arguments="${tmp#* }"
39227
39228  # Input might be given as Windows format, start by converting to
39229  # unix format.
39230  new_path=`$CYGPATH -u "$path"`
39231
39232  # Now try to locate executable using which
39233  new_path=`$WHICH "$new_path" 2> /dev/null`
39234  # bat and cmd files are not always considered executable in cygwin causing which
39235  # to not find them
39236  if test "x$new_path" = x \
39237      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39238      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39239    new_path=`$CYGPATH -u "$path"`
39240  fi
39241  if test "x$new_path" = x; then
39242    # Oops. Which didn't find the executable.
39243    # The splitting of arguments from the executable at a space might have been incorrect,
39244    # since paths with space are more likely in Windows. Give it another try with the whole
39245    # argument.
39246    path="$complete"
39247    arguments="EOL"
39248    new_path=`$CYGPATH -u "$path"`
39249    new_path=`$WHICH "$new_path" 2> /dev/null`
39250    # bat and cmd files are not always considered executable in cygwin causing which
39251    # to not find them
39252    if test "x$new_path" = x \
39253        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39254        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39255      new_path=`$CYGPATH -u "$path"`
39256    fi
39257    if test "x$new_path" = x; then
39258      # It's still not found. Now this is an unrecoverable error.
39259      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39260$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39261      has_space=`$ECHO "$complete" | $GREP " "`
39262      if test "x$has_space" != x; then
39263        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39264$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39265      fi
39266      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39267    fi
39268  fi
39269
39270  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39271  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39272  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39273  # "foo.exe" is OK but "foo" is an error.
39274  #
39275  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39276  # It is also a way to make sure we got the proper file name for the real test later on.
39277  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39278  if test "x$test_shortpath" = x; then
39279    # Short path failed, file does not exist as specified.
39280    # Try adding .exe or .cmd
39281    if test -f "${new_path}.exe"; then
39282      input_to_shortpath="${new_path}.exe"
39283    elif test -f "${new_path}.cmd"; then
39284      input_to_shortpath="${new_path}.cmd"
39285    else
39286      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
39287$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
39288      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39289$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39290      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39291    fi
39292  else
39293    input_to_shortpath="$new_path"
39294  fi
39295
39296  # Call helper function which possibly converts this using DOS-style short mode.
39297  # If so, the updated path is stored in $new_path.
39298  new_path="$input_to_shortpath"
39299
39300  input_path="$input_to_shortpath"
39301  # Check if we need to convert this using DOS-style short mode. If the path
39302  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39303  # take no chances and rewrite it.
39304  # Note: m4 eats our [], so we need to use [ and ] instead.
39305  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39306  if test "x$has_forbidden_chars" != x; then
39307    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39308    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39309    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39310    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39311      # Going to short mode and back again did indeed matter. Since short mode is
39312      # case insensitive, let's make it lowercase to improve readability.
39313      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39314      # Now convert it back to Unix-style (cygpath)
39315      input_path=`$CYGPATH -u "$shortmode_path"`
39316      new_path="$input_path"
39317    fi
39318  fi
39319
39320  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39321  if test "x$test_cygdrive_prefix" = x; then
39322    # As a simple fix, exclude /usr/bin since it's not a real path.
39323    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39324      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39325      # a path prefixed by /cygdrive for fixpath to work.
39326      new_path="$CYGWIN_ROOT_PATH$input_path"
39327    fi
39328  fi
39329
39330  # remove trailing .exe if any
39331  new_path="${new_path/%.exe/}"
39332
39333    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39334
39335  # First separate the path from the arguments. This will split at the first
39336  # space.
39337  complete="$LIPO"
39338  path="${complete%% *}"
39339  tmp="$complete EOL"
39340  arguments="${tmp#* }"
39341
39342  # Input might be given as Windows format, start by converting to
39343  # unix format.
39344  new_path="$path"
39345
39346  windows_path="$new_path"
39347  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39348    unix_path=`$CYGPATH -u "$windows_path"`
39349    new_path="$unix_path"
39350  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39351    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39352    new_path="$unix_path"
39353  fi
39354
39355
39356  # Now try to locate executable using which
39357  new_path=`$WHICH "$new_path" 2> /dev/null`
39358
39359  if test "x$new_path" = x; then
39360    # Oops. Which didn't find the executable.
39361    # The splitting of arguments from the executable at a space might have been incorrect,
39362    # since paths with space are more likely in Windows. Give it another try with the whole
39363    # argument.
39364    path="$complete"
39365    arguments="EOL"
39366    new_path="$path"
39367
39368  windows_path="$new_path"
39369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39370    unix_path=`$CYGPATH -u "$windows_path"`
39371    new_path="$unix_path"
39372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39374    new_path="$unix_path"
39375  fi
39376
39377
39378    new_path=`$WHICH "$new_path" 2> /dev/null`
39379    # bat and cmd files are not always considered executable in MSYS causing which
39380    # to not find them
39381    if test "x$new_path" = x \
39382        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39383        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39384      new_path="$path"
39385
39386  windows_path="$new_path"
39387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39388    unix_path=`$CYGPATH -u "$windows_path"`
39389    new_path="$unix_path"
39390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39391    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39392    new_path="$unix_path"
39393  fi
39394
39395    fi
39396
39397    if test "x$new_path" = x; then
39398      # It's still not found. Now this is an unrecoverable error.
39399      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39400$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39401      has_space=`$ECHO "$complete" | $GREP " "`
39402      if test "x$has_space" != x; then
39403        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39404$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39405      fi
39406      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39407    fi
39408  fi
39409
39410  # Now new_path has a complete unix path to the binary
39411  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39412    # Keep paths in /bin as-is, but remove trailing .exe if any
39413    new_path="${new_path/%.exe/}"
39414    # Do not save /bin paths to all_fixpath_prefixes!
39415  else
39416    # Not in mixed or Windows style, start by that.
39417    new_path=`cmd //c echo $new_path`
39418
39419  input_path="$new_path"
39420  # Check if we need to convert this using DOS-style short mode. If the path
39421  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39422  # take no chances and rewrite it.
39423  # Note: m4 eats our [], so we need to use [ and ] instead.
39424  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39425  if test "x$has_forbidden_chars" != x; then
39426    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39427    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39428  fi
39429
39430    # Output is in $new_path
39431
39432  windows_path="$new_path"
39433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39434    unix_path=`$CYGPATH -u "$windows_path"`
39435    new_path="$unix_path"
39436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39438    new_path="$unix_path"
39439  fi
39440
39441    # remove trailing .exe if any
39442    new_path="${new_path/%.exe/}"
39443
39444    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39445    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39446  fi
39447
39448    else
39449      # We're on a unix platform. Hooray! :)
39450      # First separate the path from the arguments. This will split at the first
39451      # space.
39452      complete="$LIPO"
39453      path="${complete%% *}"
39454      tmp="$complete EOL"
39455      arguments="${tmp#* }"
39456
39457      # Cannot rely on the command "which" here since it doesn't always work.
39458      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39459      if test -z "$is_absolute_path"; then
39460        # Path to executable is not absolute. Find it.
39461        IFS_save="$IFS"
39462        IFS=:
39463        for p in $PATH; do
39464          if test -f "$p/$path" && test -x "$p/$path"; then
39465            new_path="$p/$path"
39466            break
39467          fi
39468        done
39469        IFS="$IFS_save"
39470      else
39471        # This is an absolute path, we can use it without further modifications.
39472        new_path="$path"
39473      fi
39474
39475      if test "x$new_path" = x; then
39476        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39477$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39478        has_space=`$ECHO "$complete" | $GREP " "`
39479        if test "x$has_space" != x; then
39480          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39481$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39482        fi
39483        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39484      fi
39485    fi
39486
39487    # Now join together the path and the arguments once again
39488    if test "x$arguments" != xEOL; then
39489      new_complete="$new_path ${arguments% *}"
39490    else
39491      new_complete="$new_path"
39492    fi
39493
39494    if test "x$complete" != "x$new_complete"; then
39495      LIPO="$new_complete"
39496      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
39497$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
39498    fi
39499  fi
39500
39501  fi
39502
39503  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
39504    # Extract the first word of "mt", so it can be a program name with args.
39505set dummy mt; ac_word=$2
39506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39507$as_echo_n "checking for $ac_word... " >&6; }
39508if ${ac_cv_prog_MT+:} false; then :
39509  $as_echo_n "(cached) " >&6
39510else
39511  if test -n "$MT"; then
39512  ac_cv_prog_MT="$MT" # Let the user override the test.
39513else
39514  ac_prog_rejected=no
39515as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39516for as_dir in $PATH
39517do
39518  IFS=$as_save_IFS
39519  test -z "$as_dir" && as_dir=.
39520    for ac_exec_ext in '' $ac_executable_extensions; do
39521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39522    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
39523       ac_prog_rejected=yes
39524       continue
39525     fi
39526    ac_cv_prog_MT="mt"
39527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39528    break 2
39529  fi
39530done
39531  done
39532IFS=$as_save_IFS
39533
39534if test $ac_prog_rejected = yes; then
39535  # We found a bogon in the path, so make sure we never use it.
39536  set dummy $ac_cv_prog_MT
39537  shift
39538  if test $# != 0; then
39539    # We chose a different compiler from the bogus one.
39540    # However, it has the same basename, so the bogon will be chosen
39541    # first if we set MT to just the basename; use the full file name.
39542    shift
39543    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
39544  fi
39545fi
39546fi
39547fi
39548MT=$ac_cv_prog_MT
39549if test -n "$MT"; then
39550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
39551$as_echo "$MT" >&6; }
39552else
39553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39554$as_echo "no" >&6; }
39555fi
39556
39557
39558
39559  # Only process if variable expands to non-empty
39560
39561  if test "x$MT" != x; then
39562    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39563
39564  # First separate the path from the arguments. This will split at the first
39565  # space.
39566  complete="$MT"
39567  path="${complete%% *}"
39568  tmp="$complete EOL"
39569  arguments="${tmp#* }"
39570
39571  # Input might be given as Windows format, start by converting to
39572  # unix format.
39573  new_path=`$CYGPATH -u "$path"`
39574
39575  # Now try to locate executable using which
39576  new_path=`$WHICH "$new_path" 2> /dev/null`
39577  # bat and cmd files are not always considered executable in cygwin causing which
39578  # to not find them
39579  if test "x$new_path" = x \
39580      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39581      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39582    new_path=`$CYGPATH -u "$path"`
39583  fi
39584  if test "x$new_path" = x; then
39585    # Oops. Which didn't find the executable.
39586    # The splitting of arguments from the executable at a space might have been incorrect,
39587    # since paths with space are more likely in Windows. Give it another try with the whole
39588    # argument.
39589    path="$complete"
39590    arguments="EOL"
39591    new_path=`$CYGPATH -u "$path"`
39592    new_path=`$WHICH "$new_path" 2> /dev/null`
39593    # bat and cmd files are not always considered executable in cygwin causing which
39594    # to not find them
39595    if test "x$new_path" = x \
39596        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39597        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39598      new_path=`$CYGPATH -u "$path"`
39599    fi
39600    if test "x$new_path" = x; then
39601      # It's still not found. Now this is an unrecoverable error.
39602      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39603$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39604      has_space=`$ECHO "$complete" | $GREP " "`
39605      if test "x$has_space" != x; then
39606        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39607$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39608      fi
39609      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39610    fi
39611  fi
39612
39613  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39614  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39615  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39616  # "foo.exe" is OK but "foo" is an error.
39617  #
39618  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39619  # It is also a way to make sure we got the proper file name for the real test later on.
39620  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39621  if test "x$test_shortpath" = x; then
39622    # Short path failed, file does not exist as specified.
39623    # Try adding .exe or .cmd
39624    if test -f "${new_path}.exe"; then
39625      input_to_shortpath="${new_path}.exe"
39626    elif test -f "${new_path}.cmd"; then
39627      input_to_shortpath="${new_path}.cmd"
39628    else
39629      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
39630$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
39631      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39632$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39633      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39634    fi
39635  else
39636    input_to_shortpath="$new_path"
39637  fi
39638
39639  # Call helper function which possibly converts this using DOS-style short mode.
39640  # If so, the updated path is stored in $new_path.
39641  new_path="$input_to_shortpath"
39642
39643  input_path="$input_to_shortpath"
39644  # Check if we need to convert this using DOS-style short mode. If the path
39645  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39646  # take no chances and rewrite it.
39647  # Note: m4 eats our [], so we need to use [ and ] instead.
39648  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39649  if test "x$has_forbidden_chars" != x; then
39650    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39651    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39652    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39653    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39654      # Going to short mode and back again did indeed matter. Since short mode is
39655      # case insensitive, let's make it lowercase to improve readability.
39656      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39657      # Now convert it back to Unix-style (cygpath)
39658      input_path=`$CYGPATH -u "$shortmode_path"`
39659      new_path="$input_path"
39660    fi
39661  fi
39662
39663  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39664  if test "x$test_cygdrive_prefix" = x; then
39665    # As a simple fix, exclude /usr/bin since it's not a real path.
39666    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39667      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39668      # a path prefixed by /cygdrive for fixpath to work.
39669      new_path="$CYGWIN_ROOT_PATH$input_path"
39670    fi
39671  fi
39672
39673  # remove trailing .exe if any
39674  new_path="${new_path/%.exe/}"
39675
39676    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39677
39678  # First separate the path from the arguments. This will split at the first
39679  # space.
39680  complete="$MT"
39681  path="${complete%% *}"
39682  tmp="$complete EOL"
39683  arguments="${tmp#* }"
39684
39685  # Input might be given as Windows format, start by converting to
39686  # unix format.
39687  new_path="$path"
39688
39689  windows_path="$new_path"
39690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39691    unix_path=`$CYGPATH -u "$windows_path"`
39692    new_path="$unix_path"
39693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39694    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39695    new_path="$unix_path"
39696  fi
39697
39698
39699  # Now try to locate executable using which
39700  new_path=`$WHICH "$new_path" 2> /dev/null`
39701
39702  if test "x$new_path" = x; then
39703    # Oops. Which didn't find the executable.
39704    # The splitting of arguments from the executable at a space might have been incorrect,
39705    # since paths with space are more likely in Windows. Give it another try with the whole
39706    # argument.
39707    path="$complete"
39708    arguments="EOL"
39709    new_path="$path"
39710
39711  windows_path="$new_path"
39712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39713    unix_path=`$CYGPATH -u "$windows_path"`
39714    new_path="$unix_path"
39715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39716    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39717    new_path="$unix_path"
39718  fi
39719
39720
39721    new_path=`$WHICH "$new_path" 2> /dev/null`
39722    # bat and cmd files are not always considered executable in MSYS causing which
39723    # to not find them
39724    if test "x$new_path" = x \
39725        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39726        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39727      new_path="$path"
39728
39729  windows_path="$new_path"
39730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39731    unix_path=`$CYGPATH -u "$windows_path"`
39732    new_path="$unix_path"
39733  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39734    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39735    new_path="$unix_path"
39736  fi
39737
39738    fi
39739
39740    if test "x$new_path" = x; then
39741      # It's still not found. Now this is an unrecoverable error.
39742      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39743$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39744      has_space=`$ECHO "$complete" | $GREP " "`
39745      if test "x$has_space" != x; then
39746        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39747$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39748      fi
39749      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39750    fi
39751  fi
39752
39753  # Now new_path has a complete unix path to the binary
39754  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39755    # Keep paths in /bin as-is, but remove trailing .exe if any
39756    new_path="${new_path/%.exe/}"
39757    # Do not save /bin paths to all_fixpath_prefixes!
39758  else
39759    # Not in mixed or Windows style, start by that.
39760    new_path=`cmd //c echo $new_path`
39761
39762  input_path="$new_path"
39763  # Check if we need to convert this using DOS-style short mode. If the path
39764  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39765  # take no chances and rewrite it.
39766  # Note: m4 eats our [], so we need to use [ and ] instead.
39767  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39768  if test "x$has_forbidden_chars" != x; then
39769    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39770    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39771  fi
39772
39773    # Output is in $new_path
39774
39775  windows_path="$new_path"
39776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39777    unix_path=`$CYGPATH -u "$windows_path"`
39778    new_path="$unix_path"
39779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39780    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39781    new_path="$unix_path"
39782  fi
39783
39784    # remove trailing .exe if any
39785    new_path="${new_path/%.exe/}"
39786
39787    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39788    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39789  fi
39790
39791    else
39792      # We're on a unix platform. Hooray! :)
39793      # First separate the path from the arguments. This will split at the first
39794      # space.
39795      complete="$MT"
39796      path="${complete%% *}"
39797      tmp="$complete EOL"
39798      arguments="${tmp#* }"
39799
39800      # Cannot rely on the command "which" here since it doesn't always work.
39801      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39802      if test -z "$is_absolute_path"; then
39803        # Path to executable is not absolute. Find it.
39804        IFS_save="$IFS"
39805        IFS=:
39806        for p in $PATH; do
39807          if test -f "$p/$path" && test -x "$p/$path"; then
39808            new_path="$p/$path"
39809            break
39810          fi
39811        done
39812        IFS="$IFS_save"
39813      else
39814        # This is an absolute path, we can use it without further modifications.
39815        new_path="$path"
39816      fi
39817
39818      if test "x$new_path" = x; then
39819        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39820$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39821        has_space=`$ECHO "$complete" | $GREP " "`
39822        if test "x$has_space" != x; then
39823          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39824$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39825        fi
39826        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39827      fi
39828    fi
39829
39830    # Now join together the path and the arguments once again
39831    if test "x$arguments" != xEOL; then
39832      new_complete="$new_path ${arguments% *}"
39833    else
39834      new_complete="$new_path"
39835    fi
39836
39837    if test "x$complete" != "x$new_complete"; then
39838      MT="$new_complete"
39839      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
39840$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
39841    fi
39842  fi
39843
39844    # Setup the resource compiler (RC)
39845    # Extract the first word of "rc", so it can be a program name with args.
39846set dummy rc; ac_word=$2
39847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39848$as_echo_n "checking for $ac_word... " >&6; }
39849if ${ac_cv_prog_RC+:} false; then :
39850  $as_echo_n "(cached) " >&6
39851else
39852  if test -n "$RC"; then
39853  ac_cv_prog_RC="$RC" # Let the user override the test.
39854else
39855  ac_prog_rejected=no
39856as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39857for as_dir in $PATH
39858do
39859  IFS=$as_save_IFS
39860  test -z "$as_dir" && as_dir=.
39861    for ac_exec_ext in '' $ac_executable_extensions; do
39862  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39863    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
39864       ac_prog_rejected=yes
39865       continue
39866     fi
39867    ac_cv_prog_RC="rc"
39868    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39869    break 2
39870  fi
39871done
39872  done
39873IFS=$as_save_IFS
39874
39875if test $ac_prog_rejected = yes; then
39876  # We found a bogon in the path, so make sure we never use it.
39877  set dummy $ac_cv_prog_RC
39878  shift
39879  if test $# != 0; then
39880    # We chose a different compiler from the bogus one.
39881    # However, it has the same basename, so the bogon will be chosen
39882    # first if we set RC to just the basename; use the full file name.
39883    shift
39884    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
39885  fi
39886fi
39887fi
39888fi
39889RC=$ac_cv_prog_RC
39890if test -n "$RC"; then
39891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
39892$as_echo "$RC" >&6; }
39893else
39894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39895$as_echo "no" >&6; }
39896fi
39897
39898
39899
39900  # Only process if variable expands to non-empty
39901
39902  if test "x$RC" != x; then
39903    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39904
39905  # First separate the path from the arguments. This will split at the first
39906  # space.
39907  complete="$RC"
39908  path="${complete%% *}"
39909  tmp="$complete EOL"
39910  arguments="${tmp#* }"
39911
39912  # Input might be given as Windows format, start by converting to
39913  # unix format.
39914  new_path=`$CYGPATH -u "$path"`
39915
39916  # Now try to locate executable using which
39917  new_path=`$WHICH "$new_path" 2> /dev/null`
39918  # bat and cmd files are not always considered executable in cygwin causing which
39919  # to not find them
39920  if test "x$new_path" = x \
39921      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39922      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39923    new_path=`$CYGPATH -u "$path"`
39924  fi
39925  if test "x$new_path" = x; then
39926    # Oops. Which didn't find the executable.
39927    # The splitting of arguments from the executable at a space might have been incorrect,
39928    # since paths with space are more likely in Windows. Give it another try with the whole
39929    # argument.
39930    path="$complete"
39931    arguments="EOL"
39932    new_path=`$CYGPATH -u "$path"`
39933    new_path=`$WHICH "$new_path" 2> /dev/null`
39934    # bat and cmd files are not always considered executable in cygwin causing which
39935    # to not find them
39936    if test "x$new_path" = x \
39937        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39938        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39939      new_path=`$CYGPATH -u "$path"`
39940    fi
39941    if test "x$new_path" = x; then
39942      # It's still not found. Now this is an unrecoverable error.
39943      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39944$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39945      has_space=`$ECHO "$complete" | $GREP " "`
39946      if test "x$has_space" != x; then
39947        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39948$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39949      fi
39950      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39951    fi
39952  fi
39953
39954  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39955  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39956  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39957  # "foo.exe" is OK but "foo" is an error.
39958  #
39959  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39960  # It is also a way to make sure we got the proper file name for the real test later on.
39961  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39962  if test "x$test_shortpath" = x; then
39963    # Short path failed, file does not exist as specified.
39964    # Try adding .exe or .cmd
39965    if test -f "${new_path}.exe"; then
39966      input_to_shortpath="${new_path}.exe"
39967    elif test -f "${new_path}.cmd"; then
39968      input_to_shortpath="${new_path}.cmd"
39969    else
39970      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
39971$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
39972      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39973$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39974      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39975    fi
39976  else
39977    input_to_shortpath="$new_path"
39978  fi
39979
39980  # Call helper function which possibly converts this using DOS-style short mode.
39981  # If so, the updated path is stored in $new_path.
39982  new_path="$input_to_shortpath"
39983
39984  input_path="$input_to_shortpath"
39985  # Check if we need to convert this using DOS-style short mode. If the path
39986  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39987  # take no chances and rewrite it.
39988  # Note: m4 eats our [], so we need to use [ and ] instead.
39989  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39990  if test "x$has_forbidden_chars" != x; then
39991    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39992    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39993    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39994    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39995      # Going to short mode and back again did indeed matter. Since short mode is
39996      # case insensitive, let's make it lowercase to improve readability.
39997      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39998      # Now convert it back to Unix-style (cygpath)
39999      input_path=`$CYGPATH -u "$shortmode_path"`
40000      new_path="$input_path"
40001    fi
40002  fi
40003
40004  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40005  if test "x$test_cygdrive_prefix" = x; then
40006    # As a simple fix, exclude /usr/bin since it's not a real path.
40007    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40008      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40009      # a path prefixed by /cygdrive for fixpath to work.
40010      new_path="$CYGWIN_ROOT_PATH$input_path"
40011    fi
40012  fi
40013
40014  # remove trailing .exe if any
40015  new_path="${new_path/%.exe/}"
40016
40017    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40018
40019  # First separate the path from the arguments. This will split at the first
40020  # space.
40021  complete="$RC"
40022  path="${complete%% *}"
40023  tmp="$complete EOL"
40024  arguments="${tmp#* }"
40025
40026  # Input might be given as Windows format, start by converting to
40027  # unix format.
40028  new_path="$path"
40029
40030  windows_path="$new_path"
40031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40032    unix_path=`$CYGPATH -u "$windows_path"`
40033    new_path="$unix_path"
40034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40035    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40036    new_path="$unix_path"
40037  fi
40038
40039
40040  # Now try to locate executable using which
40041  new_path=`$WHICH "$new_path" 2> /dev/null`
40042
40043  if test "x$new_path" = x; then
40044    # Oops. Which didn't find the executable.
40045    # The splitting of arguments from the executable at a space might have been incorrect,
40046    # since paths with space are more likely in Windows. Give it another try with the whole
40047    # argument.
40048    path="$complete"
40049    arguments="EOL"
40050    new_path="$path"
40051
40052  windows_path="$new_path"
40053  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40054    unix_path=`$CYGPATH -u "$windows_path"`
40055    new_path="$unix_path"
40056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40057    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40058    new_path="$unix_path"
40059  fi
40060
40061
40062    new_path=`$WHICH "$new_path" 2> /dev/null`
40063    # bat and cmd files are not always considered executable in MSYS causing which
40064    # to not find them
40065    if test "x$new_path" = x \
40066        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40067        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40068      new_path="$path"
40069
40070  windows_path="$new_path"
40071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40072    unix_path=`$CYGPATH -u "$windows_path"`
40073    new_path="$unix_path"
40074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40075    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40076    new_path="$unix_path"
40077  fi
40078
40079    fi
40080
40081    if test "x$new_path" = x; then
40082      # It's still not found. Now this is an unrecoverable error.
40083      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
40084$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
40085      has_space=`$ECHO "$complete" | $GREP " "`
40086      if test "x$has_space" != x; then
40087        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40088$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40089      fi
40090      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
40091    fi
40092  fi
40093
40094  # Now new_path has a complete unix path to the binary
40095  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40096    # Keep paths in /bin as-is, but remove trailing .exe if any
40097    new_path="${new_path/%.exe/}"
40098    # Do not save /bin paths to all_fixpath_prefixes!
40099  else
40100    # Not in mixed or Windows style, start by that.
40101    new_path=`cmd //c echo $new_path`
40102
40103  input_path="$new_path"
40104  # Check if we need to convert this using DOS-style short mode. If the path
40105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40106  # take no chances and rewrite it.
40107  # Note: m4 eats our [], so we need to use [ and ] instead.
40108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40109  if test "x$has_forbidden_chars" != x; then
40110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40111    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40112  fi
40113
40114    # Output is in $new_path
40115
40116  windows_path="$new_path"
40117  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40118    unix_path=`$CYGPATH -u "$windows_path"`
40119    new_path="$unix_path"
40120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40121    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40122    new_path="$unix_path"
40123  fi
40124
40125    # remove trailing .exe if any
40126    new_path="${new_path/%.exe/}"
40127
40128    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40129    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40130  fi
40131
40132    else
40133      # We're on a unix platform. Hooray! :)
40134      # First separate the path from the arguments. This will split at the first
40135      # space.
40136      complete="$RC"
40137      path="${complete%% *}"
40138      tmp="$complete EOL"
40139      arguments="${tmp#* }"
40140
40141      # Cannot rely on the command "which" here since it doesn't always work.
40142      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40143      if test -z "$is_absolute_path"; then
40144        # Path to executable is not absolute. Find it.
40145        IFS_save="$IFS"
40146        IFS=:
40147        for p in $PATH; do
40148          if test -f "$p/$path" && test -x "$p/$path"; then
40149            new_path="$p/$path"
40150            break
40151          fi
40152        done
40153        IFS="$IFS_save"
40154      else
40155        # This is an absolute path, we can use it without further modifications.
40156        new_path="$path"
40157      fi
40158
40159      if test "x$new_path" = x; then
40160        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
40161$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
40162        has_space=`$ECHO "$complete" | $GREP " "`
40163        if test "x$has_space" != x; then
40164          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40165$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40166        fi
40167        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
40168      fi
40169    fi
40170
40171    # Now join together the path and the arguments once again
40172    if test "x$arguments" != xEOL; then
40173      new_complete="$new_path ${arguments% *}"
40174    else
40175      new_complete="$new_path"
40176    fi
40177
40178    if test "x$complete" != "x$new_complete"; then
40179      RC="$new_complete"
40180      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
40181$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
40182    fi
40183  fi
40184
40185    # Extract the first word of "dumpbin", so it can be a program name with args.
40186set dummy dumpbin; ac_word=$2
40187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40188$as_echo_n "checking for $ac_word... " >&6; }
40189if ${ac_cv_prog_DUMPBIN+:} false; then :
40190  $as_echo_n "(cached) " >&6
40191else
40192  if test -n "$DUMPBIN"; then
40193  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
40194else
40195as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40196for as_dir in $PATH
40197do
40198  IFS=$as_save_IFS
40199  test -z "$as_dir" && as_dir=.
40200    for ac_exec_ext in '' $ac_executable_extensions; do
40201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40202    ac_cv_prog_DUMPBIN="dumpbin"
40203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40204    break 2
40205  fi
40206done
40207  done
40208IFS=$as_save_IFS
40209
40210fi
40211fi
40212DUMPBIN=$ac_cv_prog_DUMPBIN
40213if test -n "$DUMPBIN"; then
40214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
40215$as_echo "$DUMPBIN" >&6; }
40216else
40217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40218$as_echo "no" >&6; }
40219fi
40220
40221
40222
40223  # Only process if variable expands to non-empty
40224
40225  if test "x$DUMPBIN" != x; then
40226    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40227
40228  # First separate the path from the arguments. This will split at the first
40229  # space.
40230  complete="$DUMPBIN"
40231  path="${complete%% *}"
40232  tmp="$complete EOL"
40233  arguments="${tmp#* }"
40234
40235  # Input might be given as Windows format, start by converting to
40236  # unix format.
40237  new_path=`$CYGPATH -u "$path"`
40238
40239  # Now try to locate executable using which
40240  new_path=`$WHICH "$new_path" 2> /dev/null`
40241  # bat and cmd files are not always considered executable in cygwin causing which
40242  # to not find them
40243  if test "x$new_path" = x \
40244      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40245      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40246    new_path=`$CYGPATH -u "$path"`
40247  fi
40248  if test "x$new_path" = x; then
40249    # Oops. Which didn't find the executable.
40250    # The splitting of arguments from the executable at a space might have been incorrect,
40251    # since paths with space are more likely in Windows. Give it another try with the whole
40252    # argument.
40253    path="$complete"
40254    arguments="EOL"
40255    new_path=`$CYGPATH -u "$path"`
40256    new_path=`$WHICH "$new_path" 2> /dev/null`
40257    # bat and cmd files are not always considered executable in cygwin causing which
40258    # to not find them
40259    if test "x$new_path" = x \
40260        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40261        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40262      new_path=`$CYGPATH -u "$path"`
40263    fi
40264    if test "x$new_path" = x; then
40265      # It's still not found. Now this is an unrecoverable error.
40266      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40267$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40268      has_space=`$ECHO "$complete" | $GREP " "`
40269      if test "x$has_space" != x; then
40270        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40271$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40272      fi
40273      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40274    fi
40275  fi
40276
40277  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40278  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40279  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40280  # "foo.exe" is OK but "foo" is an error.
40281  #
40282  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40283  # It is also a way to make sure we got the proper file name for the real test later on.
40284  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40285  if test "x$test_shortpath" = x; then
40286    # Short path failed, file does not exist as specified.
40287    # Try adding .exe or .cmd
40288    if test -f "${new_path}.exe"; then
40289      input_to_shortpath="${new_path}.exe"
40290    elif test -f "${new_path}.cmd"; then
40291      input_to_shortpath="${new_path}.cmd"
40292    else
40293      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
40294$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
40295      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40296$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40297      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40298    fi
40299  else
40300    input_to_shortpath="$new_path"
40301  fi
40302
40303  # Call helper function which possibly converts this using DOS-style short mode.
40304  # If so, the updated path is stored in $new_path.
40305  new_path="$input_to_shortpath"
40306
40307  input_path="$input_to_shortpath"
40308  # Check if we need to convert this using DOS-style short mode. If the path
40309  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40310  # take no chances and rewrite it.
40311  # Note: m4 eats our [], so we need to use [ and ] instead.
40312  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40313  if test "x$has_forbidden_chars" != x; then
40314    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40315    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40316    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40317    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40318      # Going to short mode and back again did indeed matter. Since short mode is
40319      # case insensitive, let's make it lowercase to improve readability.
40320      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40321      # Now convert it back to Unix-style (cygpath)
40322      input_path=`$CYGPATH -u "$shortmode_path"`
40323      new_path="$input_path"
40324    fi
40325  fi
40326
40327  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40328  if test "x$test_cygdrive_prefix" = x; then
40329    # As a simple fix, exclude /usr/bin since it's not a real path.
40330    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40331      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40332      # a path prefixed by /cygdrive for fixpath to work.
40333      new_path="$CYGWIN_ROOT_PATH$input_path"
40334    fi
40335  fi
40336
40337  # remove trailing .exe if any
40338  new_path="${new_path/%.exe/}"
40339
40340    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40341
40342  # First separate the path from the arguments. This will split at the first
40343  # space.
40344  complete="$DUMPBIN"
40345  path="${complete%% *}"
40346  tmp="$complete EOL"
40347  arguments="${tmp#* }"
40348
40349  # Input might be given as Windows format, start by converting to
40350  # unix format.
40351  new_path="$path"
40352
40353  windows_path="$new_path"
40354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40355    unix_path=`$CYGPATH -u "$windows_path"`
40356    new_path="$unix_path"
40357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40358    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40359    new_path="$unix_path"
40360  fi
40361
40362
40363  # Now try to locate executable using which
40364  new_path=`$WHICH "$new_path" 2> /dev/null`
40365
40366  if test "x$new_path" = x; then
40367    # Oops. Which didn't find the executable.
40368    # The splitting of arguments from the executable at a space might have been incorrect,
40369    # since paths with space are more likely in Windows. Give it another try with the whole
40370    # argument.
40371    path="$complete"
40372    arguments="EOL"
40373    new_path="$path"
40374
40375  windows_path="$new_path"
40376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40377    unix_path=`$CYGPATH -u "$windows_path"`
40378    new_path="$unix_path"
40379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40381    new_path="$unix_path"
40382  fi
40383
40384
40385    new_path=`$WHICH "$new_path" 2> /dev/null`
40386    # bat and cmd files are not always considered executable in MSYS causing which
40387    # to not find them
40388    if test "x$new_path" = x \
40389        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40390        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40391      new_path="$path"
40392
40393  windows_path="$new_path"
40394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40395    unix_path=`$CYGPATH -u "$windows_path"`
40396    new_path="$unix_path"
40397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40398    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40399    new_path="$unix_path"
40400  fi
40401
40402    fi
40403
40404    if test "x$new_path" = x; then
40405      # It's still not found. Now this is an unrecoverable error.
40406      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40407$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40408      has_space=`$ECHO "$complete" | $GREP " "`
40409      if test "x$has_space" != x; then
40410        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40411$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40412      fi
40413      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40414    fi
40415  fi
40416
40417  # Now new_path has a complete unix path to the binary
40418  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40419    # Keep paths in /bin as-is, but remove trailing .exe if any
40420    new_path="${new_path/%.exe/}"
40421    # Do not save /bin paths to all_fixpath_prefixes!
40422  else
40423    # Not in mixed or Windows style, start by that.
40424    new_path=`cmd //c echo $new_path`
40425
40426  input_path="$new_path"
40427  # Check if we need to convert this using DOS-style short mode. If the path
40428  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40429  # take no chances and rewrite it.
40430  # Note: m4 eats our [], so we need to use [ and ] instead.
40431  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40432  if test "x$has_forbidden_chars" != x; then
40433    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40434    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40435  fi
40436
40437    # Output is in $new_path
40438
40439  windows_path="$new_path"
40440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40441    unix_path=`$CYGPATH -u "$windows_path"`
40442    new_path="$unix_path"
40443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40444    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40445    new_path="$unix_path"
40446  fi
40447
40448    # remove trailing .exe if any
40449    new_path="${new_path/%.exe/}"
40450
40451    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40452    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40453  fi
40454
40455    else
40456      # We're on a unix platform. Hooray! :)
40457      # First separate the path from the arguments. This will split at the first
40458      # space.
40459      complete="$DUMPBIN"
40460      path="${complete%% *}"
40461      tmp="$complete EOL"
40462      arguments="${tmp#* }"
40463
40464      # Cannot rely on the command "which" here since it doesn't always work.
40465      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40466      if test -z "$is_absolute_path"; then
40467        # Path to executable is not absolute. Find it.
40468        IFS_save="$IFS"
40469        IFS=:
40470        for p in $PATH; do
40471          if test -f "$p/$path" && test -x "$p/$path"; then
40472            new_path="$p/$path"
40473            break
40474          fi
40475        done
40476        IFS="$IFS_save"
40477      else
40478        # This is an absolute path, we can use it without further modifications.
40479        new_path="$path"
40480      fi
40481
40482      if test "x$new_path" = x; then
40483        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40484$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40485        has_space=`$ECHO "$complete" | $GREP " "`
40486        if test "x$has_space" != x; then
40487          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40488$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40489        fi
40490        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40491      fi
40492    fi
40493
40494    # Now join together the path and the arguments once again
40495    if test "x$arguments" != xEOL; then
40496      new_complete="$new_path ${arguments% *}"
40497    else
40498      new_complete="$new_path"
40499    fi
40500
40501    if test "x$complete" != "x$new_complete"; then
40502      DUMPBIN="$new_complete"
40503      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
40504$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
40505    fi
40506  fi
40507
40508    # We need to check for 'msbuild.exe' because at the place where we expect to
40509    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
40510    # won't find the 'msbuild.exe' executable in that case (and the
40511    # 'ac_executable_extensions' is unusable due to performance reasons).
40512    # Notice that we intentionally don't fix up the path to MSBUILD because we
40513    # will call it in a DOS shell during freetype detection on Windows (see
40514    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
40515    # Extract the first word of "msbuild.exe", so it can be a program name with args.
40516set dummy msbuild.exe; ac_word=$2
40517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40518$as_echo_n "checking for $ac_word... " >&6; }
40519if ${ac_cv_prog_MSBUILD+:} false; then :
40520  $as_echo_n "(cached) " >&6
40521else
40522  if test -n "$MSBUILD"; then
40523  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
40524else
40525as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40526for as_dir in $PATH
40527do
40528  IFS=$as_save_IFS
40529  test -z "$as_dir" && as_dir=.
40530    for ac_exec_ext in '' $ac_executable_extensions; do
40531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40532    ac_cv_prog_MSBUILD="msbuild.exe"
40533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40534    break 2
40535  fi
40536done
40537  done
40538IFS=$as_save_IFS
40539
40540fi
40541fi
40542MSBUILD=$ac_cv_prog_MSBUILD
40543if test -n "$MSBUILD"; then
40544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
40545$as_echo "$MSBUILD" >&6; }
40546else
40547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40548$as_echo "no" >&6; }
40549fi
40550
40551
40552  fi
40553
40554  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40555
40556
40557  # Publish this variable in the help.
40558
40559
40560  if [ -z "${STRIP+x}" ]; then
40561    # The variable is not set by user, try to locate tool using the code snippet
40562    for ac_prog in strip
40563do
40564  # Extract the first word of "$ac_prog", so it can be a program name with args.
40565set dummy $ac_prog; ac_word=$2
40566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40567$as_echo_n "checking for $ac_word... " >&6; }
40568if ${ac_cv_path_STRIP+:} false; then :
40569  $as_echo_n "(cached) " >&6
40570else
40571  case $STRIP in
40572  [\\/]* | ?:[\\/]*)
40573  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40574  ;;
40575  *)
40576  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40577for as_dir in $PATH
40578do
40579  IFS=$as_save_IFS
40580  test -z "$as_dir" && as_dir=.
40581    for ac_exec_ext in '' $ac_executable_extensions; do
40582  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40583    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40584    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40585    break 2
40586  fi
40587done
40588  done
40589IFS=$as_save_IFS
40590
40591  ;;
40592esac
40593fi
40594STRIP=$ac_cv_path_STRIP
40595if test -n "$STRIP"; then
40596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40597$as_echo "$STRIP" >&6; }
40598else
40599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40600$as_echo "no" >&6; }
40601fi
40602
40603
40604  test -n "$STRIP" && break
40605done
40606
40607  else
40608    # The variable is set, but is it from the command line or the environment?
40609
40610    # Try to remove the string !STRIP! from our list.
40611    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
40612    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40613      # If it failed, the variable was not from the command line. Ignore it,
40614      # but warn the user (except for BASH, which is always set by the calling BASH).
40615      if test "xSTRIP" != xBASH; then
40616        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
40617$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
40618      fi
40619      # Try to locate tool using the code snippet
40620      for ac_prog in strip
40621do
40622  # Extract the first word of "$ac_prog", so it can be a program name with args.
40623set dummy $ac_prog; ac_word=$2
40624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40625$as_echo_n "checking for $ac_word... " >&6; }
40626if ${ac_cv_path_STRIP+:} false; then :
40627  $as_echo_n "(cached) " >&6
40628else
40629  case $STRIP in
40630  [\\/]* | ?:[\\/]*)
40631  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40632  ;;
40633  *)
40634  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40635for as_dir in $PATH
40636do
40637  IFS=$as_save_IFS
40638  test -z "$as_dir" && as_dir=.
40639    for ac_exec_ext in '' $ac_executable_extensions; do
40640  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40641    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40642    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40643    break 2
40644  fi
40645done
40646  done
40647IFS=$as_save_IFS
40648
40649  ;;
40650esac
40651fi
40652STRIP=$ac_cv_path_STRIP
40653if test -n "$STRIP"; then
40654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40655$as_echo "$STRIP" >&6; }
40656else
40657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40658$as_echo "no" >&6; }
40659fi
40660
40661
40662  test -n "$STRIP" && break
40663done
40664
40665    else
40666      # If it succeeded, then it was overridden by the user. We will use it
40667      # for the tool.
40668
40669      # First remove it from the list of overridden variables, so we can test
40670      # for unknown variables in the end.
40671      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40672
40673      # Check if we try to supply an empty value
40674      if test "x$STRIP" = x; then
40675        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40676$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40677        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40678$as_echo_n "checking for STRIP... " >&6; }
40679        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40680$as_echo "disabled" >&6; }
40681      else
40682        # Check if the provided tool contains a complete path.
40683        tool_specified="$STRIP"
40684        tool_basename="${tool_specified##*/}"
40685        if test "x$tool_basename" = "x$tool_specified"; then
40686          # A command without a complete path is provided, search $PATH.
40687          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40688$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40689          # Extract the first word of "$tool_basename", so it can be a program name with args.
40690set dummy $tool_basename; ac_word=$2
40691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40692$as_echo_n "checking for $ac_word... " >&6; }
40693if ${ac_cv_path_STRIP+:} false; then :
40694  $as_echo_n "(cached) " >&6
40695else
40696  case $STRIP in
40697  [\\/]* | ?:[\\/]*)
40698  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40699  ;;
40700  *)
40701  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40702for as_dir in $PATH
40703do
40704  IFS=$as_save_IFS
40705  test -z "$as_dir" && as_dir=.
40706    for ac_exec_ext in '' $ac_executable_extensions; do
40707  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40708    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40710    break 2
40711  fi
40712done
40713  done
40714IFS=$as_save_IFS
40715
40716  ;;
40717esac
40718fi
40719STRIP=$ac_cv_path_STRIP
40720if test -n "$STRIP"; then
40721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40722$as_echo "$STRIP" >&6; }
40723else
40724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40725$as_echo "no" >&6; }
40726fi
40727
40728
40729          if test "x$STRIP" = x; then
40730            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40731          fi
40732        else
40733          # Otherwise we believe it is a complete path. Use it as it is.
40734          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40735$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40736          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40737$as_echo_n "checking for STRIP... " >&6; }
40738          if test ! -x "$tool_specified"; then
40739            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40740$as_echo "not found" >&6; }
40741            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40742          fi
40743          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40744$as_echo "$tool_specified" >&6; }
40745        fi
40746      fi
40747    fi
40748
40749  fi
40750
40751
40752
40753  # Only process if variable expands to non-empty
40754
40755  if test "x$STRIP" != x; then
40756    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40757
40758  # First separate the path from the arguments. This will split at the first
40759  # space.
40760  complete="$STRIP"
40761  path="${complete%% *}"
40762  tmp="$complete EOL"
40763  arguments="${tmp#* }"
40764
40765  # Input might be given as Windows format, start by converting to
40766  # unix format.
40767  new_path=`$CYGPATH -u "$path"`
40768
40769  # Now try to locate executable using which
40770  new_path=`$WHICH "$new_path" 2> /dev/null`
40771  # bat and cmd files are not always considered executable in cygwin causing which
40772  # to not find them
40773  if test "x$new_path" = x \
40774      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40775      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40776    new_path=`$CYGPATH -u "$path"`
40777  fi
40778  if test "x$new_path" = x; then
40779    # Oops. Which didn't find the executable.
40780    # The splitting of arguments from the executable at a space might have been incorrect,
40781    # since paths with space are more likely in Windows. Give it another try with the whole
40782    # argument.
40783    path="$complete"
40784    arguments="EOL"
40785    new_path=`$CYGPATH -u "$path"`
40786    new_path=`$WHICH "$new_path" 2> /dev/null`
40787    # bat and cmd files are not always considered executable in cygwin causing which
40788    # to not find them
40789    if test "x$new_path" = x \
40790        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40791        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40792      new_path=`$CYGPATH -u "$path"`
40793    fi
40794    if test "x$new_path" = x; then
40795      # It's still not found. Now this is an unrecoverable error.
40796      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40797$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40798      has_space=`$ECHO "$complete" | $GREP " "`
40799      if test "x$has_space" != x; then
40800        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40801$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40802      fi
40803      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40804    fi
40805  fi
40806
40807  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40808  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40809  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40810  # "foo.exe" is OK but "foo" is an error.
40811  #
40812  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40813  # It is also a way to make sure we got the proper file name for the real test later on.
40814  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40815  if test "x$test_shortpath" = x; then
40816    # Short path failed, file does not exist as specified.
40817    # Try adding .exe or .cmd
40818    if test -f "${new_path}.exe"; then
40819      input_to_shortpath="${new_path}.exe"
40820    elif test -f "${new_path}.cmd"; then
40821      input_to_shortpath="${new_path}.cmd"
40822    else
40823      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40824$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40825      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40826$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40827      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40828    fi
40829  else
40830    input_to_shortpath="$new_path"
40831  fi
40832
40833  # Call helper function which possibly converts this using DOS-style short mode.
40834  # If so, the updated path is stored in $new_path.
40835  new_path="$input_to_shortpath"
40836
40837  input_path="$input_to_shortpath"
40838  # Check if we need to convert this using DOS-style short mode. If the path
40839  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40840  # take no chances and rewrite it.
40841  # Note: m4 eats our [], so we need to use [ and ] instead.
40842  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40843  if test "x$has_forbidden_chars" != x; then
40844    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40845    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40846    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40847    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40848      # Going to short mode and back again did indeed matter. Since short mode is
40849      # case insensitive, let's make it lowercase to improve readability.
40850      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40851      # Now convert it back to Unix-style (cygpath)
40852      input_path=`$CYGPATH -u "$shortmode_path"`
40853      new_path="$input_path"
40854    fi
40855  fi
40856
40857  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40858  if test "x$test_cygdrive_prefix" = x; then
40859    # As a simple fix, exclude /usr/bin since it's not a real path.
40860    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40861      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40862      # a path prefixed by /cygdrive for fixpath to work.
40863      new_path="$CYGWIN_ROOT_PATH$input_path"
40864    fi
40865  fi
40866
40867  # remove trailing .exe if any
40868  new_path="${new_path/%.exe/}"
40869
40870    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40871
40872  # First separate the path from the arguments. This will split at the first
40873  # space.
40874  complete="$STRIP"
40875  path="${complete%% *}"
40876  tmp="$complete EOL"
40877  arguments="${tmp#* }"
40878
40879  # Input might be given as Windows format, start by converting to
40880  # unix format.
40881  new_path="$path"
40882
40883  windows_path="$new_path"
40884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40885    unix_path=`$CYGPATH -u "$windows_path"`
40886    new_path="$unix_path"
40887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40889    new_path="$unix_path"
40890  fi
40891
40892
40893  # Now try to locate executable using which
40894  new_path=`$WHICH "$new_path" 2> /dev/null`
40895
40896  if test "x$new_path" = x; then
40897    # Oops. Which didn't find the executable.
40898    # The splitting of arguments from the executable at a space might have been incorrect,
40899    # since paths with space are more likely in Windows. Give it another try with the whole
40900    # argument.
40901    path="$complete"
40902    arguments="EOL"
40903    new_path="$path"
40904
40905  windows_path="$new_path"
40906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40907    unix_path=`$CYGPATH -u "$windows_path"`
40908    new_path="$unix_path"
40909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40911    new_path="$unix_path"
40912  fi
40913
40914
40915    new_path=`$WHICH "$new_path" 2> /dev/null`
40916    # bat and cmd files are not always considered executable in MSYS causing which
40917    # to not find them
40918    if test "x$new_path" = x \
40919        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40920        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40921      new_path="$path"
40922
40923  windows_path="$new_path"
40924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40925    unix_path=`$CYGPATH -u "$windows_path"`
40926    new_path="$unix_path"
40927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40929    new_path="$unix_path"
40930  fi
40931
40932    fi
40933
40934    if test "x$new_path" = x; then
40935      # It's still not found. Now this is an unrecoverable error.
40936      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40937$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40938      has_space=`$ECHO "$complete" | $GREP " "`
40939      if test "x$has_space" != x; then
40940        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40941$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40942      fi
40943      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40944    fi
40945  fi
40946
40947  # Now new_path has a complete unix path to the binary
40948  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40949    # Keep paths in /bin as-is, but remove trailing .exe if any
40950    new_path="${new_path/%.exe/}"
40951    # Do not save /bin paths to all_fixpath_prefixes!
40952  else
40953    # Not in mixed or Windows style, start by that.
40954    new_path=`cmd //c echo $new_path`
40955
40956  input_path="$new_path"
40957  # Check if we need to convert this using DOS-style short mode. If the path
40958  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40959  # take no chances and rewrite it.
40960  # Note: m4 eats our [], so we need to use [ and ] instead.
40961  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40962  if test "x$has_forbidden_chars" != x; then
40963    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40964    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40965  fi
40966
40967    # Output is in $new_path
40968
40969  windows_path="$new_path"
40970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40971    unix_path=`$CYGPATH -u "$windows_path"`
40972    new_path="$unix_path"
40973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40975    new_path="$unix_path"
40976  fi
40977
40978    # remove trailing .exe if any
40979    new_path="${new_path/%.exe/}"
40980
40981    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40982    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40983  fi
40984
40985    else
40986      # We're on a unix platform. Hooray! :)
40987      # First separate the path from the arguments. This will split at the first
40988      # space.
40989      complete="$STRIP"
40990      path="${complete%% *}"
40991      tmp="$complete EOL"
40992      arguments="${tmp#* }"
40993
40994      # Cannot rely on the command "which" here since it doesn't always work.
40995      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40996      if test -z "$is_absolute_path"; then
40997        # Path to executable is not absolute. Find it.
40998        IFS_save="$IFS"
40999        IFS=:
41000        for p in $PATH; do
41001          if test -f "$p/$path" && test -x "$p/$path"; then
41002            new_path="$p/$path"
41003            break
41004          fi
41005        done
41006        IFS="$IFS_save"
41007      else
41008        # This is an absolute path, we can use it without further modifications.
41009        new_path="$path"
41010      fi
41011
41012      if test "x$new_path" = x; then
41013        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41014$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41015        has_space=`$ECHO "$complete" | $GREP " "`
41016        if test "x$has_space" != x; then
41017          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41018$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41019        fi
41020        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41021      fi
41022    fi
41023
41024    # Now join together the path and the arguments once again
41025    if test "x$arguments" != xEOL; then
41026      new_complete="$new_path ${arguments% *}"
41027    else
41028      new_complete="$new_path"
41029    fi
41030
41031    if test "x$complete" != "x$new_complete"; then
41032      STRIP="$new_complete"
41033      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41034$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41035    fi
41036  fi
41037
41038
41039
41040  # Publish this variable in the help.
41041
41042
41043  if [ -z "${NM+x}" ]; then
41044    # The variable is not set by user, try to locate tool using the code snippet
41045    for ac_prog in nm
41046do
41047  # Extract the first word of "$ac_prog", so it can be a program name with args.
41048set dummy $ac_prog; ac_word=$2
41049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41050$as_echo_n "checking for $ac_word... " >&6; }
41051if ${ac_cv_path_NM+:} false; then :
41052  $as_echo_n "(cached) " >&6
41053else
41054  case $NM in
41055  [\\/]* | ?:[\\/]*)
41056  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41057  ;;
41058  *)
41059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41060for as_dir in $PATH
41061do
41062  IFS=$as_save_IFS
41063  test -z "$as_dir" && as_dir=.
41064    for ac_exec_ext in '' $ac_executable_extensions; do
41065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41066    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41068    break 2
41069  fi
41070done
41071  done
41072IFS=$as_save_IFS
41073
41074  ;;
41075esac
41076fi
41077NM=$ac_cv_path_NM
41078if test -n "$NM"; then
41079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41080$as_echo "$NM" >&6; }
41081else
41082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41083$as_echo "no" >&6; }
41084fi
41085
41086
41087  test -n "$NM" && break
41088done
41089
41090  else
41091    # The variable is set, but is it from the command line or the environment?
41092
41093    # Try to remove the string !NM! from our list.
41094    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41095    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41096      # If it failed, the variable was not from the command line. Ignore it,
41097      # but warn the user (except for BASH, which is always set by the calling BASH).
41098      if test "xNM" != xBASH; then
41099        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41100$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41101      fi
41102      # Try to locate tool using the code snippet
41103      for ac_prog in nm
41104do
41105  # Extract the first word of "$ac_prog", so it can be a program name with args.
41106set dummy $ac_prog; ac_word=$2
41107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41108$as_echo_n "checking for $ac_word... " >&6; }
41109if ${ac_cv_path_NM+:} false; then :
41110  $as_echo_n "(cached) " >&6
41111else
41112  case $NM in
41113  [\\/]* | ?:[\\/]*)
41114  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41115  ;;
41116  *)
41117  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41118for as_dir in $PATH
41119do
41120  IFS=$as_save_IFS
41121  test -z "$as_dir" && as_dir=.
41122    for ac_exec_ext in '' $ac_executable_extensions; do
41123  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41124    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41125    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41126    break 2
41127  fi
41128done
41129  done
41130IFS=$as_save_IFS
41131
41132  ;;
41133esac
41134fi
41135NM=$ac_cv_path_NM
41136if test -n "$NM"; then
41137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41138$as_echo "$NM" >&6; }
41139else
41140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41141$as_echo "no" >&6; }
41142fi
41143
41144
41145  test -n "$NM" && break
41146done
41147
41148    else
41149      # If it succeeded, then it was overridden by the user. We will use it
41150      # for the tool.
41151
41152      # First remove it from the list of overridden variables, so we can test
41153      # for unknown variables in the end.
41154      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41155
41156      # Check if we try to supply an empty value
41157      if test "x$NM" = x; then
41158        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41159$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41160        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41161$as_echo_n "checking for NM... " >&6; }
41162        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41163$as_echo "disabled" >&6; }
41164      else
41165        # Check if the provided tool contains a complete path.
41166        tool_specified="$NM"
41167        tool_basename="${tool_specified##*/}"
41168        if test "x$tool_basename" = "x$tool_specified"; then
41169          # A command without a complete path is provided, search $PATH.
41170          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41171$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41172          # Extract the first word of "$tool_basename", so it can be a program name with args.
41173set dummy $tool_basename; ac_word=$2
41174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41175$as_echo_n "checking for $ac_word... " >&6; }
41176if ${ac_cv_path_NM+:} false; then :
41177  $as_echo_n "(cached) " >&6
41178else
41179  case $NM in
41180  [\\/]* | ?:[\\/]*)
41181  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41182  ;;
41183  *)
41184  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41185for as_dir in $PATH
41186do
41187  IFS=$as_save_IFS
41188  test -z "$as_dir" && as_dir=.
41189    for ac_exec_ext in '' $ac_executable_extensions; do
41190  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41191    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41192    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41193    break 2
41194  fi
41195done
41196  done
41197IFS=$as_save_IFS
41198
41199  ;;
41200esac
41201fi
41202NM=$ac_cv_path_NM
41203if test -n "$NM"; then
41204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41205$as_echo "$NM" >&6; }
41206else
41207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41208$as_echo "no" >&6; }
41209fi
41210
41211
41212          if test "x$NM" = x; then
41213            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41214          fi
41215        else
41216          # Otherwise we believe it is a complete path. Use it as it is.
41217          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41218$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41219          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41220$as_echo_n "checking for NM... " >&6; }
41221          if test ! -x "$tool_specified"; then
41222            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41223$as_echo "not found" >&6; }
41224            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41225          fi
41226          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41227$as_echo "$tool_specified" >&6; }
41228        fi
41229      fi
41230    fi
41231
41232  fi
41233
41234
41235
41236  # Only process if variable expands to non-empty
41237
41238  if test "x$NM" != x; then
41239    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41240
41241  # First separate the path from the arguments. This will split at the first
41242  # space.
41243  complete="$NM"
41244  path="${complete%% *}"
41245  tmp="$complete EOL"
41246  arguments="${tmp#* }"
41247
41248  # Input might be given as Windows format, start by converting to
41249  # unix format.
41250  new_path=`$CYGPATH -u "$path"`
41251
41252  # Now try to locate executable using which
41253  new_path=`$WHICH "$new_path" 2> /dev/null`
41254  # bat and cmd files are not always considered executable in cygwin causing which
41255  # to not find them
41256  if test "x$new_path" = x \
41257      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41258      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41259    new_path=`$CYGPATH -u "$path"`
41260  fi
41261  if test "x$new_path" = x; then
41262    # Oops. Which didn't find the executable.
41263    # The splitting of arguments from the executable at a space might have been incorrect,
41264    # since paths with space are more likely in Windows. Give it another try with the whole
41265    # argument.
41266    path="$complete"
41267    arguments="EOL"
41268    new_path=`$CYGPATH -u "$path"`
41269    new_path=`$WHICH "$new_path" 2> /dev/null`
41270    # bat and cmd files are not always considered executable in cygwin causing which
41271    # to not find them
41272    if test "x$new_path" = x \
41273        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41274        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41275      new_path=`$CYGPATH -u "$path"`
41276    fi
41277    if test "x$new_path" = x; then
41278      # It's still not found. Now this is an unrecoverable error.
41279      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41280$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41281      has_space=`$ECHO "$complete" | $GREP " "`
41282      if test "x$has_space" != x; then
41283        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41284$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41285      fi
41286      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41287    fi
41288  fi
41289
41290  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41291  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41292  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41293  # "foo.exe" is OK but "foo" is an error.
41294  #
41295  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41296  # It is also a way to make sure we got the proper file name for the real test later on.
41297  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41298  if test "x$test_shortpath" = x; then
41299    # Short path failed, file does not exist as specified.
41300    # Try adding .exe or .cmd
41301    if test -f "${new_path}.exe"; then
41302      input_to_shortpath="${new_path}.exe"
41303    elif test -f "${new_path}.cmd"; then
41304      input_to_shortpath="${new_path}.cmd"
41305    else
41306      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
41307$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
41308      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41309$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41310      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41311    fi
41312  else
41313    input_to_shortpath="$new_path"
41314  fi
41315
41316  # Call helper function which possibly converts this using DOS-style short mode.
41317  # If so, the updated path is stored in $new_path.
41318  new_path="$input_to_shortpath"
41319
41320  input_path="$input_to_shortpath"
41321  # Check if we need to convert this using DOS-style short mode. If the path
41322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41323  # take no chances and rewrite it.
41324  # Note: m4 eats our [], so we need to use [ and ] instead.
41325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41326  if test "x$has_forbidden_chars" != x; then
41327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41328    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41329    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41330    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41331      # Going to short mode and back again did indeed matter. Since short mode is
41332      # case insensitive, let's make it lowercase to improve readability.
41333      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41334      # Now convert it back to Unix-style (cygpath)
41335      input_path=`$CYGPATH -u "$shortmode_path"`
41336      new_path="$input_path"
41337    fi
41338  fi
41339
41340  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41341  if test "x$test_cygdrive_prefix" = x; then
41342    # As a simple fix, exclude /usr/bin since it's not a real path.
41343    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41344      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41345      # a path prefixed by /cygdrive for fixpath to work.
41346      new_path="$CYGWIN_ROOT_PATH$input_path"
41347    fi
41348  fi
41349
41350  # remove trailing .exe if any
41351  new_path="${new_path/%.exe/}"
41352
41353    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41354
41355  # First separate the path from the arguments. This will split at the first
41356  # space.
41357  complete="$NM"
41358  path="${complete%% *}"
41359  tmp="$complete EOL"
41360  arguments="${tmp#* }"
41361
41362  # Input might be given as Windows format, start by converting to
41363  # unix format.
41364  new_path="$path"
41365
41366  windows_path="$new_path"
41367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41368    unix_path=`$CYGPATH -u "$windows_path"`
41369    new_path="$unix_path"
41370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41372    new_path="$unix_path"
41373  fi
41374
41375
41376  # Now try to locate executable using which
41377  new_path=`$WHICH "$new_path" 2> /dev/null`
41378
41379  if test "x$new_path" = x; then
41380    # Oops. Which didn't find the executable.
41381    # The splitting of arguments from the executable at a space might have been incorrect,
41382    # since paths with space are more likely in Windows. Give it another try with the whole
41383    # argument.
41384    path="$complete"
41385    arguments="EOL"
41386    new_path="$path"
41387
41388  windows_path="$new_path"
41389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41390    unix_path=`$CYGPATH -u "$windows_path"`
41391    new_path="$unix_path"
41392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41394    new_path="$unix_path"
41395  fi
41396
41397
41398    new_path=`$WHICH "$new_path" 2> /dev/null`
41399    # bat and cmd files are not always considered executable in MSYS causing which
41400    # to not find them
41401    if test "x$new_path" = x \
41402        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41403        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41404      new_path="$path"
41405
41406  windows_path="$new_path"
41407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41408    unix_path=`$CYGPATH -u "$windows_path"`
41409    new_path="$unix_path"
41410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41412    new_path="$unix_path"
41413  fi
41414
41415    fi
41416
41417    if test "x$new_path" = x; then
41418      # It's still not found. Now this is an unrecoverable error.
41419      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41420$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41421      has_space=`$ECHO "$complete" | $GREP " "`
41422      if test "x$has_space" != x; then
41423        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41424$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41425      fi
41426      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41427    fi
41428  fi
41429
41430  # Now new_path has a complete unix path to the binary
41431  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41432    # Keep paths in /bin as-is, but remove trailing .exe if any
41433    new_path="${new_path/%.exe/}"
41434    # Do not save /bin paths to all_fixpath_prefixes!
41435  else
41436    # Not in mixed or Windows style, start by that.
41437    new_path=`cmd //c echo $new_path`
41438
41439  input_path="$new_path"
41440  # Check if we need to convert this using DOS-style short mode. If the path
41441  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41442  # take no chances and rewrite it.
41443  # Note: m4 eats our [], so we need to use [ and ] instead.
41444  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41445  if test "x$has_forbidden_chars" != x; then
41446    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41447    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41448  fi
41449
41450    # Output is in $new_path
41451
41452  windows_path="$new_path"
41453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41454    unix_path=`$CYGPATH -u "$windows_path"`
41455    new_path="$unix_path"
41456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41458    new_path="$unix_path"
41459  fi
41460
41461    # remove trailing .exe if any
41462    new_path="${new_path/%.exe/}"
41463
41464    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41465    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41466  fi
41467
41468    else
41469      # We're on a unix platform. Hooray! :)
41470      # First separate the path from the arguments. This will split at the first
41471      # space.
41472      complete="$NM"
41473      path="${complete%% *}"
41474      tmp="$complete EOL"
41475      arguments="${tmp#* }"
41476
41477      # Cannot rely on the command "which" here since it doesn't always work.
41478      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41479      if test -z "$is_absolute_path"; then
41480        # Path to executable is not absolute. Find it.
41481        IFS_save="$IFS"
41482        IFS=:
41483        for p in $PATH; do
41484          if test -f "$p/$path" && test -x "$p/$path"; then
41485            new_path="$p/$path"
41486            break
41487          fi
41488        done
41489        IFS="$IFS_save"
41490      else
41491        # This is an absolute path, we can use it without further modifications.
41492        new_path="$path"
41493      fi
41494
41495      if test "x$new_path" = x; then
41496        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41497$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41498        has_space=`$ECHO "$complete" | $GREP " "`
41499        if test "x$has_space" != x; then
41500          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41501$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41502        fi
41503        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41504      fi
41505    fi
41506
41507    # Now join together the path and the arguments once again
41508    if test "x$arguments" != xEOL; then
41509      new_complete="$new_path ${arguments% *}"
41510    else
41511      new_complete="$new_path"
41512    fi
41513
41514    if test "x$complete" != "x$new_complete"; then
41515      NM="$new_complete"
41516      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
41517$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
41518    fi
41519  fi
41520
41521
41522
41523  # Publish this variable in the help.
41524
41525
41526  if [ -z "${GNM+x}" ]; then
41527    # The variable is not set by user, try to locate tool using the code snippet
41528    for ac_prog in gnm
41529do
41530  # Extract the first word of "$ac_prog", so it can be a program name with args.
41531set dummy $ac_prog; ac_word=$2
41532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41533$as_echo_n "checking for $ac_word... " >&6; }
41534if ${ac_cv_path_GNM+:} false; then :
41535  $as_echo_n "(cached) " >&6
41536else
41537  case $GNM in
41538  [\\/]* | ?:[\\/]*)
41539  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41540  ;;
41541  *)
41542  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41543for as_dir in $PATH
41544do
41545  IFS=$as_save_IFS
41546  test -z "$as_dir" && as_dir=.
41547    for ac_exec_ext in '' $ac_executable_extensions; do
41548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41549    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41551    break 2
41552  fi
41553done
41554  done
41555IFS=$as_save_IFS
41556
41557  ;;
41558esac
41559fi
41560GNM=$ac_cv_path_GNM
41561if test -n "$GNM"; then
41562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41563$as_echo "$GNM" >&6; }
41564else
41565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41566$as_echo "no" >&6; }
41567fi
41568
41569
41570  test -n "$GNM" && break
41571done
41572
41573  else
41574    # The variable is set, but is it from the command line or the environment?
41575
41576    # Try to remove the string !GNM! from our list.
41577    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
41578    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41579      # If it failed, the variable was not from the command line. Ignore it,
41580      # but warn the user (except for BASH, which is always set by the calling BASH).
41581      if test "xGNM" != xBASH; then
41582        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
41583$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
41584      fi
41585      # Try to locate tool using the code snippet
41586      for ac_prog in gnm
41587do
41588  # Extract the first word of "$ac_prog", so it can be a program name with args.
41589set dummy $ac_prog; ac_word=$2
41590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41591$as_echo_n "checking for $ac_word... " >&6; }
41592if ${ac_cv_path_GNM+:} false; then :
41593  $as_echo_n "(cached) " >&6
41594else
41595  case $GNM in
41596  [\\/]* | ?:[\\/]*)
41597  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41598  ;;
41599  *)
41600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41601for as_dir in $PATH
41602do
41603  IFS=$as_save_IFS
41604  test -z "$as_dir" && as_dir=.
41605    for ac_exec_ext in '' $ac_executable_extensions; do
41606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41607    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41609    break 2
41610  fi
41611done
41612  done
41613IFS=$as_save_IFS
41614
41615  ;;
41616esac
41617fi
41618GNM=$ac_cv_path_GNM
41619if test -n "$GNM"; then
41620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41621$as_echo "$GNM" >&6; }
41622else
41623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41624$as_echo "no" >&6; }
41625fi
41626
41627
41628  test -n "$GNM" && break
41629done
41630
41631    else
41632      # If it succeeded, then it was overridden by the user. We will use it
41633      # for the tool.
41634
41635      # First remove it from the list of overridden variables, so we can test
41636      # for unknown variables in the end.
41637      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41638
41639      # Check if we try to supply an empty value
41640      if test "x$GNM" = x; then
41641        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
41642$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
41643        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41644$as_echo_n "checking for GNM... " >&6; }
41645        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41646$as_echo "disabled" >&6; }
41647      else
41648        # Check if the provided tool contains a complete path.
41649        tool_specified="$GNM"
41650        tool_basename="${tool_specified##*/}"
41651        if test "x$tool_basename" = "x$tool_specified"; then
41652          # A command without a complete path is provided, search $PATH.
41653          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
41654$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
41655          # Extract the first word of "$tool_basename", so it can be a program name with args.
41656set dummy $tool_basename; ac_word=$2
41657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41658$as_echo_n "checking for $ac_word... " >&6; }
41659if ${ac_cv_path_GNM+:} false; then :
41660  $as_echo_n "(cached) " >&6
41661else
41662  case $GNM in
41663  [\\/]* | ?:[\\/]*)
41664  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41665  ;;
41666  *)
41667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41668for as_dir in $PATH
41669do
41670  IFS=$as_save_IFS
41671  test -z "$as_dir" && as_dir=.
41672    for ac_exec_ext in '' $ac_executable_extensions; do
41673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41674    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41676    break 2
41677  fi
41678done
41679  done
41680IFS=$as_save_IFS
41681
41682  ;;
41683esac
41684fi
41685GNM=$ac_cv_path_GNM
41686if test -n "$GNM"; then
41687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41688$as_echo "$GNM" >&6; }
41689else
41690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41691$as_echo "no" >&6; }
41692fi
41693
41694
41695          if test "x$GNM" = x; then
41696            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41697          fi
41698        else
41699          # Otherwise we believe it is a complete path. Use it as it is.
41700          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
41701$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
41702          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41703$as_echo_n "checking for GNM... " >&6; }
41704          if test ! -x "$tool_specified"; then
41705            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41706$as_echo "not found" >&6; }
41707            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
41708          fi
41709          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41710$as_echo "$tool_specified" >&6; }
41711        fi
41712      fi
41713    fi
41714
41715  fi
41716
41717
41718
41719  # Only process if variable expands to non-empty
41720
41721  if test "x$GNM" != x; then
41722    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41723
41724  # First separate the path from the arguments. This will split at the first
41725  # space.
41726  complete="$GNM"
41727  path="${complete%% *}"
41728  tmp="$complete EOL"
41729  arguments="${tmp#* }"
41730
41731  # Input might be given as Windows format, start by converting to
41732  # unix format.
41733  new_path=`$CYGPATH -u "$path"`
41734
41735  # Now try to locate executable using which
41736  new_path=`$WHICH "$new_path" 2> /dev/null`
41737  # bat and cmd files are not always considered executable in cygwin causing which
41738  # to not find them
41739  if test "x$new_path" = x \
41740      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41741      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41742    new_path=`$CYGPATH -u "$path"`
41743  fi
41744  if test "x$new_path" = x; then
41745    # Oops. Which didn't find the executable.
41746    # The splitting of arguments from the executable at a space might have been incorrect,
41747    # since paths with space are more likely in Windows. Give it another try with the whole
41748    # argument.
41749    path="$complete"
41750    arguments="EOL"
41751    new_path=`$CYGPATH -u "$path"`
41752    new_path=`$WHICH "$new_path" 2> /dev/null`
41753    # bat and cmd files are not always considered executable in cygwin causing which
41754    # to not find them
41755    if test "x$new_path" = x \
41756        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41757        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41758      new_path=`$CYGPATH -u "$path"`
41759    fi
41760    if test "x$new_path" = x; then
41761      # It's still not found. Now this is an unrecoverable error.
41762      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41763$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41764      has_space=`$ECHO "$complete" | $GREP " "`
41765      if test "x$has_space" != x; then
41766        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41767$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41768      fi
41769      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41770    fi
41771  fi
41772
41773  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41774  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41775  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41776  # "foo.exe" is OK but "foo" is an error.
41777  #
41778  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41779  # It is also a way to make sure we got the proper file name for the real test later on.
41780  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41781  if test "x$test_shortpath" = x; then
41782    # Short path failed, file does not exist as specified.
41783    # Try adding .exe or .cmd
41784    if test -f "${new_path}.exe"; then
41785      input_to_shortpath="${new_path}.exe"
41786    elif test -f "${new_path}.cmd"; then
41787      input_to_shortpath="${new_path}.cmd"
41788    else
41789      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
41790$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
41791      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41792$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41793      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41794    fi
41795  else
41796    input_to_shortpath="$new_path"
41797  fi
41798
41799  # Call helper function which possibly converts this using DOS-style short mode.
41800  # If so, the updated path is stored in $new_path.
41801  new_path="$input_to_shortpath"
41802
41803  input_path="$input_to_shortpath"
41804  # Check if we need to convert this using DOS-style short mode. If the path
41805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41806  # take no chances and rewrite it.
41807  # Note: m4 eats our [], so we need to use [ and ] instead.
41808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41809  if test "x$has_forbidden_chars" != x; then
41810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41811    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41812    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41813    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41814      # Going to short mode and back again did indeed matter. Since short mode is
41815      # case insensitive, let's make it lowercase to improve readability.
41816      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41817      # Now convert it back to Unix-style (cygpath)
41818      input_path=`$CYGPATH -u "$shortmode_path"`
41819      new_path="$input_path"
41820    fi
41821  fi
41822
41823  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41824  if test "x$test_cygdrive_prefix" = x; then
41825    # As a simple fix, exclude /usr/bin since it's not a real path.
41826    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41827      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41828      # a path prefixed by /cygdrive for fixpath to work.
41829      new_path="$CYGWIN_ROOT_PATH$input_path"
41830    fi
41831  fi
41832
41833  # remove trailing .exe if any
41834  new_path="${new_path/%.exe/}"
41835
41836    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41837
41838  # First separate the path from the arguments. This will split at the first
41839  # space.
41840  complete="$GNM"
41841  path="${complete%% *}"
41842  tmp="$complete EOL"
41843  arguments="${tmp#* }"
41844
41845  # Input might be given as Windows format, start by converting to
41846  # unix format.
41847  new_path="$path"
41848
41849  windows_path="$new_path"
41850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41851    unix_path=`$CYGPATH -u "$windows_path"`
41852    new_path="$unix_path"
41853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41854    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41855    new_path="$unix_path"
41856  fi
41857
41858
41859  # Now try to locate executable using which
41860  new_path=`$WHICH "$new_path" 2> /dev/null`
41861
41862  if test "x$new_path" = x; then
41863    # Oops. Which didn't find the executable.
41864    # The splitting of arguments from the executable at a space might have been incorrect,
41865    # since paths with space are more likely in Windows. Give it another try with the whole
41866    # argument.
41867    path="$complete"
41868    arguments="EOL"
41869    new_path="$path"
41870
41871  windows_path="$new_path"
41872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41873    unix_path=`$CYGPATH -u "$windows_path"`
41874    new_path="$unix_path"
41875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41877    new_path="$unix_path"
41878  fi
41879
41880
41881    new_path=`$WHICH "$new_path" 2> /dev/null`
41882    # bat and cmd files are not always considered executable in MSYS causing which
41883    # to not find them
41884    if test "x$new_path" = x \
41885        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41886        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41887      new_path="$path"
41888
41889  windows_path="$new_path"
41890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41891    unix_path=`$CYGPATH -u "$windows_path"`
41892    new_path="$unix_path"
41893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41894    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41895    new_path="$unix_path"
41896  fi
41897
41898    fi
41899
41900    if test "x$new_path" = x; then
41901      # It's still not found. Now this is an unrecoverable error.
41902      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41903$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41904      has_space=`$ECHO "$complete" | $GREP " "`
41905      if test "x$has_space" != x; then
41906        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41907$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41908      fi
41909      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41910    fi
41911  fi
41912
41913  # Now new_path has a complete unix path to the binary
41914  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41915    # Keep paths in /bin as-is, but remove trailing .exe if any
41916    new_path="${new_path/%.exe/}"
41917    # Do not save /bin paths to all_fixpath_prefixes!
41918  else
41919    # Not in mixed or Windows style, start by that.
41920    new_path=`cmd //c echo $new_path`
41921
41922  input_path="$new_path"
41923  # Check if we need to convert this using DOS-style short mode. If the path
41924  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41925  # take no chances and rewrite it.
41926  # Note: m4 eats our [], so we need to use [ and ] instead.
41927  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41928  if test "x$has_forbidden_chars" != x; then
41929    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41930    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41931  fi
41932
41933    # Output is in $new_path
41934
41935  windows_path="$new_path"
41936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41937    unix_path=`$CYGPATH -u "$windows_path"`
41938    new_path="$unix_path"
41939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41941    new_path="$unix_path"
41942  fi
41943
41944    # remove trailing .exe if any
41945    new_path="${new_path/%.exe/}"
41946
41947    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41948    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41949  fi
41950
41951    else
41952      # We're on a unix platform. Hooray! :)
41953      # First separate the path from the arguments. This will split at the first
41954      # space.
41955      complete="$GNM"
41956      path="${complete%% *}"
41957      tmp="$complete EOL"
41958      arguments="${tmp#* }"
41959
41960      # Cannot rely on the command "which" here since it doesn't always work.
41961      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41962      if test -z "$is_absolute_path"; then
41963        # Path to executable is not absolute. Find it.
41964        IFS_save="$IFS"
41965        IFS=:
41966        for p in $PATH; do
41967          if test -f "$p/$path" && test -x "$p/$path"; then
41968            new_path="$p/$path"
41969            break
41970          fi
41971        done
41972        IFS="$IFS_save"
41973      else
41974        # This is an absolute path, we can use it without further modifications.
41975        new_path="$path"
41976      fi
41977
41978      if test "x$new_path" = x; then
41979        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41980$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41981        has_space=`$ECHO "$complete" | $GREP " "`
41982        if test "x$has_space" != x; then
41983          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41984$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41985        fi
41986        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41987      fi
41988    fi
41989
41990    # Now join together the path and the arguments once again
41991    if test "x$arguments" != xEOL; then
41992      new_complete="$new_path ${arguments% *}"
41993    else
41994      new_complete="$new_path"
41995    fi
41996
41997    if test "x$complete" != "x$new_complete"; then
41998      GNM="$new_complete"
41999      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
42000$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
42001    fi
42002  fi
42003
42004  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
42005    # FIXME: we should unify this with the solaris case above.
42006
42007
42008  # Publish this variable in the help.
42009
42010
42011  if [ -z "${STRIP+x}" ]; then
42012    # The variable is not set by user, try to locate tool using the code snippet
42013    if test -n "$ac_tool_prefix"; then
42014  for ac_prog in strip
42015  do
42016    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42017set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42019$as_echo_n "checking for $ac_word... " >&6; }
42020if ${ac_cv_prog_STRIP+:} false; then :
42021  $as_echo_n "(cached) " >&6
42022else
42023  if test -n "$STRIP"; then
42024  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
42025else
42026as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42027for as_dir in $PATH
42028do
42029  IFS=$as_save_IFS
42030  test -z "$as_dir" && as_dir=.
42031    for ac_exec_ext in '' $ac_executable_extensions; do
42032  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42033    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
42034    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42035    break 2
42036  fi
42037done
42038  done
42039IFS=$as_save_IFS
42040
42041fi
42042fi
42043STRIP=$ac_cv_prog_STRIP
42044if test -n "$STRIP"; then
42045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42046$as_echo "$STRIP" >&6; }
42047else
42048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42049$as_echo "no" >&6; }
42050fi
42051
42052
42053    test -n "$STRIP" && break
42054  done
42055fi
42056if test -z "$STRIP"; then
42057  ac_ct_STRIP=$STRIP
42058  for ac_prog in strip
42059do
42060  # Extract the first word of "$ac_prog", so it can be a program name with args.
42061set dummy $ac_prog; ac_word=$2
42062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42063$as_echo_n "checking for $ac_word... " >&6; }
42064if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
42065  $as_echo_n "(cached) " >&6
42066else
42067  if test -n "$ac_ct_STRIP"; then
42068  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
42069else
42070as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42071for as_dir in $PATH
42072do
42073  IFS=$as_save_IFS
42074  test -z "$as_dir" && as_dir=.
42075    for ac_exec_ext in '' $ac_executable_extensions; do
42076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42077    ac_cv_prog_ac_ct_STRIP="$ac_prog"
42078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42079    break 2
42080  fi
42081done
42082  done
42083IFS=$as_save_IFS
42084
42085fi
42086fi
42087ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
42088if test -n "$ac_ct_STRIP"; then
42089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
42090$as_echo "$ac_ct_STRIP" >&6; }
42091else
42092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42093$as_echo "no" >&6; }
42094fi
42095
42096
42097  test -n "$ac_ct_STRIP" && break
42098done
42099
42100  if test "x$ac_ct_STRIP" = x; then
42101    STRIP=""
42102  else
42103    case $cross_compiling:$ac_tool_warned in
42104yes:)
42105{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42106$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42107ac_tool_warned=yes ;;
42108esac
42109    STRIP=$ac_ct_STRIP
42110  fi
42111fi
42112
42113  else
42114    # The variable is set, but is it from the command line or the environment?
42115
42116    # Try to remove the string !STRIP! from our list.
42117    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
42118    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42119      # If it failed, the variable was not from the command line. Ignore it,
42120      # but warn the user (except for BASH, which is always set by the calling BASH).
42121      if test "xSTRIP" != xBASH; then
42122        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
42123$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
42124      fi
42125      # Try to locate tool using the code snippet
42126      if test -n "$ac_tool_prefix"; then
42127  for ac_prog in strip
42128  do
42129    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42130set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42132$as_echo_n "checking for $ac_word... " >&6; }
42133if ${ac_cv_prog_STRIP+:} false; then :
42134  $as_echo_n "(cached) " >&6
42135else
42136  if test -n "$STRIP"; then
42137  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
42138else
42139as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42140for as_dir in $PATH
42141do
42142  IFS=$as_save_IFS
42143  test -z "$as_dir" && as_dir=.
42144    for ac_exec_ext in '' $ac_executable_extensions; do
42145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42146    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
42147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42148    break 2
42149  fi
42150done
42151  done
42152IFS=$as_save_IFS
42153
42154fi
42155fi
42156STRIP=$ac_cv_prog_STRIP
42157if test -n "$STRIP"; then
42158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42159$as_echo "$STRIP" >&6; }
42160else
42161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42162$as_echo "no" >&6; }
42163fi
42164
42165
42166    test -n "$STRIP" && break
42167  done
42168fi
42169if test -z "$STRIP"; then
42170  ac_ct_STRIP=$STRIP
42171  for ac_prog in strip
42172do
42173  # Extract the first word of "$ac_prog", so it can be a program name with args.
42174set dummy $ac_prog; ac_word=$2
42175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42176$as_echo_n "checking for $ac_word... " >&6; }
42177if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
42178  $as_echo_n "(cached) " >&6
42179else
42180  if test -n "$ac_ct_STRIP"; then
42181  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
42182else
42183as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42184for as_dir in $PATH
42185do
42186  IFS=$as_save_IFS
42187  test -z "$as_dir" && as_dir=.
42188    for ac_exec_ext in '' $ac_executable_extensions; do
42189  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42190    ac_cv_prog_ac_ct_STRIP="$ac_prog"
42191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42192    break 2
42193  fi
42194done
42195  done
42196IFS=$as_save_IFS
42197
42198fi
42199fi
42200ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
42201if test -n "$ac_ct_STRIP"; then
42202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
42203$as_echo "$ac_ct_STRIP" >&6; }
42204else
42205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42206$as_echo "no" >&6; }
42207fi
42208
42209
42210  test -n "$ac_ct_STRIP" && break
42211done
42212
42213  if test "x$ac_ct_STRIP" = x; then
42214    STRIP=""
42215  else
42216    case $cross_compiling:$ac_tool_warned in
42217yes:)
42218{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42219$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42220ac_tool_warned=yes ;;
42221esac
42222    STRIP=$ac_ct_STRIP
42223  fi
42224fi
42225
42226    else
42227      # If it succeeded, then it was overridden by the user. We will use it
42228      # for the tool.
42229
42230      # First remove it from the list of overridden variables, so we can test
42231      # for unknown variables in the end.
42232      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42233
42234      # Check if we try to supply an empty value
42235      if test "x$STRIP" = x; then
42236        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
42237$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
42238        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
42239$as_echo_n "checking for STRIP... " >&6; }
42240        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42241$as_echo "disabled" >&6; }
42242      else
42243        # Check if the provided tool contains a complete path.
42244        tool_specified="$STRIP"
42245        tool_basename="${tool_specified##*/}"
42246        if test "x$tool_basename" = "x$tool_specified"; then
42247          # A command without a complete path is provided, search $PATH.
42248          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
42249$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
42250          # Extract the first word of "$tool_basename", so it can be a program name with args.
42251set dummy $tool_basename; ac_word=$2
42252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42253$as_echo_n "checking for $ac_word... " >&6; }
42254if ${ac_cv_path_STRIP+:} false; then :
42255  $as_echo_n "(cached) " >&6
42256else
42257  case $STRIP in
42258  [\\/]* | ?:[\\/]*)
42259  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
42260  ;;
42261  *)
42262  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42263for as_dir in $PATH
42264do
42265  IFS=$as_save_IFS
42266  test -z "$as_dir" && as_dir=.
42267    for ac_exec_ext in '' $ac_executable_extensions; do
42268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42269    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
42270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42271    break 2
42272  fi
42273done
42274  done
42275IFS=$as_save_IFS
42276
42277  ;;
42278esac
42279fi
42280STRIP=$ac_cv_path_STRIP
42281if test -n "$STRIP"; then
42282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42283$as_echo "$STRIP" >&6; }
42284else
42285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42286$as_echo "no" >&6; }
42287fi
42288
42289
42290          if test "x$STRIP" = x; then
42291            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42292          fi
42293        else
42294          # Otherwise we believe it is a complete path. Use it as it is.
42295          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
42296$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
42297          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
42298$as_echo_n "checking for STRIP... " >&6; }
42299          if test ! -x "$tool_specified"; then
42300            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42301$as_echo "not found" >&6; }
42302            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
42303          fi
42304          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42305$as_echo "$tool_specified" >&6; }
42306        fi
42307      fi
42308    fi
42309
42310  fi
42311
42312
42313
42314  # Only process if variable expands to non-empty
42315
42316  if test "x$STRIP" != x; then
42317    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42318
42319  # First separate the path from the arguments. This will split at the first
42320  # space.
42321  complete="$STRIP"
42322  path="${complete%% *}"
42323  tmp="$complete EOL"
42324  arguments="${tmp#* }"
42325
42326  # Input might be given as Windows format, start by converting to
42327  # unix format.
42328  new_path=`$CYGPATH -u "$path"`
42329
42330  # Now try to locate executable using which
42331  new_path=`$WHICH "$new_path" 2> /dev/null`
42332  # bat and cmd files are not always considered executable in cygwin causing which
42333  # to not find them
42334  if test "x$new_path" = x \
42335      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42336      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42337    new_path=`$CYGPATH -u "$path"`
42338  fi
42339  if test "x$new_path" = x; then
42340    # Oops. Which didn't find the executable.
42341    # The splitting of arguments from the executable at a space might have been incorrect,
42342    # since paths with space are more likely in Windows. Give it another try with the whole
42343    # argument.
42344    path="$complete"
42345    arguments="EOL"
42346    new_path=`$CYGPATH -u "$path"`
42347    new_path=`$WHICH "$new_path" 2> /dev/null`
42348    # bat and cmd files are not always considered executable in cygwin causing which
42349    # to not find them
42350    if test "x$new_path" = x \
42351        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42352        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42353      new_path=`$CYGPATH -u "$path"`
42354    fi
42355    if test "x$new_path" = x; then
42356      # It's still not found. Now this is an unrecoverable error.
42357      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42358$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42359      has_space=`$ECHO "$complete" | $GREP " "`
42360      if test "x$has_space" != x; then
42361        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42362$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42363      fi
42364      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42365    fi
42366  fi
42367
42368  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42369  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42370  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42371  # "foo.exe" is OK but "foo" is an error.
42372  #
42373  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42374  # It is also a way to make sure we got the proper file name for the real test later on.
42375  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42376  if test "x$test_shortpath" = x; then
42377    # Short path failed, file does not exist as specified.
42378    # Try adding .exe or .cmd
42379    if test -f "${new_path}.exe"; then
42380      input_to_shortpath="${new_path}.exe"
42381    elif test -f "${new_path}.cmd"; then
42382      input_to_shortpath="${new_path}.cmd"
42383    else
42384      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
42385$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
42386      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42387$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42388      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42389    fi
42390  else
42391    input_to_shortpath="$new_path"
42392  fi
42393
42394  # Call helper function which possibly converts this using DOS-style short mode.
42395  # If so, the updated path is stored in $new_path.
42396  new_path="$input_to_shortpath"
42397
42398  input_path="$input_to_shortpath"
42399  # Check if we need to convert this using DOS-style short mode. If the path
42400  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42401  # take no chances and rewrite it.
42402  # Note: m4 eats our [], so we need to use [ and ] instead.
42403  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42404  if test "x$has_forbidden_chars" != x; then
42405    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42406    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42407    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42408    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42409      # Going to short mode and back again did indeed matter. Since short mode is
42410      # case insensitive, let's make it lowercase to improve readability.
42411      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42412      # Now convert it back to Unix-style (cygpath)
42413      input_path=`$CYGPATH -u "$shortmode_path"`
42414      new_path="$input_path"
42415    fi
42416  fi
42417
42418  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42419  if test "x$test_cygdrive_prefix" = x; then
42420    # As a simple fix, exclude /usr/bin since it's not a real path.
42421    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42422      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42423      # a path prefixed by /cygdrive for fixpath to work.
42424      new_path="$CYGWIN_ROOT_PATH$input_path"
42425    fi
42426  fi
42427
42428  # remove trailing .exe if any
42429  new_path="${new_path/%.exe/}"
42430
42431    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42432
42433  # First separate the path from the arguments. This will split at the first
42434  # space.
42435  complete="$STRIP"
42436  path="${complete%% *}"
42437  tmp="$complete EOL"
42438  arguments="${tmp#* }"
42439
42440  # Input might be given as Windows format, start by converting to
42441  # unix format.
42442  new_path="$path"
42443
42444  windows_path="$new_path"
42445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42446    unix_path=`$CYGPATH -u "$windows_path"`
42447    new_path="$unix_path"
42448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42450    new_path="$unix_path"
42451  fi
42452
42453
42454  # Now try to locate executable using which
42455  new_path=`$WHICH "$new_path" 2> /dev/null`
42456
42457  if test "x$new_path" = x; then
42458    # Oops. Which didn't find the executable.
42459    # The splitting of arguments from the executable at a space might have been incorrect,
42460    # since paths with space are more likely in Windows. Give it another try with the whole
42461    # argument.
42462    path="$complete"
42463    arguments="EOL"
42464    new_path="$path"
42465
42466  windows_path="$new_path"
42467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42468    unix_path=`$CYGPATH -u "$windows_path"`
42469    new_path="$unix_path"
42470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42471    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42472    new_path="$unix_path"
42473  fi
42474
42475
42476    new_path=`$WHICH "$new_path" 2> /dev/null`
42477    # bat and cmd files are not always considered executable in MSYS causing which
42478    # to not find them
42479    if test "x$new_path" = x \
42480        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42481        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42482      new_path="$path"
42483
42484  windows_path="$new_path"
42485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42486    unix_path=`$CYGPATH -u "$windows_path"`
42487    new_path="$unix_path"
42488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42490    new_path="$unix_path"
42491  fi
42492
42493    fi
42494
42495    if test "x$new_path" = x; then
42496      # It's still not found. Now this is an unrecoverable error.
42497      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42498$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42499      has_space=`$ECHO "$complete" | $GREP " "`
42500      if test "x$has_space" != x; then
42501        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42502$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42503      fi
42504      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42505    fi
42506  fi
42507
42508  # Now new_path has a complete unix path to the binary
42509  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42510    # Keep paths in /bin as-is, but remove trailing .exe if any
42511    new_path="${new_path/%.exe/}"
42512    # Do not save /bin paths to all_fixpath_prefixes!
42513  else
42514    # Not in mixed or Windows style, start by that.
42515    new_path=`cmd //c echo $new_path`
42516
42517  input_path="$new_path"
42518  # Check if we need to convert this using DOS-style short mode. If the path
42519  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42520  # take no chances and rewrite it.
42521  # Note: m4 eats our [], so we need to use [ and ] instead.
42522  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42523  if test "x$has_forbidden_chars" != x; then
42524    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42525    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42526  fi
42527
42528    # Output is in $new_path
42529
42530  windows_path="$new_path"
42531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42532    unix_path=`$CYGPATH -u "$windows_path"`
42533    new_path="$unix_path"
42534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42535    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42536    new_path="$unix_path"
42537  fi
42538
42539    # remove trailing .exe if any
42540    new_path="${new_path/%.exe/}"
42541
42542    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42543    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42544  fi
42545
42546    else
42547      # We're on a unix platform. Hooray! :)
42548      # First separate the path from the arguments. This will split at the first
42549      # space.
42550      complete="$STRIP"
42551      path="${complete%% *}"
42552      tmp="$complete EOL"
42553      arguments="${tmp#* }"
42554
42555      # Cannot rely on the command "which" here since it doesn't always work.
42556      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42557      if test -z "$is_absolute_path"; then
42558        # Path to executable is not absolute. Find it.
42559        IFS_save="$IFS"
42560        IFS=:
42561        for p in $PATH; do
42562          if test -f "$p/$path" && test -x "$p/$path"; then
42563            new_path="$p/$path"
42564            break
42565          fi
42566        done
42567        IFS="$IFS_save"
42568      else
42569        # This is an absolute path, we can use it without further modifications.
42570        new_path="$path"
42571      fi
42572
42573      if test "x$new_path" = x; then
42574        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42575$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42576        has_space=`$ECHO "$complete" | $GREP " "`
42577        if test "x$has_space" != x; then
42578          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42579$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42580        fi
42581        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42582      fi
42583    fi
42584
42585    # Now join together the path and the arguments once again
42586    if test "x$arguments" != xEOL; then
42587      new_complete="$new_path ${arguments% *}"
42588    else
42589      new_complete="$new_path"
42590    fi
42591
42592    if test "x$complete" != "x$new_complete"; then
42593      STRIP="$new_complete"
42594      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
42595$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
42596    fi
42597  fi
42598
42599    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42600
42601
42602  # Publish this variable in the help.
42603
42604
42605  if [ -z "${NM+x}" ]; then
42606    # The variable is not set by user, try to locate tool using the code snippet
42607    if test -n "$ac_tool_prefix"; then
42608  for ac_prog in nm gcc-nm
42609  do
42610    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42611set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42613$as_echo_n "checking for $ac_word... " >&6; }
42614if ${ac_cv_prog_NM+:} false; then :
42615  $as_echo_n "(cached) " >&6
42616else
42617  if test -n "$NM"; then
42618  ac_cv_prog_NM="$NM" # Let the user override the test.
42619else
42620as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42621for as_dir in $PATH
42622do
42623  IFS=$as_save_IFS
42624  test -z "$as_dir" && as_dir=.
42625    for ac_exec_ext in '' $ac_executable_extensions; do
42626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42627    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42629    break 2
42630  fi
42631done
42632  done
42633IFS=$as_save_IFS
42634
42635fi
42636fi
42637NM=$ac_cv_prog_NM
42638if test -n "$NM"; then
42639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42640$as_echo "$NM" >&6; }
42641else
42642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42643$as_echo "no" >&6; }
42644fi
42645
42646
42647    test -n "$NM" && break
42648  done
42649fi
42650if test -z "$NM"; then
42651  ac_ct_NM=$NM
42652  for ac_prog in nm gcc-nm
42653do
42654  # Extract the first word of "$ac_prog", so it can be a program name with args.
42655set dummy $ac_prog; ac_word=$2
42656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42657$as_echo_n "checking for $ac_word... " >&6; }
42658if ${ac_cv_prog_ac_ct_NM+:} false; then :
42659  $as_echo_n "(cached) " >&6
42660else
42661  if test -n "$ac_ct_NM"; then
42662  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42663else
42664as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42665for as_dir in $PATH
42666do
42667  IFS=$as_save_IFS
42668  test -z "$as_dir" && as_dir=.
42669    for ac_exec_ext in '' $ac_executable_extensions; do
42670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42671    ac_cv_prog_ac_ct_NM="$ac_prog"
42672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42673    break 2
42674  fi
42675done
42676  done
42677IFS=$as_save_IFS
42678
42679fi
42680fi
42681ac_ct_NM=$ac_cv_prog_ac_ct_NM
42682if test -n "$ac_ct_NM"; then
42683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42684$as_echo "$ac_ct_NM" >&6; }
42685else
42686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42687$as_echo "no" >&6; }
42688fi
42689
42690
42691  test -n "$ac_ct_NM" && break
42692done
42693
42694  if test "x$ac_ct_NM" = x; then
42695    NM=""
42696  else
42697    case $cross_compiling:$ac_tool_warned in
42698yes:)
42699{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42700$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42701ac_tool_warned=yes ;;
42702esac
42703    NM=$ac_ct_NM
42704  fi
42705fi
42706
42707  else
42708    # The variable is set, but is it from the command line or the environment?
42709
42710    # Try to remove the string !NM! from our list.
42711    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42712    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42713      # If it failed, the variable was not from the command line. Ignore it,
42714      # but warn the user (except for BASH, which is always set by the calling BASH).
42715      if test "xNM" != xBASH; then
42716        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42717$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42718      fi
42719      # Try to locate tool using the code snippet
42720      if test -n "$ac_tool_prefix"; then
42721  for ac_prog in nm gcc-nm
42722  do
42723    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42724set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42726$as_echo_n "checking for $ac_word... " >&6; }
42727if ${ac_cv_prog_NM+:} false; then :
42728  $as_echo_n "(cached) " >&6
42729else
42730  if test -n "$NM"; then
42731  ac_cv_prog_NM="$NM" # Let the user override the test.
42732else
42733as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42734for as_dir in $PATH
42735do
42736  IFS=$as_save_IFS
42737  test -z "$as_dir" && as_dir=.
42738    for ac_exec_ext in '' $ac_executable_extensions; do
42739  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42740    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42741    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42742    break 2
42743  fi
42744done
42745  done
42746IFS=$as_save_IFS
42747
42748fi
42749fi
42750NM=$ac_cv_prog_NM
42751if test -n "$NM"; then
42752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42753$as_echo "$NM" >&6; }
42754else
42755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42756$as_echo "no" >&6; }
42757fi
42758
42759
42760    test -n "$NM" && break
42761  done
42762fi
42763if test -z "$NM"; then
42764  ac_ct_NM=$NM
42765  for ac_prog in nm gcc-nm
42766do
42767  # Extract the first word of "$ac_prog", so it can be a program name with args.
42768set dummy $ac_prog; ac_word=$2
42769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42770$as_echo_n "checking for $ac_word... " >&6; }
42771if ${ac_cv_prog_ac_ct_NM+:} false; then :
42772  $as_echo_n "(cached) " >&6
42773else
42774  if test -n "$ac_ct_NM"; then
42775  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42776else
42777as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42778for as_dir in $PATH
42779do
42780  IFS=$as_save_IFS
42781  test -z "$as_dir" && as_dir=.
42782    for ac_exec_ext in '' $ac_executable_extensions; do
42783  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42784    ac_cv_prog_ac_ct_NM="$ac_prog"
42785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42786    break 2
42787  fi
42788done
42789  done
42790IFS=$as_save_IFS
42791
42792fi
42793fi
42794ac_ct_NM=$ac_cv_prog_ac_ct_NM
42795if test -n "$ac_ct_NM"; then
42796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42797$as_echo "$ac_ct_NM" >&6; }
42798else
42799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42800$as_echo "no" >&6; }
42801fi
42802
42803
42804  test -n "$ac_ct_NM" && break
42805done
42806
42807  if test "x$ac_ct_NM" = x; then
42808    NM=""
42809  else
42810    case $cross_compiling:$ac_tool_warned in
42811yes:)
42812{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42813$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42814ac_tool_warned=yes ;;
42815esac
42816    NM=$ac_ct_NM
42817  fi
42818fi
42819
42820    else
42821      # If it succeeded, then it was overridden by the user. We will use it
42822      # for the tool.
42823
42824      # First remove it from the list of overridden variables, so we can test
42825      # for unknown variables in the end.
42826      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42827
42828      # Check if we try to supply an empty value
42829      if test "x$NM" = x; then
42830        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42831$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42832        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42833$as_echo_n "checking for NM... " >&6; }
42834        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42835$as_echo "disabled" >&6; }
42836      else
42837        # Check if the provided tool contains a complete path.
42838        tool_specified="$NM"
42839        tool_basename="${tool_specified##*/}"
42840        if test "x$tool_basename" = "x$tool_specified"; then
42841          # A command without a complete path is provided, search $PATH.
42842          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42843$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42844          # Extract the first word of "$tool_basename", so it can be a program name with args.
42845set dummy $tool_basename; ac_word=$2
42846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42847$as_echo_n "checking for $ac_word... " >&6; }
42848if ${ac_cv_path_NM+:} false; then :
42849  $as_echo_n "(cached) " >&6
42850else
42851  case $NM in
42852  [\\/]* | ?:[\\/]*)
42853  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42854  ;;
42855  *)
42856  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42857for as_dir in $PATH
42858do
42859  IFS=$as_save_IFS
42860  test -z "$as_dir" && as_dir=.
42861    for ac_exec_ext in '' $ac_executable_extensions; do
42862  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42863    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42864    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42865    break 2
42866  fi
42867done
42868  done
42869IFS=$as_save_IFS
42870
42871  ;;
42872esac
42873fi
42874NM=$ac_cv_path_NM
42875if test -n "$NM"; then
42876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42877$as_echo "$NM" >&6; }
42878else
42879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42880$as_echo "no" >&6; }
42881fi
42882
42883
42884          if test "x$NM" = x; then
42885            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42886          fi
42887        else
42888          # Otherwise we believe it is a complete path. Use it as it is.
42889          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42890$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42891          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42892$as_echo_n "checking for NM... " >&6; }
42893          if test ! -x "$tool_specified"; then
42894            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42895$as_echo "not found" >&6; }
42896            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42897          fi
42898          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42899$as_echo "$tool_specified" >&6; }
42900        fi
42901      fi
42902    fi
42903
42904  fi
42905
42906
42907    else
42908
42909
42910  # Publish this variable in the help.
42911
42912
42913  if [ -z "${NM+x}" ]; then
42914    # The variable is not set by user, try to locate tool using the code snippet
42915    if test -n "$ac_tool_prefix"; then
42916  for ac_prog in nm
42917  do
42918    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42919set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42921$as_echo_n "checking for $ac_word... " >&6; }
42922if ${ac_cv_prog_NM+:} false; then :
42923  $as_echo_n "(cached) " >&6
42924else
42925  if test -n "$NM"; then
42926  ac_cv_prog_NM="$NM" # Let the user override the test.
42927else
42928as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42929for as_dir in $PATH
42930do
42931  IFS=$as_save_IFS
42932  test -z "$as_dir" && as_dir=.
42933    for ac_exec_ext in '' $ac_executable_extensions; do
42934  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42935    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42936    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42937    break 2
42938  fi
42939done
42940  done
42941IFS=$as_save_IFS
42942
42943fi
42944fi
42945NM=$ac_cv_prog_NM
42946if test -n "$NM"; then
42947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42948$as_echo "$NM" >&6; }
42949else
42950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42951$as_echo "no" >&6; }
42952fi
42953
42954
42955    test -n "$NM" && break
42956  done
42957fi
42958if test -z "$NM"; then
42959  ac_ct_NM=$NM
42960  for ac_prog in nm
42961do
42962  # Extract the first word of "$ac_prog", so it can be a program name with args.
42963set dummy $ac_prog; ac_word=$2
42964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42965$as_echo_n "checking for $ac_word... " >&6; }
42966if ${ac_cv_prog_ac_ct_NM+:} false; then :
42967  $as_echo_n "(cached) " >&6
42968else
42969  if test -n "$ac_ct_NM"; then
42970  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42971else
42972as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42973for as_dir in $PATH
42974do
42975  IFS=$as_save_IFS
42976  test -z "$as_dir" && as_dir=.
42977    for ac_exec_ext in '' $ac_executable_extensions; do
42978  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42979    ac_cv_prog_ac_ct_NM="$ac_prog"
42980    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42981    break 2
42982  fi
42983done
42984  done
42985IFS=$as_save_IFS
42986
42987fi
42988fi
42989ac_ct_NM=$ac_cv_prog_ac_ct_NM
42990if test -n "$ac_ct_NM"; then
42991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42992$as_echo "$ac_ct_NM" >&6; }
42993else
42994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42995$as_echo "no" >&6; }
42996fi
42997
42998
42999  test -n "$ac_ct_NM" && break
43000done
43001
43002  if test "x$ac_ct_NM" = x; then
43003    NM=""
43004  else
43005    case $cross_compiling:$ac_tool_warned in
43006yes:)
43007{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43008$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43009ac_tool_warned=yes ;;
43010esac
43011    NM=$ac_ct_NM
43012  fi
43013fi
43014
43015  else
43016    # The variable is set, but is it from the command line or the environment?
43017
43018    # Try to remove the string !NM! from our list.
43019    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
43020    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43021      # If it failed, the variable was not from the command line. Ignore it,
43022      # but warn the user (except for BASH, which is always set by the calling BASH).
43023      if test "xNM" != xBASH; then
43024        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
43025$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
43026      fi
43027      # Try to locate tool using the code snippet
43028      if test -n "$ac_tool_prefix"; then
43029  for ac_prog in nm
43030  do
43031    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43032set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43034$as_echo_n "checking for $ac_word... " >&6; }
43035if ${ac_cv_prog_NM+:} false; then :
43036  $as_echo_n "(cached) " >&6
43037else
43038  if test -n "$NM"; then
43039  ac_cv_prog_NM="$NM" # Let the user override the test.
43040else
43041as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43042for as_dir in $PATH
43043do
43044  IFS=$as_save_IFS
43045  test -z "$as_dir" && as_dir=.
43046    for ac_exec_ext in '' $ac_executable_extensions; do
43047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43048    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
43049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43050    break 2
43051  fi
43052done
43053  done
43054IFS=$as_save_IFS
43055
43056fi
43057fi
43058NM=$ac_cv_prog_NM
43059if test -n "$NM"; then
43060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
43061$as_echo "$NM" >&6; }
43062else
43063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43064$as_echo "no" >&6; }
43065fi
43066
43067
43068    test -n "$NM" && break
43069  done
43070fi
43071if test -z "$NM"; then
43072  ac_ct_NM=$NM
43073  for ac_prog in nm
43074do
43075  # Extract the first word of "$ac_prog", so it can be a program name with args.
43076set dummy $ac_prog; ac_word=$2
43077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43078$as_echo_n "checking for $ac_word... " >&6; }
43079if ${ac_cv_prog_ac_ct_NM+:} false; then :
43080  $as_echo_n "(cached) " >&6
43081else
43082  if test -n "$ac_ct_NM"; then
43083  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
43084else
43085as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43086for as_dir in $PATH
43087do
43088  IFS=$as_save_IFS
43089  test -z "$as_dir" && as_dir=.
43090    for ac_exec_ext in '' $ac_executable_extensions; do
43091  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43092    ac_cv_prog_ac_ct_NM="$ac_prog"
43093    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43094    break 2
43095  fi
43096done
43097  done
43098IFS=$as_save_IFS
43099
43100fi
43101fi
43102ac_ct_NM=$ac_cv_prog_ac_ct_NM
43103if test -n "$ac_ct_NM"; then
43104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
43105$as_echo "$ac_ct_NM" >&6; }
43106else
43107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43108$as_echo "no" >&6; }
43109fi
43110
43111
43112  test -n "$ac_ct_NM" && break
43113done
43114
43115  if test "x$ac_ct_NM" = x; then
43116    NM=""
43117  else
43118    case $cross_compiling:$ac_tool_warned in
43119yes:)
43120{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43121$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43122ac_tool_warned=yes ;;
43123esac
43124    NM=$ac_ct_NM
43125  fi
43126fi
43127
43128    else
43129      # If it succeeded, then it was overridden by the user. We will use it
43130      # for the tool.
43131
43132      # First remove it from the list of overridden variables, so we can test
43133      # for unknown variables in the end.
43134      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43135
43136      # Check if we try to supply an empty value
43137      if test "x$NM" = x; then
43138        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
43139$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
43140        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
43141$as_echo_n "checking for NM... " >&6; }
43142        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43143$as_echo "disabled" >&6; }
43144      else
43145        # Check if the provided tool contains a complete path.
43146        tool_specified="$NM"
43147        tool_basename="${tool_specified##*/}"
43148        if test "x$tool_basename" = "x$tool_specified"; then
43149          # A command without a complete path is provided, search $PATH.
43150          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
43151$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
43152          # Extract the first word of "$tool_basename", so it can be a program name with args.
43153set dummy $tool_basename; ac_word=$2
43154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43155$as_echo_n "checking for $ac_word... " >&6; }
43156if ${ac_cv_path_NM+:} false; then :
43157  $as_echo_n "(cached) " >&6
43158else
43159  case $NM in
43160  [\\/]* | ?:[\\/]*)
43161  ac_cv_path_NM="$NM" # Let the user override the test with a path.
43162  ;;
43163  *)
43164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43165for as_dir in $PATH
43166do
43167  IFS=$as_save_IFS
43168  test -z "$as_dir" && as_dir=.
43169    for ac_exec_ext in '' $ac_executable_extensions; do
43170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43171    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
43172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43173    break 2
43174  fi
43175done
43176  done
43177IFS=$as_save_IFS
43178
43179  ;;
43180esac
43181fi
43182NM=$ac_cv_path_NM
43183if test -n "$NM"; then
43184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
43185$as_echo "$NM" >&6; }
43186else
43187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43188$as_echo "no" >&6; }
43189fi
43190
43191
43192          if test "x$NM" = x; then
43193            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43194          fi
43195        else
43196          # Otherwise we believe it is a complete path. Use it as it is.
43197          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
43198$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
43199          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
43200$as_echo_n "checking for NM... " >&6; }
43201          if test ! -x "$tool_specified"; then
43202            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43203$as_echo "not found" >&6; }
43204            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
43205          fi
43206          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43207$as_echo "$tool_specified" >&6; }
43208        fi
43209      fi
43210    fi
43211
43212  fi
43213
43214
43215    fi
43216
43217  # Only process if variable expands to non-empty
43218
43219  if test "x$NM" != x; then
43220    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43221
43222  # First separate the path from the arguments. This will split at the first
43223  # space.
43224  complete="$NM"
43225  path="${complete%% *}"
43226  tmp="$complete EOL"
43227  arguments="${tmp#* }"
43228
43229  # Input might be given as Windows format, start by converting to
43230  # unix format.
43231  new_path=`$CYGPATH -u "$path"`
43232
43233  # Now try to locate executable using which
43234  new_path=`$WHICH "$new_path" 2> /dev/null`
43235  # bat and cmd files are not always considered executable in cygwin causing which
43236  # to not find them
43237  if test "x$new_path" = x \
43238      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43239      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43240    new_path=`$CYGPATH -u "$path"`
43241  fi
43242  if test "x$new_path" = x; then
43243    # Oops. Which didn't find the executable.
43244    # The splitting of arguments from the executable at a space might have been incorrect,
43245    # since paths with space are more likely in Windows. Give it another try with the whole
43246    # argument.
43247    path="$complete"
43248    arguments="EOL"
43249    new_path=`$CYGPATH -u "$path"`
43250    new_path=`$WHICH "$new_path" 2> /dev/null`
43251    # bat and cmd files are not always considered executable in cygwin causing which
43252    # to not find them
43253    if test "x$new_path" = x \
43254        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43255        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43256      new_path=`$CYGPATH -u "$path"`
43257    fi
43258    if test "x$new_path" = x; then
43259      # It's still not found. Now this is an unrecoverable error.
43260      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43261$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43262      has_space=`$ECHO "$complete" | $GREP " "`
43263      if test "x$has_space" != x; then
43264        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43265$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43266      fi
43267      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43268    fi
43269  fi
43270
43271  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43272  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43273  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43274  # "foo.exe" is OK but "foo" is an error.
43275  #
43276  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43277  # It is also a way to make sure we got the proper file name for the real test later on.
43278  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43279  if test "x$test_shortpath" = x; then
43280    # Short path failed, file does not exist as specified.
43281    # Try adding .exe or .cmd
43282    if test -f "${new_path}.exe"; then
43283      input_to_shortpath="${new_path}.exe"
43284    elif test -f "${new_path}.cmd"; then
43285      input_to_shortpath="${new_path}.cmd"
43286    else
43287      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
43288$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
43289      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43290$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43291      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43292    fi
43293  else
43294    input_to_shortpath="$new_path"
43295  fi
43296
43297  # Call helper function which possibly converts this using DOS-style short mode.
43298  # If so, the updated path is stored in $new_path.
43299  new_path="$input_to_shortpath"
43300
43301  input_path="$input_to_shortpath"
43302  # Check if we need to convert this using DOS-style short mode. If the path
43303  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43304  # take no chances and rewrite it.
43305  # Note: m4 eats our [], so we need to use [ and ] instead.
43306  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43307  if test "x$has_forbidden_chars" != x; then
43308    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43309    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43310    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43311    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43312      # Going to short mode and back again did indeed matter. Since short mode is
43313      # case insensitive, let's make it lowercase to improve readability.
43314      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43315      # Now convert it back to Unix-style (cygpath)
43316      input_path=`$CYGPATH -u "$shortmode_path"`
43317      new_path="$input_path"
43318    fi
43319  fi
43320
43321  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43322  if test "x$test_cygdrive_prefix" = x; then
43323    # As a simple fix, exclude /usr/bin since it's not a real path.
43324    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43325      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43326      # a path prefixed by /cygdrive for fixpath to work.
43327      new_path="$CYGWIN_ROOT_PATH$input_path"
43328    fi
43329  fi
43330
43331  # remove trailing .exe if any
43332  new_path="${new_path/%.exe/}"
43333
43334    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43335
43336  # First separate the path from the arguments. This will split at the first
43337  # space.
43338  complete="$NM"
43339  path="${complete%% *}"
43340  tmp="$complete EOL"
43341  arguments="${tmp#* }"
43342
43343  # Input might be given as Windows format, start by converting to
43344  # unix format.
43345  new_path="$path"
43346
43347  windows_path="$new_path"
43348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43349    unix_path=`$CYGPATH -u "$windows_path"`
43350    new_path="$unix_path"
43351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43353    new_path="$unix_path"
43354  fi
43355
43356
43357  # Now try to locate executable using which
43358  new_path=`$WHICH "$new_path" 2> /dev/null`
43359
43360  if test "x$new_path" = x; then
43361    # Oops. Which didn't find the executable.
43362    # The splitting of arguments from the executable at a space might have been incorrect,
43363    # since paths with space are more likely in Windows. Give it another try with the whole
43364    # argument.
43365    path="$complete"
43366    arguments="EOL"
43367    new_path="$path"
43368
43369  windows_path="$new_path"
43370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43371    unix_path=`$CYGPATH -u "$windows_path"`
43372    new_path="$unix_path"
43373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43375    new_path="$unix_path"
43376  fi
43377
43378
43379    new_path=`$WHICH "$new_path" 2> /dev/null`
43380    # bat and cmd files are not always considered executable in MSYS causing which
43381    # to not find them
43382    if test "x$new_path" = x \
43383        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43384        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43385      new_path="$path"
43386
43387  windows_path="$new_path"
43388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43389    unix_path=`$CYGPATH -u "$windows_path"`
43390    new_path="$unix_path"
43391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43393    new_path="$unix_path"
43394  fi
43395
43396    fi
43397
43398    if test "x$new_path" = x; then
43399      # It's still not found. Now this is an unrecoverable error.
43400      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43401$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43402      has_space=`$ECHO "$complete" | $GREP " "`
43403      if test "x$has_space" != x; then
43404        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43405$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43406      fi
43407      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43408    fi
43409  fi
43410
43411  # Now new_path has a complete unix path to the binary
43412  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43413    # Keep paths in /bin as-is, but remove trailing .exe if any
43414    new_path="${new_path/%.exe/}"
43415    # Do not save /bin paths to all_fixpath_prefixes!
43416  else
43417    # Not in mixed or Windows style, start by that.
43418    new_path=`cmd //c echo $new_path`
43419
43420  input_path="$new_path"
43421  # Check if we need to convert this using DOS-style short mode. If the path
43422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43423  # take no chances and rewrite it.
43424  # Note: m4 eats our [], so we need to use [ and ] instead.
43425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43426  if test "x$has_forbidden_chars" != x; then
43427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43428    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43429  fi
43430
43431    # Output is in $new_path
43432
43433  windows_path="$new_path"
43434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43435    unix_path=`$CYGPATH -u "$windows_path"`
43436    new_path="$unix_path"
43437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43438    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43439    new_path="$unix_path"
43440  fi
43441
43442    # remove trailing .exe if any
43443    new_path="${new_path/%.exe/}"
43444
43445    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43446    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43447  fi
43448
43449    else
43450      # We're on a unix platform. Hooray! :)
43451      # First separate the path from the arguments. This will split at the first
43452      # space.
43453      complete="$NM"
43454      path="${complete%% *}"
43455      tmp="$complete EOL"
43456      arguments="${tmp#* }"
43457
43458      # Cannot rely on the command "which" here since it doesn't always work.
43459      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43460      if test -z "$is_absolute_path"; then
43461        # Path to executable is not absolute. Find it.
43462        IFS_save="$IFS"
43463        IFS=:
43464        for p in $PATH; do
43465          if test -f "$p/$path" && test -x "$p/$path"; then
43466            new_path="$p/$path"
43467            break
43468          fi
43469        done
43470        IFS="$IFS_save"
43471      else
43472        # This is an absolute path, we can use it without further modifications.
43473        new_path="$path"
43474      fi
43475
43476      if test "x$new_path" = x; then
43477        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43478$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43479        has_space=`$ECHO "$complete" | $GREP " "`
43480        if test "x$has_space" != x; then
43481          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43482$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43483        fi
43484        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43485      fi
43486    fi
43487
43488    # Now join together the path and the arguments once again
43489    if test "x$arguments" != xEOL; then
43490      new_complete="$new_path ${arguments% *}"
43491    else
43492      new_complete="$new_path"
43493    fi
43494
43495    if test "x$complete" != "x$new_complete"; then
43496      NM="$new_complete"
43497      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
43498$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
43499    fi
43500  fi
43501
43502    GNM="$NM"
43503
43504  fi
43505
43506  # objcopy is used for moving debug symbols to separate files when
43507  # full debug symbols are enabled.
43508  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
43509
43510
43511  # Publish this variable in the help.
43512
43513
43514  if [ -z "${OBJCOPY+x}" ]; then
43515    # The variable is not set by user, try to locate tool using the code snippet
43516    if test -n "$ac_tool_prefix"; then
43517  for ac_prog in gobjcopy objcopy
43518  do
43519    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43520set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43522$as_echo_n "checking for $ac_word... " >&6; }
43523if ${ac_cv_prog_OBJCOPY+:} false; then :
43524  $as_echo_n "(cached) " >&6
43525else
43526  if test -n "$OBJCOPY"; then
43527  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
43528else
43529as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43530for as_dir in $PATH
43531do
43532  IFS=$as_save_IFS
43533  test -z "$as_dir" && as_dir=.
43534    for ac_exec_ext in '' $ac_executable_extensions; do
43535  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43536    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
43537    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43538    break 2
43539  fi
43540done
43541  done
43542IFS=$as_save_IFS
43543
43544fi
43545fi
43546OBJCOPY=$ac_cv_prog_OBJCOPY
43547if test -n "$OBJCOPY"; then
43548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43549$as_echo "$OBJCOPY" >&6; }
43550else
43551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43552$as_echo "no" >&6; }
43553fi
43554
43555
43556    test -n "$OBJCOPY" && break
43557  done
43558fi
43559if test -z "$OBJCOPY"; then
43560  ac_ct_OBJCOPY=$OBJCOPY
43561  for ac_prog in gobjcopy objcopy
43562do
43563  # Extract the first word of "$ac_prog", so it can be a program name with args.
43564set dummy $ac_prog; ac_word=$2
43565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43566$as_echo_n "checking for $ac_word... " >&6; }
43567if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43568  $as_echo_n "(cached) " >&6
43569else
43570  if test -n "$ac_ct_OBJCOPY"; then
43571  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43572else
43573as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43574for as_dir in $PATH
43575do
43576  IFS=$as_save_IFS
43577  test -z "$as_dir" && as_dir=.
43578    for ac_exec_ext in '' $ac_executable_extensions; do
43579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43580    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43582    break 2
43583  fi
43584done
43585  done
43586IFS=$as_save_IFS
43587
43588fi
43589fi
43590ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43591if test -n "$ac_ct_OBJCOPY"; then
43592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43593$as_echo "$ac_ct_OBJCOPY" >&6; }
43594else
43595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43596$as_echo "no" >&6; }
43597fi
43598
43599
43600  test -n "$ac_ct_OBJCOPY" && break
43601done
43602
43603  if test "x$ac_ct_OBJCOPY" = x; then
43604    OBJCOPY=""
43605  else
43606    case $cross_compiling:$ac_tool_warned in
43607yes:)
43608{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43609$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43610ac_tool_warned=yes ;;
43611esac
43612    OBJCOPY=$ac_ct_OBJCOPY
43613  fi
43614fi
43615
43616  else
43617    # The variable is set, but is it from the command line or the environment?
43618
43619    # Try to remove the string !OBJCOPY! from our list.
43620    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
43621    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43622      # If it failed, the variable was not from the command line. Ignore it,
43623      # but warn the user (except for BASH, which is always set by the calling BASH).
43624      if test "xOBJCOPY" != xBASH; then
43625        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
43626$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
43627      fi
43628      # Try to locate tool using the code snippet
43629      if test -n "$ac_tool_prefix"; then
43630  for ac_prog in gobjcopy objcopy
43631  do
43632    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43633set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43635$as_echo_n "checking for $ac_word... " >&6; }
43636if ${ac_cv_prog_OBJCOPY+:} false; then :
43637  $as_echo_n "(cached) " >&6
43638else
43639  if test -n "$OBJCOPY"; then
43640  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
43641else
43642as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43643for as_dir in $PATH
43644do
43645  IFS=$as_save_IFS
43646  test -z "$as_dir" && as_dir=.
43647    for ac_exec_ext in '' $ac_executable_extensions; do
43648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43649    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
43650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43651    break 2
43652  fi
43653done
43654  done
43655IFS=$as_save_IFS
43656
43657fi
43658fi
43659OBJCOPY=$ac_cv_prog_OBJCOPY
43660if test -n "$OBJCOPY"; then
43661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43662$as_echo "$OBJCOPY" >&6; }
43663else
43664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43665$as_echo "no" >&6; }
43666fi
43667
43668
43669    test -n "$OBJCOPY" && break
43670  done
43671fi
43672if test -z "$OBJCOPY"; then
43673  ac_ct_OBJCOPY=$OBJCOPY
43674  for ac_prog in gobjcopy objcopy
43675do
43676  # Extract the first word of "$ac_prog", so it can be a program name with args.
43677set dummy $ac_prog; ac_word=$2
43678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43679$as_echo_n "checking for $ac_word... " >&6; }
43680if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43681  $as_echo_n "(cached) " >&6
43682else
43683  if test -n "$ac_ct_OBJCOPY"; then
43684  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43685else
43686as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43687for as_dir in $PATH
43688do
43689  IFS=$as_save_IFS
43690  test -z "$as_dir" && as_dir=.
43691    for ac_exec_ext in '' $ac_executable_extensions; do
43692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43693    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43695    break 2
43696  fi
43697done
43698  done
43699IFS=$as_save_IFS
43700
43701fi
43702fi
43703ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43704if test -n "$ac_ct_OBJCOPY"; then
43705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43706$as_echo "$ac_ct_OBJCOPY" >&6; }
43707else
43708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43709$as_echo "no" >&6; }
43710fi
43711
43712
43713  test -n "$ac_ct_OBJCOPY" && break
43714done
43715
43716  if test "x$ac_ct_OBJCOPY" = x; then
43717    OBJCOPY=""
43718  else
43719    case $cross_compiling:$ac_tool_warned in
43720yes:)
43721{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43722$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43723ac_tool_warned=yes ;;
43724esac
43725    OBJCOPY=$ac_ct_OBJCOPY
43726  fi
43727fi
43728
43729    else
43730      # If it succeeded, then it was overridden by the user. We will use it
43731      # for the tool.
43732
43733      # First remove it from the list of overridden variables, so we can test
43734      # for unknown variables in the end.
43735      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43736
43737      # Check if we try to supply an empty value
43738      if test "x$OBJCOPY" = x; then
43739        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
43740$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
43741        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43742$as_echo_n "checking for OBJCOPY... " >&6; }
43743        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43744$as_echo "disabled" >&6; }
43745      else
43746        # Check if the provided tool contains a complete path.
43747        tool_specified="$OBJCOPY"
43748        tool_basename="${tool_specified##*/}"
43749        if test "x$tool_basename" = "x$tool_specified"; then
43750          # A command without a complete path is provided, search $PATH.
43751          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
43752$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
43753          # Extract the first word of "$tool_basename", so it can be a program name with args.
43754set dummy $tool_basename; ac_word=$2
43755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43756$as_echo_n "checking for $ac_word... " >&6; }
43757if ${ac_cv_path_OBJCOPY+:} false; then :
43758  $as_echo_n "(cached) " >&6
43759else
43760  case $OBJCOPY in
43761  [\\/]* | ?:[\\/]*)
43762  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
43763  ;;
43764  *)
43765  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43766for as_dir in $PATH
43767do
43768  IFS=$as_save_IFS
43769  test -z "$as_dir" && as_dir=.
43770    for ac_exec_ext in '' $ac_executable_extensions; do
43771  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43772    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
43773    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43774    break 2
43775  fi
43776done
43777  done
43778IFS=$as_save_IFS
43779
43780  ;;
43781esac
43782fi
43783OBJCOPY=$ac_cv_path_OBJCOPY
43784if test -n "$OBJCOPY"; then
43785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43786$as_echo "$OBJCOPY" >&6; }
43787else
43788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43789$as_echo "no" >&6; }
43790fi
43791
43792
43793          if test "x$OBJCOPY" = x; then
43794            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43795          fi
43796        else
43797          # Otherwise we believe it is a complete path. Use it as it is.
43798          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
43799$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
43800          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43801$as_echo_n "checking for OBJCOPY... " >&6; }
43802          if test ! -x "$tool_specified"; then
43803            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43804$as_echo "not found" >&6; }
43805            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
43806          fi
43807          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43808$as_echo "$tool_specified" >&6; }
43809        fi
43810      fi
43811    fi
43812
43813  fi
43814
43815
43816    # Only call fixup if objcopy was found.
43817    if test -n "$OBJCOPY"; then
43818
43819  # Only process if variable expands to non-empty
43820
43821  if test "x$OBJCOPY" != x; then
43822    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43823
43824  # First separate the path from the arguments. This will split at the first
43825  # space.
43826  complete="$OBJCOPY"
43827  path="${complete%% *}"
43828  tmp="$complete EOL"
43829  arguments="${tmp#* }"
43830
43831  # Input might be given as Windows format, start by converting to
43832  # unix format.
43833  new_path=`$CYGPATH -u "$path"`
43834
43835  # Now try to locate executable using which
43836  new_path=`$WHICH "$new_path" 2> /dev/null`
43837  # bat and cmd files are not always considered executable in cygwin causing which
43838  # to not find them
43839  if test "x$new_path" = x \
43840      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43841      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43842    new_path=`$CYGPATH -u "$path"`
43843  fi
43844  if test "x$new_path" = x; then
43845    # Oops. Which didn't find the executable.
43846    # The splitting of arguments from the executable at a space might have been incorrect,
43847    # since paths with space are more likely in Windows. Give it another try with the whole
43848    # argument.
43849    path="$complete"
43850    arguments="EOL"
43851    new_path=`$CYGPATH -u "$path"`
43852    new_path=`$WHICH "$new_path" 2> /dev/null`
43853    # bat and cmd files are not always considered executable in cygwin causing which
43854    # to not find them
43855    if test "x$new_path" = x \
43856        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43857        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43858      new_path=`$CYGPATH -u "$path"`
43859    fi
43860    if test "x$new_path" = x; then
43861      # It's still not found. Now this is an unrecoverable error.
43862      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43863$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43864      has_space=`$ECHO "$complete" | $GREP " "`
43865      if test "x$has_space" != x; then
43866        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43867$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43868      fi
43869      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43870    fi
43871  fi
43872
43873  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43874  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43875  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43876  # "foo.exe" is OK but "foo" is an error.
43877  #
43878  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43879  # It is also a way to make sure we got the proper file name for the real test later on.
43880  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43881  if test "x$test_shortpath" = x; then
43882    # Short path failed, file does not exist as specified.
43883    # Try adding .exe or .cmd
43884    if test -f "${new_path}.exe"; then
43885      input_to_shortpath="${new_path}.exe"
43886    elif test -f "${new_path}.cmd"; then
43887      input_to_shortpath="${new_path}.cmd"
43888    else
43889      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
43890$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
43891      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43892$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43893      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43894    fi
43895  else
43896    input_to_shortpath="$new_path"
43897  fi
43898
43899  # Call helper function which possibly converts this using DOS-style short mode.
43900  # If so, the updated path is stored in $new_path.
43901  new_path="$input_to_shortpath"
43902
43903  input_path="$input_to_shortpath"
43904  # Check if we need to convert this using DOS-style short mode. If the path
43905  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43906  # take no chances and rewrite it.
43907  # Note: m4 eats our [], so we need to use [ and ] instead.
43908  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43909  if test "x$has_forbidden_chars" != x; then
43910    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43911    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43912    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43913    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43914      # Going to short mode and back again did indeed matter. Since short mode is
43915      # case insensitive, let's make it lowercase to improve readability.
43916      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43917      # Now convert it back to Unix-style (cygpath)
43918      input_path=`$CYGPATH -u "$shortmode_path"`
43919      new_path="$input_path"
43920    fi
43921  fi
43922
43923  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43924  if test "x$test_cygdrive_prefix" = x; then
43925    # As a simple fix, exclude /usr/bin since it's not a real path.
43926    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43927      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43928      # a path prefixed by /cygdrive for fixpath to work.
43929      new_path="$CYGWIN_ROOT_PATH$input_path"
43930    fi
43931  fi
43932
43933  # remove trailing .exe if any
43934  new_path="${new_path/%.exe/}"
43935
43936    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43937
43938  # First separate the path from the arguments. This will split at the first
43939  # space.
43940  complete="$OBJCOPY"
43941  path="${complete%% *}"
43942  tmp="$complete EOL"
43943  arguments="${tmp#* }"
43944
43945  # Input might be given as Windows format, start by converting to
43946  # unix format.
43947  new_path="$path"
43948
43949  windows_path="$new_path"
43950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43951    unix_path=`$CYGPATH -u "$windows_path"`
43952    new_path="$unix_path"
43953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43955    new_path="$unix_path"
43956  fi
43957
43958
43959  # Now try to locate executable using which
43960  new_path=`$WHICH "$new_path" 2> /dev/null`
43961
43962  if test "x$new_path" = x; then
43963    # Oops. Which didn't find the executable.
43964    # The splitting of arguments from the executable at a space might have been incorrect,
43965    # since paths with space are more likely in Windows. Give it another try with the whole
43966    # argument.
43967    path="$complete"
43968    arguments="EOL"
43969    new_path="$path"
43970
43971  windows_path="$new_path"
43972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43973    unix_path=`$CYGPATH -u "$windows_path"`
43974    new_path="$unix_path"
43975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43976    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43977    new_path="$unix_path"
43978  fi
43979
43980
43981    new_path=`$WHICH "$new_path" 2> /dev/null`
43982    # bat and cmd files are not always considered executable in MSYS causing which
43983    # to not find them
43984    if test "x$new_path" = x \
43985        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43986        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43987      new_path="$path"
43988
43989  windows_path="$new_path"
43990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43991    unix_path=`$CYGPATH -u "$windows_path"`
43992    new_path="$unix_path"
43993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43995    new_path="$unix_path"
43996  fi
43997
43998    fi
43999
44000    if test "x$new_path" = x; then
44001      # It's still not found. Now this is an unrecoverable error.
44002      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
44003$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
44004      has_space=`$ECHO "$complete" | $GREP " "`
44005      if test "x$has_space" != x; then
44006        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44007$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44008      fi
44009      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
44010    fi
44011  fi
44012
44013  # Now new_path has a complete unix path to the binary
44014  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44015    # Keep paths in /bin as-is, but remove trailing .exe if any
44016    new_path="${new_path/%.exe/}"
44017    # Do not save /bin paths to all_fixpath_prefixes!
44018  else
44019    # Not in mixed or Windows style, start by that.
44020    new_path=`cmd //c echo $new_path`
44021
44022  input_path="$new_path"
44023  # Check if we need to convert this using DOS-style short mode. If the path
44024  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44025  # take no chances and rewrite it.
44026  # Note: m4 eats our [], so we need to use [ and ] instead.
44027  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44028  if test "x$has_forbidden_chars" != x; then
44029    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44030    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44031  fi
44032
44033    # Output is in $new_path
44034
44035  windows_path="$new_path"
44036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44037    unix_path=`$CYGPATH -u "$windows_path"`
44038    new_path="$unix_path"
44039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44040    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44041    new_path="$unix_path"
44042  fi
44043
44044    # remove trailing .exe if any
44045    new_path="${new_path/%.exe/}"
44046
44047    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44048    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44049  fi
44050
44051    else
44052      # We're on a unix platform. Hooray! :)
44053      # First separate the path from the arguments. This will split at the first
44054      # space.
44055      complete="$OBJCOPY"
44056      path="${complete%% *}"
44057      tmp="$complete EOL"
44058      arguments="${tmp#* }"
44059
44060      # Cannot rely on the command "which" here since it doesn't always work.
44061      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44062      if test -z "$is_absolute_path"; then
44063        # Path to executable is not absolute. Find it.
44064        IFS_save="$IFS"
44065        IFS=:
44066        for p in $PATH; do
44067          if test -f "$p/$path" && test -x "$p/$path"; then
44068            new_path="$p/$path"
44069            break
44070          fi
44071        done
44072        IFS="$IFS_save"
44073      else
44074        # This is an absolute path, we can use it without further modifications.
44075        new_path="$path"
44076      fi
44077
44078      if test "x$new_path" = x; then
44079        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
44080$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
44081        has_space=`$ECHO "$complete" | $GREP " "`
44082        if test "x$has_space" != x; then
44083          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44084$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44085        fi
44086        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
44087      fi
44088    fi
44089
44090    # Now join together the path and the arguments once again
44091    if test "x$arguments" != xEOL; then
44092      new_complete="$new_path ${arguments% *}"
44093    else
44094      new_complete="$new_path"
44095    fi
44096
44097    if test "x$complete" != "x$new_complete"; then
44098      OBJCOPY="$new_complete"
44099      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
44100$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
44101    fi
44102  fi
44103
44104      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
44105        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
44106        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
44107        # - version number is last blank separate word on first line
44108        # - version number formats that have been seen:
44109        #   - <major>.<minor>
44110        #   - <major>.<minor>.<micro>
44111        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
44112        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
44113         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
44114              -e 's/.* //' \
44115              -e '/^[01]\./b bad' \
44116              -e '/^2\./{' \
44117              -e '  s/^2\.//' \
44118              -e '  /^[0-9]$/b bad' \
44119              -e '  /^[0-9]\./b bad' \
44120              -e '  /^1[0-9]$/b bad' \
44121              -e '  /^1[0-9]\./b bad' \
44122              -e '  /^20\./b bad' \
44123              -e '  /^21\.0$/b bad' \
44124              -e '  /^21\.0\./b bad' \
44125              -e '}' \
44126              -e ':good' \
44127              -e 's/.*/VALID_VERSION/p' \
44128              -e 'q' \
44129              -e ':bad' \
44130              -e 's/.*/BAD_VERSION/p' \
44131              -e 'q'`
44132        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
44133          OBJCOPY=
44134          { $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
44135$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
44136          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
44137$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
44138          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
44139$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
44140          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
44141$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
44142          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
44143$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
44144        fi
44145      fi
44146    fi
44147  fi
44148
44149
44150
44151  # Publish this variable in the help.
44152
44153
44154  if [ -z "${OBJDUMP+x}" ]; then
44155    # The variable is not set by user, try to locate tool using the code snippet
44156    if test -n "$ac_tool_prefix"; then
44157  for ac_prog in gobjdump objdump
44158  do
44159    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
44160set dummy $ac_tool_prefix$ac_prog; ac_word=$2
44161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44162$as_echo_n "checking for $ac_word... " >&6; }
44163if ${ac_cv_prog_OBJDUMP+:} false; then :
44164  $as_echo_n "(cached) " >&6
44165else
44166  if test -n "$OBJDUMP"; then
44167  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
44168else
44169as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44170for as_dir in $PATH
44171do
44172  IFS=$as_save_IFS
44173  test -z "$as_dir" && as_dir=.
44174    for ac_exec_ext in '' $ac_executable_extensions; do
44175  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44176    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
44177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44178    break 2
44179  fi
44180done
44181  done
44182IFS=$as_save_IFS
44183
44184fi
44185fi
44186OBJDUMP=$ac_cv_prog_OBJDUMP
44187if test -n "$OBJDUMP"; then
44188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44189$as_echo "$OBJDUMP" >&6; }
44190else
44191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44192$as_echo "no" >&6; }
44193fi
44194
44195
44196    test -n "$OBJDUMP" && break
44197  done
44198fi
44199if test -z "$OBJDUMP"; then
44200  ac_ct_OBJDUMP=$OBJDUMP
44201  for ac_prog in gobjdump objdump
44202do
44203  # Extract the first word of "$ac_prog", so it can be a program name with args.
44204set dummy $ac_prog; ac_word=$2
44205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44206$as_echo_n "checking for $ac_word... " >&6; }
44207if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
44208  $as_echo_n "(cached) " >&6
44209else
44210  if test -n "$ac_ct_OBJDUMP"; then
44211  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
44212else
44213as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44214for as_dir in $PATH
44215do
44216  IFS=$as_save_IFS
44217  test -z "$as_dir" && as_dir=.
44218    for ac_exec_ext in '' $ac_executable_extensions; do
44219  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44220    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
44221    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44222    break 2
44223  fi
44224done
44225  done
44226IFS=$as_save_IFS
44227
44228fi
44229fi
44230ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
44231if test -n "$ac_ct_OBJDUMP"; then
44232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
44233$as_echo "$ac_ct_OBJDUMP" >&6; }
44234else
44235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44236$as_echo "no" >&6; }
44237fi
44238
44239
44240  test -n "$ac_ct_OBJDUMP" && break
44241done
44242
44243  if test "x$ac_ct_OBJDUMP" = x; then
44244    OBJDUMP=""
44245  else
44246    case $cross_compiling:$ac_tool_warned in
44247yes:)
44248{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44249$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44250ac_tool_warned=yes ;;
44251esac
44252    OBJDUMP=$ac_ct_OBJDUMP
44253  fi
44254fi
44255
44256  else
44257    # The variable is set, but is it from the command line or the environment?
44258
44259    # Try to remove the string !OBJDUMP! from our list.
44260    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
44261    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44262      # If it failed, the variable was not from the command line. Ignore it,
44263      # but warn the user (except for BASH, which is always set by the calling BASH).
44264      if test "xOBJDUMP" != xBASH; then
44265        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
44266$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
44267      fi
44268      # Try to locate tool using the code snippet
44269      if test -n "$ac_tool_prefix"; then
44270  for ac_prog in gobjdump objdump
44271  do
44272    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
44273set dummy $ac_tool_prefix$ac_prog; ac_word=$2
44274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44275$as_echo_n "checking for $ac_word... " >&6; }
44276if ${ac_cv_prog_OBJDUMP+:} false; then :
44277  $as_echo_n "(cached) " >&6
44278else
44279  if test -n "$OBJDUMP"; then
44280  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
44281else
44282as_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_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
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
44297fi
44298fi
44299OBJDUMP=$ac_cv_prog_OBJDUMP
44300if test -n "$OBJDUMP"; then
44301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44302$as_echo "$OBJDUMP" >&6; }
44303else
44304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44305$as_echo "no" >&6; }
44306fi
44307
44308
44309    test -n "$OBJDUMP" && break
44310  done
44311fi
44312if test -z "$OBJDUMP"; then
44313  ac_ct_OBJDUMP=$OBJDUMP
44314  for ac_prog in gobjdump objdump
44315do
44316  # Extract the first word of "$ac_prog", so it can be a program name with args.
44317set dummy $ac_prog; ac_word=$2
44318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44319$as_echo_n "checking for $ac_word... " >&6; }
44320if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
44321  $as_echo_n "(cached) " >&6
44322else
44323  if test -n "$ac_ct_OBJDUMP"; then
44324  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
44325else
44326as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44327for as_dir in $PATH
44328do
44329  IFS=$as_save_IFS
44330  test -z "$as_dir" && as_dir=.
44331    for ac_exec_ext in '' $ac_executable_extensions; do
44332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44333    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
44334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44335    break 2
44336  fi
44337done
44338  done
44339IFS=$as_save_IFS
44340
44341fi
44342fi
44343ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
44344if test -n "$ac_ct_OBJDUMP"; then
44345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
44346$as_echo "$ac_ct_OBJDUMP" >&6; }
44347else
44348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44349$as_echo "no" >&6; }
44350fi
44351
44352
44353  test -n "$ac_ct_OBJDUMP" && break
44354done
44355
44356  if test "x$ac_ct_OBJDUMP" = x; then
44357    OBJDUMP=""
44358  else
44359    case $cross_compiling:$ac_tool_warned in
44360yes:)
44361{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44362$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44363ac_tool_warned=yes ;;
44364esac
44365    OBJDUMP=$ac_ct_OBJDUMP
44366  fi
44367fi
44368
44369    else
44370      # If it succeeded, then it was overridden by the user. We will use it
44371      # for the tool.
44372
44373      # First remove it from the list of overridden variables, so we can test
44374      # for unknown variables in the end.
44375      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44376
44377      # Check if we try to supply an empty value
44378      if test "x$OBJDUMP" = x; then
44379        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
44380$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
44381        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
44382$as_echo_n "checking for OBJDUMP... " >&6; }
44383        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44384$as_echo "disabled" >&6; }
44385      else
44386        # Check if the provided tool contains a complete path.
44387        tool_specified="$OBJDUMP"
44388        tool_basename="${tool_specified##*/}"
44389        if test "x$tool_basename" = "x$tool_specified"; then
44390          # A command without a complete path is provided, search $PATH.
44391          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
44392$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
44393          # Extract the first word of "$tool_basename", so it can be a program name with args.
44394set dummy $tool_basename; ac_word=$2
44395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44396$as_echo_n "checking for $ac_word... " >&6; }
44397if ${ac_cv_path_OBJDUMP+:} false; then :
44398  $as_echo_n "(cached) " >&6
44399else
44400  case $OBJDUMP in
44401  [\\/]* | ?:[\\/]*)
44402  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
44403  ;;
44404  *)
44405  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44406for as_dir in $PATH
44407do
44408  IFS=$as_save_IFS
44409  test -z "$as_dir" && as_dir=.
44410    for ac_exec_ext in '' $ac_executable_extensions; do
44411  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44412    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
44413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44414    break 2
44415  fi
44416done
44417  done
44418IFS=$as_save_IFS
44419
44420  ;;
44421esac
44422fi
44423OBJDUMP=$ac_cv_path_OBJDUMP
44424if test -n "$OBJDUMP"; then
44425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44426$as_echo "$OBJDUMP" >&6; }
44427else
44428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44429$as_echo "no" >&6; }
44430fi
44431
44432
44433          if test "x$OBJDUMP" = x; then
44434            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44435          fi
44436        else
44437          # Otherwise we believe it is a complete path. Use it as it is.
44438          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
44439$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
44440          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
44441$as_echo_n "checking for OBJDUMP... " >&6; }
44442          if test ! -x "$tool_specified"; then
44443            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44444$as_echo "not found" >&6; }
44445            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
44446          fi
44447          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44448$as_echo "$tool_specified" >&6; }
44449        fi
44450      fi
44451    fi
44452
44453  fi
44454
44455
44456  if test "x$OBJDUMP" != x; then
44457    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
44458    # bails if argument is missing.
44459
44460  # Only process if variable expands to non-empty
44461
44462  if test "x$OBJDUMP" != x; then
44463    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44464
44465  # First separate the path from the arguments. This will split at the first
44466  # space.
44467  complete="$OBJDUMP"
44468  path="${complete%% *}"
44469  tmp="$complete EOL"
44470  arguments="${tmp#* }"
44471
44472  # Input might be given as Windows format, start by converting to
44473  # unix format.
44474  new_path=`$CYGPATH -u "$path"`
44475
44476  # Now try to locate executable using which
44477  new_path=`$WHICH "$new_path" 2> /dev/null`
44478  # bat and cmd files are not always considered executable in cygwin causing which
44479  # to not find them
44480  if test "x$new_path" = x \
44481      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44482      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44483    new_path=`$CYGPATH -u "$path"`
44484  fi
44485  if test "x$new_path" = x; then
44486    # Oops. Which didn't find the executable.
44487    # The splitting of arguments from the executable at a space might have been incorrect,
44488    # since paths with space are more likely in Windows. Give it another try with the whole
44489    # argument.
44490    path="$complete"
44491    arguments="EOL"
44492    new_path=`$CYGPATH -u "$path"`
44493    new_path=`$WHICH "$new_path" 2> /dev/null`
44494    # bat and cmd files are not always considered executable in cygwin causing which
44495    # to not find them
44496    if test "x$new_path" = x \
44497        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44498        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44499      new_path=`$CYGPATH -u "$path"`
44500    fi
44501    if test "x$new_path" = x; then
44502      # It's still not found. Now this is an unrecoverable error.
44503      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44504$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44505      has_space=`$ECHO "$complete" | $GREP " "`
44506      if test "x$has_space" != x; then
44507        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44508$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44509      fi
44510      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44511    fi
44512  fi
44513
44514  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44515  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44516  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44517  # "foo.exe" is OK but "foo" is an error.
44518  #
44519  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44520  # It is also a way to make sure we got the proper file name for the real test later on.
44521  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44522  if test "x$test_shortpath" = x; then
44523    # Short path failed, file does not exist as specified.
44524    # Try adding .exe or .cmd
44525    if test -f "${new_path}.exe"; then
44526      input_to_shortpath="${new_path}.exe"
44527    elif test -f "${new_path}.cmd"; then
44528      input_to_shortpath="${new_path}.cmd"
44529    else
44530      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
44531$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
44532      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44533$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44534      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44535    fi
44536  else
44537    input_to_shortpath="$new_path"
44538  fi
44539
44540  # Call helper function which possibly converts this using DOS-style short mode.
44541  # If so, the updated path is stored in $new_path.
44542  new_path="$input_to_shortpath"
44543
44544  input_path="$input_to_shortpath"
44545  # Check if we need to convert this using DOS-style short mode. If the path
44546  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44547  # take no chances and rewrite it.
44548  # Note: m4 eats our [], so we need to use [ and ] instead.
44549  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44550  if test "x$has_forbidden_chars" != x; then
44551    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44552    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44553    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44554    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44555      # Going to short mode and back again did indeed matter. Since short mode is
44556      # case insensitive, let's make it lowercase to improve readability.
44557      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44558      # Now convert it back to Unix-style (cygpath)
44559      input_path=`$CYGPATH -u "$shortmode_path"`
44560      new_path="$input_path"
44561    fi
44562  fi
44563
44564  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44565  if test "x$test_cygdrive_prefix" = x; then
44566    # As a simple fix, exclude /usr/bin since it's not a real path.
44567    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44568      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44569      # a path prefixed by /cygdrive for fixpath to work.
44570      new_path="$CYGWIN_ROOT_PATH$input_path"
44571    fi
44572  fi
44573
44574  # remove trailing .exe if any
44575  new_path="${new_path/%.exe/}"
44576
44577    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44578
44579  # First separate the path from the arguments. This will split at the first
44580  # space.
44581  complete="$OBJDUMP"
44582  path="${complete%% *}"
44583  tmp="$complete EOL"
44584  arguments="${tmp#* }"
44585
44586  # Input might be given as Windows format, start by converting to
44587  # unix format.
44588  new_path="$path"
44589
44590  windows_path="$new_path"
44591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44592    unix_path=`$CYGPATH -u "$windows_path"`
44593    new_path="$unix_path"
44594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44595    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44596    new_path="$unix_path"
44597  fi
44598
44599
44600  # Now try to locate executable using which
44601  new_path=`$WHICH "$new_path" 2> /dev/null`
44602
44603  if test "x$new_path" = x; then
44604    # Oops. Which didn't find the executable.
44605    # The splitting of arguments from the executable at a space might have been incorrect,
44606    # since paths with space are more likely in Windows. Give it another try with the whole
44607    # argument.
44608    path="$complete"
44609    arguments="EOL"
44610    new_path="$path"
44611
44612  windows_path="$new_path"
44613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44614    unix_path=`$CYGPATH -u "$windows_path"`
44615    new_path="$unix_path"
44616  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44617    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44618    new_path="$unix_path"
44619  fi
44620
44621
44622    new_path=`$WHICH "$new_path" 2> /dev/null`
44623    # bat and cmd files are not always considered executable in MSYS causing which
44624    # to not find them
44625    if test "x$new_path" = x \
44626        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44627        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44628      new_path="$path"
44629
44630  windows_path="$new_path"
44631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44632    unix_path=`$CYGPATH -u "$windows_path"`
44633    new_path="$unix_path"
44634  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44635    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44636    new_path="$unix_path"
44637  fi
44638
44639    fi
44640
44641    if test "x$new_path" = x; then
44642      # It's still not found. Now this is an unrecoverable error.
44643      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44644$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44645      has_space=`$ECHO "$complete" | $GREP " "`
44646      if test "x$has_space" != x; then
44647        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44648$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44649      fi
44650      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44651    fi
44652  fi
44653
44654  # Now new_path has a complete unix path to the binary
44655  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44656    # Keep paths in /bin as-is, but remove trailing .exe if any
44657    new_path="${new_path/%.exe/}"
44658    # Do not save /bin paths to all_fixpath_prefixes!
44659  else
44660    # Not in mixed or Windows style, start by that.
44661    new_path=`cmd //c echo $new_path`
44662
44663  input_path="$new_path"
44664  # Check if we need to convert this using DOS-style short mode. If the path
44665  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44666  # take no chances and rewrite it.
44667  # Note: m4 eats our [], so we need to use [ and ] instead.
44668  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44669  if test "x$has_forbidden_chars" != x; then
44670    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44671    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44672  fi
44673
44674    # Output is in $new_path
44675
44676  windows_path="$new_path"
44677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44678    unix_path=`$CYGPATH -u "$windows_path"`
44679    new_path="$unix_path"
44680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44682    new_path="$unix_path"
44683  fi
44684
44685    # remove trailing .exe if any
44686    new_path="${new_path/%.exe/}"
44687
44688    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44689    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44690  fi
44691
44692    else
44693      # We're on a unix platform. Hooray! :)
44694      # First separate the path from the arguments. This will split at the first
44695      # space.
44696      complete="$OBJDUMP"
44697      path="${complete%% *}"
44698      tmp="$complete EOL"
44699      arguments="${tmp#* }"
44700
44701      # Cannot rely on the command "which" here since it doesn't always work.
44702      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44703      if test -z "$is_absolute_path"; then
44704        # Path to executable is not absolute. Find it.
44705        IFS_save="$IFS"
44706        IFS=:
44707        for p in $PATH; do
44708          if test -f "$p/$path" && test -x "$p/$path"; then
44709            new_path="$p/$path"
44710            break
44711          fi
44712        done
44713        IFS="$IFS_save"
44714      else
44715        # This is an absolute path, we can use it without further modifications.
44716        new_path="$path"
44717      fi
44718
44719      if test "x$new_path" = x; then
44720        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44721$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44722        has_space=`$ECHO "$complete" | $GREP " "`
44723        if test "x$has_space" != x; then
44724          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44725$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44726        fi
44727        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44728      fi
44729    fi
44730
44731    # Now join together the path and the arguments once again
44732    if test "x$arguments" != xEOL; then
44733      new_complete="$new_path ${arguments% *}"
44734    else
44735      new_complete="$new_path"
44736    fi
44737
44738    if test "x$complete" != "x$new_complete"; then
44739      OBJDUMP="$new_complete"
44740      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
44741$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
44742    fi
44743  fi
44744
44745  fi
44746
44747
44748  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
44749  # to remain in place. Otherwise the compiler will not work in some siutations
44750  # in later configure checks.
44751  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
44752    PATH="$OLD_PATH"
44753  fi
44754
44755  # Restore the flags to the user specified values.
44756  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
44757  CFLAGS="$ORG_CFLAGS"
44758  CXXFLAGS="$ORG_CXXFLAGS"
44759
44760
44761# Finally do some processing after the detection phase
44762
44763  if test "x$COMPILE_TYPE" = "xcross"; then
44764    # Now we need to find a C/C++ compiler that can build executables for the
44765    # build platform. We can't use the AC_PROG_CC macro, since it can only be
44766    # used once. Also, we need to do this without adding a tools dir to the
44767    # path, otherwise we might pick up cross-compilers which don't use standard
44768    # naming.
44769
44770    OLDPATH="$PATH"
44771
44772
44773# Check whether --with-build-devkit was given.
44774if test "${with_build_devkit+set}" = set; then :
44775  withval=$with_build_devkit;
44776fi
44777
44778    if test "x$with_build_devkit" = "xyes"; then
44779      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
44780    elif test -n "$with_build_devkit"; then
44781      if test ! -d "$with_build_devkit"; then
44782        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
44783      else
44784
44785  # Only process if variable expands to non-empty
44786
44787  if test "x$with_build_devkit" != x; then
44788    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44789
44790  # Input might be given as Windows format, start by converting to
44791  # unix format.
44792  path="$with_build_devkit"
44793  new_path=`$CYGPATH -u "$path"`
44794
44795  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44796  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44797  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44798  # "foo.exe" is OK but "foo" is an error.
44799  #
44800  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44801  # It is also a way to make sure we got the proper file name for the real test later on.
44802  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44803  if test "x$test_shortpath" = x; then
44804    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44805$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44806    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
44807  fi
44808
44809  # Call helper function which possibly converts this using DOS-style short mode.
44810  # If so, the updated path is stored in $new_path.
44811
44812  input_path="$new_path"
44813  # Check if we need to convert this using DOS-style short mode. If the path
44814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44815  # take no chances and rewrite it.
44816  # Note: m4 eats our [], so we need to use [ and ] instead.
44817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44818  if test "x$has_forbidden_chars" != x; then
44819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44820    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44821    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44822    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44823      # Going to short mode and back again did indeed matter. Since short mode is
44824      # case insensitive, let's make it lowercase to improve readability.
44825      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44826      # Now convert it back to Unix-style (cygpath)
44827      input_path=`$CYGPATH -u "$shortmode_path"`
44828      new_path="$input_path"
44829    fi
44830  fi
44831
44832  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44833  if test "x$test_cygdrive_prefix" = x; then
44834    # As a simple fix, exclude /usr/bin since it's not a real path.
44835    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44836      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44837      # a path prefixed by /cygdrive for fixpath to work.
44838      new_path="$CYGWIN_ROOT_PATH$input_path"
44839    fi
44840  fi
44841
44842
44843  if test "x$path" != "x$new_path"; then
44844    with_build_devkit="$new_path"
44845    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44846$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44847  fi
44848
44849    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44850
44851  path="$with_build_devkit"
44852  has_colon=`$ECHO $path | $GREP ^.:`
44853  new_path="$path"
44854  if test "x$has_colon" = x; then
44855    # Not in mixed or Windows style, start by that.
44856    new_path=`cmd //c echo $path`
44857  fi
44858
44859
44860  input_path="$new_path"
44861  # Check if we need to convert this using DOS-style short mode. If the path
44862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44863  # take no chances and rewrite it.
44864  # Note: m4 eats our [], so we need to use [ and ] instead.
44865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44866  if test "x$has_forbidden_chars" != x; then
44867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44868    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44869  fi
44870
44871
44872  windows_path="$new_path"
44873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44874    unix_path=`$CYGPATH -u "$windows_path"`
44875    new_path="$unix_path"
44876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44878    new_path="$unix_path"
44879  fi
44880
44881  if test "x$path" != "x$new_path"; then
44882    with_build_devkit="$new_path"
44883    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44884$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44885  fi
44886
44887  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44888  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44889
44890    else
44891      # We're on a unix platform. Hooray! :)
44892      path="$with_build_devkit"
44893      has_space=`$ECHO "$path" | $GREP " "`
44894      if test "x$has_space" != x; then
44895        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44896$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44897        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44898      fi
44899
44900      # Use eval to expand a potential ~
44901      eval path="$path"
44902      if test ! -f "$path" && test ! -d "$path"; then
44903        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
44904      fi
44905
44906      if test -d "$path"; then
44907        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
44908      else
44909        dir="`$DIRNAME "$path"`"
44910        base="`$BASENAME "$path"`"
44911        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
44912      fi
44913    fi
44914  fi
44915
44916        BUILD_DEVKIT_ROOT="$with_build_devkit"
44917        # Check for a meta data info file in the root of the devkit
44918        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
44919          # Process devkit.info so that existing devkit variables are not
44920          # modified by this
44921          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
44922              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
44923              -e "s/\$host/\$build/g" \
44924              $BUILD_DEVKIT_ROOT/devkit.info \
44925              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44926          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44927          # This potentially sets the following:
44928          # A descriptive name of the devkit
44929
44930  if test "x$BUILD_DEVKIT_NAME" = x; then
44931    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
44932  fi
44933
44934          # Corresponds to --with-extra-path
44935
44936  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
44937    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
44938  fi
44939
44940          # Corresponds to --with-toolchain-path
44941
44942  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44943    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
44944  fi
44945
44946          # Corresponds to --with-sysroot
44947
44948  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
44949    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
44950  fi
44951
44952          # Skip the Window specific parts
44953        fi
44954
44955        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
44956$as_echo_n "checking for build platform devkit... " >&6; }
44957        if test "x$BUILD_DEVKIT_NAME" != x; then
44958          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
44959$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
44960        else
44961          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
44962$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
44963        fi
44964
44965        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
44966
44967  if test "x$BUILD_SYSROOT" != "x"; then
44968    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44969      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44970        # Solaris Studio does not have a concept of sysroot. Instead we must
44971        # make sure the default include and lib dirs are appended to each
44972        # compile and link command line. Must also add -I-xbuiltin to enable
44973        # inlining of system functions and intrinsics.
44974        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
44975        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
44976            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
44977      fi
44978    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
44979      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
44980      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
44981    elif test "x$TOOLCHAIN_TYPE" = xclang; then
44982      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
44983      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
44984    fi
44985    # The global CFLAGS and LDFLAGS variables need these for configure to function
44986    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44987    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44988    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44989    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44990  fi
44991
44992  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44993    # We also need -iframework<path>/System/Library/Frameworks
44994    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44995    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44996    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44997    # set this here so it doesn't have to be peppered throughout the forest
44998    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44999    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
45000  fi
45001
45002
45003
45004
45005
45006         # Fallback default of just /bin if DEVKIT_PATH is not defined
45007        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
45008          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
45009        fi
45010        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
45011      fi
45012    fi
45013
45014    # FIXME: we should list the discovered compilers as an exclude pattern!
45015    # If we do that, we can do this detection before POST_DETECTION, and still
45016    # find the build compilers in the tools dir, if needed.
45017
45018
45019
45020  # Publish this variable in the help.
45021
45022
45023  if [ -z "${BUILD_CC+x}" ]; then
45024    # The variable is not set by user, try to locate tool using the code snippet
45025    for ac_prog in cl cc gcc
45026do
45027  # Extract the first word of "$ac_prog", so it can be a program name with args.
45028set dummy $ac_prog; ac_word=$2
45029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45030$as_echo_n "checking for $ac_word... " >&6; }
45031if ${ac_cv_path_BUILD_CC+:} false; then :
45032  $as_echo_n "(cached) " >&6
45033else
45034  case $BUILD_CC in
45035  [\\/]* | ?:[\\/]*)
45036  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
45037  ;;
45038  *)
45039  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45040for as_dir in $PATH
45041do
45042  IFS=$as_save_IFS
45043  test -z "$as_dir" && as_dir=.
45044    for ac_exec_ext in '' $ac_executable_extensions; do
45045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45046    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
45047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45048    break 2
45049  fi
45050done
45051  done
45052IFS=$as_save_IFS
45053
45054  ;;
45055esac
45056fi
45057BUILD_CC=$ac_cv_path_BUILD_CC
45058if test -n "$BUILD_CC"; then
45059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
45060$as_echo "$BUILD_CC" >&6; }
45061else
45062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45063$as_echo "no" >&6; }
45064fi
45065
45066
45067  test -n "$BUILD_CC" && break
45068done
45069
45070  else
45071    # The variable is set, but is it from the command line or the environment?
45072
45073    # Try to remove the string !BUILD_CC! from our list.
45074    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
45075    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45076      # If it failed, the variable was not from the command line. Ignore it,
45077      # but warn the user (except for BASH, which is always set by the calling BASH).
45078      if test "xBUILD_CC" != xBASH; then
45079        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
45080$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
45081      fi
45082      # Try to locate tool using the code snippet
45083      for ac_prog in cl cc gcc
45084do
45085  # Extract the first word of "$ac_prog", so it can be a program name with args.
45086set dummy $ac_prog; ac_word=$2
45087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45088$as_echo_n "checking for $ac_word... " >&6; }
45089if ${ac_cv_path_BUILD_CC+:} false; then :
45090  $as_echo_n "(cached) " >&6
45091else
45092  case $BUILD_CC in
45093  [\\/]* | ?:[\\/]*)
45094  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
45095  ;;
45096  *)
45097  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45098for as_dir in $PATH
45099do
45100  IFS=$as_save_IFS
45101  test -z "$as_dir" && as_dir=.
45102    for ac_exec_ext in '' $ac_executable_extensions; do
45103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45104    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
45105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45106    break 2
45107  fi
45108done
45109  done
45110IFS=$as_save_IFS
45111
45112  ;;
45113esac
45114fi
45115BUILD_CC=$ac_cv_path_BUILD_CC
45116if test -n "$BUILD_CC"; then
45117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
45118$as_echo "$BUILD_CC" >&6; }
45119else
45120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45121$as_echo "no" >&6; }
45122fi
45123
45124
45125  test -n "$BUILD_CC" && break
45126done
45127
45128    else
45129      # If it succeeded, then it was overridden by the user. We will use it
45130      # for the tool.
45131
45132      # First remove it from the list of overridden variables, so we can test
45133      # for unknown variables in the end.
45134      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45135
45136      # Check if we try to supply an empty value
45137      if test "x$BUILD_CC" = x; then
45138        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
45139$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
45140        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
45141$as_echo_n "checking for BUILD_CC... " >&6; }
45142        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45143$as_echo "disabled" >&6; }
45144      else
45145        # Check if the provided tool contains a complete path.
45146        tool_specified="$BUILD_CC"
45147        tool_basename="${tool_specified##*/}"
45148        if test "x$tool_basename" = "x$tool_specified"; then
45149          # A command without a complete path is provided, search $PATH.
45150          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
45151$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
45152          # Extract the first word of "$tool_basename", so it can be a program name with args.
45153set dummy $tool_basename; ac_word=$2
45154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45155$as_echo_n "checking for $ac_word... " >&6; }
45156if ${ac_cv_path_BUILD_CC+:} false; then :
45157  $as_echo_n "(cached) " >&6
45158else
45159  case $BUILD_CC in
45160  [\\/]* | ?:[\\/]*)
45161  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
45162  ;;
45163  *)
45164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45165for as_dir in $PATH
45166do
45167  IFS=$as_save_IFS
45168  test -z "$as_dir" && as_dir=.
45169    for ac_exec_ext in '' $ac_executable_extensions; do
45170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45171    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
45172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45173    break 2
45174  fi
45175done
45176  done
45177IFS=$as_save_IFS
45178
45179  ;;
45180esac
45181fi
45182BUILD_CC=$ac_cv_path_BUILD_CC
45183if test -n "$BUILD_CC"; then
45184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
45185$as_echo "$BUILD_CC" >&6; }
45186else
45187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45188$as_echo "no" >&6; }
45189fi
45190
45191
45192          if test "x$BUILD_CC" = x; then
45193            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45194          fi
45195        else
45196          # Otherwise we believe it is a complete path. Use it as it is.
45197          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
45198$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
45199          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
45200$as_echo_n "checking for BUILD_CC... " >&6; }
45201          if test ! -x "$tool_specified"; then
45202            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45203$as_echo "not found" >&6; }
45204            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
45205          fi
45206          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45207$as_echo "$tool_specified" >&6; }
45208        fi
45209      fi
45210    fi
45211
45212  fi
45213
45214
45215
45216  if test "x$BUILD_CC" = x; then
45217    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
45218  fi
45219
45220
45221
45222  # Only process if variable expands to non-empty
45223
45224  if test "x$BUILD_CC" != x; then
45225    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45226
45227  # First separate the path from the arguments. This will split at the first
45228  # space.
45229  complete="$BUILD_CC"
45230  path="${complete%% *}"
45231  tmp="$complete EOL"
45232  arguments="${tmp#* }"
45233
45234  # Input might be given as Windows format, start by converting to
45235  # unix format.
45236  new_path=`$CYGPATH -u "$path"`
45237
45238  # Now try to locate executable using which
45239  new_path=`$WHICH "$new_path" 2> /dev/null`
45240  # bat and cmd files are not always considered executable in cygwin causing which
45241  # to not find them
45242  if test "x$new_path" = x \
45243      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45244      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45245    new_path=`$CYGPATH -u "$path"`
45246  fi
45247  if test "x$new_path" = x; then
45248    # Oops. Which didn't find the executable.
45249    # The splitting of arguments from the executable at a space might have been incorrect,
45250    # since paths with space are more likely in Windows. Give it another try with the whole
45251    # argument.
45252    path="$complete"
45253    arguments="EOL"
45254    new_path=`$CYGPATH -u "$path"`
45255    new_path=`$WHICH "$new_path" 2> /dev/null`
45256    # bat and cmd files are not always considered executable in cygwin causing which
45257    # to not find them
45258    if test "x$new_path" = x \
45259        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45260        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45261      new_path=`$CYGPATH -u "$path"`
45262    fi
45263    if test "x$new_path" = x; then
45264      # It's still not found. Now this is an unrecoverable error.
45265      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45266$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45267      has_space=`$ECHO "$complete" | $GREP " "`
45268      if test "x$has_space" != x; then
45269        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45270$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45271      fi
45272      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45273    fi
45274  fi
45275
45276  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45277  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45278  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45279  # "foo.exe" is OK but "foo" is an error.
45280  #
45281  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45282  # It is also a way to make sure we got the proper file name for the real test later on.
45283  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45284  if test "x$test_shortpath" = x; then
45285    # Short path failed, file does not exist as specified.
45286    # Try adding .exe or .cmd
45287    if test -f "${new_path}.exe"; then
45288      input_to_shortpath="${new_path}.exe"
45289    elif test -f "${new_path}.cmd"; then
45290      input_to_shortpath="${new_path}.cmd"
45291    else
45292      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
45293$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
45294      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45295$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45296      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45297    fi
45298  else
45299    input_to_shortpath="$new_path"
45300  fi
45301
45302  # Call helper function which possibly converts this using DOS-style short mode.
45303  # If so, the updated path is stored in $new_path.
45304  new_path="$input_to_shortpath"
45305
45306  input_path="$input_to_shortpath"
45307  # Check if we need to convert this using DOS-style short mode. If the path
45308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45309  # take no chances and rewrite it.
45310  # Note: m4 eats our [], so we need to use [ and ] instead.
45311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45312  if test "x$has_forbidden_chars" != x; then
45313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45314    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45315    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45316    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45317      # Going to short mode and back again did indeed matter. Since short mode is
45318      # case insensitive, let's make it lowercase to improve readability.
45319      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45320      # Now convert it back to Unix-style (cygpath)
45321      input_path=`$CYGPATH -u "$shortmode_path"`
45322      new_path="$input_path"
45323    fi
45324  fi
45325
45326  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45327  if test "x$test_cygdrive_prefix" = x; then
45328    # As a simple fix, exclude /usr/bin since it's not a real path.
45329    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45330      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45331      # a path prefixed by /cygdrive for fixpath to work.
45332      new_path="$CYGWIN_ROOT_PATH$input_path"
45333    fi
45334  fi
45335
45336  # remove trailing .exe if any
45337  new_path="${new_path/%.exe/}"
45338
45339    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45340
45341  # First separate the path from the arguments. This will split at the first
45342  # space.
45343  complete="$BUILD_CC"
45344  path="${complete%% *}"
45345  tmp="$complete EOL"
45346  arguments="${tmp#* }"
45347
45348  # Input might be given as Windows format, start by converting to
45349  # unix format.
45350  new_path="$path"
45351
45352  windows_path="$new_path"
45353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45354    unix_path=`$CYGPATH -u "$windows_path"`
45355    new_path="$unix_path"
45356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45358    new_path="$unix_path"
45359  fi
45360
45361
45362  # Now try to locate executable using which
45363  new_path=`$WHICH "$new_path" 2> /dev/null`
45364
45365  if test "x$new_path" = x; then
45366    # Oops. Which didn't find the executable.
45367    # The splitting of arguments from the executable at a space might have been incorrect,
45368    # since paths with space are more likely in Windows. Give it another try with the whole
45369    # argument.
45370    path="$complete"
45371    arguments="EOL"
45372    new_path="$path"
45373
45374  windows_path="$new_path"
45375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45376    unix_path=`$CYGPATH -u "$windows_path"`
45377    new_path="$unix_path"
45378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45379    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45380    new_path="$unix_path"
45381  fi
45382
45383
45384    new_path=`$WHICH "$new_path" 2> /dev/null`
45385    # bat and cmd files are not always considered executable in MSYS causing which
45386    # to not find them
45387    if test "x$new_path" = x \
45388        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45389        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45390      new_path="$path"
45391
45392  windows_path="$new_path"
45393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45394    unix_path=`$CYGPATH -u "$windows_path"`
45395    new_path="$unix_path"
45396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45398    new_path="$unix_path"
45399  fi
45400
45401    fi
45402
45403    if test "x$new_path" = x; then
45404      # It's still not found. Now this is an unrecoverable error.
45405      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45406$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45407      has_space=`$ECHO "$complete" | $GREP " "`
45408      if test "x$has_space" != x; then
45409        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45410$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45411      fi
45412      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45413    fi
45414  fi
45415
45416  # Now new_path has a complete unix path to the binary
45417  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45418    # Keep paths in /bin as-is, but remove trailing .exe if any
45419    new_path="${new_path/%.exe/}"
45420    # Do not save /bin paths to all_fixpath_prefixes!
45421  else
45422    # Not in mixed or Windows style, start by that.
45423    new_path=`cmd //c echo $new_path`
45424
45425  input_path="$new_path"
45426  # Check if we need to convert this using DOS-style short mode. If the path
45427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45428  # take no chances and rewrite it.
45429  # Note: m4 eats our [], so we need to use [ and ] instead.
45430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45431  if test "x$has_forbidden_chars" != x; then
45432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45433    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45434  fi
45435
45436    # Output is in $new_path
45437
45438  windows_path="$new_path"
45439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45440    unix_path=`$CYGPATH -u "$windows_path"`
45441    new_path="$unix_path"
45442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45443    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45444    new_path="$unix_path"
45445  fi
45446
45447    # remove trailing .exe if any
45448    new_path="${new_path/%.exe/}"
45449
45450    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45451    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45452  fi
45453
45454    else
45455      # We're on a unix platform. Hooray! :)
45456      # First separate the path from the arguments. This will split at the first
45457      # space.
45458      complete="$BUILD_CC"
45459      path="${complete%% *}"
45460      tmp="$complete EOL"
45461      arguments="${tmp#* }"
45462
45463      # Cannot rely on the command "which" here since it doesn't always work.
45464      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45465      if test -z "$is_absolute_path"; then
45466        # Path to executable is not absolute. Find it.
45467        IFS_save="$IFS"
45468        IFS=:
45469        for p in $PATH; do
45470          if test -f "$p/$path" && test -x "$p/$path"; then
45471            new_path="$p/$path"
45472            break
45473          fi
45474        done
45475        IFS="$IFS_save"
45476      else
45477        # This is an absolute path, we can use it without further modifications.
45478        new_path="$path"
45479      fi
45480
45481      if test "x$new_path" = x; then
45482        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45483$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45484        has_space=`$ECHO "$complete" | $GREP " "`
45485        if test "x$has_space" != x; then
45486          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45487$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45488        fi
45489        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45490      fi
45491    fi
45492
45493    # Now join together the path and the arguments once again
45494    if test "x$arguments" != xEOL; then
45495      new_complete="$new_path ${arguments% *}"
45496    else
45497      new_complete="$new_path"
45498    fi
45499
45500    if test "x$complete" != "x$new_complete"; then
45501      BUILD_CC="$new_complete"
45502      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
45503$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
45504    fi
45505  fi
45506
45507
45508
45509
45510  # Publish this variable in the help.
45511
45512
45513  if [ -z "${BUILD_CXX+x}" ]; then
45514    # The variable is not set by user, try to locate tool using the code snippet
45515    for ac_prog in cl CC g++
45516do
45517  # Extract the first word of "$ac_prog", so it can be a program name with args.
45518set dummy $ac_prog; ac_word=$2
45519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45520$as_echo_n "checking for $ac_word... " >&6; }
45521if ${ac_cv_path_BUILD_CXX+:} false; then :
45522  $as_echo_n "(cached) " >&6
45523else
45524  case $BUILD_CXX in
45525  [\\/]* | ?:[\\/]*)
45526  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45527  ;;
45528  *)
45529  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45530for as_dir in $PATH
45531do
45532  IFS=$as_save_IFS
45533  test -z "$as_dir" && as_dir=.
45534    for ac_exec_ext in '' $ac_executable_extensions; do
45535  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45536    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45537    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45538    break 2
45539  fi
45540done
45541  done
45542IFS=$as_save_IFS
45543
45544  ;;
45545esac
45546fi
45547BUILD_CXX=$ac_cv_path_BUILD_CXX
45548if test -n "$BUILD_CXX"; then
45549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45550$as_echo "$BUILD_CXX" >&6; }
45551else
45552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45553$as_echo "no" >&6; }
45554fi
45555
45556
45557  test -n "$BUILD_CXX" && break
45558done
45559
45560  else
45561    # The variable is set, but is it from the command line or the environment?
45562
45563    # Try to remove the string !BUILD_CXX! from our list.
45564    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
45565    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45566      # If it failed, the variable was not from the command line. Ignore it,
45567      # but warn the user (except for BASH, which is always set by the calling BASH).
45568      if test "xBUILD_CXX" != xBASH; then
45569        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
45570$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
45571      fi
45572      # Try to locate tool using the code snippet
45573      for ac_prog in cl CC g++
45574do
45575  # Extract the first word of "$ac_prog", so it can be a program name with args.
45576set dummy $ac_prog; ac_word=$2
45577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45578$as_echo_n "checking for $ac_word... " >&6; }
45579if ${ac_cv_path_BUILD_CXX+:} false; then :
45580  $as_echo_n "(cached) " >&6
45581else
45582  case $BUILD_CXX in
45583  [\\/]* | ?:[\\/]*)
45584  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45585  ;;
45586  *)
45587  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45588for as_dir in $PATH
45589do
45590  IFS=$as_save_IFS
45591  test -z "$as_dir" && as_dir=.
45592    for ac_exec_ext in '' $ac_executable_extensions; do
45593  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45594    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45595    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45596    break 2
45597  fi
45598done
45599  done
45600IFS=$as_save_IFS
45601
45602  ;;
45603esac
45604fi
45605BUILD_CXX=$ac_cv_path_BUILD_CXX
45606if test -n "$BUILD_CXX"; then
45607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45608$as_echo "$BUILD_CXX" >&6; }
45609else
45610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45611$as_echo "no" >&6; }
45612fi
45613
45614
45615  test -n "$BUILD_CXX" && break
45616done
45617
45618    else
45619      # If it succeeded, then it was overridden by the user. We will use it
45620      # for the tool.
45621
45622      # First remove it from the list of overridden variables, so we can test
45623      # for unknown variables in the end.
45624      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45625
45626      # Check if we try to supply an empty value
45627      if test "x$BUILD_CXX" = x; then
45628        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
45629$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
45630        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45631$as_echo_n "checking for BUILD_CXX... " >&6; }
45632        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45633$as_echo "disabled" >&6; }
45634      else
45635        # Check if the provided tool contains a complete path.
45636        tool_specified="$BUILD_CXX"
45637        tool_basename="${tool_specified##*/}"
45638        if test "x$tool_basename" = "x$tool_specified"; then
45639          # A command without a complete path is provided, search $PATH.
45640          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
45641$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
45642          # Extract the first word of "$tool_basename", so it can be a program name with args.
45643set dummy $tool_basename; ac_word=$2
45644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45645$as_echo_n "checking for $ac_word... " >&6; }
45646if ${ac_cv_path_BUILD_CXX+:} false; then :
45647  $as_echo_n "(cached) " >&6
45648else
45649  case $BUILD_CXX in
45650  [\\/]* | ?:[\\/]*)
45651  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45652  ;;
45653  *)
45654  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45655for as_dir in $PATH
45656do
45657  IFS=$as_save_IFS
45658  test -z "$as_dir" && as_dir=.
45659    for ac_exec_ext in '' $ac_executable_extensions; do
45660  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45661    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45662    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45663    break 2
45664  fi
45665done
45666  done
45667IFS=$as_save_IFS
45668
45669  ;;
45670esac
45671fi
45672BUILD_CXX=$ac_cv_path_BUILD_CXX
45673if test -n "$BUILD_CXX"; then
45674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45675$as_echo "$BUILD_CXX" >&6; }
45676else
45677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45678$as_echo "no" >&6; }
45679fi
45680
45681
45682          if test "x$BUILD_CXX" = x; then
45683            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45684          fi
45685        else
45686          # Otherwise we believe it is a complete path. Use it as it is.
45687          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
45688$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
45689          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45690$as_echo_n "checking for BUILD_CXX... " >&6; }
45691          if test ! -x "$tool_specified"; then
45692            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45693$as_echo "not found" >&6; }
45694            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
45695          fi
45696          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45697$as_echo "$tool_specified" >&6; }
45698        fi
45699      fi
45700    fi
45701
45702  fi
45703
45704
45705
45706  if test "x$BUILD_CXX" = x; then
45707    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
45708  fi
45709
45710
45711
45712  # Only process if variable expands to non-empty
45713
45714  if test "x$BUILD_CXX" != x; then
45715    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45716
45717  # First separate the path from the arguments. This will split at the first
45718  # space.
45719  complete="$BUILD_CXX"
45720  path="${complete%% *}"
45721  tmp="$complete EOL"
45722  arguments="${tmp#* }"
45723
45724  # Input might be given as Windows format, start by converting to
45725  # unix format.
45726  new_path=`$CYGPATH -u "$path"`
45727
45728  # Now try to locate executable using which
45729  new_path=`$WHICH "$new_path" 2> /dev/null`
45730  # bat and cmd files are not always considered executable in cygwin causing which
45731  # to not find them
45732  if test "x$new_path" = x \
45733      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45734      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45735    new_path=`$CYGPATH -u "$path"`
45736  fi
45737  if test "x$new_path" = x; then
45738    # Oops. Which didn't find the executable.
45739    # The splitting of arguments from the executable at a space might have been incorrect,
45740    # since paths with space are more likely in Windows. Give it another try with the whole
45741    # argument.
45742    path="$complete"
45743    arguments="EOL"
45744    new_path=`$CYGPATH -u "$path"`
45745    new_path=`$WHICH "$new_path" 2> /dev/null`
45746    # bat and cmd files are not always considered executable in cygwin causing which
45747    # to not find them
45748    if test "x$new_path" = x \
45749        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45750        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45751      new_path=`$CYGPATH -u "$path"`
45752    fi
45753    if test "x$new_path" = x; then
45754      # It's still not found. Now this is an unrecoverable error.
45755      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45756$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45757      has_space=`$ECHO "$complete" | $GREP " "`
45758      if test "x$has_space" != x; then
45759        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45760$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45761      fi
45762      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45763    fi
45764  fi
45765
45766  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45767  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45768  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45769  # "foo.exe" is OK but "foo" is an error.
45770  #
45771  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45772  # It is also a way to make sure we got the proper file name for the real test later on.
45773  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45774  if test "x$test_shortpath" = x; then
45775    # Short path failed, file does not exist as specified.
45776    # Try adding .exe or .cmd
45777    if test -f "${new_path}.exe"; then
45778      input_to_shortpath="${new_path}.exe"
45779    elif test -f "${new_path}.cmd"; then
45780      input_to_shortpath="${new_path}.cmd"
45781    else
45782      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
45783$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
45784      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45785$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45786      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45787    fi
45788  else
45789    input_to_shortpath="$new_path"
45790  fi
45791
45792  # Call helper function which possibly converts this using DOS-style short mode.
45793  # If so, the updated path is stored in $new_path.
45794  new_path="$input_to_shortpath"
45795
45796  input_path="$input_to_shortpath"
45797  # Check if we need to convert this using DOS-style short mode. If the path
45798  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45799  # take no chances and rewrite it.
45800  # Note: m4 eats our [], so we need to use [ and ] instead.
45801  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45802  if test "x$has_forbidden_chars" != x; then
45803    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45804    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45805    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45806    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45807      # Going to short mode and back again did indeed matter. Since short mode is
45808      # case insensitive, let's make it lowercase to improve readability.
45809      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45810      # Now convert it back to Unix-style (cygpath)
45811      input_path=`$CYGPATH -u "$shortmode_path"`
45812      new_path="$input_path"
45813    fi
45814  fi
45815
45816  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45817  if test "x$test_cygdrive_prefix" = x; then
45818    # As a simple fix, exclude /usr/bin since it's not a real path.
45819    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45820      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45821      # a path prefixed by /cygdrive for fixpath to work.
45822      new_path="$CYGWIN_ROOT_PATH$input_path"
45823    fi
45824  fi
45825
45826  # remove trailing .exe if any
45827  new_path="${new_path/%.exe/}"
45828
45829    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45830
45831  # First separate the path from the arguments. This will split at the first
45832  # space.
45833  complete="$BUILD_CXX"
45834  path="${complete%% *}"
45835  tmp="$complete EOL"
45836  arguments="${tmp#* }"
45837
45838  # Input might be given as Windows format, start by converting to
45839  # unix format.
45840  new_path="$path"
45841
45842  windows_path="$new_path"
45843  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45844    unix_path=`$CYGPATH -u "$windows_path"`
45845    new_path="$unix_path"
45846  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45847    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45848    new_path="$unix_path"
45849  fi
45850
45851
45852  # Now try to locate executable using which
45853  new_path=`$WHICH "$new_path" 2> /dev/null`
45854
45855  if test "x$new_path" = x; then
45856    # Oops. Which didn't find the executable.
45857    # The splitting of arguments from the executable at a space might have been incorrect,
45858    # since paths with space are more likely in Windows. Give it another try with the whole
45859    # argument.
45860    path="$complete"
45861    arguments="EOL"
45862    new_path="$path"
45863
45864  windows_path="$new_path"
45865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45866    unix_path=`$CYGPATH -u "$windows_path"`
45867    new_path="$unix_path"
45868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45870    new_path="$unix_path"
45871  fi
45872
45873
45874    new_path=`$WHICH "$new_path" 2> /dev/null`
45875    # bat and cmd files are not always considered executable in MSYS causing which
45876    # to not find them
45877    if test "x$new_path" = x \
45878        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45879        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45880      new_path="$path"
45881
45882  windows_path="$new_path"
45883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45884    unix_path=`$CYGPATH -u "$windows_path"`
45885    new_path="$unix_path"
45886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45887    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45888    new_path="$unix_path"
45889  fi
45890
45891    fi
45892
45893    if test "x$new_path" = x; then
45894      # It's still not found. Now this is an unrecoverable error.
45895      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45896$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45897      has_space=`$ECHO "$complete" | $GREP " "`
45898      if test "x$has_space" != x; then
45899        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45900$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45901      fi
45902      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45903    fi
45904  fi
45905
45906  # Now new_path has a complete unix path to the binary
45907  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45908    # Keep paths in /bin as-is, but remove trailing .exe if any
45909    new_path="${new_path/%.exe/}"
45910    # Do not save /bin paths to all_fixpath_prefixes!
45911  else
45912    # Not in mixed or Windows style, start by that.
45913    new_path=`cmd //c echo $new_path`
45914
45915  input_path="$new_path"
45916  # Check if we need to convert this using DOS-style short mode. If the path
45917  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45918  # take no chances and rewrite it.
45919  # Note: m4 eats our [], so we need to use [ and ] instead.
45920  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45921  if test "x$has_forbidden_chars" != x; then
45922    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45923    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45924  fi
45925
45926    # Output is in $new_path
45927
45928  windows_path="$new_path"
45929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45930    unix_path=`$CYGPATH -u "$windows_path"`
45931    new_path="$unix_path"
45932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45934    new_path="$unix_path"
45935  fi
45936
45937    # remove trailing .exe if any
45938    new_path="${new_path/%.exe/}"
45939
45940    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45941    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45942  fi
45943
45944    else
45945      # We're on a unix platform. Hooray! :)
45946      # First separate the path from the arguments. This will split at the first
45947      # space.
45948      complete="$BUILD_CXX"
45949      path="${complete%% *}"
45950      tmp="$complete EOL"
45951      arguments="${tmp#* }"
45952
45953      # Cannot rely on the command "which" here since it doesn't always work.
45954      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45955      if test -z "$is_absolute_path"; then
45956        # Path to executable is not absolute. Find it.
45957        IFS_save="$IFS"
45958        IFS=:
45959        for p in $PATH; do
45960          if test -f "$p/$path" && test -x "$p/$path"; then
45961            new_path="$p/$path"
45962            break
45963          fi
45964        done
45965        IFS="$IFS_save"
45966      else
45967        # This is an absolute path, we can use it without further modifications.
45968        new_path="$path"
45969      fi
45970
45971      if test "x$new_path" = x; then
45972        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45973$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45974        has_space=`$ECHO "$complete" | $GREP " "`
45975        if test "x$has_space" != x; then
45976          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45977$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45978        fi
45979        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45980      fi
45981    fi
45982
45983    # Now join together the path and the arguments once again
45984    if test "x$arguments" != xEOL; then
45985      new_complete="$new_path ${arguments% *}"
45986    else
45987      new_complete="$new_path"
45988    fi
45989
45990    if test "x$complete" != "x$new_complete"; then
45991      BUILD_CXX="$new_complete"
45992      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45993$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45994    fi
45995  fi
45996
45997
45998
45999  # Publish this variable in the help.
46000
46001
46002  if [ -z "${BUILD_NM+x}" ]; then
46003    # The variable is not set by user, try to locate tool using the code snippet
46004    for ac_prog in nm gcc-nm
46005do
46006  # Extract the first word of "$ac_prog", so it can be a program name with args.
46007set dummy $ac_prog; ac_word=$2
46008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46009$as_echo_n "checking for $ac_word... " >&6; }
46010if ${ac_cv_path_BUILD_NM+:} false; then :
46011  $as_echo_n "(cached) " >&6
46012else
46013  case $BUILD_NM in
46014  [\\/]* | ?:[\\/]*)
46015  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
46016  ;;
46017  *)
46018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46019for as_dir in $PATH
46020do
46021  IFS=$as_save_IFS
46022  test -z "$as_dir" && as_dir=.
46023    for ac_exec_ext in '' $ac_executable_extensions; do
46024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46025    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
46026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46027    break 2
46028  fi
46029done
46030  done
46031IFS=$as_save_IFS
46032
46033  ;;
46034esac
46035fi
46036BUILD_NM=$ac_cv_path_BUILD_NM
46037if test -n "$BUILD_NM"; then
46038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
46039$as_echo "$BUILD_NM" >&6; }
46040else
46041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46042$as_echo "no" >&6; }
46043fi
46044
46045
46046  test -n "$BUILD_NM" && break
46047done
46048
46049  else
46050    # The variable is set, but is it from the command line or the environment?
46051
46052    # Try to remove the string !BUILD_NM! from our list.
46053    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
46054    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46055      # If it failed, the variable was not from the command line. Ignore it,
46056      # but warn the user (except for BASH, which is always set by the calling BASH).
46057      if test "xBUILD_NM" != xBASH; then
46058        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
46059$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
46060      fi
46061      # Try to locate tool using the code snippet
46062      for ac_prog in nm gcc-nm
46063do
46064  # Extract the first word of "$ac_prog", so it can be a program name with args.
46065set dummy $ac_prog; ac_word=$2
46066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46067$as_echo_n "checking for $ac_word... " >&6; }
46068if ${ac_cv_path_BUILD_NM+:} false; then :
46069  $as_echo_n "(cached) " >&6
46070else
46071  case $BUILD_NM in
46072  [\\/]* | ?:[\\/]*)
46073  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
46074  ;;
46075  *)
46076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46077for as_dir in $PATH
46078do
46079  IFS=$as_save_IFS
46080  test -z "$as_dir" && as_dir=.
46081    for ac_exec_ext in '' $ac_executable_extensions; do
46082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46083    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
46084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46085    break 2
46086  fi
46087done
46088  done
46089IFS=$as_save_IFS
46090
46091  ;;
46092esac
46093fi
46094BUILD_NM=$ac_cv_path_BUILD_NM
46095if test -n "$BUILD_NM"; then
46096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
46097$as_echo "$BUILD_NM" >&6; }
46098else
46099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46100$as_echo "no" >&6; }
46101fi
46102
46103
46104  test -n "$BUILD_NM" && break
46105done
46106
46107    else
46108      # If it succeeded, then it was overridden by the user. We will use it
46109      # for the tool.
46110
46111      # First remove it from the list of overridden variables, so we can test
46112      # for unknown variables in the end.
46113      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46114
46115      # Check if we try to supply an empty value
46116      if test "x$BUILD_NM" = x; then
46117        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
46118$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
46119        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
46120$as_echo_n "checking for BUILD_NM... " >&6; }
46121        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46122$as_echo "disabled" >&6; }
46123      else
46124        # Check if the provided tool contains a complete path.
46125        tool_specified="$BUILD_NM"
46126        tool_basename="${tool_specified##*/}"
46127        if test "x$tool_basename" = "x$tool_specified"; then
46128          # A command without a complete path is provided, search $PATH.
46129          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
46130$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
46131          # Extract the first word of "$tool_basename", so it can be a program name with args.
46132set dummy $tool_basename; ac_word=$2
46133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46134$as_echo_n "checking for $ac_word... " >&6; }
46135if ${ac_cv_path_BUILD_NM+:} false; then :
46136  $as_echo_n "(cached) " >&6
46137else
46138  case $BUILD_NM in
46139  [\\/]* | ?:[\\/]*)
46140  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
46141  ;;
46142  *)
46143  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46144for as_dir in $PATH
46145do
46146  IFS=$as_save_IFS
46147  test -z "$as_dir" && as_dir=.
46148    for ac_exec_ext in '' $ac_executable_extensions; do
46149  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46150    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
46151    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46152    break 2
46153  fi
46154done
46155  done
46156IFS=$as_save_IFS
46157
46158  ;;
46159esac
46160fi
46161BUILD_NM=$ac_cv_path_BUILD_NM
46162if test -n "$BUILD_NM"; then
46163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
46164$as_echo "$BUILD_NM" >&6; }
46165else
46166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46167$as_echo "no" >&6; }
46168fi
46169
46170
46171          if test "x$BUILD_NM" = x; then
46172            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46173          fi
46174        else
46175          # Otherwise we believe it is a complete path. Use it as it is.
46176          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
46177$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
46178          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
46179$as_echo_n "checking for BUILD_NM... " >&6; }
46180          if test ! -x "$tool_specified"; then
46181            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46182$as_echo "not found" >&6; }
46183            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
46184          fi
46185          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46186$as_echo "$tool_specified" >&6; }
46187        fi
46188      fi
46189    fi
46190
46191  fi
46192
46193
46194
46195  # Only process if variable expands to non-empty
46196
46197  if test "x$BUILD_NM" != x; then
46198    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46199
46200  # First separate the path from the arguments. This will split at the first
46201  # space.
46202  complete="$BUILD_NM"
46203  path="${complete%% *}"
46204  tmp="$complete EOL"
46205  arguments="${tmp#* }"
46206
46207  # Input might be given as Windows format, start by converting to
46208  # unix format.
46209  new_path=`$CYGPATH -u "$path"`
46210
46211  # Now try to locate executable using which
46212  new_path=`$WHICH "$new_path" 2> /dev/null`
46213  # bat and cmd files are not always considered executable in cygwin causing which
46214  # to not find them
46215  if test "x$new_path" = x \
46216      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46217      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46218    new_path=`$CYGPATH -u "$path"`
46219  fi
46220  if test "x$new_path" = x; then
46221    # Oops. Which didn't find the executable.
46222    # The splitting of arguments from the executable at a space might have been incorrect,
46223    # since paths with space are more likely in Windows. Give it another try with the whole
46224    # argument.
46225    path="$complete"
46226    arguments="EOL"
46227    new_path=`$CYGPATH -u "$path"`
46228    new_path=`$WHICH "$new_path" 2> /dev/null`
46229    # bat and cmd files are not always considered executable in cygwin causing which
46230    # to not find them
46231    if test "x$new_path" = x \
46232        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46233        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46234      new_path=`$CYGPATH -u "$path"`
46235    fi
46236    if test "x$new_path" = x; then
46237      # It's still not found. Now this is an unrecoverable error.
46238      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46239$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46240      has_space=`$ECHO "$complete" | $GREP " "`
46241      if test "x$has_space" != x; then
46242        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46243$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46244      fi
46245      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46246    fi
46247  fi
46248
46249  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46250  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46251  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46252  # "foo.exe" is OK but "foo" is an error.
46253  #
46254  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46255  # It is also a way to make sure we got the proper file name for the real test later on.
46256  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46257  if test "x$test_shortpath" = x; then
46258    # Short path failed, file does not exist as specified.
46259    # Try adding .exe or .cmd
46260    if test -f "${new_path}.exe"; then
46261      input_to_shortpath="${new_path}.exe"
46262    elif test -f "${new_path}.cmd"; then
46263      input_to_shortpath="${new_path}.cmd"
46264    else
46265      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
46266$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
46267      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46268$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46269      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46270    fi
46271  else
46272    input_to_shortpath="$new_path"
46273  fi
46274
46275  # Call helper function which possibly converts this using DOS-style short mode.
46276  # If so, the updated path is stored in $new_path.
46277  new_path="$input_to_shortpath"
46278
46279  input_path="$input_to_shortpath"
46280  # Check if we need to convert this using DOS-style short mode. If the path
46281  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46282  # take no chances and rewrite it.
46283  # Note: m4 eats our [], so we need to use [ and ] instead.
46284  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46285  if test "x$has_forbidden_chars" != x; then
46286    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46287    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46288    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46289    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46290      # Going to short mode and back again did indeed matter. Since short mode is
46291      # case insensitive, let's make it lowercase to improve readability.
46292      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46293      # Now convert it back to Unix-style (cygpath)
46294      input_path=`$CYGPATH -u "$shortmode_path"`
46295      new_path="$input_path"
46296    fi
46297  fi
46298
46299  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46300  if test "x$test_cygdrive_prefix" = x; then
46301    # As a simple fix, exclude /usr/bin since it's not a real path.
46302    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46303      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46304      # a path prefixed by /cygdrive for fixpath to work.
46305      new_path="$CYGWIN_ROOT_PATH$input_path"
46306    fi
46307  fi
46308
46309  # remove trailing .exe if any
46310  new_path="${new_path/%.exe/}"
46311
46312    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46313
46314  # First separate the path from the arguments. This will split at the first
46315  # space.
46316  complete="$BUILD_NM"
46317  path="${complete%% *}"
46318  tmp="$complete EOL"
46319  arguments="${tmp#* }"
46320
46321  # Input might be given as Windows format, start by converting to
46322  # unix format.
46323  new_path="$path"
46324
46325  windows_path="$new_path"
46326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46327    unix_path=`$CYGPATH -u "$windows_path"`
46328    new_path="$unix_path"
46329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46330    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46331    new_path="$unix_path"
46332  fi
46333
46334
46335  # Now try to locate executable using which
46336  new_path=`$WHICH "$new_path" 2> /dev/null`
46337
46338  if test "x$new_path" = x; then
46339    # Oops. Which didn't find the executable.
46340    # The splitting of arguments from the executable at a space might have been incorrect,
46341    # since paths with space are more likely in Windows. Give it another try with the whole
46342    # argument.
46343    path="$complete"
46344    arguments="EOL"
46345    new_path="$path"
46346
46347  windows_path="$new_path"
46348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46349    unix_path=`$CYGPATH -u "$windows_path"`
46350    new_path="$unix_path"
46351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46353    new_path="$unix_path"
46354  fi
46355
46356
46357    new_path=`$WHICH "$new_path" 2> /dev/null`
46358    # bat and cmd files are not always considered executable in MSYS causing which
46359    # to not find them
46360    if test "x$new_path" = x \
46361        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46362        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46363      new_path="$path"
46364
46365  windows_path="$new_path"
46366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46367    unix_path=`$CYGPATH -u "$windows_path"`
46368    new_path="$unix_path"
46369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46371    new_path="$unix_path"
46372  fi
46373
46374    fi
46375
46376    if test "x$new_path" = x; then
46377      # It's still not found. Now this is an unrecoverable error.
46378      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46379$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46380      has_space=`$ECHO "$complete" | $GREP " "`
46381      if test "x$has_space" != x; then
46382        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46383$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46384      fi
46385      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46386    fi
46387  fi
46388
46389  # Now new_path has a complete unix path to the binary
46390  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46391    # Keep paths in /bin as-is, but remove trailing .exe if any
46392    new_path="${new_path/%.exe/}"
46393    # Do not save /bin paths to all_fixpath_prefixes!
46394  else
46395    # Not in mixed or Windows style, start by that.
46396    new_path=`cmd //c echo $new_path`
46397
46398  input_path="$new_path"
46399  # Check if we need to convert this using DOS-style short mode. If the path
46400  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46401  # take no chances and rewrite it.
46402  # Note: m4 eats our [], so we need to use [ and ] instead.
46403  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46404  if test "x$has_forbidden_chars" != x; then
46405    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46406    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46407  fi
46408
46409    # Output is in $new_path
46410
46411  windows_path="$new_path"
46412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46413    unix_path=`$CYGPATH -u "$windows_path"`
46414    new_path="$unix_path"
46415  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46416    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46417    new_path="$unix_path"
46418  fi
46419
46420    # remove trailing .exe if any
46421    new_path="${new_path/%.exe/}"
46422
46423    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46424    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46425  fi
46426
46427    else
46428      # We're on a unix platform. Hooray! :)
46429      # First separate the path from the arguments. This will split at the first
46430      # space.
46431      complete="$BUILD_NM"
46432      path="${complete%% *}"
46433      tmp="$complete EOL"
46434      arguments="${tmp#* }"
46435
46436      # Cannot rely on the command "which" here since it doesn't always work.
46437      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46438      if test -z "$is_absolute_path"; then
46439        # Path to executable is not absolute. Find it.
46440        IFS_save="$IFS"
46441        IFS=:
46442        for p in $PATH; do
46443          if test -f "$p/$path" && test -x "$p/$path"; then
46444            new_path="$p/$path"
46445            break
46446          fi
46447        done
46448        IFS="$IFS_save"
46449      else
46450        # This is an absolute path, we can use it without further modifications.
46451        new_path="$path"
46452      fi
46453
46454      if test "x$new_path" = x; then
46455        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46456$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46457        has_space=`$ECHO "$complete" | $GREP " "`
46458        if test "x$has_space" != x; then
46459          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46460$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46461        fi
46462        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46463      fi
46464    fi
46465
46466    # Now join together the path and the arguments once again
46467    if test "x$arguments" != xEOL; then
46468      new_complete="$new_path ${arguments% *}"
46469    else
46470      new_complete="$new_path"
46471    fi
46472
46473    if test "x$complete" != "x$new_complete"; then
46474      BUILD_NM="$new_complete"
46475      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
46476$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
46477    fi
46478  fi
46479
46480
46481
46482  # Publish this variable in the help.
46483
46484
46485  if [ -z "${BUILD_AR+x}" ]; then
46486    # The variable is not set by user, try to locate tool using the code snippet
46487    for ac_prog in ar gcc-ar
46488do
46489  # Extract the first word of "$ac_prog", so it can be a program name with args.
46490set dummy $ac_prog; ac_word=$2
46491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46492$as_echo_n "checking for $ac_word... " >&6; }
46493if ${ac_cv_path_BUILD_AR+:} false; then :
46494  $as_echo_n "(cached) " >&6
46495else
46496  case $BUILD_AR in
46497  [\\/]* | ?:[\\/]*)
46498  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46499  ;;
46500  *)
46501  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46502for as_dir in $PATH
46503do
46504  IFS=$as_save_IFS
46505  test -z "$as_dir" && as_dir=.
46506    for ac_exec_ext in '' $ac_executable_extensions; do
46507  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46508    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46510    break 2
46511  fi
46512done
46513  done
46514IFS=$as_save_IFS
46515
46516  ;;
46517esac
46518fi
46519BUILD_AR=$ac_cv_path_BUILD_AR
46520if test -n "$BUILD_AR"; then
46521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46522$as_echo "$BUILD_AR" >&6; }
46523else
46524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46525$as_echo "no" >&6; }
46526fi
46527
46528
46529  test -n "$BUILD_AR" && break
46530done
46531
46532  else
46533    # The variable is set, but is it from the command line or the environment?
46534
46535    # Try to remove the string !BUILD_AR! from our list.
46536    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
46537    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46538      # If it failed, the variable was not from the command line. Ignore it,
46539      # but warn the user (except for BASH, which is always set by the calling BASH).
46540      if test "xBUILD_AR" != xBASH; then
46541        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
46542$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
46543      fi
46544      # Try to locate tool using the code snippet
46545      for ac_prog in ar gcc-ar
46546do
46547  # Extract the first word of "$ac_prog", so it can be a program name with args.
46548set dummy $ac_prog; ac_word=$2
46549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46550$as_echo_n "checking for $ac_word... " >&6; }
46551if ${ac_cv_path_BUILD_AR+:} false; then :
46552  $as_echo_n "(cached) " >&6
46553else
46554  case $BUILD_AR in
46555  [\\/]* | ?:[\\/]*)
46556  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46557  ;;
46558  *)
46559  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46560for as_dir in $PATH
46561do
46562  IFS=$as_save_IFS
46563  test -z "$as_dir" && as_dir=.
46564    for ac_exec_ext in '' $ac_executable_extensions; do
46565  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46566    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46567    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46568    break 2
46569  fi
46570done
46571  done
46572IFS=$as_save_IFS
46573
46574  ;;
46575esac
46576fi
46577BUILD_AR=$ac_cv_path_BUILD_AR
46578if test -n "$BUILD_AR"; then
46579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46580$as_echo "$BUILD_AR" >&6; }
46581else
46582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46583$as_echo "no" >&6; }
46584fi
46585
46586
46587  test -n "$BUILD_AR" && break
46588done
46589
46590    else
46591      # If it succeeded, then it was overridden by the user. We will use it
46592      # for the tool.
46593
46594      # First remove it from the list of overridden variables, so we can test
46595      # for unknown variables in the end.
46596      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46597
46598      # Check if we try to supply an empty value
46599      if test "x$BUILD_AR" = x; then
46600        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
46601$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
46602        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46603$as_echo_n "checking for BUILD_AR... " >&6; }
46604        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46605$as_echo "disabled" >&6; }
46606      else
46607        # Check if the provided tool contains a complete path.
46608        tool_specified="$BUILD_AR"
46609        tool_basename="${tool_specified##*/}"
46610        if test "x$tool_basename" = "x$tool_specified"; then
46611          # A command without a complete path is provided, search $PATH.
46612          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
46613$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
46614          # Extract the first word of "$tool_basename", so it can be a program name with args.
46615set dummy $tool_basename; ac_word=$2
46616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46617$as_echo_n "checking for $ac_word... " >&6; }
46618if ${ac_cv_path_BUILD_AR+:} false; then :
46619  $as_echo_n "(cached) " >&6
46620else
46621  case $BUILD_AR in
46622  [\\/]* | ?:[\\/]*)
46623  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46624  ;;
46625  *)
46626  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46627for as_dir in $PATH
46628do
46629  IFS=$as_save_IFS
46630  test -z "$as_dir" && as_dir=.
46631    for ac_exec_ext in '' $ac_executable_extensions; do
46632  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46633    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46634    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46635    break 2
46636  fi
46637done
46638  done
46639IFS=$as_save_IFS
46640
46641  ;;
46642esac
46643fi
46644BUILD_AR=$ac_cv_path_BUILD_AR
46645if test -n "$BUILD_AR"; then
46646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46647$as_echo "$BUILD_AR" >&6; }
46648else
46649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46650$as_echo "no" >&6; }
46651fi
46652
46653
46654          if test "x$BUILD_AR" = x; then
46655            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46656          fi
46657        else
46658          # Otherwise we believe it is a complete path. Use it as it is.
46659          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
46660$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
46661          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46662$as_echo_n "checking for BUILD_AR... " >&6; }
46663          if test ! -x "$tool_specified"; then
46664            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46665$as_echo "not found" >&6; }
46666            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
46667          fi
46668          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46669$as_echo "$tool_specified" >&6; }
46670        fi
46671      fi
46672    fi
46673
46674  fi
46675
46676
46677
46678  # Only process if variable expands to non-empty
46679
46680  if test "x$BUILD_AR" != x; then
46681    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46682
46683  # First separate the path from the arguments. This will split at the first
46684  # space.
46685  complete="$BUILD_AR"
46686  path="${complete%% *}"
46687  tmp="$complete EOL"
46688  arguments="${tmp#* }"
46689
46690  # Input might be given as Windows format, start by converting to
46691  # unix format.
46692  new_path=`$CYGPATH -u "$path"`
46693
46694  # Now try to locate executable using which
46695  new_path=`$WHICH "$new_path" 2> /dev/null`
46696  # bat and cmd files are not always considered executable in cygwin causing which
46697  # to not find them
46698  if test "x$new_path" = x \
46699      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46700      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46701    new_path=`$CYGPATH -u "$path"`
46702  fi
46703  if test "x$new_path" = x; then
46704    # Oops. Which didn't find the executable.
46705    # The splitting of arguments from the executable at a space might have been incorrect,
46706    # since paths with space are more likely in Windows. Give it another try with the whole
46707    # argument.
46708    path="$complete"
46709    arguments="EOL"
46710    new_path=`$CYGPATH -u "$path"`
46711    new_path=`$WHICH "$new_path" 2> /dev/null`
46712    # bat and cmd files are not always considered executable in cygwin causing which
46713    # to not find them
46714    if test "x$new_path" = x \
46715        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46716        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46717      new_path=`$CYGPATH -u "$path"`
46718    fi
46719    if test "x$new_path" = x; then
46720      # It's still not found. Now this is an unrecoverable error.
46721      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46722$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46723      has_space=`$ECHO "$complete" | $GREP " "`
46724      if test "x$has_space" != x; then
46725        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46726$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46727      fi
46728      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46729    fi
46730  fi
46731
46732  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46733  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46734  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46735  # "foo.exe" is OK but "foo" is an error.
46736  #
46737  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46738  # It is also a way to make sure we got the proper file name for the real test later on.
46739  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46740  if test "x$test_shortpath" = x; then
46741    # Short path failed, file does not exist as specified.
46742    # Try adding .exe or .cmd
46743    if test -f "${new_path}.exe"; then
46744      input_to_shortpath="${new_path}.exe"
46745    elif test -f "${new_path}.cmd"; then
46746      input_to_shortpath="${new_path}.cmd"
46747    else
46748      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
46749$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
46750      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46751$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46752      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46753    fi
46754  else
46755    input_to_shortpath="$new_path"
46756  fi
46757
46758  # Call helper function which possibly converts this using DOS-style short mode.
46759  # If so, the updated path is stored in $new_path.
46760  new_path="$input_to_shortpath"
46761
46762  input_path="$input_to_shortpath"
46763  # Check if we need to convert this using DOS-style short mode. If the path
46764  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46765  # take no chances and rewrite it.
46766  # Note: m4 eats our [], so we need to use [ and ] instead.
46767  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46768  if test "x$has_forbidden_chars" != x; then
46769    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46770    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46771    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46772    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46773      # Going to short mode and back again did indeed matter. Since short mode is
46774      # case insensitive, let's make it lowercase to improve readability.
46775      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46776      # Now convert it back to Unix-style (cygpath)
46777      input_path=`$CYGPATH -u "$shortmode_path"`
46778      new_path="$input_path"
46779    fi
46780  fi
46781
46782  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46783  if test "x$test_cygdrive_prefix" = x; then
46784    # As a simple fix, exclude /usr/bin since it's not a real path.
46785    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46786      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46787      # a path prefixed by /cygdrive for fixpath to work.
46788      new_path="$CYGWIN_ROOT_PATH$input_path"
46789    fi
46790  fi
46791
46792  # remove trailing .exe if any
46793  new_path="${new_path/%.exe/}"
46794
46795    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46796
46797  # First separate the path from the arguments. This will split at the first
46798  # space.
46799  complete="$BUILD_AR"
46800  path="${complete%% *}"
46801  tmp="$complete EOL"
46802  arguments="${tmp#* }"
46803
46804  # Input might be given as Windows format, start by converting to
46805  # unix format.
46806  new_path="$path"
46807
46808  windows_path="$new_path"
46809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46810    unix_path=`$CYGPATH -u "$windows_path"`
46811    new_path="$unix_path"
46812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46813    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46814    new_path="$unix_path"
46815  fi
46816
46817
46818  # Now try to locate executable using which
46819  new_path=`$WHICH "$new_path" 2> /dev/null`
46820
46821  if test "x$new_path" = x; then
46822    # Oops. Which didn't find the executable.
46823    # The splitting of arguments from the executable at a space might have been incorrect,
46824    # since paths with space are more likely in Windows. Give it another try with the whole
46825    # argument.
46826    path="$complete"
46827    arguments="EOL"
46828    new_path="$path"
46829
46830  windows_path="$new_path"
46831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46832    unix_path=`$CYGPATH -u "$windows_path"`
46833    new_path="$unix_path"
46834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46835    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46836    new_path="$unix_path"
46837  fi
46838
46839
46840    new_path=`$WHICH "$new_path" 2> /dev/null`
46841    # bat and cmd files are not always considered executable in MSYS causing which
46842    # to not find them
46843    if test "x$new_path" = x \
46844        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46845        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46846      new_path="$path"
46847
46848  windows_path="$new_path"
46849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46850    unix_path=`$CYGPATH -u "$windows_path"`
46851    new_path="$unix_path"
46852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46853    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46854    new_path="$unix_path"
46855  fi
46856
46857    fi
46858
46859    if test "x$new_path" = x; then
46860      # It's still not found. Now this is an unrecoverable error.
46861      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46862$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46863      has_space=`$ECHO "$complete" | $GREP " "`
46864      if test "x$has_space" != x; then
46865        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46866$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46867      fi
46868      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46869    fi
46870  fi
46871
46872  # Now new_path has a complete unix path to the binary
46873  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46874    # Keep paths in /bin as-is, but remove trailing .exe if any
46875    new_path="${new_path/%.exe/}"
46876    # Do not save /bin paths to all_fixpath_prefixes!
46877  else
46878    # Not in mixed or Windows style, start by that.
46879    new_path=`cmd //c echo $new_path`
46880
46881  input_path="$new_path"
46882  # Check if we need to convert this using DOS-style short mode. If the path
46883  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46884  # take no chances and rewrite it.
46885  # Note: m4 eats our [], so we need to use [ and ] instead.
46886  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46887  if test "x$has_forbidden_chars" != x; then
46888    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46889    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46890  fi
46891
46892    # Output is in $new_path
46893
46894  windows_path="$new_path"
46895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46896    unix_path=`$CYGPATH -u "$windows_path"`
46897    new_path="$unix_path"
46898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46899    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46900    new_path="$unix_path"
46901  fi
46902
46903    # remove trailing .exe if any
46904    new_path="${new_path/%.exe/}"
46905
46906    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46907    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46908  fi
46909
46910    else
46911      # We're on a unix platform. Hooray! :)
46912      # First separate the path from the arguments. This will split at the first
46913      # space.
46914      complete="$BUILD_AR"
46915      path="${complete%% *}"
46916      tmp="$complete EOL"
46917      arguments="${tmp#* }"
46918
46919      # Cannot rely on the command "which" here since it doesn't always work.
46920      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46921      if test -z "$is_absolute_path"; then
46922        # Path to executable is not absolute. Find it.
46923        IFS_save="$IFS"
46924        IFS=:
46925        for p in $PATH; do
46926          if test -f "$p/$path" && test -x "$p/$path"; then
46927            new_path="$p/$path"
46928            break
46929          fi
46930        done
46931        IFS="$IFS_save"
46932      else
46933        # This is an absolute path, we can use it without further modifications.
46934        new_path="$path"
46935      fi
46936
46937      if test "x$new_path" = x; then
46938        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46939$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46940        has_space=`$ECHO "$complete" | $GREP " "`
46941        if test "x$has_space" != x; then
46942          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46943$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46944        fi
46945        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46946      fi
46947    fi
46948
46949    # Now join together the path and the arguments once again
46950    if test "x$arguments" != xEOL; then
46951      new_complete="$new_path ${arguments% *}"
46952    else
46953      new_complete="$new_path"
46954    fi
46955
46956    if test "x$complete" != "x$new_complete"; then
46957      BUILD_AR="$new_complete"
46958      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
46959$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
46960    fi
46961  fi
46962
46963
46964
46965  # Publish this variable in the help.
46966
46967
46968  if [ -z "${BUILD_OBJCOPY+x}" ]; then
46969    # The variable is not set by user, try to locate tool using the code snippet
46970    for ac_prog in objcopy
46971do
46972  # Extract the first word of "$ac_prog", so it can be a program name with args.
46973set dummy $ac_prog; ac_word=$2
46974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46975$as_echo_n "checking for $ac_word... " >&6; }
46976if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46977  $as_echo_n "(cached) " >&6
46978else
46979  case $BUILD_OBJCOPY in
46980  [\\/]* | ?:[\\/]*)
46981  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46982  ;;
46983  *)
46984  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46985for as_dir in $PATH
46986do
46987  IFS=$as_save_IFS
46988  test -z "$as_dir" && as_dir=.
46989    for ac_exec_ext in '' $ac_executable_extensions; do
46990  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46991    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46992    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46993    break 2
46994  fi
46995done
46996  done
46997IFS=$as_save_IFS
46998
46999  ;;
47000esac
47001fi
47002BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
47003if test -n "$BUILD_OBJCOPY"; then
47004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
47005$as_echo "$BUILD_OBJCOPY" >&6; }
47006else
47007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47008$as_echo "no" >&6; }
47009fi
47010
47011
47012  test -n "$BUILD_OBJCOPY" && break
47013done
47014
47015  else
47016    # The variable is set, but is it from the command line or the environment?
47017
47018    # Try to remove the string !BUILD_OBJCOPY! from our list.
47019    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
47020    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
47021      # If it failed, the variable was not from the command line. Ignore it,
47022      # but warn the user (except for BASH, which is always set by the calling BASH).
47023      if test "xBUILD_OBJCOPY" != xBASH; then
47024        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
47025$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
47026      fi
47027      # Try to locate tool using the code snippet
47028      for ac_prog in objcopy
47029do
47030  # Extract the first word of "$ac_prog", so it can be a program name with args.
47031set dummy $ac_prog; ac_word=$2
47032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47033$as_echo_n "checking for $ac_word... " >&6; }
47034if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
47035  $as_echo_n "(cached) " >&6
47036else
47037  case $BUILD_OBJCOPY in
47038  [\\/]* | ?:[\\/]*)
47039  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
47040  ;;
47041  *)
47042  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47043for as_dir in $PATH
47044do
47045  IFS=$as_save_IFS
47046  test -z "$as_dir" && as_dir=.
47047    for ac_exec_ext in '' $ac_executable_extensions; do
47048  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47049    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
47050    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47051    break 2
47052  fi
47053done
47054  done
47055IFS=$as_save_IFS
47056
47057  ;;
47058esac
47059fi
47060BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
47061if test -n "$BUILD_OBJCOPY"; then
47062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
47063$as_echo "$BUILD_OBJCOPY" >&6; }
47064else
47065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47066$as_echo "no" >&6; }
47067fi
47068
47069
47070  test -n "$BUILD_OBJCOPY" && break
47071done
47072
47073    else
47074      # If it succeeded, then it was overridden by the user. We will use it
47075      # for the tool.
47076
47077      # First remove it from the list of overridden variables, so we can test
47078      # for unknown variables in the end.
47079      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47080
47081      # Check if we try to supply an empty value
47082      if test "x$BUILD_OBJCOPY" = x; then
47083        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
47084$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
47085        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
47086$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
47087        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47088$as_echo "disabled" >&6; }
47089      else
47090        # Check if the provided tool contains a complete path.
47091        tool_specified="$BUILD_OBJCOPY"
47092        tool_basename="${tool_specified##*/}"
47093        if test "x$tool_basename" = "x$tool_specified"; then
47094          # A command without a complete path is provided, search $PATH.
47095          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
47096$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
47097          # Extract the first word of "$tool_basename", so it can be a program name with args.
47098set dummy $tool_basename; ac_word=$2
47099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47100$as_echo_n "checking for $ac_word... " >&6; }
47101if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
47102  $as_echo_n "(cached) " >&6
47103else
47104  case $BUILD_OBJCOPY in
47105  [\\/]* | ?:[\\/]*)
47106  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
47107  ;;
47108  *)
47109  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47110for as_dir in $PATH
47111do
47112  IFS=$as_save_IFS
47113  test -z "$as_dir" && as_dir=.
47114    for ac_exec_ext in '' $ac_executable_extensions; do
47115  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47116    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
47117    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47118    break 2
47119  fi
47120done
47121  done
47122IFS=$as_save_IFS
47123
47124  ;;
47125esac
47126fi
47127BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
47128if test -n "$BUILD_OBJCOPY"; then
47129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
47130$as_echo "$BUILD_OBJCOPY" >&6; }
47131else
47132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47133$as_echo "no" >&6; }
47134fi
47135
47136
47137          if test "x$BUILD_OBJCOPY" = x; then
47138            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47139          fi
47140        else
47141          # Otherwise we believe it is a complete path. Use it as it is.
47142          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
47143$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
47144          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
47145$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
47146          if test ! -x "$tool_specified"; then
47147            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47148$as_echo "not found" >&6; }
47149            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
47150          fi
47151          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47152$as_echo "$tool_specified" >&6; }
47153        fi
47154      fi
47155    fi
47156
47157  fi
47158
47159
47160
47161  # Only process if variable expands to non-empty
47162
47163  if test "x$BUILD_OBJCOPY" != x; then
47164    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47165
47166  # First separate the path from the arguments. This will split at the first
47167  # space.
47168  complete="$BUILD_OBJCOPY"
47169  path="${complete%% *}"
47170  tmp="$complete EOL"
47171  arguments="${tmp#* }"
47172
47173  # Input might be given as Windows format, start by converting to
47174  # unix format.
47175  new_path=`$CYGPATH -u "$path"`
47176
47177  # Now try to locate executable using which
47178  new_path=`$WHICH "$new_path" 2> /dev/null`
47179  # bat and cmd files are not always considered executable in cygwin causing which
47180  # to not find them
47181  if test "x$new_path" = x \
47182      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47183      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47184    new_path=`$CYGPATH -u "$path"`
47185  fi
47186  if test "x$new_path" = x; then
47187    # Oops. Which didn't find the executable.
47188    # The splitting of arguments from the executable at a space might have been incorrect,
47189    # since paths with space are more likely in Windows. Give it another try with the whole
47190    # argument.
47191    path="$complete"
47192    arguments="EOL"
47193    new_path=`$CYGPATH -u "$path"`
47194    new_path=`$WHICH "$new_path" 2> /dev/null`
47195    # bat and cmd files are not always considered executable in cygwin causing which
47196    # to not find them
47197    if test "x$new_path" = x \
47198        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47199        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47200      new_path=`$CYGPATH -u "$path"`
47201    fi
47202    if test "x$new_path" = x; then
47203      # It's still not found. Now this is an unrecoverable error.
47204      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47205$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47206      has_space=`$ECHO "$complete" | $GREP " "`
47207      if test "x$has_space" != x; then
47208        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47209$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47210      fi
47211      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47212    fi
47213  fi
47214
47215  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47216  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47217  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47218  # "foo.exe" is OK but "foo" is an error.
47219  #
47220  # This test is therefore slightly more accurate than "test -f" to check for file presence.
47221  # It is also a way to make sure we got the proper file name for the real test later on.
47222  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47223  if test "x$test_shortpath" = x; then
47224    # Short path failed, file does not exist as specified.
47225    # Try adding .exe or .cmd
47226    if test -f "${new_path}.exe"; then
47227      input_to_shortpath="${new_path}.exe"
47228    elif test -f "${new_path}.cmd"; then
47229      input_to_shortpath="${new_path}.cmd"
47230    else
47231      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
47232$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
47233      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47234$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47235      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47236    fi
47237  else
47238    input_to_shortpath="$new_path"
47239  fi
47240
47241  # Call helper function which possibly converts this using DOS-style short mode.
47242  # If so, the updated path is stored in $new_path.
47243  new_path="$input_to_shortpath"
47244
47245  input_path="$input_to_shortpath"
47246  # Check if we need to convert this using DOS-style short mode. If the path
47247  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47248  # take no chances and rewrite it.
47249  # Note: m4 eats our [], so we need to use [ and ] instead.
47250  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47251  if test "x$has_forbidden_chars" != x; then
47252    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47253    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47254    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47255    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47256      # Going to short mode and back again did indeed matter. Since short mode is
47257      # case insensitive, let's make it lowercase to improve readability.
47258      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47259      # Now convert it back to Unix-style (cygpath)
47260      input_path=`$CYGPATH -u "$shortmode_path"`
47261      new_path="$input_path"
47262    fi
47263  fi
47264
47265  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47266  if test "x$test_cygdrive_prefix" = x; then
47267    # As a simple fix, exclude /usr/bin since it's not a real path.
47268    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47269      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47270      # a path prefixed by /cygdrive for fixpath to work.
47271      new_path="$CYGWIN_ROOT_PATH$input_path"
47272    fi
47273  fi
47274
47275  # remove trailing .exe if any
47276  new_path="${new_path/%.exe/}"
47277
47278    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47279
47280  # First separate the path from the arguments. This will split at the first
47281  # space.
47282  complete="$BUILD_OBJCOPY"
47283  path="${complete%% *}"
47284  tmp="$complete EOL"
47285  arguments="${tmp#* }"
47286
47287  # Input might be given as Windows format, start by converting to
47288  # unix format.
47289  new_path="$path"
47290
47291  windows_path="$new_path"
47292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47293    unix_path=`$CYGPATH -u "$windows_path"`
47294    new_path="$unix_path"
47295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47296    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47297    new_path="$unix_path"
47298  fi
47299
47300
47301  # Now try to locate executable using which
47302  new_path=`$WHICH "$new_path" 2> /dev/null`
47303
47304  if test "x$new_path" = x; then
47305    # Oops. Which didn't find the executable.
47306    # The splitting of arguments from the executable at a space might have been incorrect,
47307    # since paths with space are more likely in Windows. Give it another try with the whole
47308    # argument.
47309    path="$complete"
47310    arguments="EOL"
47311    new_path="$path"
47312
47313  windows_path="$new_path"
47314  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47315    unix_path=`$CYGPATH -u "$windows_path"`
47316    new_path="$unix_path"
47317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47318    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47319    new_path="$unix_path"
47320  fi
47321
47322
47323    new_path=`$WHICH "$new_path" 2> /dev/null`
47324    # bat and cmd files are not always considered executable in MSYS causing which
47325    # to not find them
47326    if test "x$new_path" = x \
47327        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47328        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47329      new_path="$path"
47330
47331  windows_path="$new_path"
47332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47333    unix_path=`$CYGPATH -u "$windows_path"`
47334    new_path="$unix_path"
47335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47336    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47337    new_path="$unix_path"
47338  fi
47339
47340    fi
47341
47342    if test "x$new_path" = x; then
47343      # It's still not found. Now this is an unrecoverable error.
47344      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47345$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47346      has_space=`$ECHO "$complete" | $GREP " "`
47347      if test "x$has_space" != x; then
47348        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47349$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47350      fi
47351      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47352    fi
47353  fi
47354
47355  # Now new_path has a complete unix path to the binary
47356  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47357    # Keep paths in /bin as-is, but remove trailing .exe if any
47358    new_path="${new_path/%.exe/}"
47359    # Do not save /bin paths to all_fixpath_prefixes!
47360  else
47361    # Not in mixed or Windows style, start by that.
47362    new_path=`cmd //c echo $new_path`
47363
47364  input_path="$new_path"
47365  # Check if we need to convert this using DOS-style short mode. If the path
47366  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47367  # take no chances and rewrite it.
47368  # Note: m4 eats our [], so we need to use [ and ] instead.
47369  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47370  if test "x$has_forbidden_chars" != x; then
47371    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47372    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47373  fi
47374
47375    # Output is in $new_path
47376
47377  windows_path="$new_path"
47378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47379    unix_path=`$CYGPATH -u "$windows_path"`
47380    new_path="$unix_path"
47381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47382    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47383    new_path="$unix_path"
47384  fi
47385
47386    # remove trailing .exe if any
47387    new_path="${new_path/%.exe/}"
47388
47389    # Save the first 10 bytes of this path to the storage, so fixpath can work.
47390    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47391  fi
47392
47393    else
47394      # We're on a unix platform. Hooray! :)
47395      # First separate the path from the arguments. This will split at the first
47396      # space.
47397      complete="$BUILD_OBJCOPY"
47398      path="${complete%% *}"
47399      tmp="$complete EOL"
47400      arguments="${tmp#* }"
47401
47402      # Cannot rely on the command "which" here since it doesn't always work.
47403      is_absolute_path=`$ECHO "$path" | $GREP ^/`
47404      if test -z "$is_absolute_path"; then
47405        # Path to executable is not absolute. Find it.
47406        IFS_save="$IFS"
47407        IFS=:
47408        for p in $PATH; do
47409          if test -f "$p/$path" && test -x "$p/$path"; then
47410            new_path="$p/$path"
47411            break
47412          fi
47413        done
47414        IFS="$IFS_save"
47415      else
47416        # This is an absolute path, we can use it without further modifications.
47417        new_path="$path"
47418      fi
47419
47420      if test "x$new_path" = x; then
47421        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47422$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47423        has_space=`$ECHO "$complete" | $GREP " "`
47424        if test "x$has_space" != x; then
47425          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47426$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47427        fi
47428        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47429      fi
47430    fi
47431
47432    # Now join together the path and the arguments once again
47433    if test "x$arguments" != xEOL; then
47434      new_complete="$new_path ${arguments% *}"
47435    else
47436      new_complete="$new_path"
47437    fi
47438
47439    if test "x$complete" != "x$new_complete"; then
47440      BUILD_OBJCOPY="$new_complete"
47441      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
47442$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
47443    fi
47444  fi
47445
47446
47447
47448  # Publish this variable in the help.
47449
47450
47451  if [ -z "${BUILD_STRIP+x}" ]; then
47452    # The variable is not set by user, try to locate tool using the code snippet
47453    for ac_prog in strip
47454do
47455  # Extract the first word of "$ac_prog", so it can be a program name with args.
47456set dummy $ac_prog; ac_word=$2
47457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47458$as_echo_n "checking for $ac_word... " >&6; }
47459if ${ac_cv_path_BUILD_STRIP+:} false; then :
47460  $as_echo_n "(cached) " >&6
47461else
47462  case $BUILD_STRIP in
47463  [\\/]* | ?:[\\/]*)
47464  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47465  ;;
47466  *)
47467  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47468for as_dir in $PATH
47469do
47470  IFS=$as_save_IFS
47471  test -z "$as_dir" && as_dir=.
47472    for ac_exec_ext in '' $ac_executable_extensions; do
47473  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47474    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47475    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47476    break 2
47477  fi
47478done
47479  done
47480IFS=$as_save_IFS
47481
47482  ;;
47483esac
47484fi
47485BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47486if test -n "$BUILD_STRIP"; then
47487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47488$as_echo "$BUILD_STRIP" >&6; }
47489else
47490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47491$as_echo "no" >&6; }
47492fi
47493
47494
47495  test -n "$BUILD_STRIP" && break
47496done
47497
47498  else
47499    # The variable is set, but is it from the command line or the environment?
47500
47501    # Try to remove the string !BUILD_STRIP! from our list.
47502    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
47503    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
47504      # If it failed, the variable was not from the command line. Ignore it,
47505      # but warn the user (except for BASH, which is always set by the calling BASH).
47506      if test "xBUILD_STRIP" != xBASH; then
47507        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
47508$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
47509      fi
47510      # Try to locate tool using the code snippet
47511      for ac_prog in strip
47512do
47513  # Extract the first word of "$ac_prog", so it can be a program name with args.
47514set dummy $ac_prog; ac_word=$2
47515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47516$as_echo_n "checking for $ac_word... " >&6; }
47517if ${ac_cv_path_BUILD_STRIP+:} false; then :
47518  $as_echo_n "(cached) " >&6
47519else
47520  case $BUILD_STRIP in
47521  [\\/]* | ?:[\\/]*)
47522  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47523  ;;
47524  *)
47525  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47526for as_dir in $PATH
47527do
47528  IFS=$as_save_IFS
47529  test -z "$as_dir" && as_dir=.
47530    for ac_exec_ext in '' $ac_executable_extensions; do
47531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47532    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47534    break 2
47535  fi
47536done
47537  done
47538IFS=$as_save_IFS
47539
47540  ;;
47541esac
47542fi
47543BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47544if test -n "$BUILD_STRIP"; then
47545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47546$as_echo "$BUILD_STRIP" >&6; }
47547else
47548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47549$as_echo "no" >&6; }
47550fi
47551
47552
47553  test -n "$BUILD_STRIP" && break
47554done
47555
47556    else
47557      # If it succeeded, then it was overridden by the user. We will use it
47558      # for the tool.
47559
47560      # First remove it from the list of overridden variables, so we can test
47561      # for unknown variables in the end.
47562      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47563
47564      # Check if we try to supply an empty value
47565      if test "x$BUILD_STRIP" = x; then
47566        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
47567$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
47568        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47569$as_echo_n "checking for BUILD_STRIP... " >&6; }
47570        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47571$as_echo "disabled" >&6; }
47572      else
47573        # Check if the provided tool contains a complete path.
47574        tool_specified="$BUILD_STRIP"
47575        tool_basename="${tool_specified##*/}"
47576        if test "x$tool_basename" = "x$tool_specified"; then
47577          # A command without a complete path is provided, search $PATH.
47578          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
47579$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
47580          # Extract the first word of "$tool_basename", so it can be a program name with args.
47581set dummy $tool_basename; ac_word=$2
47582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47583$as_echo_n "checking for $ac_word... " >&6; }
47584if ${ac_cv_path_BUILD_STRIP+:} false; then :
47585  $as_echo_n "(cached) " >&6
47586else
47587  case $BUILD_STRIP in
47588  [\\/]* | ?:[\\/]*)
47589  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47590  ;;
47591  *)
47592  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47593for as_dir in $PATH
47594do
47595  IFS=$as_save_IFS
47596  test -z "$as_dir" && as_dir=.
47597    for ac_exec_ext in '' $ac_executable_extensions; do
47598  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47599    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47600    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47601    break 2
47602  fi
47603done
47604  done
47605IFS=$as_save_IFS
47606
47607  ;;
47608esac
47609fi
47610BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47611if test -n "$BUILD_STRIP"; then
47612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47613$as_echo "$BUILD_STRIP" >&6; }
47614else
47615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47616$as_echo "no" >&6; }
47617fi
47618
47619
47620          if test "x$BUILD_STRIP" = x; then
47621            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47622          fi
47623        else
47624          # Otherwise we believe it is a complete path. Use it as it is.
47625          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
47626$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
47627          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47628$as_echo_n "checking for BUILD_STRIP... " >&6; }
47629          if test ! -x "$tool_specified"; then
47630            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47631$as_echo "not found" >&6; }
47632            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
47633          fi
47634          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47635$as_echo "$tool_specified" >&6; }
47636        fi
47637      fi
47638    fi
47639
47640  fi
47641
47642
47643
47644  # Only process if variable expands to non-empty
47645
47646  if test "x$BUILD_STRIP" != x; then
47647    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47648
47649  # First separate the path from the arguments. This will split at the first
47650  # space.
47651  complete="$BUILD_STRIP"
47652  path="${complete%% *}"
47653  tmp="$complete EOL"
47654  arguments="${tmp#* }"
47655
47656  # Input might be given as Windows format, start by converting to
47657  # unix format.
47658  new_path=`$CYGPATH -u "$path"`
47659
47660  # Now try to locate executable using which
47661  new_path=`$WHICH "$new_path" 2> /dev/null`
47662  # bat and cmd files are not always considered executable in cygwin causing which
47663  # to not find them
47664  if test "x$new_path" = x \
47665      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47666      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47667    new_path=`$CYGPATH -u "$path"`
47668  fi
47669  if test "x$new_path" = x; then
47670    # Oops. Which didn't find the executable.
47671    # The splitting of arguments from the executable at a space might have been incorrect,
47672    # since paths with space are more likely in Windows. Give it another try with the whole
47673    # argument.
47674    path="$complete"
47675    arguments="EOL"
47676    new_path=`$CYGPATH -u "$path"`
47677    new_path=`$WHICH "$new_path" 2> /dev/null`
47678    # bat and cmd files are not always considered executable in cygwin causing which
47679    # to not find them
47680    if test "x$new_path" = x \
47681        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47682        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47683      new_path=`$CYGPATH -u "$path"`
47684    fi
47685    if test "x$new_path" = x; then
47686      # It's still not found. Now this is an unrecoverable error.
47687      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47688$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47689      has_space=`$ECHO "$complete" | $GREP " "`
47690      if test "x$has_space" != x; then
47691        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47692$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47693      fi
47694      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47695    fi
47696  fi
47697
47698  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47699  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47700  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47701  # "foo.exe" is OK but "foo" is an error.
47702  #
47703  # This test is therefore slightly more accurate than "test -f" to check for file presence.
47704  # It is also a way to make sure we got the proper file name for the real test later on.
47705  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47706  if test "x$test_shortpath" = x; then
47707    # Short path failed, file does not exist as specified.
47708    # Try adding .exe or .cmd
47709    if test -f "${new_path}.exe"; then
47710      input_to_shortpath="${new_path}.exe"
47711    elif test -f "${new_path}.cmd"; then
47712      input_to_shortpath="${new_path}.cmd"
47713    else
47714      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
47715$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
47716      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47717$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47718      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47719    fi
47720  else
47721    input_to_shortpath="$new_path"
47722  fi
47723
47724  # Call helper function which possibly converts this using DOS-style short mode.
47725  # If so, the updated path is stored in $new_path.
47726  new_path="$input_to_shortpath"
47727
47728  input_path="$input_to_shortpath"
47729  # Check if we need to convert this using DOS-style short mode. If the path
47730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47731  # take no chances and rewrite it.
47732  # Note: m4 eats our [], so we need to use [ and ] instead.
47733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47734  if test "x$has_forbidden_chars" != x; then
47735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47736    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47737    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47738    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47739      # Going to short mode and back again did indeed matter. Since short mode is
47740      # case insensitive, let's make it lowercase to improve readability.
47741      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47742      # Now convert it back to Unix-style (cygpath)
47743      input_path=`$CYGPATH -u "$shortmode_path"`
47744      new_path="$input_path"
47745    fi
47746  fi
47747
47748  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47749  if test "x$test_cygdrive_prefix" = x; then
47750    # As a simple fix, exclude /usr/bin since it's not a real path.
47751    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47752      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47753      # a path prefixed by /cygdrive for fixpath to work.
47754      new_path="$CYGWIN_ROOT_PATH$input_path"
47755    fi
47756  fi
47757
47758  # remove trailing .exe if any
47759  new_path="${new_path/%.exe/}"
47760
47761    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47762
47763  # First separate the path from the arguments. This will split at the first
47764  # space.
47765  complete="$BUILD_STRIP"
47766  path="${complete%% *}"
47767  tmp="$complete EOL"
47768  arguments="${tmp#* }"
47769
47770  # Input might be given as Windows format, start by converting to
47771  # unix format.
47772  new_path="$path"
47773
47774  windows_path="$new_path"
47775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47776    unix_path=`$CYGPATH -u "$windows_path"`
47777    new_path="$unix_path"
47778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47779    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47780    new_path="$unix_path"
47781  fi
47782
47783
47784  # Now try to locate executable using which
47785  new_path=`$WHICH "$new_path" 2> /dev/null`
47786
47787  if test "x$new_path" = x; then
47788    # Oops. Which didn't find the executable.
47789    # The splitting of arguments from the executable at a space might have been incorrect,
47790    # since paths with space are more likely in Windows. Give it another try with the whole
47791    # argument.
47792    path="$complete"
47793    arguments="EOL"
47794    new_path="$path"
47795
47796  windows_path="$new_path"
47797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47798    unix_path=`$CYGPATH -u "$windows_path"`
47799    new_path="$unix_path"
47800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47802    new_path="$unix_path"
47803  fi
47804
47805
47806    new_path=`$WHICH "$new_path" 2> /dev/null`
47807    # bat and cmd files are not always considered executable in MSYS causing which
47808    # to not find them
47809    if test "x$new_path" = x \
47810        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47811        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47812      new_path="$path"
47813
47814  windows_path="$new_path"
47815  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47816    unix_path=`$CYGPATH -u "$windows_path"`
47817    new_path="$unix_path"
47818  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47819    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47820    new_path="$unix_path"
47821  fi
47822
47823    fi
47824
47825    if test "x$new_path" = x; then
47826      # It's still not found. Now this is an unrecoverable error.
47827      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47828$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47829      has_space=`$ECHO "$complete" | $GREP " "`
47830      if test "x$has_space" != x; then
47831        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47832$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47833      fi
47834      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47835    fi
47836  fi
47837
47838  # Now new_path has a complete unix path to the binary
47839  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47840    # Keep paths in /bin as-is, but remove trailing .exe if any
47841    new_path="${new_path/%.exe/}"
47842    # Do not save /bin paths to all_fixpath_prefixes!
47843  else
47844    # Not in mixed or Windows style, start by that.
47845    new_path=`cmd //c echo $new_path`
47846
47847  input_path="$new_path"
47848  # Check if we need to convert this using DOS-style short mode. If the path
47849  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47850  # take no chances and rewrite it.
47851  # Note: m4 eats our [], so we need to use [ and ] instead.
47852  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47853  if test "x$has_forbidden_chars" != x; then
47854    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47855    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47856  fi
47857
47858    # Output is in $new_path
47859
47860  windows_path="$new_path"
47861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47862    unix_path=`$CYGPATH -u "$windows_path"`
47863    new_path="$unix_path"
47864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47865    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47866    new_path="$unix_path"
47867  fi
47868
47869    # remove trailing .exe if any
47870    new_path="${new_path/%.exe/}"
47871
47872    # Save the first 10 bytes of this path to the storage, so fixpath can work.
47873    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47874  fi
47875
47876    else
47877      # We're on a unix platform. Hooray! :)
47878      # First separate the path from the arguments. This will split at the first
47879      # space.
47880      complete="$BUILD_STRIP"
47881      path="${complete%% *}"
47882      tmp="$complete EOL"
47883      arguments="${tmp#* }"
47884
47885      # Cannot rely on the command "which" here since it doesn't always work.
47886      is_absolute_path=`$ECHO "$path" | $GREP ^/`
47887      if test -z "$is_absolute_path"; then
47888        # Path to executable is not absolute. Find it.
47889        IFS_save="$IFS"
47890        IFS=:
47891        for p in $PATH; do
47892          if test -f "$p/$path" && test -x "$p/$path"; then
47893            new_path="$p/$path"
47894            break
47895          fi
47896        done
47897        IFS="$IFS_save"
47898      else
47899        # This is an absolute path, we can use it without further modifications.
47900        new_path="$path"
47901      fi
47902
47903      if test "x$new_path" = x; then
47904        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47905$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47906        has_space=`$ECHO "$complete" | $GREP " "`
47907        if test "x$has_space" != x; then
47908          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47909$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47910        fi
47911        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47912      fi
47913    fi
47914
47915    # Now join together the path and the arguments once again
47916    if test "x$arguments" != xEOL; then
47917      new_complete="$new_path ${arguments% *}"
47918    else
47919      new_complete="$new_path"
47920    fi
47921
47922    if test "x$complete" != "x$new_complete"; then
47923      BUILD_STRIP="$new_complete"
47924      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
47925$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
47926    fi
47927  fi
47928
47929    # Assume the C compiler is the assembler
47930    BUILD_AS="$BUILD_CC -c"
47931    # Just like for the target compiler, use the compiler as linker
47932    BUILD_LD="$BUILD_CC"
47933    BUILD_LDCXX="$BUILD_CXX"
47934
47935    PATH="$OLDPATH"
47936
47937
47938  COMPILER=$BUILD_CC
47939  COMPILER_NAME=BuildC
47940
47941  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47942    # cc -V output typically looks like
47943    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47944    # or
47945    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47946    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47947    # Check that this is likely to be the Solaris Studio cc.
47948    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47949    if test $? -ne 0; then
47950      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47951      { $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
47952$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47953      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47954$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47955      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47956$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47957      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47958    fi
47959    # Remove usage instructions (if present), and
47960    # collapse compiler output into a single line
47961    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47962        $SED -e 's/ *[Uu]sage:.*//'`
47963    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47964        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47965  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47966    # xlc -qversion output typically looks like
47967    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47968    #     Version: 11.01.0000.0015
47969    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47970    # Check that this is likely to be the IBM XL C compiler.
47971    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47972    if test $? -ne 0; then
47973      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47974      { $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
47975$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47976      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47977$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47978      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47979$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47980      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47981    fi
47982    # Collapse compiler output into a single line
47983    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47984    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47985        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47986  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47987    # There is no specific version flag, but all output starts with a version string.
47988    # First line typically looks something like:
47989    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47990    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47991    # Check that this is likely to be Microsoft CL.EXE.
47992    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47993    if test $? -ne 0; then
47994      { $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
47995$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47996      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47997$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47998      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47999    fi
48000    # Collapse compiler output into a single line
48001    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48002    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48003        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
48004  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
48005    # gcc --version output typically looks like
48006    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
48007    #     Copyright (C) 2013 Free Software Foundation, Inc.
48008    #     This is free software; see the source for copying conditions.  There is NO
48009    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
48010    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48011    # Check that this is likely to be GCC.
48012    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
48013    if test $? -ne 0; then
48014      { $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
48015$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48016      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
48017$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
48018      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48019    fi
48020    # Remove Copyright and legalese from version string, and
48021    # collapse into a single line
48022    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
48023        $SED -e 's/ *Copyright .*//'`
48024    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48025        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
48026  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
48027    # clang --version output typically looks like
48028    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
48029    #    clang version 3.3 (tags/RELEASE_33/final)
48030    # or
48031    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
48032    #    Target: x86_64-pc-linux-gnu
48033    #    Thread model: posix
48034    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48035    # Check that this is likely to be clang
48036    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
48037    if test $? -ne 0; then
48038      { $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
48039$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48040      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48041$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48042      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48043    fi
48044    # Collapse compiler output into a single line
48045    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48046    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48047        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
48048  else
48049      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
48050  fi
48051  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
48052  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
48053  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
48054  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
48055
48056  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
48057$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
48058
48059
48060  COMPILER=$BUILD_CXX
48061  COMPILER_NAME=BuildC++
48062
48063  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48064    # cc -V output typically looks like
48065    #     cc: Sun C 5.12 Linux_i386 2011/11/16
48066    # or
48067    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
48068    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
48069    # Check that this is likely to be the Solaris Studio cc.
48070    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
48071    if test $? -ne 0; then
48072      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48073      { $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
48074$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48075      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48076$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48077      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
48078$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
48079      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48080    fi
48081    # Remove usage instructions (if present), and
48082    # collapse compiler output into a single line
48083    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
48084        $SED -e 's/ *[Uu]sage:.*//'`
48085    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48086        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
48087  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
48088    # xlc -qversion output typically looks like
48089    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
48090    #     Version: 11.01.0000.0015
48091    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
48092    # Check that this is likely to be the IBM XL C compiler.
48093    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
48094    if test $? -ne 0; then
48095      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48096      { $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
48097$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48098      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48099$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48100      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
48101$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
48102      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48103    fi
48104    # Collapse compiler output into a single line
48105    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48106    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48107        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
48108  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48109    # There is no specific version flag, but all output starts with a version string.
48110    # First line typically looks something like:
48111    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
48112    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
48113    # Check that this is likely to be Microsoft CL.EXE.
48114    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
48115    if test $? -ne 0; then
48116      { $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
48117$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48118      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48119$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48120      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48121    fi
48122    # Collapse compiler output into a single line
48123    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48124    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48125        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
48126  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
48127    # gcc --version output typically looks like
48128    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
48129    #     Copyright (C) 2013 Free Software Foundation, Inc.
48130    #     This is free software; see the source for copying conditions.  There is NO
48131    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
48132    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48133    # Check that this is likely to be GCC.
48134    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
48135    if test $? -ne 0; then
48136      { $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
48137$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48138      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
48139$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
48140      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48141    fi
48142    # Remove Copyright and legalese from version string, and
48143    # collapse into a single line
48144    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
48145        $SED -e 's/ *Copyright .*//'`
48146    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48147        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
48148  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
48149    # clang --version output typically looks like
48150    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
48151    #    clang version 3.3 (tags/RELEASE_33/final)
48152    # or
48153    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
48154    #    Target: x86_64-pc-linux-gnu
48155    #    Thread model: posix
48156    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48157    # Check that this is likely to be clang
48158    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
48159    if test $? -ne 0; then
48160      { $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
48161$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48162      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48163$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48164      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48165    fi
48166    # Collapse compiler output into a single line
48167    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48168    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48169        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
48170  else
48171      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
48172  fi
48173  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
48174  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
48175  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
48176  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
48177
48178  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
48179$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
48180
48181
48182  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
48183    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&5
48184$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
48185    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
48186$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
48187  fi
48188
48189  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
48190  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
48191    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
48192$as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48193  fi
48194
48195  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
48196    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
48197$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48198  fi
48199
48200  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$BUILD_CC_VERSION_NUMBER"`
48201
48202  else
48203    # If we are not cross compiling, use the normal target compilers for
48204    # building the build platform executables.
48205    BUILD_CC="$CC"
48206    BUILD_CXX="$CXX"
48207    BUILD_LD="$LD"
48208    BUILD_LDCXX="$LDCXX"
48209    BUILD_NM="$NM"
48210    BUILD_AS="$AS"
48211    BUILD_OBJCOPY="$OBJCOPY"
48212    BUILD_STRIP="$STRIP"
48213    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
48214    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
48215    BUILD_AR="$AR"
48216
48217
48218  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
48219    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
48220$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
48221    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
48222$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
48223  fi
48224
48225  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
48226  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
48227    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
48228$as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48229  fi
48230
48231  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
48232    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
48233$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48234  fi
48235
48236  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
48237
48238  fi
48239
48240
48241
48242
48243
48244
48245
48246
48247
48248
48249
48250
48251
48252
48253  # The package path is used only on macosx?
48254  # FIXME: clean this up, and/or move it elsewhere.
48255  PACKAGE_PATH=/opt/local
48256
48257
48258  # Check for extra potential brokenness.
48259  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48260    # On Windows, double-check that we got the right compiler.
48261    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
48262    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
48263    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
48264      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
48265        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
48266      fi
48267    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
48268      if test "x$COMPILER_CPU_TEST" != "xx64"; then
48269        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
48270      fi
48271    fi
48272  fi
48273
48274  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48275    # If this is a --hash-style=gnu system, use --hash-style=both, why?
48276    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
48277    # This is later checked when setting flags.
48278
48279    # "-Og" suppported for GCC 4.8 and later
48280    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
48281
48282
48283
48284
48285
48286
48287
48288
48289
48290
48291
48292
48293
48294
48295
48296
48297
48298
48299
48300
48301
48302
48303
48304
48305
48306
48307
48308
48309
48310
48311
48312
48313
48314
48315
48316
48317
48318
48319
48320
48321
48322
48323
48324
48325
48326
48327
48328    # Execute function body
48329
48330
48331
48332
48333
48334
48335
48336
48337
48338
48339
48340
48341
48342
48343
48344
48345
48346
48347
48348
48349
48350
48351
48352
48353
48354
48355
48356
48357
48358
48359
48360
48361
48362
48363
48364
48365
48366
48367
48368
48369
48370
48371
48372
48373
48374
48375
48376
48377    # Execute function body
48378
48379  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48380$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48381  supports=yes
48382
48383  saved_cflags="$CFLAGS"
48384  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
48385  ac_ext=c
48386ac_cpp='$CPP $CPPFLAGS'
48387ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48388ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48389ac_compiler_gnu=$ac_cv_c_compiler_gnu
48390
48391  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48392/* end confdefs.h.  */
48393int i;
48394_ACEOF
48395if ac_fn_c_try_compile "$LINENO"; then :
48396
48397else
48398  supports=no
48399fi
48400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48401  ac_ext=cpp
48402ac_cpp='$CXXCPP $CPPFLAGS'
48403ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48404ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48405ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48406
48407  CFLAGS="$saved_cflags"
48408
48409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48410$as_echo "$supports" >&6; }
48411  if test "x$supports" = "xyes" ; then
48412    :
48413    C_COMP_SUPPORTS="yes"
48414  else
48415    :
48416    C_COMP_SUPPORTS="no"
48417  fi
48418
48419
48420
48421
48422
48423
48424
48425
48426
48427
48428
48429
48430
48431
48432
48433
48434
48435
48436
48437
48438
48439
48440
48441
48442
48443
48444
48445
48446
48447
48448
48449
48450
48451
48452
48453
48454
48455
48456
48457
48458
48459
48460
48461
48462
48463
48464
48465
48466
48467
48468
48469
48470
48471
48472
48473
48474
48475
48476
48477    # Execute function body
48478
48479  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48480$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48481  supports=yes
48482
48483  saved_cxxflags="$CXXFLAGS"
48484  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
48485  ac_ext=cpp
48486ac_cpp='$CXXCPP $CPPFLAGS'
48487ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48488ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48489ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48490
48491  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48492/* end confdefs.h.  */
48493int i;
48494_ACEOF
48495if ac_fn_cxx_try_compile "$LINENO"; then :
48496
48497else
48498  supports=no
48499fi
48500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48501  ac_ext=cpp
48502ac_cpp='$CXXCPP $CPPFLAGS'
48503ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48504ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48505ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48506
48507  CXXFLAGS="$saved_cxxflags"
48508
48509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48510$as_echo "$supports" >&6; }
48511  if test "x$supports" = "xyes" ; then
48512    :
48513    CXX_COMP_SUPPORTS="yes"
48514  else
48515    :
48516    CXX_COMP_SUPPORTS="no"
48517  fi
48518
48519
48520
48521
48522
48523
48524
48525
48526
48527
48528
48529
48530
48531  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48532$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48533  supports=no
48534  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
48535
48536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48537$as_echo "$supports" >&6; }
48538  if test "x$supports" = "xyes" ; then
48539    :
48540    HAS_CFLAG_OPTIMIZE_DEBUG=true
48541  else
48542    :
48543    HAS_CFLAG_OPTIMIZE_DEBUG=false
48544  fi
48545
48546
48547
48548
48549
48550
48551
48552    # "-z relro" supported in GNU binutils 2.17 and later
48553    LINKER_RELRO_FLAG="-Wl,-z,relro"
48554
48555
48556
48557
48558
48559
48560
48561
48562
48563
48564
48565
48566
48567
48568
48569
48570
48571
48572
48573
48574
48575
48576
48577
48578
48579
48580
48581
48582
48583
48584
48585
48586
48587
48588
48589
48590
48591
48592
48593
48594
48595
48596
48597
48598
48599
48600
48601    # Execute function body
48602
48603  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
48604$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
48605  supports=yes
48606
48607  saved_ldflags="$LDFLAGS"
48608  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
48609  ac_ext=c
48610ac_cpp='$CPP $CPPFLAGS'
48611ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48612ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48613ac_compiler_gnu=$ac_cv_c_compiler_gnu
48614
48615  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48616/* end confdefs.h.  */
48617
48618int
48619main ()
48620{
48621
48622  ;
48623  return 0;
48624}
48625_ACEOF
48626if ac_fn_c_try_link "$LINENO"; then :
48627
48628else
48629  supports=no
48630fi
48631rm -f core conftest.err conftest.$ac_objext \
48632    conftest$ac_exeext conftest.$ac_ext
48633  ac_ext=cpp
48634ac_cpp='$CXXCPP $CPPFLAGS'
48635ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48636ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48637ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48638
48639  LDFLAGS="$saved_ldflags"
48640
48641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48642$as_echo "$supports" >&6; }
48643  if test "x$supports" = "xyes" ; then
48644    :
48645    HAS_LINKER_RELRO=true
48646  else
48647    :
48648    HAS_LINKER_RELRO=false
48649  fi
48650
48651
48652
48653
48654
48655
48656
48657
48658
48659
48660
48661
48662
48663    # "-z now" supported in GNU binutils 2.11 and later
48664    LINKER_NOW_FLAG="-Wl,-z,now"
48665
48666
48667
48668
48669
48670
48671
48672
48673
48674
48675
48676
48677
48678
48679
48680
48681
48682
48683
48684
48685
48686
48687
48688
48689
48690
48691
48692
48693
48694
48695
48696
48697
48698
48699
48700
48701
48702
48703
48704
48705
48706
48707
48708
48709
48710
48711
48712    # Execute function body
48713
48714  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
48715$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
48716  supports=yes
48717
48718  saved_ldflags="$LDFLAGS"
48719  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
48720  ac_ext=c
48721ac_cpp='$CPP $CPPFLAGS'
48722ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48723ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48724ac_compiler_gnu=$ac_cv_c_compiler_gnu
48725
48726  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48727/* end confdefs.h.  */
48728
48729int
48730main ()
48731{
48732
48733  ;
48734  return 0;
48735}
48736_ACEOF
48737if ac_fn_c_try_link "$LINENO"; then :
48738
48739else
48740  supports=no
48741fi
48742rm -f core conftest.err conftest.$ac_objext \
48743    conftest$ac_exeext conftest.$ac_ext
48744  ac_ext=cpp
48745ac_cpp='$CXXCPP $CPPFLAGS'
48746ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48747ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48748ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48749
48750  LDFLAGS="$saved_ldflags"
48751
48752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48753$as_echo "$supports" >&6; }
48754  if test "x$supports" = "xyes" ; then
48755    :
48756    HAS_LINKER_NOW=true
48757  else
48758    :
48759    HAS_LINKER_NOW=false
48760  fi
48761
48762
48763
48764
48765
48766
48767
48768
48769
48770
48771
48772
48773  fi
48774
48775  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
48776  # in executable.'
48777  USING_BROKEN_SUSE_LD=no
48778  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
48779    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
48780$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
48781    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
48782    $ECHO "int main() { }" > main.c
48783    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
48784      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48785$as_echo "no" >&6; }
48786      USING_BROKEN_SUSE_LD=no
48787    else
48788      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48789$as_echo "yes" >&6; }
48790      USING_BROKEN_SUSE_LD=yes
48791    fi
48792    $RM version-script.map main.c a.out
48793  fi
48794
48795
48796  # Setup hotspot lecagy names for toolchains
48797  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
48798  if test "x$TOOLCHAIN_TYPE" = xclang; then
48799    HOTSPOT_TOOLCHAIN_TYPE=gcc
48800  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48801    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
48802  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48803    HOTSPOT_TOOLCHAIN_TYPE=visCPP
48804  fi
48805
48806
48807
48808# Setup the JTReg Regression Test Harness.
48809
48810
48811# Check whether --with-jtreg was given.
48812if test "${with_jtreg+set}" = set; then :
48813  withval=$with_jtreg;
48814else
48815  with_jtreg=no
48816fi
48817
48818
48819  if test "x$with_jtreg" = xno; then
48820    # jtreg disabled
48821    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
48822$as_echo_n "checking for jtreg... " >&6; }
48823    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48824$as_echo "no" >&6; }
48825  else
48826    if test "x$with_jtreg" != xyes; then
48827      # with path specified.
48828      JT_HOME="$with_jtreg"
48829    fi
48830
48831    if test "x$JT_HOME" != x; then
48832      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
48833$as_echo_n "checking for jtreg... " >&6; }
48834
48835      # use JT_HOME enviroment var.
48836
48837  # Only process if variable expands to non-empty
48838
48839  if test "x$JT_HOME" != x; then
48840    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48841
48842  # Input might be given as Windows format, start by converting to
48843  # unix format.
48844  path="$JT_HOME"
48845  new_path=`$CYGPATH -u "$path"`
48846
48847  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48848  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48849  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48850  # "foo.exe" is OK but "foo" is an error.
48851  #
48852  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48853  # It is also a way to make sure we got the proper file name for the real test later on.
48854  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48855  if test "x$test_shortpath" = x; then
48856    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48857$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48858    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
48859  fi
48860
48861  # Call helper function which possibly converts this using DOS-style short mode.
48862  # If so, the updated path is stored in $new_path.
48863
48864  input_path="$new_path"
48865  # Check if we need to convert this using DOS-style short mode. If the path
48866  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48867  # take no chances and rewrite it.
48868  # Note: m4 eats our [], so we need to use [ and ] instead.
48869  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48870  if test "x$has_forbidden_chars" != x; then
48871    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48872    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48873    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48874    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48875      # Going to short mode and back again did indeed matter. Since short mode is
48876      # case insensitive, let's make it lowercase to improve readability.
48877      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48878      # Now convert it back to Unix-style (cygpath)
48879      input_path=`$CYGPATH -u "$shortmode_path"`
48880      new_path="$input_path"
48881    fi
48882  fi
48883
48884  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48885  if test "x$test_cygdrive_prefix" = x; then
48886    # As a simple fix, exclude /usr/bin since it's not a real path.
48887    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48888      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48889      # a path prefixed by /cygdrive for fixpath to work.
48890      new_path="$CYGWIN_ROOT_PATH$input_path"
48891    fi
48892  fi
48893
48894
48895  if test "x$path" != "x$new_path"; then
48896    JT_HOME="$new_path"
48897    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48898$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48899  fi
48900
48901    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48902
48903  path="$JT_HOME"
48904  has_colon=`$ECHO $path | $GREP ^.:`
48905  new_path="$path"
48906  if test "x$has_colon" = x; then
48907    # Not in mixed or Windows style, start by that.
48908    new_path=`cmd //c echo $path`
48909  fi
48910
48911
48912  input_path="$new_path"
48913  # Check if we need to convert this using DOS-style short mode. If the path
48914  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48915  # take no chances and rewrite it.
48916  # Note: m4 eats our [], so we need to use [ and ] instead.
48917  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48918  if test "x$has_forbidden_chars" != x; then
48919    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48920    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48921  fi
48922
48923
48924  windows_path="$new_path"
48925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48926    unix_path=`$CYGPATH -u "$windows_path"`
48927    new_path="$unix_path"
48928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48929    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48930    new_path="$unix_path"
48931  fi
48932
48933  if test "x$path" != "x$new_path"; then
48934    JT_HOME="$new_path"
48935    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48936$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48937  fi
48938
48939  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48940  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48941
48942    else
48943      # We're on a unix platform. Hooray! :)
48944      path="$JT_HOME"
48945      has_space=`$ECHO "$path" | $GREP " "`
48946      if test "x$has_space" != x; then
48947        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48948$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48949        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48950      fi
48951
48952      # Use eval to expand a potential ~
48953      eval path="$path"
48954      if test ! -f "$path" && test ! -d "$path"; then
48955        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
48956      fi
48957
48958      if test -d "$path"; then
48959        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
48960      else
48961        dir="`$DIRNAME "$path"`"
48962        base="`$BASENAME "$path"`"
48963        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
48964      fi
48965    fi
48966  fi
48967
48968
48969      # jtreg win32 script works for everybody
48970      JTREGEXE="$JT_HOME/bin/jtreg"
48971
48972      if test ! -f "$JTREGEXE"; then
48973        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
48974      fi
48975
48976      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48977$as_echo "$JTREGEXE" >&6; }
48978    else
48979      # try to find jtreg on path
48980
48981
48982
48983  # Publish this variable in the help.
48984
48985
48986  if [ -z "${JTREGEXE+x}" ]; then
48987    # The variable is not set by user, try to locate tool using the code snippet
48988    for ac_prog in jtreg
48989do
48990  # Extract the first word of "$ac_prog", so it can be a program name with args.
48991set dummy $ac_prog; ac_word=$2
48992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48993$as_echo_n "checking for $ac_word... " >&6; }
48994if ${ac_cv_path_JTREGEXE+:} false; then :
48995  $as_echo_n "(cached) " >&6
48996else
48997  case $JTREGEXE in
48998  [\\/]* | ?:[\\/]*)
48999  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
49000  ;;
49001  *)
49002  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49003for as_dir in $PATH
49004do
49005  IFS=$as_save_IFS
49006  test -z "$as_dir" && as_dir=.
49007    for ac_exec_ext in '' $ac_executable_extensions; do
49008  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49009    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
49010    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49011    break 2
49012  fi
49013done
49014  done
49015IFS=$as_save_IFS
49016
49017  ;;
49018esac
49019fi
49020JTREGEXE=$ac_cv_path_JTREGEXE
49021if test -n "$JTREGEXE"; then
49022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
49023$as_echo "$JTREGEXE" >&6; }
49024else
49025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49026$as_echo "no" >&6; }
49027fi
49028
49029
49030  test -n "$JTREGEXE" && break
49031done
49032
49033  else
49034    # The variable is set, but is it from the command line or the environment?
49035
49036    # Try to remove the string !JTREGEXE! from our list.
49037    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
49038    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
49039      # If it failed, the variable was not from the command line. Ignore it,
49040      # but warn the user (except for BASH, which is always set by the calling BASH).
49041      if test "xJTREGEXE" != xBASH; then
49042        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
49043$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
49044      fi
49045      # Try to locate tool using the code snippet
49046      for ac_prog in jtreg
49047do
49048  # Extract the first word of "$ac_prog", so it can be a program name with args.
49049set dummy $ac_prog; ac_word=$2
49050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49051$as_echo_n "checking for $ac_word... " >&6; }
49052if ${ac_cv_path_JTREGEXE+:} false; then :
49053  $as_echo_n "(cached) " >&6
49054else
49055  case $JTREGEXE in
49056  [\\/]* | ?:[\\/]*)
49057  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
49058  ;;
49059  *)
49060  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49061for as_dir in $PATH
49062do
49063  IFS=$as_save_IFS
49064  test -z "$as_dir" && as_dir=.
49065    for ac_exec_ext in '' $ac_executable_extensions; do
49066  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49067    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
49068    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49069    break 2
49070  fi
49071done
49072  done
49073IFS=$as_save_IFS
49074
49075  ;;
49076esac
49077fi
49078JTREGEXE=$ac_cv_path_JTREGEXE
49079if test -n "$JTREGEXE"; then
49080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
49081$as_echo "$JTREGEXE" >&6; }
49082else
49083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49084$as_echo "no" >&6; }
49085fi
49086
49087
49088  test -n "$JTREGEXE" && break
49089done
49090
49091    else
49092      # If it succeeded, then it was overridden by the user. We will use it
49093      # for the tool.
49094
49095      # First remove it from the list of overridden variables, so we can test
49096      # for unknown variables in the end.
49097      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
49098
49099      # Check if we try to supply an empty value
49100      if test "x$JTREGEXE" = x; then
49101        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
49102$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
49103        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
49104$as_echo_n "checking for JTREGEXE... " >&6; }
49105        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
49106$as_echo "disabled" >&6; }
49107      else
49108        # Check if the provided tool contains a complete path.
49109        tool_specified="$JTREGEXE"
49110        tool_basename="${tool_specified##*/}"
49111        if test "x$tool_basename" = "x$tool_specified"; then
49112          # A command without a complete path is provided, search $PATH.
49113          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
49114$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
49115          # Extract the first word of "$tool_basename", so it can be a program name with args.
49116set dummy $tool_basename; ac_word=$2
49117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49118$as_echo_n "checking for $ac_word... " >&6; }
49119if ${ac_cv_path_JTREGEXE+:} false; then :
49120  $as_echo_n "(cached) " >&6
49121else
49122  case $JTREGEXE in
49123  [\\/]* | ?:[\\/]*)
49124  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
49125  ;;
49126  *)
49127  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49128for as_dir in $PATH
49129do
49130  IFS=$as_save_IFS
49131  test -z "$as_dir" && as_dir=.
49132    for ac_exec_ext in '' $ac_executable_extensions; do
49133  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49134    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
49135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49136    break 2
49137  fi
49138done
49139  done
49140IFS=$as_save_IFS
49141
49142  ;;
49143esac
49144fi
49145JTREGEXE=$ac_cv_path_JTREGEXE
49146if test -n "$JTREGEXE"; then
49147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
49148$as_echo "$JTREGEXE" >&6; }
49149else
49150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49151$as_echo "no" >&6; }
49152fi
49153
49154
49155          if test "x$JTREGEXE" = x; then
49156            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
49157          fi
49158        else
49159          # Otherwise we believe it is a complete path. Use it as it is.
49160          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
49161$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
49162          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
49163$as_echo_n "checking for JTREGEXE... " >&6; }
49164          if test ! -x "$tool_specified"; then
49165            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
49166$as_echo "not found" >&6; }
49167            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
49168          fi
49169          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
49170$as_echo "$tool_specified" >&6; }
49171        fi
49172      fi
49173    fi
49174
49175  fi
49176
49177
49178
49179  if test "x$JTREGEXE" = x; then
49180    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
49181  fi
49182
49183
49184      JT_HOME="`$DIRNAME $JTREGEXE`"
49185    fi
49186  fi
49187
49188
49189
49190
49191
49192
49193  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
49194  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
49195  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
49196  #                              commands produced by the link step (currently AIX only)
49197  if test "x$TOOLCHAIN_TYPE" = xxlc; then
49198    COMPILER_TARGET_BITS_FLAG="-q"
49199    COMPILER_COMMAND_FILE_FLAG="-f"
49200    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
49201  else
49202    COMPILER_TARGET_BITS_FLAG="-m"
49203    COMPILER_COMMAND_FILE_FLAG="@"
49204    COMPILER_BINDCMD_FILE_FLAG=""
49205
49206    # The solstudio linker does not support @-files.
49207    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49208      COMPILER_COMMAND_FILE_FLAG=
49209    fi
49210
49211    # Check if @file is supported by gcc
49212    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49213      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
49214$as_echo_n "checking if @file is supported by gcc... " >&6; }
49215      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
49216      $ECHO "" "--version" > command.file
49217      if $CXX @command.file 2>&5 >&5; then
49218        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49219$as_echo "yes" >&6; }
49220        COMPILER_COMMAND_FILE_FLAG="@"
49221      else
49222        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49223$as_echo "no" >&6; }
49224        COMPILER_COMMAND_FILE_FLAG=
49225      fi
49226      $RM command.file
49227    fi
49228  fi
49229
49230
49231
49232
49233  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
49234  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49235    ARFLAGS="-r"
49236  elif test "x$OPENJDK_TARGET_OS" = xaix; then
49237    ARFLAGS="-X64"
49238  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
49239    # lib.exe is used as AR to create static libraries.
49240    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
49241  else
49242    ARFLAGS=""
49243  fi
49244
49245
49246  ## Setup strip.
49247  # FIXME: should this really be per platform, or should it be per toolchain type?
49248  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
49249  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
49250  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49251    STRIPFLAGS="-g"
49252  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
49253    STRIPFLAGS="-x"
49254  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
49255    STRIPFLAGS="-S"
49256  elif test "x$OPENJDK_TARGET_OS" = xaix; then
49257    STRIPFLAGS="-X32_64"
49258  fi
49259
49260
49261
49262  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49263    CC_OUT_OPTION=-Fo
49264    EXE_OUT_OPTION=-out:
49265    LD_OUT_OPTION=-out:
49266    AR_OUT_OPTION=-out:
49267  else
49268    # The option used to specify the target .o,.a or .so file.
49269    # When compiling, how to specify the to be created object file.
49270    CC_OUT_OPTION='-o$(SPACE)'
49271    # When linking, how to specify the to be created executable.
49272    EXE_OUT_OPTION='-o$(SPACE)'
49273    # When linking, how to specify the to be created dynamically linkable library.
49274    LD_OUT_OPTION='-o$(SPACE)'
49275    # When archiving, how to specify the to be create static archive for object files.
49276    AR_OUT_OPTION='rcs$(SPACE)'
49277  fi
49278
49279
49280
49281
49282
49283  # On Windows, we need to set RC flags.
49284  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49285    RC_FLAGS="-nologo -l0x409"
49286    JVM_RCFLAGS="-nologo"
49287    if test "x$DEBUG_LEVEL" = xrelease; then
49288      RC_FLAGS="$RC_FLAGS -DNDEBUG"
49289      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
49290    fi
49291
49292    # The version variables used to create RC_FLAGS may be overridden
49293    # in a custom configure script, or possibly the command line.
49294    # Let those variables be expanded at make time in spec.gmk.
49295    # The \$ are escaped to the shell, and the $(...) variables
49296    # are evaluated by make.
49297    RC_FLAGS="$RC_FLAGS \
49298        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
49299        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
49300        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
49301        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
49302        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
49303        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
49304        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
49305
49306    JVM_RCFLAGS="$JVM_RCFLAGS \
49307        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
49308        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
49309        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
49310        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
49311        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
49312        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
49313        -D\"HS_FNAME=jvm.dll\" \
49314        -D\"HS_INTERNAL_NAME=jvm\""
49315  fi
49316
49317
49318
49319  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49320    # silence copyright notice and other headers.
49321    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
49322  fi
49323
49324
49325# Now we can test some aspects on the target using configure macros.
49326
49327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
49328$as_echo_n "checking for ANSI C header files... " >&6; }
49329if ${ac_cv_header_stdc+:} false; then :
49330  $as_echo_n "(cached) " >&6
49331else
49332  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49333/* end confdefs.h.  */
49334#include <stdlib.h>
49335#include <stdarg.h>
49336#include <string.h>
49337#include <float.h>
49338
49339int
49340main ()
49341{
49342
49343  ;
49344  return 0;
49345}
49346_ACEOF
49347if ac_fn_cxx_try_compile "$LINENO"; then :
49348  ac_cv_header_stdc=yes
49349else
49350  ac_cv_header_stdc=no
49351fi
49352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49353
49354if test $ac_cv_header_stdc = yes; then
49355  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
49356  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49357/* end confdefs.h.  */
49358#include <string.h>
49359
49360_ACEOF
49361if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49362  $EGREP "memchr" >/dev/null 2>&1; then :
49363
49364else
49365  ac_cv_header_stdc=no
49366fi
49367rm -f conftest*
49368
49369fi
49370
49371if test $ac_cv_header_stdc = yes; then
49372  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
49373  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49374/* end confdefs.h.  */
49375#include <stdlib.h>
49376
49377_ACEOF
49378if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49379  $EGREP "free" >/dev/null 2>&1; then :
49380
49381else
49382  ac_cv_header_stdc=no
49383fi
49384rm -f conftest*
49385
49386fi
49387
49388if test $ac_cv_header_stdc = yes; then
49389  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
49390  if test "$cross_compiling" = yes; then :
49391  :
49392else
49393  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49394/* end confdefs.h.  */
49395#include <ctype.h>
49396#include <stdlib.h>
49397#if ((' ' & 0x0FF) == 0x020)
49398# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
49399# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
49400#else
49401# define ISLOWER(c) \
49402		   (('a' <= (c) && (c) <= 'i') \
49403		     || ('j' <= (c) && (c) <= 'r') \
49404		     || ('s' <= (c) && (c) <= 'z'))
49405# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
49406#endif
49407
49408#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
49409int
49410main ()
49411{
49412  int i;
49413  for (i = 0; i < 256; i++)
49414    if (XOR (islower (i), ISLOWER (i))
49415	|| toupper (i) != TOUPPER (i))
49416      return 2;
49417  return 0;
49418}
49419_ACEOF
49420if ac_fn_cxx_try_run "$LINENO"; then :
49421
49422else
49423  ac_cv_header_stdc=no
49424fi
49425rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49426  conftest.$ac_objext conftest.beam conftest.$ac_ext
49427fi
49428
49429fi
49430fi
49431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
49432$as_echo "$ac_cv_header_stdc" >&6; }
49433if test $ac_cv_header_stdc = yes; then
49434
49435$as_echo "#define STDC_HEADERS 1" >>confdefs.h
49436
49437fi
49438
49439# On IRIX 5.3, sys/types and inttypes.h are conflicting.
49440for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
49441		  inttypes.h stdint.h unistd.h
49442do :
49443  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
49444ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
49445"
49446if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
49447  cat >>confdefs.h <<_ACEOF
49448#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
49449_ACEOF
49450
49451fi
49452
49453done
49454
49455
49456
49457  ###############################################################################
49458  #
49459  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
49460  # (The JVM can use 32 or 64 bit Java pointers but that decision
49461  # is made at runtime.)
49462  #
49463
49464  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
49465    # Always specify -m flag on Solaris
49466    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
49467
49468  # When we add flags to the "official" CFLAGS etc, we need to
49469  # keep track of these additions in ADDED_CFLAGS etc. These
49470  # will later be checked to make sure only controlled additions
49471  # have been made to CFLAGS etc.
49472  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49473  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49474  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49475
49476  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49477  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49478  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49479
49480  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49481  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49482  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49483
49484  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49485  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49486  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49487
49488  elif test "x$COMPILE_TYPE" = xreduced; then
49489    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
49490      # Specify -m if running reduced on unix platforms
49491
49492  # When we add flags to the "official" CFLAGS etc, we need to
49493  # keep track of these additions in ADDED_CFLAGS etc. These
49494  # will later be checked to make sure only controlled additions
49495  # have been made to CFLAGS etc.
49496  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49497  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49498  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49499
49500  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49501  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49502  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49503
49504  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49505  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49506  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49507
49508  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49509  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49510  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49511
49512    fi
49513  fi
49514  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49515    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49516    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49517    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49518  fi
49519
49520  # Make compilation sanity check
49521  for ac_header in stdio.h
49522do :
49523  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
49524if test "x$ac_cv_header_stdio_h" = xyes; then :
49525  cat >>confdefs.h <<_ACEOF
49526#define HAVE_STDIO_H 1
49527_ACEOF
49528
49529else
49530
49531    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
49532$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
49533    if test "x$COMPILE_TYPE" = xreduced; then
49534
49535  # Print a helpful message on how to acquire the necessary build dependency.
49536  # reduced is the help tag: freetype, cups, alsa etc
49537  MISSING_DEPENDENCY=reduced
49538
49539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49540    cygwin_help $MISSING_DEPENDENCY
49541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49542    msys_help $MISSING_DEPENDENCY
49543  else
49544    PKGHANDLER_COMMAND=
49545
49546    case $PKGHANDLER in
49547      apt-get)
49548        apt_help     $MISSING_DEPENDENCY ;;
49549      yum)
49550        yum_help     $MISSING_DEPENDENCY ;;
49551      brew)
49552        brew_help    $MISSING_DEPENDENCY ;;
49553      port)
49554        port_help    $MISSING_DEPENDENCY ;;
49555      pkgutil)
49556        pkgutil_help $MISSING_DEPENDENCY ;;
49557      pkgadd)
49558        pkgadd_help  $MISSING_DEPENDENCY ;;
49559    esac
49560
49561    if test "x$PKGHANDLER_COMMAND" != x; then
49562      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49563    fi
49564  fi
49565
49566      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
49567$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
49568    elif test "x$COMPILE_TYPE" = xcross; then
49569      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
49570$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
49571    fi
49572    as_fn_error $? "Cannot continue." "$LINENO" 5
49573
49574fi
49575
49576done
49577
49578
49579  # The cast to long int works around a bug in the HP C Compiler
49580# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
49581# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
49582# This bug is HP SR number 8606223364.
49583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
49584$as_echo_n "checking size of int *... " >&6; }
49585if ${ac_cv_sizeof_int_p+:} false; then :
49586  $as_echo_n "(cached) " >&6
49587else
49588  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
49589
49590else
49591  if test "$ac_cv_type_int_p" = yes; then
49592     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49593$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49594as_fn_error 77 "cannot compute sizeof (int *)
49595See \`config.log' for more details" "$LINENO" 5; }
49596   else
49597     ac_cv_sizeof_int_p=0
49598   fi
49599fi
49600
49601fi
49602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
49603$as_echo "$ac_cv_sizeof_int_p" >&6; }
49604
49605
49606
49607cat >>confdefs.h <<_ACEOF
49608#define SIZEOF_INT_P $ac_cv_sizeof_int_p
49609_ACEOF
49610
49611
49612
49613  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
49614  if test "x$ac_cv_sizeof_int_p" = x; then
49615    # The test failed, lets stick to the assumed value.
49616    { $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
49617$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
49618  else
49619    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
49620
49621    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
49622      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
49623      # Let's try to implicitely set the compilers target architecture and retry the test
49624      { $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
49625$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;}
49626      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
49627$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
49628
49629  # When we add flags to the "official" CFLAGS etc, we need to
49630  # keep track of these additions in ADDED_CFLAGS etc. These
49631  # will later be checked to make sure only controlled additions
49632  # have been made to CFLAGS etc.
49633  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49634  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49635  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49636
49637  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49638  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49639  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49640
49641  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49642  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49643  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49644
49645  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49646  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49647  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49648
49649
49650      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
49651      unset ac_cv_sizeof_int_p
49652      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
49653      cat >>confdefs.h <<_ACEOF
49654#undef SIZEOF_INT_P
49655_ACEOF
49656
49657      # The cast to long int works around a bug in the HP C Compiler
49658# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
49659# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
49660# This bug is HP SR number 8606223364.
49661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
49662$as_echo_n "checking size of int *... " >&6; }
49663if ${ac_cv_sizeof_int_p+:} false; then :
49664  $as_echo_n "(cached) " >&6
49665else
49666  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
49667
49668else
49669  if test "$ac_cv_type_int_p" = yes; then
49670     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49671$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49672as_fn_error 77 "cannot compute sizeof (int *)
49673See \`config.log' for more details" "$LINENO" 5; }
49674   else
49675     ac_cv_sizeof_int_p=0
49676   fi
49677fi
49678
49679fi
49680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
49681$as_echo "$ac_cv_sizeof_int_p" >&6; }
49682
49683
49684
49685cat >>confdefs.h <<_ACEOF
49686#define SIZEOF_INT_P $ac_cv_sizeof_int_p
49687_ACEOF
49688
49689
49690
49691      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
49692
49693      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
49694        { $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
49695$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;}
49696        if test "x$COMPILE_TYPE" = xreduced; then
49697
49698  # Print a helpful message on how to acquire the necessary build dependency.
49699  # reduced is the help tag: freetype, cups, alsa etc
49700  MISSING_DEPENDENCY=reduced
49701
49702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49703    cygwin_help $MISSING_DEPENDENCY
49704  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49705    msys_help $MISSING_DEPENDENCY
49706  else
49707    PKGHANDLER_COMMAND=
49708
49709    case $PKGHANDLER in
49710      apt-get)
49711        apt_help     $MISSING_DEPENDENCY ;;
49712      yum)
49713        yum_help     $MISSING_DEPENDENCY ;;
49714      brew)
49715        brew_help    $MISSING_DEPENDENCY ;;
49716      port)
49717        port_help    $MISSING_DEPENDENCY ;;
49718      pkgutil)
49719        pkgutil_help $MISSING_DEPENDENCY ;;
49720      pkgadd)
49721        pkgadd_help  $MISSING_DEPENDENCY ;;
49722    esac
49723
49724    if test "x$PKGHANDLER_COMMAND" != x; then
49725      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49726    fi
49727  fi
49728
49729          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
49730$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
49731        elif test "x$COMPILE_TYPE" = xcross; then
49732          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
49733$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
49734        fi
49735        as_fn_error $? "Cannot continue." "$LINENO" 5
49736      fi
49737    fi
49738  fi
49739
49740  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
49741$as_echo_n "checking for target address size... " >&6; }
49742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
49743$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
49744
49745
49746  ###############################################################################
49747  #
49748  # Is the target little of big endian?
49749  #
49750   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
49751$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
49752if ${ac_cv_c_bigendian+:} false; then :
49753  $as_echo_n "(cached) " >&6
49754else
49755  ac_cv_c_bigendian=unknown
49756    # See if we're dealing with a universal compiler.
49757    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49758/* end confdefs.h.  */
49759#ifndef __APPLE_CC__
49760	       not a universal capable compiler
49761	     #endif
49762	     typedef int dummy;
49763
49764_ACEOF
49765if ac_fn_cxx_try_compile "$LINENO"; then :
49766
49767	# Check for potential -arch flags.  It is not universal unless
49768	# there are at least two -arch flags with different values.
49769	ac_arch=
49770	ac_prev=
49771	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
49772	 if test -n "$ac_prev"; then
49773	   case $ac_word in
49774	     i?86 | x86_64 | ppc | ppc64)
49775	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
49776		 ac_arch=$ac_word
49777	       else
49778		 ac_cv_c_bigendian=universal
49779		 break
49780	       fi
49781	       ;;
49782	   esac
49783	   ac_prev=
49784	 elif test "x$ac_word" = "x-arch"; then
49785	   ac_prev=arch
49786	 fi
49787       done
49788fi
49789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49790    if test $ac_cv_c_bigendian = unknown; then
49791      # See if sys/param.h defines the BYTE_ORDER macro.
49792      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49793/* end confdefs.h.  */
49794#include <sys/types.h>
49795	     #include <sys/param.h>
49796
49797int
49798main ()
49799{
49800#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
49801		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
49802		     && LITTLE_ENDIAN)
49803	      bogus endian macros
49804	     #endif
49805
49806  ;
49807  return 0;
49808}
49809_ACEOF
49810if ac_fn_cxx_try_compile "$LINENO"; then :
49811  # It does; now see whether it defined to BIG_ENDIAN or not.
49812	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49813/* end confdefs.h.  */
49814#include <sys/types.h>
49815		#include <sys/param.h>
49816
49817int
49818main ()
49819{
49820#if BYTE_ORDER != BIG_ENDIAN
49821		 not big endian
49822		#endif
49823
49824  ;
49825  return 0;
49826}
49827_ACEOF
49828if ac_fn_cxx_try_compile "$LINENO"; then :
49829  ac_cv_c_bigendian=yes
49830else
49831  ac_cv_c_bigendian=no
49832fi
49833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49834fi
49835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49836    fi
49837    if test $ac_cv_c_bigendian = unknown; then
49838      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
49839      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49840/* end confdefs.h.  */
49841#include <limits.h>
49842
49843int
49844main ()
49845{
49846#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
49847	      bogus endian macros
49848	     #endif
49849
49850  ;
49851  return 0;
49852}
49853_ACEOF
49854if ac_fn_cxx_try_compile "$LINENO"; then :
49855  # It does; now see whether it defined to _BIG_ENDIAN or not.
49856	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49857/* end confdefs.h.  */
49858#include <limits.h>
49859
49860int
49861main ()
49862{
49863#ifndef _BIG_ENDIAN
49864		 not big endian
49865		#endif
49866
49867  ;
49868  return 0;
49869}
49870_ACEOF
49871if ac_fn_cxx_try_compile "$LINENO"; then :
49872  ac_cv_c_bigendian=yes
49873else
49874  ac_cv_c_bigendian=no
49875fi
49876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49877fi
49878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49879    fi
49880    if test $ac_cv_c_bigendian = unknown; then
49881      # Compile a test program.
49882      if test "$cross_compiling" = yes; then :
49883  # Try to guess by grepping values from an object file.
49884	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49885/* end confdefs.h.  */
49886short int ascii_mm[] =
49887		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
49888		short int ascii_ii[] =
49889		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
49890		int use_ascii (int i) {
49891		  return ascii_mm[i] + ascii_ii[i];
49892		}
49893		short int ebcdic_ii[] =
49894		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
49895		short int ebcdic_mm[] =
49896		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
49897		int use_ebcdic (int i) {
49898		  return ebcdic_mm[i] + ebcdic_ii[i];
49899		}
49900		extern int foo;
49901
49902int
49903main ()
49904{
49905return use_ascii (foo) == use_ebcdic (foo);
49906  ;
49907  return 0;
49908}
49909_ACEOF
49910if ac_fn_cxx_try_compile "$LINENO"; then :
49911  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
49912	      ac_cv_c_bigendian=yes
49913	    fi
49914	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
49915	      if test "$ac_cv_c_bigendian" = unknown; then
49916		ac_cv_c_bigendian=no
49917	      else
49918		# finding both strings is unlikely to happen, but who knows?
49919		ac_cv_c_bigendian=unknown
49920	      fi
49921	    fi
49922fi
49923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49924else
49925  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49926/* end confdefs.h.  */
49927$ac_includes_default
49928int
49929main ()
49930{
49931
49932	     /* Are we little or big endian?  From Harbison&Steele.  */
49933	     union
49934	     {
49935	       long int l;
49936	       char c[sizeof (long int)];
49937	     } u;
49938	     u.l = 1;
49939	     return u.c[sizeof (long int) - 1] == 1;
49940
49941  ;
49942  return 0;
49943}
49944_ACEOF
49945if ac_fn_cxx_try_run "$LINENO"; then :
49946  ac_cv_c_bigendian=no
49947else
49948  ac_cv_c_bigendian=yes
49949fi
49950rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49951  conftest.$ac_objext conftest.beam conftest.$ac_ext
49952fi
49953
49954    fi
49955fi
49956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
49957$as_echo "$ac_cv_c_bigendian" >&6; }
49958 case $ac_cv_c_bigendian in #(
49959   yes)
49960     ENDIAN="big";; #(
49961   no)
49962     ENDIAN="little" ;; #(
49963   universal)
49964     ENDIAN="universal_endianness"
49965     ;; #(
49966   *)
49967     ENDIAN="unknown" ;;
49968 esac
49969
49970
49971  if test "x$ENDIAN" = xuniversal_endianness; then
49972    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
49973  fi
49974  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
49975    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
49976  fi
49977
49978
49979# Configure flags for the tools
49980
49981  ###############################################################################
49982  #
49983  # How to compile shared libraries.
49984  #
49985
49986  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49987    PICFLAG="-fPIC"
49988    C_FLAG_REORDER=''
49989    CXX_FLAG_REORDER=''
49990
49991    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49992      # Linking is different on MacOSX
49993      if test "x$STATIC_BUILD" = xtrue; then
49994        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49995      else
49996        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49997        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49998      fi
49999      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
50000      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
50001      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
50002      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
50003    else
50004      # Default works for linux, might work on other platforms as well.
50005      SHARED_LIBRARY_FLAGS='-shared'
50006      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
50007      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
50008      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
50009      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
50010    fi
50011  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50012    C_FLAG_REORDER=''
50013    CXX_FLAG_REORDER=''
50014
50015    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50016      # Linking is different on MacOSX
50017      PICFLAG=''
50018      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
50019      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
50020      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
50021      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
50022      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
50023
50024      if test "x$STATIC_BUILD" = xfalse; then
50025        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
50026      fi
50027    else
50028      # Default works for linux, might work on other platforms as well.
50029      PICFLAG='-fPIC'
50030      SHARED_LIBRARY_FLAGS='-shared'
50031      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
50032      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
50033      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
50034
50035      # arm specific settings
50036      if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
50037        # '-Wl,-z,origin' isn't used on arm.
50038        SET_SHARED_LIBRARY_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
50039      else
50040        SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
50041      fi
50042
50043    fi
50044  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50045    if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50046      PICFLAG="-xcode=pic32"
50047    else
50048      PICFLAG="-KPIC"
50049    fi
50050    C_FLAG_REORDER='-xF'
50051    CXX_FLAG_REORDER='-xF'
50052    SHARED_LIBRARY_FLAGS="-G"
50053    SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
50054    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
50055    SET_SHARED_LIBRARY_NAME='-h $1'
50056    SET_SHARED_LIBRARY_MAPFILE='-M$1'
50057  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50058    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
50059    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
50060    # will have to patch this single instruction with a call to some out-of-order code which
50061    # does the load from the TOC. This is of course slow. But in that case we also would have
50062    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
50063    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
50064    # can be patched directly by the linker and does not require a jump to out-of-order code.
50065    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
50066    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
50067    # loads for accessing a global variable). But there are rumors that this may be seen as a
50068    # 'performance feature' because of improved code locality of the symbols used in a
50069    # compilation unit.
50070    PICFLAG="-qpic"
50071    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
50072    C_FLAG_REORDER=''
50073    CXX_FLAG_REORDER=''
50074    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
50075    SET_EXECUTABLE_ORIGIN=""
50076    SET_SHARED_LIBRARY_ORIGIN=''
50077    SET_SHARED_LIBRARY_NAME=''
50078    SET_SHARED_LIBRARY_MAPFILE=''
50079  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50080    PICFLAG=""
50081    C_FLAG_REORDER=''
50082    CXX_FLAG_REORDER=''
50083    SHARED_LIBRARY_FLAGS="-dll"
50084    SET_EXECUTABLE_ORIGIN=''
50085    SET_SHARED_LIBRARY_ORIGIN=''
50086    SET_SHARED_LIBRARY_NAME=''
50087    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
50088  fi
50089
50090
50091
50092
50093
50094
50095
50096
50097
50098  # The (cross) compiler is now configured, we can now test capabilities
50099  # of the target platform.
50100
50101
50102
50103  ###############################################################################
50104  #
50105  # Setup the opt flags for different compilers
50106  # and different operating systems.
50107  #
50108
50109  # FIXME: this was indirectly the old default, but just inherited.
50110  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50111  #   C_FLAG_DEPS="-MMD -MF"
50112  # fi
50113
50114  # Generate make dependency files
50115  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50116    C_FLAG_DEPS="-MMD -MF"
50117  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50118    C_FLAG_DEPS="-MMD -MF"
50119  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50120    C_FLAG_DEPS="-xMMD -xMF"
50121  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50122    C_FLAG_DEPS="-qmakedep=gcc -MF"
50123  fi
50124  CXX_FLAG_DEPS="$C_FLAG_DEPS"
50125
50126
50127
50128  # Debug symbols
50129  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50130    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
50131      # reduce from default "-g2" option to save space
50132      CFLAGS_DEBUG_SYMBOLS="-g1"
50133      CXXFLAGS_DEBUG_SYMBOLS="-g1"
50134    else
50135      CFLAGS_DEBUG_SYMBOLS="-g"
50136      CXXFLAGS_DEBUG_SYMBOLS="-g"
50137    fi
50138  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50139    CFLAGS_DEBUG_SYMBOLS="-g"
50140    CXXFLAGS_DEBUG_SYMBOLS="-g"
50141  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50142    CFLAGS_DEBUG_SYMBOLS="-g -xs"
50143    # -g0 enables debug symbols without disabling inlining.
50144    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
50145  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50146    CFLAGS_DEBUG_SYMBOLS="-g"
50147    CXXFLAGS_DEBUG_SYMBOLS="-g"
50148  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50149    CFLAGS_DEBUG_SYMBOLS="-Zi"
50150    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
50151  fi
50152
50153
50154
50155  # Debug symbols for JVM_CFLAGS
50156  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50157    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
50158    if test "x$DEBUG_LEVEL" = xslowdebug; then
50159      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
50160    else
50161      # -g0 does not disable inlining, which -g does.
50162      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
50163    fi
50164  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50165    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
50166  else
50167    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
50168  fi
50169
50170
50171  # bounds, memory and behavior checking options
50172  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50173    case $DEBUG_LEVEL in
50174    release )
50175      # no adjustment
50176      ;;
50177    fastdebug )
50178      # no adjustment
50179      ;;
50180    slowdebug )
50181      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
50182      # get's added conditionally on whether we produce debug symbols or not.
50183      # This is most likely not really correct.
50184
50185      # Add runtime stack smashing and undefined behavior checks.
50186      # Not all versions of gcc support -fstack-protector
50187      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
50188
50189
50190
50191
50192
50193
50194
50195
50196
50197
50198
50199
50200
50201
50202
50203
50204
50205
50206
50207
50208
50209
50210
50211
50212
50213
50214
50215
50216
50217
50218
50219
50220
50221
50222
50223
50224
50225
50226
50227
50228
50229
50230    # Execute function body
50231
50232
50233
50234
50235
50236
50237
50238
50239
50240
50241
50242
50243
50244
50245
50246
50247
50248
50249
50250
50251
50252
50253
50254
50255
50256
50257
50258
50259
50260
50261
50262
50263
50264
50265
50266
50267
50268
50269
50270
50271
50272
50273
50274
50275
50276
50277
50278
50279    # Execute function body
50280
50281  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50282$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50283  supports=yes
50284
50285  saved_cflags="$CFLAGS"
50286  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
50287  ac_ext=c
50288ac_cpp='$CPP $CPPFLAGS'
50289ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50290ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50291ac_compiler_gnu=$ac_cv_c_compiler_gnu
50292
50293  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50294/* end confdefs.h.  */
50295int i;
50296_ACEOF
50297if ac_fn_c_try_compile "$LINENO"; then :
50298
50299else
50300  supports=no
50301fi
50302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50303  ac_ext=cpp
50304ac_cpp='$CXXCPP $CPPFLAGS'
50305ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50306ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50307ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50308
50309  CFLAGS="$saved_cflags"
50310
50311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50312$as_echo "$supports" >&6; }
50313  if test "x$supports" = "xyes" ; then
50314    :
50315    C_COMP_SUPPORTS="yes"
50316  else
50317    :
50318    C_COMP_SUPPORTS="no"
50319  fi
50320
50321
50322
50323
50324
50325
50326
50327
50328
50329
50330
50331
50332
50333
50334
50335
50336
50337
50338
50339
50340
50341
50342
50343
50344
50345
50346
50347
50348
50349
50350
50351
50352
50353
50354
50355
50356
50357
50358
50359
50360
50361
50362
50363
50364
50365
50366
50367
50368
50369
50370
50371
50372
50373
50374
50375
50376
50377
50378
50379    # Execute function body
50380
50381  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50382$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50383  supports=yes
50384
50385  saved_cxxflags="$CXXFLAGS"
50386  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
50387  ac_ext=cpp
50388ac_cpp='$CXXCPP $CPPFLAGS'
50389ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50390ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50391ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50392
50393  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50394/* end confdefs.h.  */
50395int i;
50396_ACEOF
50397if ac_fn_cxx_try_compile "$LINENO"; then :
50398
50399else
50400  supports=no
50401fi
50402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50403  ac_ext=cpp
50404ac_cpp='$CXXCPP $CPPFLAGS'
50405ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50406ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50407ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50408
50409  CXXFLAGS="$saved_cxxflags"
50410
50411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50412$as_echo "$supports" >&6; }
50413  if test "x$supports" = "xyes" ; then
50414    :
50415    CXX_COMP_SUPPORTS="yes"
50416  else
50417    :
50418    CXX_COMP_SUPPORTS="no"
50419  fi
50420
50421
50422
50423
50424
50425
50426
50427
50428
50429
50430
50431
50432
50433  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50434$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50435  supports=no
50436  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
50437
50438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50439$as_echo "$supports" >&6; }
50440  if test "x$supports" = "xyes" ; then
50441    :
50442
50443  else
50444    :
50445    STACK_PROTECTOR_CFLAG=""
50446  fi
50447
50448
50449
50450
50451
50452
50453
50454      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50455      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50456      if test "x$STACK_PROTECTOR_CFLAG" != x; then
50457        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50458      fi
50459      ;;
50460    esac
50461  fi
50462
50463  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50464    if test "x$DEBUG_LEVEL" != xrelease; then
50465      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50466        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
50467      fi
50468    fi
50469  fi
50470
50471  # Optimization levels
50472  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50473    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
50474
50475    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
50476      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
50477      C_O_FLAG_HIGHEST_JVM="-xO4"
50478      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
50479      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
50480      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
50481      C_O_FLAG_DEBUG="-xregs=no%frameptr"
50482      C_O_FLAG_DEBUG_JVM=""
50483      C_O_FLAG_NONE="-xregs=no%frameptr"
50484      CXX_O_FLAG_HIGHEST_JVM="-xO4"
50485      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
50486      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
50487      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
50488      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
50489      CXX_O_FLAG_DEBUG_JVM=""
50490      CXX_O_FLAG_NONE="-xregs=no%frameptr"
50491      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50492        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
50493        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
50494      fi
50495    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50496      C_O_FLAG_HIGHEST_JVM="-xO4"
50497      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
50498      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
50499      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
50500      C_O_FLAG_DEBUG=""
50501      C_O_FLAG_DEBUG_JVM=""
50502      C_O_FLAG_NONE=""
50503      CXX_O_FLAG_HIGHEST_JVM="-xO4"
50504      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
50505      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
50506      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
50507      CXX_O_FLAG_DEBUG=""
50508      CXX_O_FLAG_DEBUG_JVM=""
50509      CXX_O_FLAG_NONE=""
50510    fi
50511  else
50512    # The remaining toolchains share opt flags between CC and CXX;
50513    # setup for C and duplicate afterwards.
50514    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50515      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50516        # On MacOSX we optimize for size, something
50517        # we should do for all platforms?
50518        C_O_FLAG_HIGHEST_JVM="-Os"
50519        C_O_FLAG_HIGHEST="-Os"
50520        C_O_FLAG_HI="-Os"
50521        C_O_FLAG_NORM="-Os"
50522        C_O_FLAG_SIZE="-Os"
50523      else
50524        C_O_FLAG_HIGHEST_JVM="-O3"
50525        C_O_FLAG_HIGHEST="-O3"
50526        C_O_FLAG_HI="-O3"
50527        C_O_FLAG_NORM="-O2"
50528        C_O_FLAG_SIZE="-Os"
50529      fi
50530      C_O_FLAG_DEBUG="-O0"
50531      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50532        C_O_FLAG_DEBUG_JVM=""
50533      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50534        C_O_FLAG_DEBUG_JVM="-O0"
50535      fi
50536      C_O_FLAG_NONE="-O0"
50537    elif test "x$TOOLCHAIN_TYPE" = xclang; then
50538      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50539        # On MacOSX we optimize for size, something
50540        # we should do for all platforms?
50541        C_O_FLAG_HIGHEST_JVM="-Os"
50542        C_O_FLAG_HIGHEST="-Os"
50543        C_O_FLAG_HI="-Os"
50544        C_O_FLAG_NORM="-Os"
50545        C_O_FLAG_SIZE="-Os"
50546      else
50547        C_O_FLAG_HIGHEST_JVM="-O3"
50548        C_O_FLAG_HIGHEST="-O3"
50549        C_O_FLAG_HI="-O3"
50550        C_O_FLAG_NORM="-O2"
50551        C_O_FLAG_SIZE="-Os"
50552      fi
50553      C_O_FLAG_DEBUG="-O0"
50554      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50555        C_O_FLAG_DEBUG_JVM=""
50556      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50557        C_O_FLAG_DEBUG_JVM="-O0"
50558      fi
50559      C_O_FLAG_NONE="-O0"
50560    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50561      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
50562      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
50563      C_O_FLAG_HI="-O3 -qinline -qinlglue"
50564      C_O_FLAG_NORM="-O2"
50565      C_O_FLAG_DEBUG="-qnoopt"
50566      # FIXME: Value below not verified.
50567      C_O_FLAG_DEBUG_JVM=""
50568      C_O_FLAG_NONE="-qnoopt"
50569    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50570      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
50571      C_O_FLAG_HIGHEST="-O2"
50572      C_O_FLAG_HI="-O1"
50573      C_O_FLAG_NORM="-O1"
50574      C_O_FLAG_DEBUG="-Od"
50575      C_O_FLAG_DEBUG_JVM=""
50576      C_O_FLAG_NONE="-Od"
50577      C_O_FLAG_SIZE="-Os"
50578    fi
50579    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
50580    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
50581    CXX_O_FLAG_HI="$C_O_FLAG_HI"
50582    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
50583    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
50584    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
50585    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
50586    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
50587  fi
50588
50589  # Adjust optimization flags according to debug level.
50590  case $DEBUG_LEVEL in
50591    release )
50592      # no adjustment
50593      ;;
50594    fastdebug )
50595      # Not quite so much optimization
50596      C_O_FLAG_HI="$C_O_FLAG_NORM"
50597      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
50598      ;;
50599    slowdebug )
50600      # Disable optimization
50601      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
50602      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
50603      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
50604      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
50605      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
50606      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
50607      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
50608      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
50609      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
50610      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
50611      ;;
50612  esac
50613
50614
50615
50616
50617
50618
50619
50620
50621
50622
50623
50624
50625
50626
50627
50628
50629
50630
50631
50632
50633# Check whether --with-abi-profile was given.
50634if test "${with_abi_profile+set}" = set; then :
50635  withval=$with_abi_profile;
50636fi
50637
50638
50639  if test "x$with_abi_profile" != x; then
50640    if test "x$OPENJDK_TARGET_CPU" != xarm && \
50641        test "x$OPENJDK_TARGET_CPU" != xaarch64; then
50642      as_fn_error $? "--with-abi-profile only available on arm/aarch64" "$LINENO" 5
50643    fi
50644
50645    OPENJDK_TARGET_ABI_PROFILE=$with_abi_profile
50646    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI profle" >&5
50647$as_echo_n "checking for ABI profle... " >&6; }
50648    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_ABI_PROFILE" >&5
50649$as_echo "$OPENJDK_TARGET_ABI_PROFILE" >&6; }
50650
50651    if test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-sflt; then
50652      ARM_FLOAT_TYPE=vfp-sflt
50653      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
50654    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-hflt; then
50655      ARM_FLOAT_TYPE=vfp-hflt
50656      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
50657    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-sflt; then
50658      ARM_FLOAT_TYPE=sflt
50659      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
50660    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv5-vfp-sflt; then
50661      ARM_FLOAT_TYPE=vfp-sflt
50662      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
50663    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv6-vfp-hflt; then
50664      ARM_FLOAT_TYPE=vfp-hflt
50665      ARM_ARCH_TYPE_FLAGS='-march=armv6 -marm'
50666    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm64; then
50667      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
50668      ARM_FLOAT_TYPE=
50669      ARM_ARCH_TYPE_FLAGS=
50670    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xaarch64; then
50671      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
50672      ARM_FLOAT_TYPE=
50673      ARM_ARCH_TYPE_FLAGS=
50674    else
50675      as_fn_error $? "Invalid ABI profile: \"$OPENJDK_TARGET_ABI_PROFILE\"" "$LINENO" 5
50676    fi
50677
50678    if test "x$ARM_FLOAT_TYPE" = xvfp-sflt; then
50679      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=softfp -mfpu=vfp -DFLOAT_ARCH=-vfp-sflt'
50680    elif test "x$ARM_FLOAT_TYPE" = xvfp-hflt; then
50681      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=hard -mfpu=vfp -DFLOAT_ARCH=-vfp-hflt'
50682    elif test "x$ARM_FLOAT_TYPE" = xsflt; then
50683      ARM_FLOAT_TYPE_FLAGS='-msoft-float -mfpu=vfp'
50684    fi
50685    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ARM_FLOAT_TYPE floating point flags" >&5
50686$as_echo_n "checking for $ARM_FLOAT_TYPE floating point flags... " >&6; }
50687    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_FLOAT_TYPE_FLAGS" >&5
50688$as_echo "$ARM_FLOAT_TYPE_FLAGS" >&6; }
50689
50690    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arch type flags" >&5
50691$as_echo_n "checking for arch type flags... " >&6; }
50692    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_ARCH_TYPE_FLAGS" >&5
50693$as_echo "$ARM_ARCH_TYPE_FLAGS" >&6; }
50694
50695    # Now set JDK_ARCH_ABI_PROP_NAME. This is equivalent to the last part of the
50696    # autoconf target triplet.
50697     JDK_ARCH_ABI_PROP_NAME=`$ECHO $OPENJDK_TARGET_AUTOCONF_NAME | $SED -e 's/.*-\([^-]*\)$/\1/'`
50698    # Sanity check that it is a known ABI.
50699    if test "x$JDK_ARCH_ABI_PROP_NAME" != xgnu && \
50700        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabi  && \
50701        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabihf; then
50702          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&5
50703$as_echo "$as_me: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&2;}
50704    fi
50705    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI property name" >&5
50706$as_echo_n "checking for ABI property name... " >&6; }
50707    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_ARCH_ABI_PROP_NAME" >&5
50708$as_echo "$JDK_ARCH_ABI_PROP_NAME" >&6; }
50709
50710
50711    # Pass these on to the open part of configure as if they were set using
50712    # --with-extra-c[xx]flags.
50713    EXTRA_CFLAGS="$EXTRA_CFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
50714    EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
50715    # Get rid of annoying "note: the mangling of 'va_list' has changed in GCC 4.4"
50716    # FIXME: This should not really be set using extra_cflags.
50717    if test "x$OPENJDK_TARGET_CPU" = xarm; then
50718        EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-psabi"
50719        EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -Wno-psabi"
50720    fi
50721    # Also add JDK_ARCH_ABI_PROP_NAME define, but only to CFLAGS.
50722    EXTRA_CFLAGS="$EXTRA_CFLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
50723    # And pass the architecture flags to the linker as well
50724    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
50725  fi
50726
50727  # When building with an abi profile, the name of that profile is appended on the
50728  # bundle platform, which is used in bundle names.
50729  if test "x$OPENJDK_TARGET_ABI_PROFILE" != x; then
50730    OPENJDK_TARGET_BUNDLE_PLATFORM="$OPENJDK_TARGET_OS_BUNDLE-$OPENJDK_TARGET_ABI_PROFILE"
50731  fi
50732
50733
50734  # Special extras...
50735  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50736    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50737      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50738      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50739    fi
50740    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50741    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50742  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50743    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50744    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50745  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50746    CXXSTD_CXXFLAG="-std=gnu++98"
50747
50748
50749
50750
50751
50752
50753
50754
50755
50756
50757
50758
50759
50760
50761
50762
50763
50764
50765
50766
50767
50768
50769
50770
50771
50772
50773
50774
50775
50776
50777
50778
50779
50780
50781
50782
50783
50784
50785
50786
50787
50788
50789    # Execute function body
50790
50791  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
50792$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
50793  supports=yes
50794
50795  saved_cxxflags="$CXXFLAGS"
50796  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
50797  ac_ext=cpp
50798ac_cpp='$CXXCPP $CPPFLAGS'
50799ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50800ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50801ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50802
50803  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50804/* end confdefs.h.  */
50805int i;
50806_ACEOF
50807if ac_fn_cxx_try_compile "$LINENO"; then :
50808
50809else
50810  supports=no
50811fi
50812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50813  ac_ext=cpp
50814ac_cpp='$CXXCPP $CPPFLAGS'
50815ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50816ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50817ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50818
50819  CXXFLAGS="$saved_cxxflags"
50820
50821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50822$as_echo "$supports" >&6; }
50823  if test "x$supports" = "xyes" ; then
50824    :
50825
50826  else
50827    :
50828    CXXSTD_CXXFLAG=""
50829  fi
50830
50831
50832
50833
50834
50835
50836
50837
50838
50839
50840
50841
50842    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
50843    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
50844
50845  fi
50846  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50847    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
50848    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
50849  fi
50850
50851  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
50852  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
50853  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
50854
50855  ###############################################################################
50856  #
50857  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50858  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50859  #
50860
50861  # Setup compiler/platform specific flags into
50862  #    CFLAGS_JDK    - C Compiler flags
50863  #    CXXFLAGS_JDK  - C++ Compiler flags
50864  #    COMMON_CCXXFLAGS_JDK - common to C and C++
50865  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50866    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
50867    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
50868    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
50869    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50870      # Force compatibility with i586 on 32 bit intel platforms.
50871      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
50872      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
50873    fi
50874    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50875        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50876    case $OPENJDK_TARGET_CPU_ARCH in
50877      arm )
50878        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50879        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50880        COMMON_CCXXFLAGS_JDK="${COMMON_CCXXFLAGS_JDK} -fsigned-char"
50881        ;;
50882      ppc )
50883        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50884        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50885        ;;
50886      s390 )
50887        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
50888        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50889        ;;
50890      * )
50891        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50892        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50893        ;;
50894    esac
50895
50896
50897
50898
50899
50900
50901
50902
50903
50904
50905
50906
50907
50908
50909
50910
50911
50912
50913
50914
50915
50916
50917
50918
50919
50920
50921
50922
50923
50924
50925
50926
50927
50928
50929
50930
50931
50932
50933
50934
50935
50936
50937
50938
50939
50940
50941
50942
50943
50944
50945
50946
50947
50948
50949    # Execute function body
50950
50951  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50952  REFERENCE_VERSION=6
50953
50954  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50955    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50956  fi
50957
50958  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50959    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50960  fi
50961
50962  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50963  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50964
50965  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50966    :
50967
50968  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50969  # runs afoul of the more aggressive versions of these optimisations.
50970  # Notably, value range propagation now assumes that the this pointer of C++
50971  # member functions is non-null.
50972  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50973        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50974        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50975$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50976  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50977  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50978
50979  else
50980    :
50981
50982  fi
50983
50984
50985
50986
50987
50988
50989
50990
50991
50992
50993
50994
50995
50996
50997  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50998    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
50999
51000    # Restrict the debug information created by Clang to avoid
51001    # too big object files and speed the build up a little bit
51002    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
51003    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
51004    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51005      if test "x$OPENJDK_TARGET_CPU" = xx86; then
51006        # Force compatibility with i586 on 32 bit intel platforms.
51007        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
51008        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
51009      fi
51010      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
51011      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51012          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51013      case $OPENJDK_TARGET_CPU_ARCH in
51014        ppc )
51015          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51016          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51017          ;;
51018        * )
51019          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51020          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51021          ;;
51022      esac
51023    fi
51024  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51025    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
51026    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
51027    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
51028      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
51029    fi
51030
51031    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
51032    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
51033  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51034    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
51035    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51036    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51037  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51038    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
51039        -MD -Zc:wchar_t- -W3 -wd4800 \
51040        -DWIN32_LEAN_AND_MEAN \
51041        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
51042        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
51043        -DWIN32 -DIAL"
51044    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
51045      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
51046    else
51047      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
51048    fi
51049    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
51050    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
51051    # studio.
51052    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
51053      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
51054      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
51055      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
51056    fi
51057  fi
51058
51059  ###############################################################################
51060
51061  # Adjust flags according to debug level.
51062  case $DEBUG_LEVEL in
51063    fastdebug | slowdebug )
51064      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
51065      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
51066      ;;
51067    release )
51068      ;;
51069    * )
51070      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51071      ;;
51072  esac
51073
51074  # Set some common defines. These works for all compilers, but assume
51075  # -D is universally accepted.
51076
51077  # Setup endianness
51078  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
51079    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
51080    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
51081    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
51082    #   Note: -Dmacro         is the same as    #define macro 1
51083    #         -Dmacro=        is the same as    #define macro
51084    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51085      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
51086    else
51087      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
51088    fi
51089  else
51090    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
51091    # are defined in the system?
51092    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51093      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
51094    else
51095      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
51096    fi
51097  fi
51098
51099  # Setup target OS define. Use OS target name but in upper case.
51100  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
51101  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
51102
51103  # Setup target CPU
51104  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51105      $OPENJDK_TARGET_ADD_LP64 \
51106      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
51107
51108  # Setup debug/release defines
51109  if test "x$DEBUG_LEVEL" = xrelease; then
51110    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
51111    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51112      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
51113    fi
51114  else
51115    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
51116  fi
51117
51118  # Set some additional per-OS defines.
51119  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51120    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
51121    JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
51122        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
51123  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
51124    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
51125    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
51126        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
51127  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51128    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
51129    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
51130    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
51131    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
51132        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
51133        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
51134        -fno-omit-frame-pointer"
51135  elif test "x$OPENJDK_TARGET_OS" = xaix; then
51136    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
51137    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51138    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
51139        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
51140        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
51141  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
51142    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
51143  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
51144    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
51145    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
51146  fi
51147
51148  # Set some additional per-CPU defines.
51149  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
51150    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
51151  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
51152    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
51153  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
51154    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51155      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51156      # fixes `relocation truncated to fit' error for gcc 4.1.
51157      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
51158      # Use ppc64 instructions, but schedule for power5
51159      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
51160    elif test "x$OPENJDK_TARGET_OS" = xaix; then
51161      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
51162    fi
51163  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
51164    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51165      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51166      # Little endian machine uses ELFv2 ABI.
51167      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
51168      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
51169      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
51170    fi
51171  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
51172    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51173      JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
51174    fi
51175  fi
51176
51177  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
51178    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
51179  fi
51180
51181  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51182    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
51183      # Solaris does not have _LP64=1 in the old build.
51184      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
51185      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
51186    fi
51187  fi
51188
51189  # Set JVM_CFLAGS warning handling
51190  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51191    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
51192        -Wunused-value -Woverloaded-virtual"
51193
51194    if test "x$TOOLCHAIN_TYPE" = xgcc; then
51195
51196
51197
51198
51199
51200
51201
51202
51203
51204
51205
51206
51207
51208
51209
51210
51211
51212
51213
51214
51215
51216
51217
51218
51219
51220
51221
51222
51223
51224
51225
51226
51227
51228
51229
51230
51231
51232
51233
51234
51235
51236
51237
51238
51239
51240
51241
51242
51243
51244
51245
51246
51247
51248
51249    # Execute function body
51250
51251  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51252  REFERENCE_VERSION=4.8
51253
51254  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51255    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51256  fi
51257
51258  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51259    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51260  fi
51261
51262  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51263  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51264
51265  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51266    :
51267
51268            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51269            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51270
51271
51272  else
51273    :
51274
51275  fi
51276
51277
51278
51279
51280
51281
51282
51283
51284
51285
51286
51287
51288
51289
51290    fi
51291    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51292      # Non-zero builds have stricter warnings
51293      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51294    else
51295      if test "x$TOOLCHAIN_TYPE" = xclang; then
51296        # Some versions of llvm do not like -Wundef
51297        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
51298      fi
51299    fi
51300  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51301    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51302        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51303  fi
51304
51305  # Additional macosx handling
51306  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51307    # Setting these parameters makes it an error to link to macosx APIs that are
51308    # newer than the given OS version and makes the linked binaries compatible
51309    # even if built on a newer version of the OS.
51310    # The expected format is X.Y.Z
51311    MACOSX_VERSION_MIN=10.7.0
51312
51313
51314    # The macro takes the version with no dots, ex: 1070
51315    # Let the flags variables get resolved in make for easier override on make
51316    # command line.
51317    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51318    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51319  fi
51320
51321  # Setup some hard coded includes
51322  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51323      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51324      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51325      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
51326      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
51327      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51328      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
51329
51330  # The shared libraries are compiled using the picflag.
51331  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
51332      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51333  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
51334      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51335
51336  # Executable flags
51337  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
51338  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
51339
51340
51341
51342
51343
51344
51345  # Setup LDFLAGS et al.
51346  #
51347
51348  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51349    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51350    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51351    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51352    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
51353      LDFLAGS_SAFESH="-safeseh"
51354      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
51355      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
51356      # NOTE: Old build added -machine. Probably not needed.
51357      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
51358    else
51359      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
51360    fi
51361  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51362      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51363      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51364        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51365        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51366    fi
51367  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51368    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51369    # We have previously set HAS_GNU_HASH if this is the case
51370    if test -n "$HAS_GNU_HASH"; then
51371      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51372      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
51373      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
51374    fi
51375      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51376        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51377    fi
51378    if test "x$OPENJDK_TARGET_OS" = xlinux; then
51379      # And since we now know that the linker is gnu, then add -z defs, to forbid
51380      # undefined symbols in object files.
51381      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51382      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51383      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51384      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51385      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51386      if test "x$OPENJDK_TARGET_CPU" = xx86; then
51387        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
51388      fi
51389      case $DEBUG_LEVEL in
51390        release )
51391          # tell linker to optimize libraries.
51392          # Should this be supplied to the OSS linker as well?
51393          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51394          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51395          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51396          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51397            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51398          fi
51399          ;;
51400        slowdebug )
51401          # Hotspot always let the linker optimize
51402          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
51403          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51404            # do relocations at load
51405            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
51406            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51407            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
51408          fi
51409          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51410            # mark relocations read only
51411            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
51412            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51413            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51414          fi
51415          ;;
51416        fastdebug )
51417          # Hotspot always let the linker optimize
51418          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
51419          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51420            # mark relocations read only
51421            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
51422            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51423            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51424          fi
51425          ;;
51426        * )
51427          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51428          ;;
51429        esac
51430    fi
51431  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51432    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51433    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51434    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51435    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51436    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51437    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
51438      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
51439    fi
51440  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51441    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51442    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
51443    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
51444  fi
51445
51446  # Customize LDFLAGS for executables
51447
51448  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
51449
51450  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51451    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
51452      LDFLAGS_STACK_SIZE=1048576
51453    else
51454      LDFLAGS_STACK_SIZE=327680
51455    fi
51456    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51457  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
51458    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51459  fi
51460
51461  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
51462
51463  # Customize LDFLAGS for libs
51464  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
51465
51466  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51467  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51468    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51469        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51470    JDKLIB_LIBS=""
51471  else
51472    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51473        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
51474
51475    if test "xTARGET" = "xTARGET"; then
51476      # On some platforms (mac) the linker warns about non existing -L dirs.
51477      # For any of the variants server, client or minimal, the dir matches the
51478      # variant name. The "main" variant should be used for linking. For the
51479      # rest, the dir is just server.
51480      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
51481          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51482        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51483            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
51484      else
51485        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51486            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51487      fi
51488    elif test "xTARGET" = "xBUILD"; then
51489      # When building a buildjdk, it's always only the server variant
51490      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51491          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51492    fi
51493
51494    JDKLIB_LIBS="-ljava -ljvm"
51495    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51496      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
51497    fi
51498
51499  fi
51500
51501LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
51502
51503  # Set JVM_LIBS (per os)
51504  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51505    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
51506  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
51507    # FIXME: This hard-coded path is not really proper.
51508    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
51509      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51510    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
51511      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51512    fi
51513    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51514        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51515  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51516    JVM_LIBS="$JVM_LIBS -lm"
51517  elif test "x$OPENJDK_TARGET_OS" = xaix; then
51518    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51519  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
51520    JVM_LIBS="$JVM_LIBS -lm"
51521  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
51522    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51523        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51524        wsock32.lib winmm.lib version.lib psapi.lib"
51525    fi
51526
51527  # Set JVM_ASFLAGS
51528  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51529    if test "x$OPENJDK_TARGET_CPU" = xx86; then
51530      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
51531    fi
51532  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51533    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51534  fi
51535
51536  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
51537
51538
51539
51540
51541
51542
51543
51544
51545
51546
51547
51548
51549
51550
51551
51552  # Special extras...
51553  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51554    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51555      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51556      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51557    fi
51558    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51559    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51560  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51561    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51562    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51563  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51564    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
51565
51566
51567
51568
51569
51570
51571
51572
51573
51574
51575
51576
51577
51578
51579
51580
51581
51582
51583
51584
51585
51586
51587
51588
51589
51590
51591
51592
51593
51594
51595
51596
51597
51598
51599
51600
51601
51602
51603
51604
51605
51606
51607    # Execute function body
51608
51609  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
51610$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
51611  supports=yes
51612
51613  saved_cxxflags="$CXXFLAGS"
51614  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
51615  ac_ext=cpp
51616ac_cpp='$CXXCPP $CPPFLAGS'
51617ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51618ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51619ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51620
51621  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51622/* end confdefs.h.  */
51623int i;
51624_ACEOF
51625if ac_fn_cxx_try_compile "$LINENO"; then :
51626
51627else
51628  supports=no
51629fi
51630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51631  ac_ext=cpp
51632ac_cpp='$CXXCPP $CPPFLAGS'
51633ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51634ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51635ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51636
51637  CXXFLAGS="$saved_cxxflags"
51638
51639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51640$as_echo "$supports" >&6; }
51641  if test "x$supports" = "xyes" ; then
51642    :
51643
51644  else
51645    :
51646    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
51647  fi
51648
51649
51650
51651
51652
51653
51654
51655
51656
51657
51658
51659
51660    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
51661    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
51662
51663  fi
51664  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51665    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
51666    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
51667  fi
51668
51669  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
51670  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
51671  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
51672
51673  ###############################################################################
51674  #
51675  # Now setup the CFLAGS and LDFLAGS for the JDK build.
51676  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
51677  #
51678
51679  # Setup compiler/platform specific flags into
51680  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
51681  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
51682  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
51683  if test "x$TOOLCHAIN_TYPE" = xgcc; then
51684    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
51685    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
51686    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
51687    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51688      # Force compatibility with i586 on 32 bit intel platforms.
51689      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
51690      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
51691    fi
51692    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51693        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51694    case $OPENJDK_BUILD_CPU_ARCH in
51695      arm )
51696        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51697        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51698        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="${OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK} -fsigned-char"
51699        ;;
51700      ppc )
51701        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51702        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51703        ;;
51704      s390 )
51705        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
51706        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51707        ;;
51708      * )
51709        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51710        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51711        ;;
51712    esac
51713
51714
51715
51716
51717
51718
51719
51720
51721
51722
51723
51724
51725
51726
51727
51728
51729
51730
51731
51732
51733
51734
51735
51736
51737
51738
51739
51740
51741
51742
51743
51744
51745
51746
51747
51748
51749
51750
51751
51752
51753
51754
51755
51756
51757
51758
51759
51760
51761
51762
51763
51764
51765
51766
51767    # Execute function body
51768
51769  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51770  REFERENCE_VERSION=6
51771
51772  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51773    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51774  fi
51775
51776  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51777    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
51778  fi
51779
51780  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51781  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51782
51783  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51784    :
51785
51786  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
51787  # runs afoul of the more aggressive versions of these optimisations.
51788  # Notably, value range propagation now assumes that the this pointer of C++
51789  # member functions is non-null.
51790  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
51791        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
51792        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
51793$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
51794  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51795  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51796
51797  else
51798    :
51799
51800  fi
51801
51802
51803
51804
51805
51806
51807
51808
51809
51810
51811
51812
51813
51814
51815  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51816    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
51817
51818    # Restrict the debug information created by Clang to avoid
51819    # too big object files and speed the build up a little bit
51820    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
51821    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
51822    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51823      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51824        # Force compatibility with i586 on 32 bit intel platforms.
51825        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
51826        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
51827      fi
51828      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
51829      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51830          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51831      case $OPENJDK_BUILD_CPU_ARCH in
51832        ppc )
51833          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51834          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51835          ;;
51836        * )
51837          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51838          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51839          ;;
51840      esac
51841    fi
51842  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51843    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
51844    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
51845    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
51846      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
51847    fi
51848
51849    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
51850    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
51851  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51852    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
51853    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51854    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51855  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51856    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51857        -MD -Zc:wchar_t- -W3 -wd4800 \
51858        -DWIN32_LEAN_AND_MEAN \
51859        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
51860        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
51861        -DWIN32 -DIAL"
51862    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51863      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
51864    else
51865      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
51866    fi
51867    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
51868    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
51869    # studio.
51870    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
51871      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
51872      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
51873      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
51874    fi
51875  fi
51876
51877  ###############################################################################
51878
51879  # Adjust flags according to debug level.
51880  case $DEBUG_LEVEL in
51881    fastdebug | slowdebug )
51882      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
51883      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
51884      ;;
51885    release )
51886      ;;
51887    * )
51888      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51889      ;;
51890  esac
51891
51892  # Set some common defines. These works for all compilers, but assume
51893  # -D is universally accepted.
51894
51895  # Setup endianness
51896  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51897    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
51898    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
51899    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
51900    #   Note: -Dmacro         is the same as    #define macro 1
51901    #         -Dmacro=        is the same as    #define macro
51902    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51903      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
51904    else
51905      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
51906    fi
51907  else
51908    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
51909    # are defined in the system?
51910    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51911      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
51912    else
51913      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
51914    fi
51915  fi
51916
51917  # Setup target OS define. Use OS target name but in upper case.
51918  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
51919  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
51920
51921  # Setup target CPU
51922  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51923      $OPENJDK_BUILD_ADD_LP64 \
51924      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
51925
51926  # Setup debug/release defines
51927  if test "x$DEBUG_LEVEL" = xrelease; then
51928    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
51929    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51930      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
51931    fi
51932  else
51933    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
51934  fi
51935
51936  # Set some additional per-OS defines.
51937  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51938    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
51939    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
51940        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
51941  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51942    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
51943    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
51944        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
51945  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51946    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
51947    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
51948    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
51949    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
51950        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
51951        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
51952        -fno-omit-frame-pointer"
51953  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51954    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
51955    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51956    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
51957        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
51958        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
51959  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51960    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
51961  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51962    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
51963    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
51964  fi
51965
51966  # Set some additional per-CPU defines.
51967  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
51968    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
51969  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51970    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
51971  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
51972    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51973      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51974      # fixes `relocation truncated to fit' error for gcc 4.1.
51975      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
51976      # Use ppc64 instructions, but schedule for power5
51977      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
51978    elif test "x$OPENJDK_BUILD_OS" = xaix; then
51979      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
51980    fi
51981  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
51982    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51983      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51984      # Little endian machine uses ELFv2 ABI.
51985      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
51986      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
51987      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
51988    fi
51989  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
51990    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51991      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
51992    fi
51993  fi
51994
51995  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51996    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
51997  fi
51998
51999  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
52000    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
52001      # Solaris does not have _LP64=1 in the old build.
52002      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
52003      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
52004    fi
52005  fi
52006
52007  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
52008  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52009    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
52010        -Wunused-value -Woverloaded-virtual"
52011
52012    if test "x$TOOLCHAIN_TYPE" = xgcc; then
52013
52014
52015
52016
52017
52018
52019
52020
52021
52022
52023
52024
52025
52026
52027
52028
52029
52030
52031
52032
52033
52034
52035
52036
52037
52038
52039
52040
52041
52042
52043
52044
52045
52046
52047
52048
52049
52050
52051
52052
52053
52054
52055
52056
52057
52058
52059
52060
52061
52062
52063
52064
52065
52066
52067    # Execute function body
52068
52069  # Need to assign to a variable since m4 is blocked from modifying parts in [].
52070  REFERENCE_VERSION=4.8
52071
52072  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
52073    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
52074  fi
52075
52076  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
52077    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
52078  fi
52079
52080  # Version comparison method inspired by http://stackoverflow.com/a/24067243
52081  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
52082
52083  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
52084    :
52085
52086            # These flags either do not work or give spurious warnings prior to gcc 4.8.
52087            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
52088
52089
52090  else
52091    :
52092
52093  fi
52094
52095
52096
52097
52098
52099
52100
52101
52102
52103
52104
52105
52106
52107
52108    fi
52109    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52110      # Non-zero builds have stricter warnings
52111      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
52112    else
52113      if test "x$TOOLCHAIN_TYPE" = xclang; then
52114        # Some versions of llvm do not like -Wundef
52115        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
52116      fi
52117    fi
52118  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52119    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
52120        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
52121  fi
52122
52123  # Additional macosx handling
52124  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52125    # Setting these parameters makes it an error to link to macosx APIs that are
52126    # newer than the given OS version and makes the linked binaries compatible
52127    # even if built on a newer version of the OS.
52128    # The expected format is X.Y.Z
52129    MACOSX_VERSION_MIN=10.7.0
52130
52131
52132    # The macro takes the version with no dots, ex: 1070
52133    # Let the flags variables get resolved in make for easier override on make
52134    # command line.
52135    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
52136    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
52137  fi
52138
52139  # Setup some hard coded includes
52140  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52141      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
52142      -I${JDK_TOPDIR}/src/java.base/share/native/include \
52143      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
52144      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
52145      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
52146      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
52147
52148  # The shared libraries are compiled using the picflag.
52149  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52150      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
52151  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52152      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
52153
52154  # Executable flags
52155  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
52156  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
52157
52158
52159
52160
52161
52162
52163  # Setup LDFLAGS et al.
52164  #
52165
52166  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52167    LDFLAGS_MICROSOFT="-nologo -opt:ref"
52168    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
52169    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
52170    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
52171      LDFLAGS_SAFESH="-safeseh"
52172      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
52173      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
52174      # NOTE: Old build added -machine. Probably not needed.
52175      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
52176    else
52177      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
52178    fi
52179  elif test "x$TOOLCHAIN_TYPE" = xclang; then
52180      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
52181      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52182        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
52183        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
52184    fi
52185  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
52186    # If this is a --hash-style=gnu system, use --hash-style=both, why?
52187    # We have previously set HAS_GNU_HASH if this is the case
52188    if test -n "$HAS_GNU_HASH"; then
52189      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
52190      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
52191      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
52192    fi
52193      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52194        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
52195    fi
52196    if test "x$OPENJDK_BUILD_OS" = xlinux; then
52197      # And since we now know that the linker is gnu, then add -z defs, to forbid
52198      # undefined symbols in object files.
52199      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
52200      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
52201      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
52202      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
52203      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
52204      if test "x$OPENJDK_BUILD_CPU" = xx86; then
52205        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
52206      fi
52207      case $DEBUG_LEVEL in
52208        release )
52209          # tell linker to optimize libraries.
52210          # Should this be supplied to the OSS linker as well?
52211          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
52212          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
52213          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
52214          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52215            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52216          fi
52217          ;;
52218        slowdebug )
52219          # Hotspot always let the linker optimize
52220          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
52221          if test "x$HAS_LINKER_NOW" = "xtrue"; then
52222            # do relocations at load
52223            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
52224            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
52225            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
52226          fi
52227          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52228            # mark relocations read only
52229            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
52230            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
52231            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52232          fi
52233          ;;
52234        fastdebug )
52235          # Hotspot always let the linker optimize
52236          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
52237          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52238            # mark relocations read only
52239            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
52240            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
52241            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52242          fi
52243          ;;
52244        * )
52245          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
52246          ;;
52247        esac
52248    fi
52249  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52250    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
52251    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
52252    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
52253    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
52254    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
52255    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
52256      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
52257    fi
52258  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
52259    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
52260    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
52261    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
52262  fi
52263
52264  # Customize LDFLAGS for executables
52265
52266  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
52267
52268  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52269    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
52270      LDFLAGS_STACK_SIZE=1048576
52271    else
52272      LDFLAGS_STACK_SIZE=327680
52273    fi
52274    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
52275  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
52276    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
52277  fi
52278
52279  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
52280
52281  # Customize LDFLAGS for libs
52282  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
52283
52284  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
52285  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52286    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52287        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
52288    OPENJDK_BUILD_JDKLIB_LIBS=""
52289  else
52290    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52291        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
52292
52293    if test "xBUILD" = "xTARGET"; then
52294      # On some platforms (mac) the linker warns about non existing -L dirs.
52295      # For any of the variants server, client or minimal, the dir matches the
52296      # variant name. The "main" variant should be used for linking. For the
52297      # rest, the dir is just server.
52298      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
52299          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
52300        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52301            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
52302      else
52303        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52304            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52305      fi
52306    elif test "xBUILD" = "xBUILD"; then
52307      # When building a buildjdk, it's always only the server variant
52308      OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52309          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52310    fi
52311
52312    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
52313    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52314      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
52315    fi
52316
52317  fi
52318
52319OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
52320
52321  # Set OPENJDK_BUILD_JVM_LIBS (per os)
52322  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52323    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
52324  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
52325    # FIXME: This hard-coded path is not really proper.
52326    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
52327      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
52328    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
52329      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
52330    fi
52331    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
52332        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
52333  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52334    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
52335  elif test "x$OPENJDK_BUILD_OS" = xaix; then
52336    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
52337  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
52338    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
52339  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52340    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
52341        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
52342        wsock32.lib winmm.lib version.lib psapi.lib"
52343    fi
52344
52345  # Set OPENJDK_BUILD_JVM_ASFLAGS
52346  if test "x$OPENJDK_BUILD_OS" = xlinux; then
52347    if test "x$OPENJDK_BUILD_CPU" = xx86; then
52348      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
52349    fi
52350  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52351    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
52352  fi
52353
52354  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
52355
52356
52357
52358
52359
52360
52361
52362
52363
52364
52365
52366
52367
52368
52369
52370  # Tests are only ever compiled for TARGET
52371  # Flags for compiling test libraries
52372  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
52373  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
52374
52375  # Flags for compiling test executables
52376  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
52377  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
52378
52379
52380
52381
52382
52383
52384  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
52385  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
52386
52387
52388
52389
52390
52391
52392  # Check that the compiler supports -mX (or -qX on AIX) flags
52393  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
52394
52395
52396
52397
52398
52399
52400
52401
52402
52403
52404
52405
52406
52407
52408
52409
52410
52411
52412
52413
52414
52415
52416
52417
52418
52419
52420
52421
52422
52423
52424
52425
52426
52427
52428
52429
52430
52431
52432
52433
52434
52435
52436
52437
52438
52439
52440
52441    # Execute function body
52442
52443
52444
52445
52446
52447
52448
52449
52450
52451
52452
52453
52454
52455
52456
52457
52458
52459
52460
52461
52462
52463
52464
52465
52466
52467
52468
52469
52470
52471
52472
52473
52474
52475
52476
52477
52478
52479
52480
52481
52482
52483
52484
52485
52486
52487
52488
52489
52490    # Execute function body
52491
52492  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52493$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52494  supports=yes
52495
52496  saved_cflags="$CFLAGS"
52497  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
52498  ac_ext=c
52499ac_cpp='$CPP $CPPFLAGS'
52500ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52501ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52502ac_compiler_gnu=$ac_cv_c_compiler_gnu
52503
52504  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52505/* end confdefs.h.  */
52506int i;
52507_ACEOF
52508if ac_fn_c_try_compile "$LINENO"; then :
52509
52510else
52511  supports=no
52512fi
52513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52514  ac_ext=cpp
52515ac_cpp='$CXXCPP $CPPFLAGS'
52516ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52517ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52518ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52519
52520  CFLAGS="$saved_cflags"
52521
52522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52523$as_echo "$supports" >&6; }
52524  if test "x$supports" = "xyes" ; then
52525    :
52526    C_COMP_SUPPORTS="yes"
52527  else
52528    :
52529    C_COMP_SUPPORTS="no"
52530  fi
52531
52532
52533
52534
52535
52536
52537
52538
52539
52540
52541
52542
52543
52544
52545
52546
52547
52548
52549
52550
52551
52552
52553
52554
52555
52556
52557
52558
52559
52560
52561
52562
52563
52564
52565
52566
52567
52568
52569
52570
52571
52572
52573
52574
52575
52576
52577
52578
52579
52580
52581
52582
52583
52584
52585
52586
52587
52588
52589
52590    # Execute function body
52591
52592  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52593$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52594  supports=yes
52595
52596  saved_cxxflags="$CXXFLAGS"
52597  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
52598  ac_ext=cpp
52599ac_cpp='$CXXCPP $CPPFLAGS'
52600ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52601ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52602ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52603
52604  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52605/* end confdefs.h.  */
52606int i;
52607_ACEOF
52608if ac_fn_cxx_try_compile "$LINENO"; then :
52609
52610else
52611  supports=no
52612fi
52613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52614  ac_ext=cpp
52615ac_cpp='$CXXCPP $CPPFLAGS'
52616ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52617ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52618ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52619
52620  CXXFLAGS="$saved_cxxflags"
52621
52622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52623$as_echo "$supports" >&6; }
52624  if test "x$supports" = "xyes" ; then
52625    :
52626    CXX_COMP_SUPPORTS="yes"
52627  else
52628    :
52629    CXX_COMP_SUPPORTS="no"
52630  fi
52631
52632
52633
52634
52635
52636
52637
52638
52639
52640
52641
52642
52643
52644  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52645$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52646  supports=no
52647  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52648
52649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52650$as_echo "$supports" >&6; }
52651  if test "x$supports" = "xyes" ; then
52652    :
52653    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
52654  else
52655    :
52656    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
52657  fi
52658
52659
52660
52661
52662
52663
52664
52665
52666  # Check whether --enable-warnings-as-errors was given.
52667if test "${enable_warnings_as_errors+set}" = set; then :
52668  enableval=$enable_warnings_as_errors;
52669fi
52670
52671
52672  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
52673$as_echo_n "checking if native warnings are errors... " >&6; }
52674  if test "x$enable_warnings_as_errors" = "xyes"; then
52675    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitly set)" >&5
52676$as_echo "yes (explicitly set)" >&6; }
52677    WARNINGS_AS_ERRORS=true
52678  elif test "x$enable_warnings_as_errors" = "xno"; then
52679    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52680$as_echo "no" >&6; }
52681    WARNINGS_AS_ERRORS=false
52682  elif test "x$enable_warnings_as_errors" = "x"; then
52683    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
52684$as_echo "yes (default)" >&6; }
52685    WARNINGS_AS_ERRORS=true
52686  else
52687    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
52688  fi
52689
52690
52691
52692  case "${TOOLCHAIN_TYPE}" in
52693    microsoft)
52694      DISABLE_WARNING_PREFIX="-wd"
52695      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
52696      ;;
52697    solstudio)
52698      DISABLE_WARNING_PREFIX="-erroff="
52699      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
52700      ;;
52701    gcc)
52702      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
52703
52704
52705
52706
52707
52708
52709
52710
52711
52712
52713
52714
52715
52716
52717
52718
52719
52720
52721
52722
52723
52724
52725
52726
52727
52728
52729
52730
52731
52732
52733
52734
52735
52736
52737
52738
52739
52740
52741
52742
52743
52744
52745
52746
52747
52748
52749
52750    # Execute function body
52751
52752
52753
52754
52755
52756
52757
52758
52759
52760
52761
52762
52763
52764
52765
52766
52767
52768
52769
52770
52771
52772
52773
52774
52775
52776
52777
52778
52779
52780
52781
52782
52783
52784
52785
52786
52787
52788
52789
52790
52791
52792
52793
52794
52795
52796
52797
52798
52799    # Execute function body
52800
52801  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52802$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52803  supports=yes
52804
52805  saved_cflags="$CFLAGS"
52806  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52807  ac_ext=c
52808ac_cpp='$CPP $CPPFLAGS'
52809ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52810ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52811ac_compiler_gnu=$ac_cv_c_compiler_gnu
52812
52813  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52814/* end confdefs.h.  */
52815int i;
52816_ACEOF
52817if ac_fn_c_try_compile "$LINENO"; then :
52818
52819else
52820  supports=no
52821fi
52822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52823  ac_ext=cpp
52824ac_cpp='$CXXCPP $CPPFLAGS'
52825ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52826ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52827ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52828
52829  CFLAGS="$saved_cflags"
52830
52831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52832$as_echo "$supports" >&6; }
52833  if test "x$supports" = "xyes" ; then
52834    :
52835    C_COMP_SUPPORTS="yes"
52836  else
52837    :
52838    C_COMP_SUPPORTS="no"
52839  fi
52840
52841
52842
52843
52844
52845
52846
52847
52848
52849
52850
52851
52852
52853
52854
52855
52856
52857
52858
52859
52860
52861
52862
52863
52864
52865
52866
52867
52868
52869
52870
52871
52872
52873
52874
52875
52876
52877
52878
52879
52880
52881
52882
52883
52884
52885
52886
52887
52888
52889
52890
52891
52892
52893
52894
52895
52896
52897
52898
52899    # Execute function body
52900
52901  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52902$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52903  supports=yes
52904
52905  saved_cxxflags="$CXXFLAGS"
52906  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52907  ac_ext=cpp
52908ac_cpp='$CXXCPP $CPPFLAGS'
52909ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52910ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52911ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52912
52913  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52914/* end confdefs.h.  */
52915int i;
52916_ACEOF
52917if ac_fn_cxx_try_compile "$LINENO"; then :
52918
52919else
52920  supports=no
52921fi
52922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52923  ac_ext=cpp
52924ac_cpp='$CXXCPP $CPPFLAGS'
52925ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52926ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52927ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52928
52929  CXXFLAGS="$saved_cxxflags"
52930
52931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52932$as_echo "$supports" >&6; }
52933  if test "x$supports" = "xyes" ; then
52934    :
52935    CXX_COMP_SUPPORTS="yes"
52936  else
52937    :
52938    CXX_COMP_SUPPORTS="no"
52939  fi
52940
52941
52942
52943
52944
52945
52946
52947
52948
52949
52950
52951
52952
52953  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52954$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52955  supports=no
52956  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52957
52958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52959$as_echo "$supports" >&6; }
52960  if test "x$supports" = "xyes" ; then
52961    :
52962    GCC_CAN_DISABLE_WARNINGS=true
52963  else
52964    :
52965    GCC_CAN_DISABLE_WARNINGS=false
52966
52967  fi
52968
52969
52970
52971
52972
52973
52974      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52975        DISABLE_WARNING_PREFIX="-Wno-"
52976      else
52977        DISABLE_WARNING_PREFIX=
52978      fi
52979      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52980      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52981      # CFLAGS since any target specific flags will likely not work with the
52982      # build compiler
52983      CC_OLD="$CC"
52984      CXX_OLD="$CXX"
52985      CC="$BUILD_CC"
52986      CXX="$BUILD_CXX"
52987      CFLAGS_OLD="$CFLAGS"
52988      CFLAGS=""
52989
52990
52991
52992
52993
52994
52995
52996
52997
52998
52999
53000
53001
53002
53003
53004
53005
53006
53007
53008
53009
53010
53011
53012
53013
53014
53015
53016
53017
53018
53019
53020
53021
53022
53023
53024
53025
53026
53027
53028
53029
53030
53031
53032
53033
53034
53035
53036    # Execute function body
53037
53038
53039
53040
53041
53042
53043
53044
53045
53046
53047
53048
53049
53050
53051
53052
53053
53054
53055
53056
53057
53058
53059
53060
53061
53062
53063
53064
53065
53066
53067
53068
53069
53070
53071
53072
53073
53074
53075
53076
53077
53078
53079
53080
53081
53082
53083
53084
53085    # Execute function body
53086
53087  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53088$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53089  supports=yes
53090
53091  saved_cflags="$CFLAGS"
53092  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
53093  ac_ext=c
53094ac_cpp='$CPP $CPPFLAGS'
53095ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53096ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53097ac_compiler_gnu=$ac_cv_c_compiler_gnu
53098
53099  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53100/* end confdefs.h.  */
53101int i;
53102_ACEOF
53103if ac_fn_c_try_compile "$LINENO"; then :
53104
53105else
53106  supports=no
53107fi
53108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53109  ac_ext=cpp
53110ac_cpp='$CXXCPP $CPPFLAGS'
53111ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53112ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53113ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53114
53115  CFLAGS="$saved_cflags"
53116
53117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53118$as_echo "$supports" >&6; }
53119  if test "x$supports" = "xyes" ; then
53120    :
53121    C_COMP_SUPPORTS="yes"
53122  else
53123    :
53124    C_COMP_SUPPORTS="no"
53125  fi
53126
53127
53128
53129
53130
53131
53132
53133
53134
53135
53136
53137
53138
53139
53140
53141
53142
53143
53144
53145
53146
53147
53148
53149
53150
53151
53152
53153
53154
53155
53156
53157
53158
53159
53160
53161
53162
53163
53164
53165
53166
53167
53168
53169
53170
53171
53172
53173
53174
53175
53176
53177
53178
53179
53180
53181
53182
53183
53184
53185    # Execute function body
53186
53187  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53188$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53189  supports=yes
53190
53191  saved_cxxflags="$CXXFLAGS"
53192  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
53193  ac_ext=cpp
53194ac_cpp='$CXXCPP $CPPFLAGS'
53195ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53196ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53197ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53198
53199  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53200/* end confdefs.h.  */
53201int i;
53202_ACEOF
53203if ac_fn_cxx_try_compile "$LINENO"; then :
53204
53205else
53206  supports=no
53207fi
53208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53209  ac_ext=cpp
53210ac_cpp='$CXXCPP $CPPFLAGS'
53211ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53212ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53213ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53214
53215  CXXFLAGS="$saved_cxxflags"
53216
53217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53218$as_echo "$supports" >&6; }
53219  if test "x$supports" = "xyes" ; then
53220    :
53221    CXX_COMP_SUPPORTS="yes"
53222  else
53223    :
53224    CXX_COMP_SUPPORTS="no"
53225  fi
53226
53227
53228
53229
53230
53231
53232
53233
53234
53235
53236
53237
53238
53239  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53240$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53241  supports=no
53242  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
53243
53244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53245$as_echo "$supports" >&6; }
53246  if test "x$supports" = "xyes" ; then
53247    :
53248    BUILD_CC_CAN_DISABLE_WARNINGS=true
53249  else
53250    :
53251    BUILD_CC_CAN_DISABLE_WARNINGS=false
53252
53253  fi
53254
53255
53256
53257
53258
53259
53260      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
53261        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
53262      else
53263        BUILD_CC_DISABLE_WARNING_PREFIX=
53264      fi
53265      CC="$CC_OLD"
53266      CXX="$CXX_OLD"
53267      CFLAGS="$CFLAGS_OLD"
53268      ;;
53269    clang)
53270      DISABLE_WARNING_PREFIX="-Wno-"
53271      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
53272      ;;
53273    xlc)
53274      DISABLE_WARNING_PREFIX="-qsuppress="
53275      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
53276      ;;
53277  esac
53278
53279
53280
53281
53282
53283# Setup debug symbols (need objcopy from the toolchain for that)
53284
53285  #
53286  # NATIVE_DEBUG_SYMBOLS
53287  # This must be done after the toolchain is setup, since we're looking at objcopy.
53288  #
53289  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
53290$as_echo_n "checking what type of native debug symbols to use... " >&6; }
53291
53292# Check whether --with-native-debug-symbols was given.
53293if test "${with_native_debug_symbols+set}" = set; then :
53294  withval=$with_native_debug_symbols;
53295        if test "x$OPENJDK_TARGET_OS" = xaix; then
53296          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
53297            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
53298          fi
53299        fi
53300
53301else
53302
53303        if test "x$OPENJDK_TARGET_OS" = xaix; then
53304          # AIX doesn't support 'zipped' so use 'internal' as default
53305          with_native_debug_symbols="internal"
53306        else
53307          if test "x$STATIC_BUILD" = xtrue; then
53308            with_native_debug_symbols="none"
53309          else
53310            with_native_debug_symbols="zipped"
53311          fi
53312        fi
53313
53314fi
53315
53316  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
53317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
53318$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
53319
53320  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
53321
53322    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53323      if test "x$OBJCOPY" = x; then
53324        # enabling of enable-debug-symbols and can't find objcopy
53325        # this is an error
53326        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53327      fi
53328    fi
53329
53330    COMPILE_WITH_DEBUG_SYMBOLS=true
53331    COPY_DEBUG_SYMBOLS=true
53332    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
53333  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
53334    COMPILE_WITH_DEBUG_SYMBOLS=false
53335    COPY_DEBUG_SYMBOLS=false
53336    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53337  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
53338    COMPILE_WITH_DEBUG_SYMBOLS=true
53339    COPY_DEBUG_SYMBOLS=false
53340    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53341  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
53342
53343    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53344      if test "x$OBJCOPY" = x; then
53345        # enabling of enable-debug-symbols and can't find objcopy
53346        # this is an error
53347        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53348      fi
53349    fi
53350
53351    COMPILE_WITH_DEBUG_SYMBOLS=true
53352    COPY_DEBUG_SYMBOLS=true
53353    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53354  else
53355    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
53356  fi
53357
53358  # --enable-debug-symbols is deprecated.
53359  # Please use --with-native-debug-symbols=[internal,external,zipped] .
53360
53361  # Check whether --enable-debug-symbols was given.
53362if test "${enable_debug_symbols+set}" = set; then :
53363  enableval=$enable_debug_symbols;
53364fi
53365
53366  if test "x$enable_debug_symbols" != x; then
53367    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
53368$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
53369
53370    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
53371      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
53372$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
53373    fi
53374
53375  fi
53376
53377
53378  # --enable-zip-debug-info is deprecated.
53379  # Please use --with-native-debug-symbols=zipped .
53380
53381  # Check whether --enable-zip-debug-info was given.
53382if test "${enable_zip_debug_info+set}" = set; then :
53383  enableval=$enable_zip_debug_info;
53384fi
53385
53386  if test "x$enable_zip_debug_info" != x; then
53387    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
53388$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
53389
53390    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
53391      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
53392$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
53393    fi
53394
53395  fi
53396
53397
53398
53399
53400
53401
53402
53403  # Check whether --enable-native-coverage was given.
53404if test "${enable_native_coverage+set}" = set; then :
53405  enableval=$enable_native_coverage;
53406fi
53407
53408  GCOV_ENABLED="false"
53409  if test "x$enable_native_coverage" = "xyes"; then
53410    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
53411      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
53412$as_echo_n "checking if native coverage is enabled... " >&6; }
53413      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53414$as_echo "yes" >&6; }
53415      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
53416      GCOV_LDFLAGS="-fprofile-arcs"
53417      JVM_CFLAGS="$JVM_CFLAGS $GCOV_CFLAGS"
53418      JVM_LDFLAGS="$JVM_LDFLAGS $GCOV_LDFLAGS"
53419      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
53420      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
53421      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
53422      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
53423      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
53424      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
53425      GCOV_ENABLED="true"
53426    else
53427      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
53428    fi
53429  elif test "x$enable_native_coverage" = "xno"; then
53430    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
53431$as_echo_n "checking if native coverage is enabled... " >&6; }
53432    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53433$as_echo "no" >&6; }
53434  elif test "x$enable_native_coverage" != "x"; then
53435    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
53436  fi
53437
53438
53439
53440
53441# Need toolchain to setup dtrace
53442
53443  # Test for dtrace dependencies
53444  # Check whether --enable-dtrace was given.
53445if test "${enable_dtrace+set}" = set; then :
53446  enableval=$enable_dtrace;
53447fi
53448
53449
53450  DTRACE_DEP_MISSING=false
53451
53452  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
53453$as_echo_n "checking for dtrace tool... " >&6; }
53454  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
53455    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
53456$as_echo "$DTRACE" >&6; }
53457  else
53458    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
53459$as_echo "not found, cannot build dtrace" >&6; }
53460    DTRACE_DEP_MISSING=true
53461  fi
53462
53463  for ac_header in sys/sdt.h
53464do :
53465  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
53466if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
53467  cat >>confdefs.h <<_ACEOF
53468#define HAVE_SYS_SDT_H 1
53469_ACEOF
53470 DTRACE_HEADERS_OK=yes
53471else
53472  DTRACE_HEADERS_OK=no
53473fi
53474
53475done
53476
53477  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
53478    DTRACE_DEP_MISSING=true
53479  fi
53480
53481  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
53482$as_echo_n "checking if dtrace should be built... " >&6; }
53483  if test "x$enable_dtrace" = "xyes"; then
53484    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
53485      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
53486$as_echo "no, missing dependencies" >&6; }
53487
53488  # Print a helpful message on how to acquire the necessary build dependency.
53489  # dtrace is the help tag: freetype, cups, alsa etc
53490  MISSING_DEPENDENCY=dtrace
53491
53492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53493    cygwin_help $MISSING_DEPENDENCY
53494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53495    msys_help $MISSING_DEPENDENCY
53496  else
53497    PKGHANDLER_COMMAND=
53498
53499    case $PKGHANDLER in
53500      apt-get)
53501        apt_help     $MISSING_DEPENDENCY ;;
53502      yum)
53503        yum_help     $MISSING_DEPENDENCY ;;
53504      brew)
53505        brew_help    $MISSING_DEPENDENCY ;;
53506      port)
53507        port_help    $MISSING_DEPENDENCY ;;
53508      pkgutil)
53509        pkgutil_help $MISSING_DEPENDENCY ;;
53510      pkgadd)
53511        pkgadd_help  $MISSING_DEPENDENCY ;;
53512    esac
53513
53514    if test "x$PKGHANDLER_COMMAND" != x; then
53515      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53516    fi
53517  fi
53518
53519      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
53520    else
53521      INCLUDE_DTRACE=true
53522      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
53523$as_echo "yes, forced" >&6; }
53524    fi
53525  elif test "x$enable_dtrace" = "xno"; then
53526    INCLUDE_DTRACE=false
53527    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53528$as_echo "no, forced" >&6; }
53529  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
53530    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
53531      INCLUDE_DTRACE=false
53532      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
53533$as_echo "no, missing dependencies" >&6; }
53534    else
53535      INCLUDE_DTRACE=true
53536      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
53537$as_echo "yes, dependencies present" >&6; }
53538    fi
53539  else
53540    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
53541  fi
53542
53543
53544  # Check whether --enable-aot was given.
53545if test "${enable_aot+set}" = set; then :
53546  enableval=$enable_aot;
53547fi
53548
53549
53550  if test "x$enable_aot" = "x" || test "x$enable_aot" = "xauto"; then
53551    ENABLE_AOT="true"
53552  elif test "x$enable_aot" = "xyes"; then
53553    ENABLE_AOT="true"
53554  elif test "x$enable_aot" = "xno"; then
53555    ENABLE_AOT="false"
53556    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
53557$as_echo_n "checking if aot should be enabled... " >&6; }
53558    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53559$as_echo "no, forced" >&6; }
53560  else
53561    as_fn_error $? "Invalid value for --enable-aot: $enable_aot" "$LINENO" 5
53562  fi
53563
53564  if test "x$ENABLE_AOT" = "xtrue"; then
53565    # Only enable AOT on linux-X64.
53566    if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = "xlinux-x86_64"; then
53567      if test -e "$HOTSPOT_TOPDIR/src/jdk.aot"; then
53568        if test -e "$HOTSPOT_TOPDIR/src/jdk.internal.vm.compiler"; then
53569          ENABLE_AOT="true"
53570        else
53571          ENABLE_AOT="false"
53572          if test "x$enable_aot" = "xyes"; then
53573            as_fn_error $? "Cannot build AOT without hotspot/src/jdk.internal.vm.compiler sources. Remove --enable-aot." "$LINENO" 5
53574          fi
53575        fi
53576      else
53577        ENABLE_AOT="false"
53578        if test "x$enable_aot" = "xyes"; then
53579          as_fn_error $? "Cannot build AOT without hotspot/src/jdk.aot sources. Remove --enable-aot." "$LINENO" 5
53580        fi
53581      fi
53582    else
53583      ENABLE_AOT="false"
53584      if test "x$enable_aot" = "xyes"; then
53585        as_fn_error $? "AOT is currently only supported on Linux-x86_64. Remove --enable-aot." "$LINENO" 5
53586      fi
53587    fi
53588  fi
53589
53590
53591
53592
53593  # Check whether --enable-hotspot-gtest was given.
53594if test "${enable_hotspot_gtest+set}" = set; then :
53595  enableval=$enable_hotspot_gtest;
53596fi
53597
53598
53599  if test -e "$HOTSPOT_TOPDIR/test/native"; then
53600    GTEST_DIR_EXISTS="true"
53601  else
53602    GTEST_DIR_EXISTS="false"
53603  fi
53604
53605  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
53606$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
53607  if test "x$enable_hotspot_gtest" = "xyes"; then
53608    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
53609      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
53610$as_echo "yes, forced" >&6; }
53611      BUILD_GTEST="true"
53612    else
53613      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
53614    fi
53615  elif test "x$enable_hotspot_gtest" = "xno"; then
53616    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53617$as_echo "no, forced" >&6; }
53618    BUILD_GTEST="false"
53619  elif test "x$enable_hotspot_gtest" = "x"; then
53620    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
53621      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53622$as_echo "yes" >&6; }
53623      BUILD_GTEST="true"
53624    else
53625      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53626$as_echo "no" >&6; }
53627      BUILD_GTEST="false"
53628    fi
53629  else
53630    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
53631  fi
53632
53633
53634
53635
53636###############################################################################
53637#
53638# Check dependencies for external and internal libraries.
53639#
53640###############################################################################
53641
53642# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
53643
53644  # When using cygwin or msys, we need a wrapper binary that renames
53645  # /cygdrive/c/ arguments into c:/ arguments and peeks into
53646  # @files and rewrites these too! This wrapper binary is
53647  # called fixpath.
53648  FIXPATH=
53649  if test "x$OPENJDK_BUILD_OS" = xwindows; then
53650    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
53651$as_echo_n "checking if fixpath can be created... " >&6; }
53652    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
53653    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
53654    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
53655    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
53656      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
53657      FIXPATH="$FIXPATH_BIN -c"
53658    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
53659      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
53660      # @ was chosen as separator to minimize risk of other tools messing around with it
53661      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
53662          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
53663      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
53664      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
53665    fi
53666    FIXPATH_SRC_W="$FIXPATH_SRC"
53667    FIXPATH_BIN_W="$FIXPATH_BIN"
53668
53669  unix_path="$FIXPATH_SRC_W"
53670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53671    windows_path=`$CYGPATH -m "$unix_path"`
53672    FIXPATH_SRC_W="$windows_path"
53673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53674    windows_path=`cmd //c echo $unix_path`
53675    FIXPATH_SRC_W="$windows_path"
53676  fi
53677
53678
53679  unix_path="$FIXPATH_BIN_W"
53680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53681    windows_path=`$CYGPATH -m "$unix_path"`
53682    FIXPATH_BIN_W="$windows_path"
53683  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53684    windows_path=`cmd //c echo $unix_path`
53685    FIXPATH_BIN_W="$windows_path"
53686  fi
53687
53688    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
53689    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
53690    cd $FIXPATH_DIR
53691    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
53692    cd $CURDIR
53693
53694    if test ! -x $FIXPATH_BIN; then
53695      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53696$as_echo "no" >&6; }
53697      cat $FIXPATH_DIR/fixpath1.log
53698      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
53699    fi
53700    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53701$as_echo "yes" >&6; }
53702    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
53703$as_echo_n "checking if fixpath.exe works... " >&6; }
53704    cd $FIXPATH_DIR
53705    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
53706        > $FIXPATH_DIR/fixpath2.log 2>&1
53707    cd $CURDIR
53708    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
53709      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53710$as_echo "no" >&6; }
53711      cat $FIXPATH_DIR/fixpath2.log
53712      as_fn_error $? "fixpath did not work!" "$LINENO" 5
53713    fi
53714    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53715$as_echo "yes" >&6; }
53716
53717    FIXPATH_DETACH_FLAG="--detach"
53718  fi
53719
53720
53721
53722
53723
53724
53725  # Check if X11 is needed
53726  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
53727    # No X11 support on windows or macosx
53728    NEEDS_LIB_X11=false
53729  else
53730    # All other instances need X11, even if building headless only, libawt still
53731    # needs X11 headers.
53732    NEEDS_LIB_X11=true
53733  fi
53734
53735  # Check if cups is needed
53736  if test "x$OPENJDK_TARGET_OS" = xwindows; then
53737    # Windows have a separate print system
53738    NEEDS_LIB_CUPS=false
53739  else
53740    NEEDS_LIB_CUPS=true
53741  fi
53742
53743  # A custom hook may have set this already
53744  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
53745    NEEDS_LIB_FREETYPE=true
53746  fi
53747
53748  # Check if alsa is needed
53749  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53750    NEEDS_LIB_ALSA=true
53751  else
53752    NEEDS_LIB_ALSA=false
53753  fi
53754
53755  # Check if ffi is needed
53756  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53757    NEEDS_LIB_FFI=true
53758  else
53759    NEEDS_LIB_FFI=false
53760  fi
53761
53762
53763  # statically link libstdc++ before C++ ABI is stablized on Linux unless
53764  # dynamic build is configured on command line.
53765
53766# Check whether --with-stdc++lib was given.
53767if test "${with_stdc__lib+set}" = set; then :
53768  withval=$with_stdc__lib;
53769        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53770                && test "x$with_stdc__lib" != xdefault; then
53771          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53772        fi
53773
53774else
53775  with_stdc__lib=default
53776
53777fi
53778
53779
53780  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53781    # Test if stdc++ can be linked statically.
53782    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53783$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53784    STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
53785    ac_ext=cpp
53786ac_cpp='$CXXCPP $CPPFLAGS'
53787ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53788ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53789ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53790
53791    OLD_LIBS="$LIBS"
53792    LIBS="$STATIC_STDCXX_FLAGS"
53793    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53794/* end confdefs.h.  */
53795
53796int
53797main ()
53798{
53799return 0;
53800  ;
53801  return 0;
53802}
53803_ACEOF
53804if ac_fn_cxx_try_link "$LINENO"; then :
53805  has_static_libstdcxx=yes
53806else
53807  has_static_libstdcxx=no
53808fi
53809rm -f core conftest.err conftest.$ac_objext \
53810    conftest$ac_exeext conftest.$ac_ext
53811    LIBS="$OLD_LIBS"
53812    ac_ext=cpp
53813ac_cpp='$CXXCPP $CPPFLAGS'
53814ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53815ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53816ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53817
53818    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53819$as_echo "$has_static_libstdcxx" >&6; }
53820
53821    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53822      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53823    fi
53824
53825    # If dynamic was requested, it's available since it would fail above otherwise.
53826    # If dynamic wasn't requested, go with static unless it isn't available.
53827    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53828$as_echo_n "checking how to link with libstdc++... " >&6; }
53829    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
53830        ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53831      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53832$as_echo "dynamic" >&6; }
53833    else
53834      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53835      JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53836      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53837      # just use the same setting as for the TARGET toolchain.
53838      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53839      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53840$as_echo "static" >&6; }
53841    fi
53842  fi
53843
53844  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53845  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53846    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53847  fi
53848
53849
53850
53851  # Setup Windows runtime dlls
53852  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53853
53854
53855# Check whether --with-msvcr-dll was given.
53856if test "${with_msvcr_dll+set}" = set; then :
53857  withval=$with_msvcr_dll;
53858fi
53859
53860
53861  if test "x$with_msvcr_dll" != x; then
53862    # If given explicitly by user, do not probe. If not present, fail directly.
53863
53864  DLL_NAME="$MSVCR_NAME"
53865  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53866  METHOD="--with-msvcr-dll"
53867  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53868    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53869$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53870
53871    # Need to check if the found msvcr is correct architecture
53872    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53873$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53874    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53875    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53876      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53877      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53878      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53879        CORRECT_MSVCR_ARCH="PE32 executable"
53880      else
53881        CORRECT_MSVCR_ARCH="PE32+ executable"
53882      fi
53883    else
53884      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53885        CORRECT_MSVCR_ARCH=386
53886      else
53887        CORRECT_MSVCR_ARCH=x86-64
53888      fi
53889    fi
53890    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53891      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53892$as_echo "ok" >&6; }
53893      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53894
53895  # Only process if variable expands to non-empty
53896
53897  if test "x$MSVC_DLL" != x; then
53898    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53899
53900  # Input might be given as Windows format, start by converting to
53901  # unix format.
53902  path="$MSVC_DLL"
53903  new_path=`$CYGPATH -u "$path"`
53904
53905  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53906  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53907  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53908  # "foo.exe" is OK but "foo" is an error.
53909  #
53910  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53911  # It is also a way to make sure we got the proper file name for the real test later on.
53912  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53913  if test "x$test_shortpath" = x; then
53914    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53915$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53916    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53917  fi
53918
53919  # Call helper function which possibly converts this using DOS-style short mode.
53920  # If so, the updated path is stored in $new_path.
53921
53922  input_path="$new_path"
53923  # Check if we need to convert this using DOS-style short mode. If the path
53924  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53925  # take no chances and rewrite it.
53926  # Note: m4 eats our [], so we need to use [ and ] instead.
53927  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53928  if test "x$has_forbidden_chars" != x; then
53929    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53930    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53931    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53932    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53933      # Going to short mode and back again did indeed matter. Since short mode is
53934      # case insensitive, let's make it lowercase to improve readability.
53935      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53936      # Now convert it back to Unix-style (cygpath)
53937      input_path=`$CYGPATH -u "$shortmode_path"`
53938      new_path="$input_path"
53939    fi
53940  fi
53941
53942  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53943  if test "x$test_cygdrive_prefix" = x; then
53944    # As a simple fix, exclude /usr/bin since it's not a real path.
53945    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53946      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53947      # a path prefixed by /cygdrive for fixpath to work.
53948      new_path="$CYGWIN_ROOT_PATH$input_path"
53949    fi
53950  fi
53951
53952
53953  if test "x$path" != "x$new_path"; then
53954    MSVC_DLL="$new_path"
53955    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53956$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53957  fi
53958
53959    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53960
53961  path="$MSVC_DLL"
53962  has_colon=`$ECHO $path | $GREP ^.:`
53963  new_path="$path"
53964  if test "x$has_colon" = x; then
53965    # Not in mixed or Windows style, start by that.
53966    new_path=`cmd //c echo $path`
53967  fi
53968
53969
53970  input_path="$new_path"
53971  # Check if we need to convert this using DOS-style short mode. If the path
53972  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53973  # take no chances and rewrite it.
53974  # Note: m4 eats our [], so we need to use [ and ] instead.
53975  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53976  if test "x$has_forbidden_chars" != x; then
53977    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53978    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53979  fi
53980
53981
53982  windows_path="$new_path"
53983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53984    unix_path=`$CYGPATH -u "$windows_path"`
53985    new_path="$unix_path"
53986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53987    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53988    new_path="$unix_path"
53989  fi
53990
53991  if test "x$path" != "x$new_path"; then
53992    MSVC_DLL="$new_path"
53993    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53994$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53995  fi
53996
53997  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53998  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53999
54000    else
54001      # We're on a unix platform. Hooray! :)
54002      path="$MSVC_DLL"
54003      has_space=`$ECHO "$path" | $GREP " "`
54004      if test "x$has_space" != x; then
54005        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54006$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54007        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54008      fi
54009
54010      # Use eval to expand a potential ~
54011      eval path="$path"
54012      if test ! -f "$path" && test ! -d "$path"; then
54013        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54014      fi
54015
54016      if test -d "$path"; then
54017        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54018      else
54019        dir="`$DIRNAME "$path"`"
54020        base="`$BASENAME "$path"`"
54021        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54022      fi
54023    fi
54024  fi
54025
54026      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54027$as_echo_n "checking for $DLL_NAME... " >&6; }
54028      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54029$as_echo "$MSVC_DLL" >&6; }
54030    else
54031      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54032$as_echo "incorrect, ignoring" >&6; }
54033      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54034$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54035    fi
54036  fi
54037
54038    if test "x$MSVC_DLL" = x; then
54039      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
54040    fi
54041    MSVCR_DLL="$MSVC_DLL"
54042  elif test "x$DEVKIT_MSVCR_DLL" != x; then
54043
54044  DLL_NAME="$MSVCR_NAME"
54045  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
54046  METHOD="devkit"
54047  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54048    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54049$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54050
54051    # Need to check if the found msvcr is correct architecture
54052    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54053$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54054    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54055    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54056      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54057      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54058      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54059        CORRECT_MSVCR_ARCH="PE32 executable"
54060      else
54061        CORRECT_MSVCR_ARCH="PE32+ executable"
54062      fi
54063    else
54064      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54065        CORRECT_MSVCR_ARCH=386
54066      else
54067        CORRECT_MSVCR_ARCH=x86-64
54068      fi
54069    fi
54070    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54071      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54072$as_echo "ok" >&6; }
54073      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54074
54075  # Only process if variable expands to non-empty
54076
54077  if test "x$MSVC_DLL" != x; then
54078    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54079
54080  # Input might be given as Windows format, start by converting to
54081  # unix format.
54082  path="$MSVC_DLL"
54083  new_path=`$CYGPATH -u "$path"`
54084
54085  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54086  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54087  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54088  # "foo.exe" is OK but "foo" is an error.
54089  #
54090  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54091  # It is also a way to make sure we got the proper file name for the real test later on.
54092  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54093  if test "x$test_shortpath" = x; then
54094    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54095$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54096    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54097  fi
54098
54099  # Call helper function which possibly converts this using DOS-style short mode.
54100  # If so, the updated path is stored in $new_path.
54101
54102  input_path="$new_path"
54103  # Check if we need to convert this using DOS-style short mode. If the path
54104  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54105  # take no chances and rewrite it.
54106  # Note: m4 eats our [], so we need to use [ and ] instead.
54107  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54108  if test "x$has_forbidden_chars" != x; then
54109    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54110    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54111    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54112    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54113      # Going to short mode and back again did indeed matter. Since short mode is
54114      # case insensitive, let's make it lowercase to improve readability.
54115      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54116      # Now convert it back to Unix-style (cygpath)
54117      input_path=`$CYGPATH -u "$shortmode_path"`
54118      new_path="$input_path"
54119    fi
54120  fi
54121
54122  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54123  if test "x$test_cygdrive_prefix" = x; then
54124    # As a simple fix, exclude /usr/bin since it's not a real path.
54125    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54126      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54127      # a path prefixed by /cygdrive for fixpath to work.
54128      new_path="$CYGWIN_ROOT_PATH$input_path"
54129    fi
54130  fi
54131
54132
54133  if test "x$path" != "x$new_path"; then
54134    MSVC_DLL="$new_path"
54135    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54136$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54137  fi
54138
54139    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54140
54141  path="$MSVC_DLL"
54142  has_colon=`$ECHO $path | $GREP ^.:`
54143  new_path="$path"
54144  if test "x$has_colon" = x; then
54145    # Not in mixed or Windows style, start by that.
54146    new_path=`cmd //c echo $path`
54147  fi
54148
54149
54150  input_path="$new_path"
54151  # Check if we need to convert this using DOS-style short mode. If the path
54152  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54153  # take no chances and rewrite it.
54154  # Note: m4 eats our [], so we need to use [ and ] instead.
54155  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54156  if test "x$has_forbidden_chars" != x; then
54157    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54158    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54159  fi
54160
54161
54162  windows_path="$new_path"
54163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54164    unix_path=`$CYGPATH -u "$windows_path"`
54165    new_path="$unix_path"
54166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54167    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54168    new_path="$unix_path"
54169  fi
54170
54171  if test "x$path" != "x$new_path"; then
54172    MSVC_DLL="$new_path"
54173    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54174$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54175  fi
54176
54177  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54178  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54179
54180    else
54181      # We're on a unix platform. Hooray! :)
54182      path="$MSVC_DLL"
54183      has_space=`$ECHO "$path" | $GREP " "`
54184      if test "x$has_space" != x; then
54185        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54186$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54187        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54188      fi
54189
54190      # Use eval to expand a potential ~
54191      eval path="$path"
54192      if test ! -f "$path" && test ! -d "$path"; then
54193        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54194      fi
54195
54196      if test -d "$path"; then
54197        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54198      else
54199        dir="`$DIRNAME "$path"`"
54200        base="`$BASENAME "$path"`"
54201        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54202      fi
54203    fi
54204  fi
54205
54206      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54207$as_echo_n "checking for $DLL_NAME... " >&6; }
54208      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54209$as_echo "$MSVC_DLL" >&6; }
54210    else
54211      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54212$as_echo "incorrect, ignoring" >&6; }
54213      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54214$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54215    fi
54216  fi
54217
54218    if test "x$MSVC_DLL" = x; then
54219      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
54220    fi
54221    MSVCR_DLL="$MSVC_DLL"
54222  else
54223
54224  DLL_NAME="${MSVCR_NAME}"
54225  MSVC_DLL=
54226
54227  if test "x$MSVC_DLL" = x; then
54228    # Probe: Using well-known location from Visual Studio 10.0
54229    if test "x$VCINSTALLDIR" != x; then
54230      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54231
54232  windows_path="$CYGWIN_VC_INSTALL_DIR"
54233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54234    unix_path=`$CYGPATH -u "$windows_path"`
54235    CYGWIN_VC_INSTALL_DIR="$unix_path"
54236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54237    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54238    CYGWIN_VC_INSTALL_DIR="$unix_path"
54239  fi
54240
54241      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54242        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54243      else
54244        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54245      fi
54246      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54247
54248  DLL_NAME="$DLL_NAME"
54249  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54250  METHOD="well-known location in VCINSTALLDIR"
54251  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54252    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54253$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54254
54255    # Need to check if the found msvcr is correct architecture
54256    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54257$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54258    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54259    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54260      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54261      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54262      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54263        CORRECT_MSVCR_ARCH="PE32 executable"
54264      else
54265        CORRECT_MSVCR_ARCH="PE32+ executable"
54266      fi
54267    else
54268      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54269        CORRECT_MSVCR_ARCH=386
54270      else
54271        CORRECT_MSVCR_ARCH=x86-64
54272      fi
54273    fi
54274    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54275      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54276$as_echo "ok" >&6; }
54277      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54278
54279  # Only process if variable expands to non-empty
54280
54281  if test "x$MSVC_DLL" != x; then
54282    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54283
54284  # Input might be given as Windows format, start by converting to
54285  # unix format.
54286  path="$MSVC_DLL"
54287  new_path=`$CYGPATH -u "$path"`
54288
54289  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54290  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54291  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54292  # "foo.exe" is OK but "foo" is an error.
54293  #
54294  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54295  # It is also a way to make sure we got the proper file name for the real test later on.
54296  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54297  if test "x$test_shortpath" = x; then
54298    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54299$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54300    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54301  fi
54302
54303  # Call helper function which possibly converts this using DOS-style short mode.
54304  # If so, the updated path is stored in $new_path.
54305
54306  input_path="$new_path"
54307  # Check if we need to convert this using DOS-style short mode. If the path
54308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54309  # take no chances and rewrite it.
54310  # Note: m4 eats our [], so we need to use [ and ] instead.
54311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54312  if test "x$has_forbidden_chars" != x; then
54313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54314    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54315    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54316    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54317      # Going to short mode and back again did indeed matter. Since short mode is
54318      # case insensitive, let's make it lowercase to improve readability.
54319      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54320      # Now convert it back to Unix-style (cygpath)
54321      input_path=`$CYGPATH -u "$shortmode_path"`
54322      new_path="$input_path"
54323    fi
54324  fi
54325
54326  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54327  if test "x$test_cygdrive_prefix" = x; then
54328    # As a simple fix, exclude /usr/bin since it's not a real path.
54329    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54330      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54331      # a path prefixed by /cygdrive for fixpath to work.
54332      new_path="$CYGWIN_ROOT_PATH$input_path"
54333    fi
54334  fi
54335
54336
54337  if test "x$path" != "x$new_path"; then
54338    MSVC_DLL="$new_path"
54339    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54340$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54341  fi
54342
54343    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54344
54345  path="$MSVC_DLL"
54346  has_colon=`$ECHO $path | $GREP ^.:`
54347  new_path="$path"
54348  if test "x$has_colon" = x; then
54349    # Not in mixed or Windows style, start by that.
54350    new_path=`cmd //c echo $path`
54351  fi
54352
54353
54354  input_path="$new_path"
54355  # Check if we need to convert this using DOS-style short mode. If the path
54356  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54357  # take no chances and rewrite it.
54358  # Note: m4 eats our [], so we need to use [ and ] instead.
54359  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54360  if test "x$has_forbidden_chars" != x; then
54361    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54362    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54363  fi
54364
54365
54366  windows_path="$new_path"
54367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54368    unix_path=`$CYGPATH -u "$windows_path"`
54369    new_path="$unix_path"
54370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54372    new_path="$unix_path"
54373  fi
54374
54375  if test "x$path" != "x$new_path"; then
54376    MSVC_DLL="$new_path"
54377    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54378$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54379  fi
54380
54381  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54382  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54383
54384    else
54385      # We're on a unix platform. Hooray! :)
54386      path="$MSVC_DLL"
54387      has_space=`$ECHO "$path" | $GREP " "`
54388      if test "x$has_space" != x; then
54389        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54390$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54391        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54392      fi
54393
54394      # Use eval to expand a potential ~
54395      eval path="$path"
54396      if test ! -f "$path" && test ! -d "$path"; then
54397        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54398      fi
54399
54400      if test -d "$path"; then
54401        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54402      else
54403        dir="`$DIRNAME "$path"`"
54404        base="`$BASENAME "$path"`"
54405        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54406      fi
54407    fi
54408  fi
54409
54410      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54411$as_echo_n "checking for $DLL_NAME... " >&6; }
54412      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54413$as_echo "$MSVC_DLL" >&6; }
54414    else
54415      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54416$as_echo "incorrect, ignoring" >&6; }
54417      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54418$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54419    fi
54420  fi
54421
54422    fi
54423  fi
54424
54425  if test "x$MSVC_DLL" = x; then
54426    # Probe: Check in the Boot JDK directory.
54427    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
54428
54429  DLL_NAME="$DLL_NAME"
54430  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54431  METHOD="well-known location in Boot JDK"
54432  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54433    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54434$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54435
54436    # Need to check if the found msvcr is correct architecture
54437    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54438$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54439    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54440    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54441      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54442      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54443      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54444        CORRECT_MSVCR_ARCH="PE32 executable"
54445      else
54446        CORRECT_MSVCR_ARCH="PE32+ executable"
54447      fi
54448    else
54449      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54450        CORRECT_MSVCR_ARCH=386
54451      else
54452        CORRECT_MSVCR_ARCH=x86-64
54453      fi
54454    fi
54455    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54456      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54457$as_echo "ok" >&6; }
54458      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54459
54460  # Only process if variable expands to non-empty
54461
54462  if test "x$MSVC_DLL" != x; then
54463    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54464
54465  # Input might be given as Windows format, start by converting to
54466  # unix format.
54467  path="$MSVC_DLL"
54468  new_path=`$CYGPATH -u "$path"`
54469
54470  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54471  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54472  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54473  # "foo.exe" is OK but "foo" is an error.
54474  #
54475  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54476  # It is also a way to make sure we got the proper file name for the real test later on.
54477  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54478  if test "x$test_shortpath" = x; then
54479    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54480$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54481    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54482  fi
54483
54484  # Call helper function which possibly converts this using DOS-style short mode.
54485  # If so, the updated path is stored in $new_path.
54486
54487  input_path="$new_path"
54488  # Check if we need to convert this using DOS-style short mode. If the path
54489  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54490  # take no chances and rewrite it.
54491  # Note: m4 eats our [], so we need to use [ and ] instead.
54492  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54493  if test "x$has_forbidden_chars" != x; then
54494    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54495    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54496    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54497    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54498      # Going to short mode and back again did indeed matter. Since short mode is
54499      # case insensitive, let's make it lowercase to improve readability.
54500      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54501      # Now convert it back to Unix-style (cygpath)
54502      input_path=`$CYGPATH -u "$shortmode_path"`
54503      new_path="$input_path"
54504    fi
54505  fi
54506
54507  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54508  if test "x$test_cygdrive_prefix" = x; then
54509    # As a simple fix, exclude /usr/bin since it's not a real path.
54510    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54511      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54512      # a path prefixed by /cygdrive for fixpath to work.
54513      new_path="$CYGWIN_ROOT_PATH$input_path"
54514    fi
54515  fi
54516
54517
54518  if test "x$path" != "x$new_path"; then
54519    MSVC_DLL="$new_path"
54520    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54521$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54522  fi
54523
54524    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54525
54526  path="$MSVC_DLL"
54527  has_colon=`$ECHO $path | $GREP ^.:`
54528  new_path="$path"
54529  if test "x$has_colon" = x; then
54530    # Not in mixed or Windows style, start by that.
54531    new_path=`cmd //c echo $path`
54532  fi
54533
54534
54535  input_path="$new_path"
54536  # Check if we need to convert this using DOS-style short mode. If the path
54537  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54538  # take no chances and rewrite it.
54539  # Note: m4 eats our [], so we need to use [ and ] instead.
54540  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54541  if test "x$has_forbidden_chars" != x; then
54542    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54543    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54544  fi
54545
54546
54547  windows_path="$new_path"
54548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54549    unix_path=`$CYGPATH -u "$windows_path"`
54550    new_path="$unix_path"
54551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54552    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54553    new_path="$unix_path"
54554  fi
54555
54556  if test "x$path" != "x$new_path"; then
54557    MSVC_DLL="$new_path"
54558    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54559$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54560  fi
54561
54562  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54563  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54564
54565    else
54566      # We're on a unix platform. Hooray! :)
54567      path="$MSVC_DLL"
54568      has_space=`$ECHO "$path" | $GREP " "`
54569      if test "x$has_space" != x; then
54570        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54571$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54572        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54573      fi
54574
54575      # Use eval to expand a potential ~
54576      eval path="$path"
54577      if test ! -f "$path" && test ! -d "$path"; then
54578        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54579      fi
54580
54581      if test -d "$path"; then
54582        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54583      else
54584        dir="`$DIRNAME "$path"`"
54585        base="`$BASENAME "$path"`"
54586        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54587      fi
54588    fi
54589  fi
54590
54591      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54592$as_echo_n "checking for $DLL_NAME... " >&6; }
54593      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54594$as_echo "$MSVC_DLL" >&6; }
54595    else
54596      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54597$as_echo "incorrect, ignoring" >&6; }
54598      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54599$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54600    fi
54601  fi
54602
54603  fi
54604
54605  if test "x$MSVC_DLL" = x; then
54606    # Probe: Look in the Windows system32 directory
54607    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
54608
54609  windows_path="$CYGWIN_SYSTEMROOT"
54610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54611    unix_path=`$CYGPATH -u "$windows_path"`
54612    CYGWIN_SYSTEMROOT="$unix_path"
54613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54614    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54615    CYGWIN_SYSTEMROOT="$unix_path"
54616  fi
54617
54618    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
54619
54620  DLL_NAME="$DLL_NAME"
54621  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54622  METHOD="well-known location in SYSTEMROOT"
54623  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54624    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54625$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54626
54627    # Need to check if the found msvcr is correct architecture
54628    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54629$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54630    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54631    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54632      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54633      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54634      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54635        CORRECT_MSVCR_ARCH="PE32 executable"
54636      else
54637        CORRECT_MSVCR_ARCH="PE32+ executable"
54638      fi
54639    else
54640      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54641        CORRECT_MSVCR_ARCH=386
54642      else
54643        CORRECT_MSVCR_ARCH=x86-64
54644      fi
54645    fi
54646    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54647      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54648$as_echo "ok" >&6; }
54649      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54650
54651  # Only process if variable expands to non-empty
54652
54653  if test "x$MSVC_DLL" != x; then
54654    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54655
54656  # Input might be given as Windows format, start by converting to
54657  # unix format.
54658  path="$MSVC_DLL"
54659  new_path=`$CYGPATH -u "$path"`
54660
54661  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54662  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54663  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54664  # "foo.exe" is OK but "foo" is an error.
54665  #
54666  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54667  # It is also a way to make sure we got the proper file name for the real test later on.
54668  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54669  if test "x$test_shortpath" = x; then
54670    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54671$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54672    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54673  fi
54674
54675  # Call helper function which possibly converts this using DOS-style short mode.
54676  # If so, the updated path is stored in $new_path.
54677
54678  input_path="$new_path"
54679  # Check if we need to convert this using DOS-style short mode. If the path
54680  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54681  # take no chances and rewrite it.
54682  # Note: m4 eats our [], so we need to use [ and ] instead.
54683  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54684  if test "x$has_forbidden_chars" != x; then
54685    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54686    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54687    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54688    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54689      # Going to short mode and back again did indeed matter. Since short mode is
54690      # case insensitive, let's make it lowercase to improve readability.
54691      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54692      # Now convert it back to Unix-style (cygpath)
54693      input_path=`$CYGPATH -u "$shortmode_path"`
54694      new_path="$input_path"
54695    fi
54696  fi
54697
54698  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54699  if test "x$test_cygdrive_prefix" = x; then
54700    # As a simple fix, exclude /usr/bin since it's not a real path.
54701    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54702      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54703      # a path prefixed by /cygdrive for fixpath to work.
54704      new_path="$CYGWIN_ROOT_PATH$input_path"
54705    fi
54706  fi
54707
54708
54709  if test "x$path" != "x$new_path"; then
54710    MSVC_DLL="$new_path"
54711    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54712$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54713  fi
54714
54715    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54716
54717  path="$MSVC_DLL"
54718  has_colon=`$ECHO $path | $GREP ^.:`
54719  new_path="$path"
54720  if test "x$has_colon" = x; then
54721    # Not in mixed or Windows style, start by that.
54722    new_path=`cmd //c echo $path`
54723  fi
54724
54725
54726  input_path="$new_path"
54727  # Check if we need to convert this using DOS-style short mode. If the path
54728  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54729  # take no chances and rewrite it.
54730  # Note: m4 eats our [], so we need to use [ and ] instead.
54731  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54732  if test "x$has_forbidden_chars" != x; then
54733    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54734    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54735  fi
54736
54737
54738  windows_path="$new_path"
54739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54740    unix_path=`$CYGPATH -u "$windows_path"`
54741    new_path="$unix_path"
54742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54743    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54744    new_path="$unix_path"
54745  fi
54746
54747  if test "x$path" != "x$new_path"; then
54748    MSVC_DLL="$new_path"
54749    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54750$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54751  fi
54752
54753  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54754  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54755
54756    else
54757      # We're on a unix platform. Hooray! :)
54758      path="$MSVC_DLL"
54759      has_space=`$ECHO "$path" | $GREP " "`
54760      if test "x$has_space" != x; then
54761        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54762$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54763        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54764      fi
54765
54766      # Use eval to expand a potential ~
54767      eval path="$path"
54768      if test ! -f "$path" && test ! -d "$path"; then
54769        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54770      fi
54771
54772      if test -d "$path"; then
54773        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54774      else
54775        dir="`$DIRNAME "$path"`"
54776        base="`$BASENAME "$path"`"
54777        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54778      fi
54779    fi
54780  fi
54781
54782      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54783$as_echo_n "checking for $DLL_NAME... " >&6; }
54784      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54785$as_echo "$MSVC_DLL" >&6; }
54786    else
54787      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54788$as_echo "incorrect, ignoring" >&6; }
54789      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54790$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54791    fi
54792  fi
54793
54794  fi
54795
54796  if test "x$MSVC_DLL" = x; then
54797    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54798    if test "x$VS100COMNTOOLS" != x; then
54799      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54800
54801  windows_path="$CYGWIN_VS_TOOLS_DIR"
54802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54803    unix_path=`$CYGPATH -u "$windows_path"`
54804    CYGWIN_VS_TOOLS_DIR="$unix_path"
54805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54806    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54807    CYGWIN_VS_TOOLS_DIR="$unix_path"
54808  fi
54809
54810      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54811        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54812	    | $GREP -i /x64/ | $HEAD --lines 1`
54813      else
54814        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54815	    | $GREP -i /x86/ | $HEAD --lines 1`
54816      fi
54817
54818  DLL_NAME="$DLL_NAME"
54819  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54820  METHOD="search of VS100COMNTOOLS"
54821  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54822    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54823$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54824
54825    # Need to check if the found msvcr is correct architecture
54826    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54827$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54828    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54829    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54830      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54831      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54832      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54833        CORRECT_MSVCR_ARCH="PE32 executable"
54834      else
54835        CORRECT_MSVCR_ARCH="PE32+ executable"
54836      fi
54837    else
54838      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54839        CORRECT_MSVCR_ARCH=386
54840      else
54841        CORRECT_MSVCR_ARCH=x86-64
54842      fi
54843    fi
54844    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54845      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54846$as_echo "ok" >&6; }
54847      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54848
54849  # Only process if variable expands to non-empty
54850
54851  if test "x$MSVC_DLL" != x; then
54852    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54853
54854  # Input might be given as Windows format, start by converting to
54855  # unix format.
54856  path="$MSVC_DLL"
54857  new_path=`$CYGPATH -u "$path"`
54858
54859  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54860  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54861  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54862  # "foo.exe" is OK but "foo" is an error.
54863  #
54864  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54865  # It is also a way to make sure we got the proper file name for the real test later on.
54866  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54867  if test "x$test_shortpath" = x; then
54868    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54869$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54870    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54871  fi
54872
54873  # Call helper function which possibly converts this using DOS-style short mode.
54874  # If so, the updated path is stored in $new_path.
54875
54876  input_path="$new_path"
54877  # Check if we need to convert this using DOS-style short mode. If the path
54878  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54879  # take no chances and rewrite it.
54880  # Note: m4 eats our [], so we need to use [ and ] instead.
54881  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54882  if test "x$has_forbidden_chars" != x; then
54883    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54884    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54885    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54886    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54887      # Going to short mode and back again did indeed matter. Since short mode is
54888      # case insensitive, let's make it lowercase to improve readability.
54889      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54890      # Now convert it back to Unix-style (cygpath)
54891      input_path=`$CYGPATH -u "$shortmode_path"`
54892      new_path="$input_path"
54893    fi
54894  fi
54895
54896  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54897  if test "x$test_cygdrive_prefix" = x; then
54898    # As a simple fix, exclude /usr/bin since it's not a real path.
54899    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54900      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54901      # a path prefixed by /cygdrive for fixpath to work.
54902      new_path="$CYGWIN_ROOT_PATH$input_path"
54903    fi
54904  fi
54905
54906
54907  if test "x$path" != "x$new_path"; then
54908    MSVC_DLL="$new_path"
54909    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54910$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54911  fi
54912
54913    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54914
54915  path="$MSVC_DLL"
54916  has_colon=`$ECHO $path | $GREP ^.:`
54917  new_path="$path"
54918  if test "x$has_colon" = x; then
54919    # Not in mixed or Windows style, start by that.
54920    new_path=`cmd //c echo $path`
54921  fi
54922
54923
54924  input_path="$new_path"
54925  # Check if we need to convert this using DOS-style short mode. If the path
54926  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54927  # take no chances and rewrite it.
54928  # Note: m4 eats our [], so we need to use [ and ] instead.
54929  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54930  if test "x$has_forbidden_chars" != x; then
54931    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54932    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54933  fi
54934
54935
54936  windows_path="$new_path"
54937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54938    unix_path=`$CYGPATH -u "$windows_path"`
54939    new_path="$unix_path"
54940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54941    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54942    new_path="$unix_path"
54943  fi
54944
54945  if test "x$path" != "x$new_path"; then
54946    MSVC_DLL="$new_path"
54947    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54948$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54949  fi
54950
54951  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54952  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54953
54954    else
54955      # We're on a unix platform. Hooray! :)
54956      path="$MSVC_DLL"
54957      has_space=`$ECHO "$path" | $GREP " "`
54958      if test "x$has_space" != x; then
54959        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54960$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54961        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54962      fi
54963
54964      # Use eval to expand a potential ~
54965      eval path="$path"
54966      if test ! -f "$path" && test ! -d "$path"; then
54967        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54968      fi
54969
54970      if test -d "$path"; then
54971        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54972      else
54973        dir="`$DIRNAME "$path"`"
54974        base="`$BASENAME "$path"`"
54975        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54976      fi
54977    fi
54978  fi
54979
54980      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54981$as_echo_n "checking for $DLL_NAME... " >&6; }
54982      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54983$as_echo "$MSVC_DLL" >&6; }
54984    else
54985      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54986$as_echo "incorrect, ignoring" >&6; }
54987      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54988$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54989    fi
54990  fi
54991
54992    fi
54993  fi
54994
54995  if test "x$MSVC_DLL" = x; then
54996    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54997    # (This was the original behaviour; kept since it might turn something up)
54998    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54999      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55000        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55001	    | $GREP x64 | $HEAD --lines 1`
55002      else
55003        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55004	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55005        if test "x$POSSIBLE_MSVC_DLL" = x; then
55006          # We're grasping at straws now...
55007          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55008	      | $HEAD --lines 1`
55009        fi
55010      fi
55011
55012
55013  DLL_NAME="$DLL_NAME"
55014  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55015  METHOD="search of VCINSTALLDIR"
55016  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55017    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55018$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55019
55020    # Need to check if the found msvcr is correct architecture
55021    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55022$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55023    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55024    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55025      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55026      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55027      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55028        CORRECT_MSVCR_ARCH="PE32 executable"
55029      else
55030        CORRECT_MSVCR_ARCH="PE32+ executable"
55031      fi
55032    else
55033      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55034        CORRECT_MSVCR_ARCH=386
55035      else
55036        CORRECT_MSVCR_ARCH=x86-64
55037      fi
55038    fi
55039    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55040      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55041$as_echo "ok" >&6; }
55042      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55043
55044  # Only process if variable expands to non-empty
55045
55046  if test "x$MSVC_DLL" != x; then
55047    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55048
55049  # Input might be given as Windows format, start by converting to
55050  # unix format.
55051  path="$MSVC_DLL"
55052  new_path=`$CYGPATH -u "$path"`
55053
55054  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55055  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55056  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55057  # "foo.exe" is OK but "foo" is an error.
55058  #
55059  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55060  # It is also a way to make sure we got the proper file name for the real test later on.
55061  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55062  if test "x$test_shortpath" = x; then
55063    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55064$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55065    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55066  fi
55067
55068  # Call helper function which possibly converts this using DOS-style short mode.
55069  # If so, the updated path is stored in $new_path.
55070
55071  input_path="$new_path"
55072  # Check if we need to convert this using DOS-style short mode. If the path
55073  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55074  # take no chances and rewrite it.
55075  # Note: m4 eats our [], so we need to use [ and ] instead.
55076  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55077  if test "x$has_forbidden_chars" != x; then
55078    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55079    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55080    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55081    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55082      # Going to short mode and back again did indeed matter. Since short mode is
55083      # case insensitive, let's make it lowercase to improve readability.
55084      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55085      # Now convert it back to Unix-style (cygpath)
55086      input_path=`$CYGPATH -u "$shortmode_path"`
55087      new_path="$input_path"
55088    fi
55089  fi
55090
55091  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55092  if test "x$test_cygdrive_prefix" = x; then
55093    # As a simple fix, exclude /usr/bin since it's not a real path.
55094    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55095      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55096      # a path prefixed by /cygdrive for fixpath to work.
55097      new_path="$CYGWIN_ROOT_PATH$input_path"
55098    fi
55099  fi
55100
55101
55102  if test "x$path" != "x$new_path"; then
55103    MSVC_DLL="$new_path"
55104    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55105$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55106  fi
55107
55108    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55109
55110  path="$MSVC_DLL"
55111  has_colon=`$ECHO $path | $GREP ^.:`
55112  new_path="$path"
55113  if test "x$has_colon" = x; then
55114    # Not in mixed or Windows style, start by that.
55115    new_path=`cmd //c echo $path`
55116  fi
55117
55118
55119  input_path="$new_path"
55120  # Check if we need to convert this using DOS-style short mode. If the path
55121  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55122  # take no chances and rewrite it.
55123  # Note: m4 eats our [], so we need to use [ and ] instead.
55124  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55125  if test "x$has_forbidden_chars" != x; then
55126    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55127    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55128  fi
55129
55130
55131  windows_path="$new_path"
55132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55133    unix_path=`$CYGPATH -u "$windows_path"`
55134    new_path="$unix_path"
55135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55136    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55137    new_path="$unix_path"
55138  fi
55139
55140  if test "x$path" != "x$new_path"; then
55141    MSVC_DLL="$new_path"
55142    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55143$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55144  fi
55145
55146  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55147  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55148
55149    else
55150      # We're on a unix platform. Hooray! :)
55151      path="$MSVC_DLL"
55152      has_space=`$ECHO "$path" | $GREP " "`
55153      if test "x$has_space" != x; then
55154        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55155$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55156        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55157      fi
55158
55159      # Use eval to expand a potential ~
55160      eval path="$path"
55161      if test ! -f "$path" && test ! -d "$path"; then
55162        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55163      fi
55164
55165      if test -d "$path"; then
55166        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55167      else
55168        dir="`$DIRNAME "$path"`"
55169        base="`$BASENAME "$path"`"
55170        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55171      fi
55172    fi
55173  fi
55174
55175      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55176$as_echo_n "checking for $DLL_NAME... " >&6; }
55177      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55178$as_echo "$MSVC_DLL" >&6; }
55179    else
55180      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55181$as_echo "incorrect, ignoring" >&6; }
55182      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55183$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55184    fi
55185  fi
55186
55187    fi
55188  fi
55189
55190  if test "x$MSVC_DLL" = x; then
55191    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55192$as_echo_n "checking for $DLL_NAME... " >&6; }
55193    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55194$as_echo "no" >&6; }
55195    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55196  fi
55197
55198    MSVCR_DLL="$MSVC_DLL"
55199  fi
55200
55201
55202
55203# Check whether --with-msvcp-dll was given.
55204if test "${with_msvcp_dll+set}" = set; then :
55205  withval=$with_msvcp_dll;
55206fi
55207
55208
55209  if test "x$MSVCP_NAME" != "x"; then
55210    if test "x$with_msvcp_dll" != x; then
55211      # If given explicitly by user, do not probe. If not present, fail directly.
55212
55213  DLL_NAME="$MSVCP_NAME"
55214  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
55215  METHOD="--with-msvcp-dll"
55216  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55217    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55218$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55219
55220    # Need to check if the found msvcr is correct architecture
55221    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55222$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55223    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55224    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55225      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55226      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55227      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55228        CORRECT_MSVCR_ARCH="PE32 executable"
55229      else
55230        CORRECT_MSVCR_ARCH="PE32+ executable"
55231      fi
55232    else
55233      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55234        CORRECT_MSVCR_ARCH=386
55235      else
55236        CORRECT_MSVCR_ARCH=x86-64
55237      fi
55238    fi
55239    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55240      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55241$as_echo "ok" >&6; }
55242      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55243
55244  # Only process if variable expands to non-empty
55245
55246  if test "x$MSVC_DLL" != x; then
55247    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55248
55249  # Input might be given as Windows format, start by converting to
55250  # unix format.
55251  path="$MSVC_DLL"
55252  new_path=`$CYGPATH -u "$path"`
55253
55254  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55255  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55256  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55257  # "foo.exe" is OK but "foo" is an error.
55258  #
55259  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55260  # It is also a way to make sure we got the proper file name for the real test later on.
55261  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55262  if test "x$test_shortpath" = x; then
55263    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55264$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55265    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55266  fi
55267
55268  # Call helper function which possibly converts this using DOS-style short mode.
55269  # If so, the updated path is stored in $new_path.
55270
55271  input_path="$new_path"
55272  # Check if we need to convert this using DOS-style short mode. If the path
55273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55274  # take no chances and rewrite it.
55275  # Note: m4 eats our [], so we need to use [ and ] instead.
55276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55277  if test "x$has_forbidden_chars" != x; then
55278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55279    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55280    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55281    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55282      # Going to short mode and back again did indeed matter. Since short mode is
55283      # case insensitive, let's make it lowercase to improve readability.
55284      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55285      # Now convert it back to Unix-style (cygpath)
55286      input_path=`$CYGPATH -u "$shortmode_path"`
55287      new_path="$input_path"
55288    fi
55289  fi
55290
55291  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55292  if test "x$test_cygdrive_prefix" = x; then
55293    # As a simple fix, exclude /usr/bin since it's not a real path.
55294    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55295      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55296      # a path prefixed by /cygdrive for fixpath to work.
55297      new_path="$CYGWIN_ROOT_PATH$input_path"
55298    fi
55299  fi
55300
55301
55302  if test "x$path" != "x$new_path"; then
55303    MSVC_DLL="$new_path"
55304    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55305$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55306  fi
55307
55308    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55309
55310  path="$MSVC_DLL"
55311  has_colon=`$ECHO $path | $GREP ^.:`
55312  new_path="$path"
55313  if test "x$has_colon" = x; then
55314    # Not in mixed or Windows style, start by that.
55315    new_path=`cmd //c echo $path`
55316  fi
55317
55318
55319  input_path="$new_path"
55320  # Check if we need to convert this using DOS-style short mode. If the path
55321  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55322  # take no chances and rewrite it.
55323  # Note: m4 eats our [], so we need to use [ and ] instead.
55324  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55325  if test "x$has_forbidden_chars" != x; then
55326    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55327    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55328  fi
55329
55330
55331  windows_path="$new_path"
55332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55333    unix_path=`$CYGPATH -u "$windows_path"`
55334    new_path="$unix_path"
55335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55336    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55337    new_path="$unix_path"
55338  fi
55339
55340  if test "x$path" != "x$new_path"; then
55341    MSVC_DLL="$new_path"
55342    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55343$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55344  fi
55345
55346  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55347  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55348
55349    else
55350      # We're on a unix platform. Hooray! :)
55351      path="$MSVC_DLL"
55352      has_space=`$ECHO "$path" | $GREP " "`
55353      if test "x$has_space" != x; then
55354        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55355$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55356        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55357      fi
55358
55359      # Use eval to expand a potential ~
55360      eval path="$path"
55361      if test ! -f "$path" && test ! -d "$path"; then
55362        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55363      fi
55364
55365      if test -d "$path"; then
55366        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55367      else
55368        dir="`$DIRNAME "$path"`"
55369        base="`$BASENAME "$path"`"
55370        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55371      fi
55372    fi
55373  fi
55374
55375      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55376$as_echo_n "checking for $DLL_NAME... " >&6; }
55377      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55378$as_echo "$MSVC_DLL" >&6; }
55379    else
55380      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55381$as_echo "incorrect, ignoring" >&6; }
55382      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55383$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55384    fi
55385  fi
55386
55387      if test "x$MSVC_DLL" = x; then
55388        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
55389      fi
55390      MSVCP_DLL="$MSVC_DLL"
55391    elif test "x$DEVKIT_MSVCP_DLL" != x; then
55392
55393  DLL_NAME="$MSVCP_NAME"
55394  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
55395  METHOD="devkit"
55396  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55397    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55398$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55399
55400    # Need to check if the found msvcr is correct architecture
55401    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55402$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55403    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55404    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55405      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55406      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55407      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55408        CORRECT_MSVCR_ARCH="PE32 executable"
55409      else
55410        CORRECT_MSVCR_ARCH="PE32+ executable"
55411      fi
55412    else
55413      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55414        CORRECT_MSVCR_ARCH=386
55415      else
55416        CORRECT_MSVCR_ARCH=x86-64
55417      fi
55418    fi
55419    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55420      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55421$as_echo "ok" >&6; }
55422      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55423
55424  # Only process if variable expands to non-empty
55425
55426  if test "x$MSVC_DLL" != x; then
55427    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55428
55429  # Input might be given as Windows format, start by converting to
55430  # unix format.
55431  path="$MSVC_DLL"
55432  new_path=`$CYGPATH -u "$path"`
55433
55434  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55435  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55436  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55437  # "foo.exe" is OK but "foo" is an error.
55438  #
55439  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55440  # It is also a way to make sure we got the proper file name for the real test later on.
55441  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55442  if test "x$test_shortpath" = x; then
55443    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55444$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55445    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55446  fi
55447
55448  # Call helper function which possibly converts this using DOS-style short mode.
55449  # If so, the updated path is stored in $new_path.
55450
55451  input_path="$new_path"
55452  # Check if we need to convert this using DOS-style short mode. If the path
55453  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55454  # take no chances and rewrite it.
55455  # Note: m4 eats our [], so we need to use [ and ] instead.
55456  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55457  if test "x$has_forbidden_chars" != x; then
55458    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55459    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55460    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55461    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55462      # Going to short mode and back again did indeed matter. Since short mode is
55463      # case insensitive, let's make it lowercase to improve readability.
55464      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55465      # Now convert it back to Unix-style (cygpath)
55466      input_path=`$CYGPATH -u "$shortmode_path"`
55467      new_path="$input_path"
55468    fi
55469  fi
55470
55471  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55472  if test "x$test_cygdrive_prefix" = x; then
55473    # As a simple fix, exclude /usr/bin since it's not a real path.
55474    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55475      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55476      # a path prefixed by /cygdrive for fixpath to work.
55477      new_path="$CYGWIN_ROOT_PATH$input_path"
55478    fi
55479  fi
55480
55481
55482  if test "x$path" != "x$new_path"; then
55483    MSVC_DLL="$new_path"
55484    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55485$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55486  fi
55487
55488    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55489
55490  path="$MSVC_DLL"
55491  has_colon=`$ECHO $path | $GREP ^.:`
55492  new_path="$path"
55493  if test "x$has_colon" = x; then
55494    # Not in mixed or Windows style, start by that.
55495    new_path=`cmd //c echo $path`
55496  fi
55497
55498
55499  input_path="$new_path"
55500  # Check if we need to convert this using DOS-style short mode. If the path
55501  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55502  # take no chances and rewrite it.
55503  # Note: m4 eats our [], so we need to use [ and ] instead.
55504  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55505  if test "x$has_forbidden_chars" != x; then
55506    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55507    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55508  fi
55509
55510
55511  windows_path="$new_path"
55512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55513    unix_path=`$CYGPATH -u "$windows_path"`
55514    new_path="$unix_path"
55515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55516    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55517    new_path="$unix_path"
55518  fi
55519
55520  if test "x$path" != "x$new_path"; then
55521    MSVC_DLL="$new_path"
55522    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55523$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55524  fi
55525
55526  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55527  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55528
55529    else
55530      # We're on a unix platform. Hooray! :)
55531      path="$MSVC_DLL"
55532      has_space=`$ECHO "$path" | $GREP " "`
55533      if test "x$has_space" != x; then
55534        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55535$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55536        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55537      fi
55538
55539      # Use eval to expand a potential ~
55540      eval path="$path"
55541      if test ! -f "$path" && test ! -d "$path"; then
55542        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55543      fi
55544
55545      if test -d "$path"; then
55546        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55547      else
55548        dir="`$DIRNAME "$path"`"
55549        base="`$BASENAME "$path"`"
55550        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55551      fi
55552    fi
55553  fi
55554
55555      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55556$as_echo_n "checking for $DLL_NAME... " >&6; }
55557      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55558$as_echo "$MSVC_DLL" >&6; }
55559    else
55560      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55561$as_echo "incorrect, ignoring" >&6; }
55562      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55563$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55564    fi
55565  fi
55566
55567      if test "x$MSVC_DLL" = x; then
55568        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
55569      fi
55570      MSVCP_DLL="$MSVC_DLL"
55571    else
55572
55573  DLL_NAME="${MSVCP_NAME}"
55574  MSVC_DLL=
55575
55576  if test "x$MSVC_DLL" = x; then
55577    # Probe: Using well-known location from Visual Studio 10.0
55578    if test "x$VCINSTALLDIR" != x; then
55579      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
55580
55581  windows_path="$CYGWIN_VC_INSTALL_DIR"
55582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55583    unix_path=`$CYGPATH -u "$windows_path"`
55584    CYGWIN_VC_INSTALL_DIR="$unix_path"
55585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55586    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55587    CYGWIN_VC_INSTALL_DIR="$unix_path"
55588  fi
55589
55590      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55591        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
55592      else
55593        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
55594      fi
55595      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
55596
55597  DLL_NAME="$DLL_NAME"
55598  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55599  METHOD="well-known location in VCINSTALLDIR"
55600  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55601    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55602$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55603
55604    # Need to check if the found msvcr is correct architecture
55605    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55606$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55607    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55608    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55609      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55610      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55611      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55612        CORRECT_MSVCR_ARCH="PE32 executable"
55613      else
55614        CORRECT_MSVCR_ARCH="PE32+ executable"
55615      fi
55616    else
55617      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55618        CORRECT_MSVCR_ARCH=386
55619      else
55620        CORRECT_MSVCR_ARCH=x86-64
55621      fi
55622    fi
55623    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55624      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55625$as_echo "ok" >&6; }
55626      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55627
55628  # Only process if variable expands to non-empty
55629
55630  if test "x$MSVC_DLL" != x; then
55631    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55632
55633  # Input might be given as Windows format, start by converting to
55634  # unix format.
55635  path="$MSVC_DLL"
55636  new_path=`$CYGPATH -u "$path"`
55637
55638  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55639  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55640  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55641  # "foo.exe" is OK but "foo" is an error.
55642  #
55643  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55644  # It is also a way to make sure we got the proper file name for the real test later on.
55645  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55646  if test "x$test_shortpath" = x; then
55647    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55648$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55649    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55650  fi
55651
55652  # Call helper function which possibly converts this using DOS-style short mode.
55653  # If so, the updated path is stored in $new_path.
55654
55655  input_path="$new_path"
55656  # Check if we need to convert this using DOS-style short mode. If the path
55657  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55658  # take no chances and rewrite it.
55659  # Note: m4 eats our [], so we need to use [ and ] instead.
55660  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55661  if test "x$has_forbidden_chars" != x; then
55662    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55663    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55664    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55665    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55666      # Going to short mode and back again did indeed matter. Since short mode is
55667      # case insensitive, let's make it lowercase to improve readability.
55668      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55669      # Now convert it back to Unix-style (cygpath)
55670      input_path=`$CYGPATH -u "$shortmode_path"`
55671      new_path="$input_path"
55672    fi
55673  fi
55674
55675  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55676  if test "x$test_cygdrive_prefix" = x; then
55677    # As a simple fix, exclude /usr/bin since it's not a real path.
55678    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55679      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55680      # a path prefixed by /cygdrive for fixpath to work.
55681      new_path="$CYGWIN_ROOT_PATH$input_path"
55682    fi
55683  fi
55684
55685
55686  if test "x$path" != "x$new_path"; then
55687    MSVC_DLL="$new_path"
55688    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55689$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55690  fi
55691
55692    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55693
55694  path="$MSVC_DLL"
55695  has_colon=`$ECHO $path | $GREP ^.:`
55696  new_path="$path"
55697  if test "x$has_colon" = x; then
55698    # Not in mixed or Windows style, start by that.
55699    new_path=`cmd //c echo $path`
55700  fi
55701
55702
55703  input_path="$new_path"
55704  # Check if we need to convert this using DOS-style short mode. If the path
55705  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55706  # take no chances and rewrite it.
55707  # Note: m4 eats our [], so we need to use [ and ] instead.
55708  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55709  if test "x$has_forbidden_chars" != x; then
55710    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55711    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55712  fi
55713
55714
55715  windows_path="$new_path"
55716  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55717    unix_path=`$CYGPATH -u "$windows_path"`
55718    new_path="$unix_path"
55719  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55720    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55721    new_path="$unix_path"
55722  fi
55723
55724  if test "x$path" != "x$new_path"; then
55725    MSVC_DLL="$new_path"
55726    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55727$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55728  fi
55729
55730  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55731  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55732
55733    else
55734      # We're on a unix platform. Hooray! :)
55735      path="$MSVC_DLL"
55736      has_space=`$ECHO "$path" | $GREP " "`
55737      if test "x$has_space" != x; then
55738        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55739$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55740        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55741      fi
55742
55743      # Use eval to expand a potential ~
55744      eval path="$path"
55745      if test ! -f "$path" && test ! -d "$path"; then
55746        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55747      fi
55748
55749      if test -d "$path"; then
55750        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55751      else
55752        dir="`$DIRNAME "$path"`"
55753        base="`$BASENAME "$path"`"
55754        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55755      fi
55756    fi
55757  fi
55758
55759      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55760$as_echo_n "checking for $DLL_NAME... " >&6; }
55761      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55762$as_echo "$MSVC_DLL" >&6; }
55763    else
55764      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55765$as_echo "incorrect, ignoring" >&6; }
55766      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55767$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55768    fi
55769  fi
55770
55771    fi
55772  fi
55773
55774  if test "x$MSVC_DLL" = x; then
55775    # Probe: Check in the Boot JDK directory.
55776    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55777
55778  DLL_NAME="$DLL_NAME"
55779  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55780  METHOD="well-known location in Boot JDK"
55781  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55782    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55783$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55784
55785    # Need to check if the found msvcr is correct architecture
55786    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55787$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55788    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55789    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55790      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55791      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55792      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55793        CORRECT_MSVCR_ARCH="PE32 executable"
55794      else
55795        CORRECT_MSVCR_ARCH="PE32+ executable"
55796      fi
55797    else
55798      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55799        CORRECT_MSVCR_ARCH=386
55800      else
55801        CORRECT_MSVCR_ARCH=x86-64
55802      fi
55803    fi
55804    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55805      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55806$as_echo "ok" >&6; }
55807      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55808
55809  # Only process if variable expands to non-empty
55810
55811  if test "x$MSVC_DLL" != x; then
55812    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55813
55814  # Input might be given as Windows format, start by converting to
55815  # unix format.
55816  path="$MSVC_DLL"
55817  new_path=`$CYGPATH -u "$path"`
55818
55819  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55820  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55821  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55822  # "foo.exe" is OK but "foo" is an error.
55823  #
55824  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55825  # It is also a way to make sure we got the proper file name for the real test later on.
55826  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55827  if test "x$test_shortpath" = x; then
55828    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55829$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55830    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55831  fi
55832
55833  # Call helper function which possibly converts this using DOS-style short mode.
55834  # If so, the updated path is stored in $new_path.
55835
55836  input_path="$new_path"
55837  # Check if we need to convert this using DOS-style short mode. If the path
55838  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55839  # take no chances and rewrite it.
55840  # Note: m4 eats our [], so we need to use [ and ] instead.
55841  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55842  if test "x$has_forbidden_chars" != x; then
55843    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55844    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55845    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55846    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55847      # Going to short mode and back again did indeed matter. Since short mode is
55848      # case insensitive, let's make it lowercase to improve readability.
55849      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55850      # Now convert it back to Unix-style (cygpath)
55851      input_path=`$CYGPATH -u "$shortmode_path"`
55852      new_path="$input_path"
55853    fi
55854  fi
55855
55856  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55857  if test "x$test_cygdrive_prefix" = x; then
55858    # As a simple fix, exclude /usr/bin since it's not a real path.
55859    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55860      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55861      # a path prefixed by /cygdrive for fixpath to work.
55862      new_path="$CYGWIN_ROOT_PATH$input_path"
55863    fi
55864  fi
55865
55866
55867  if test "x$path" != "x$new_path"; then
55868    MSVC_DLL="$new_path"
55869    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55870$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55871  fi
55872
55873    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55874
55875  path="$MSVC_DLL"
55876  has_colon=`$ECHO $path | $GREP ^.:`
55877  new_path="$path"
55878  if test "x$has_colon" = x; then
55879    # Not in mixed or Windows style, start by that.
55880    new_path=`cmd //c echo $path`
55881  fi
55882
55883
55884  input_path="$new_path"
55885  # Check if we need to convert this using DOS-style short mode. If the path
55886  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55887  # take no chances and rewrite it.
55888  # Note: m4 eats our [], so we need to use [ and ] instead.
55889  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55890  if test "x$has_forbidden_chars" != x; then
55891    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55892    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55893  fi
55894
55895
55896  windows_path="$new_path"
55897  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55898    unix_path=`$CYGPATH -u "$windows_path"`
55899    new_path="$unix_path"
55900  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55901    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55902    new_path="$unix_path"
55903  fi
55904
55905  if test "x$path" != "x$new_path"; then
55906    MSVC_DLL="$new_path"
55907    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55908$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55909  fi
55910
55911  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55912  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55913
55914    else
55915      # We're on a unix platform. Hooray! :)
55916      path="$MSVC_DLL"
55917      has_space=`$ECHO "$path" | $GREP " "`
55918      if test "x$has_space" != x; then
55919        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55920$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55921        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55922      fi
55923
55924      # Use eval to expand a potential ~
55925      eval path="$path"
55926      if test ! -f "$path" && test ! -d "$path"; then
55927        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55928      fi
55929
55930      if test -d "$path"; then
55931        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55932      else
55933        dir="`$DIRNAME "$path"`"
55934        base="`$BASENAME "$path"`"
55935        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55936      fi
55937    fi
55938  fi
55939
55940      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55941$as_echo_n "checking for $DLL_NAME... " >&6; }
55942      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55943$as_echo "$MSVC_DLL" >&6; }
55944    else
55945      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55946$as_echo "incorrect, ignoring" >&6; }
55947      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55948$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55949    fi
55950  fi
55951
55952  fi
55953
55954  if test "x$MSVC_DLL" = x; then
55955    # Probe: Look in the Windows system32 directory
55956    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55957
55958  windows_path="$CYGWIN_SYSTEMROOT"
55959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55960    unix_path=`$CYGPATH -u "$windows_path"`
55961    CYGWIN_SYSTEMROOT="$unix_path"
55962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55964    CYGWIN_SYSTEMROOT="$unix_path"
55965  fi
55966
55967    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55968
55969  DLL_NAME="$DLL_NAME"
55970  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55971  METHOD="well-known location in SYSTEMROOT"
55972  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55973    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55974$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55975
55976    # Need to check if the found msvcr is correct architecture
55977    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55978$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55979    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55980    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55981      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55982      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55983      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55984        CORRECT_MSVCR_ARCH="PE32 executable"
55985      else
55986        CORRECT_MSVCR_ARCH="PE32+ executable"
55987      fi
55988    else
55989      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55990        CORRECT_MSVCR_ARCH=386
55991      else
55992        CORRECT_MSVCR_ARCH=x86-64
55993      fi
55994    fi
55995    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55996      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55997$as_echo "ok" >&6; }
55998      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55999
56000  # Only process if variable expands to non-empty
56001
56002  if test "x$MSVC_DLL" != x; then
56003    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56004
56005  # Input might be given as Windows format, start by converting to
56006  # unix format.
56007  path="$MSVC_DLL"
56008  new_path=`$CYGPATH -u "$path"`
56009
56010  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56011  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56012  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56013  # "foo.exe" is OK but "foo" is an error.
56014  #
56015  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56016  # It is also a way to make sure we got the proper file name for the real test later on.
56017  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56018  if test "x$test_shortpath" = x; then
56019    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56020$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56021    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56022  fi
56023
56024  # Call helper function which possibly converts this using DOS-style short mode.
56025  # If so, the updated path is stored in $new_path.
56026
56027  input_path="$new_path"
56028  # Check if we need to convert this using DOS-style short mode. If the path
56029  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56030  # take no chances and rewrite it.
56031  # Note: m4 eats our [], so we need to use [ and ] instead.
56032  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56033  if test "x$has_forbidden_chars" != x; then
56034    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56035    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56036    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56037    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56038      # Going to short mode and back again did indeed matter. Since short mode is
56039      # case insensitive, let's make it lowercase to improve readability.
56040      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56041      # Now convert it back to Unix-style (cygpath)
56042      input_path=`$CYGPATH -u "$shortmode_path"`
56043      new_path="$input_path"
56044    fi
56045  fi
56046
56047  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56048  if test "x$test_cygdrive_prefix" = x; then
56049    # As a simple fix, exclude /usr/bin since it's not a real path.
56050    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56051      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56052      # a path prefixed by /cygdrive for fixpath to work.
56053      new_path="$CYGWIN_ROOT_PATH$input_path"
56054    fi
56055  fi
56056
56057
56058  if test "x$path" != "x$new_path"; then
56059    MSVC_DLL="$new_path"
56060    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56061$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56062  fi
56063
56064    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56065
56066  path="$MSVC_DLL"
56067  has_colon=`$ECHO $path | $GREP ^.:`
56068  new_path="$path"
56069  if test "x$has_colon" = x; then
56070    # Not in mixed or Windows style, start by that.
56071    new_path=`cmd //c echo $path`
56072  fi
56073
56074
56075  input_path="$new_path"
56076  # Check if we need to convert this using DOS-style short mode. If the path
56077  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56078  # take no chances and rewrite it.
56079  # Note: m4 eats our [], so we need to use [ and ] instead.
56080  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56081  if test "x$has_forbidden_chars" != x; then
56082    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56083    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56084  fi
56085
56086
56087  windows_path="$new_path"
56088  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56089    unix_path=`$CYGPATH -u "$windows_path"`
56090    new_path="$unix_path"
56091  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56092    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56093    new_path="$unix_path"
56094  fi
56095
56096  if test "x$path" != "x$new_path"; then
56097    MSVC_DLL="$new_path"
56098    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56099$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56100  fi
56101
56102  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56103  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56104
56105    else
56106      # We're on a unix platform. Hooray! :)
56107      path="$MSVC_DLL"
56108      has_space=`$ECHO "$path" | $GREP " "`
56109      if test "x$has_space" != x; then
56110        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56111$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56112        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56113      fi
56114
56115      # Use eval to expand a potential ~
56116      eval path="$path"
56117      if test ! -f "$path" && test ! -d "$path"; then
56118        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56119      fi
56120
56121      if test -d "$path"; then
56122        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56123      else
56124        dir="`$DIRNAME "$path"`"
56125        base="`$BASENAME "$path"`"
56126        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56127      fi
56128    fi
56129  fi
56130
56131      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56132$as_echo_n "checking for $DLL_NAME... " >&6; }
56133      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56134$as_echo "$MSVC_DLL" >&6; }
56135    else
56136      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56137$as_echo "incorrect, ignoring" >&6; }
56138      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56139$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56140    fi
56141  fi
56142
56143  fi
56144
56145  if test "x$MSVC_DLL" = x; then
56146    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
56147    if test "x$VS100COMNTOOLS" != x; then
56148      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
56149
56150  windows_path="$CYGWIN_VS_TOOLS_DIR"
56151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56152    unix_path=`$CYGPATH -u "$windows_path"`
56153    CYGWIN_VS_TOOLS_DIR="$unix_path"
56154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56156    CYGWIN_VS_TOOLS_DIR="$unix_path"
56157  fi
56158
56159      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56160        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56161	    | $GREP -i /x64/ | $HEAD --lines 1`
56162      else
56163        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56164	    | $GREP -i /x86/ | $HEAD --lines 1`
56165      fi
56166
56167  DLL_NAME="$DLL_NAME"
56168  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56169  METHOD="search of VS100COMNTOOLS"
56170  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56171    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56172$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56173
56174    # Need to check if the found msvcr is correct architecture
56175    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56176$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56177    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56178    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56179      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56180      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56181      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56182        CORRECT_MSVCR_ARCH="PE32 executable"
56183      else
56184        CORRECT_MSVCR_ARCH="PE32+ executable"
56185      fi
56186    else
56187      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56188        CORRECT_MSVCR_ARCH=386
56189      else
56190        CORRECT_MSVCR_ARCH=x86-64
56191      fi
56192    fi
56193    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56194      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56195$as_echo "ok" >&6; }
56196      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56197
56198  # Only process if variable expands to non-empty
56199
56200  if test "x$MSVC_DLL" != x; then
56201    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56202
56203  # Input might be given as Windows format, start by converting to
56204  # unix format.
56205  path="$MSVC_DLL"
56206  new_path=`$CYGPATH -u "$path"`
56207
56208  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56209  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56210  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56211  # "foo.exe" is OK but "foo" is an error.
56212  #
56213  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56214  # It is also a way to make sure we got the proper file name for the real test later on.
56215  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56216  if test "x$test_shortpath" = x; then
56217    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56218$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56219    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56220  fi
56221
56222  # Call helper function which possibly converts this using DOS-style short mode.
56223  # If so, the updated path is stored in $new_path.
56224
56225  input_path="$new_path"
56226  # Check if we need to convert this using DOS-style short mode. If the path
56227  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56228  # take no chances and rewrite it.
56229  # Note: m4 eats our [], so we need to use [ and ] instead.
56230  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56231  if test "x$has_forbidden_chars" != x; then
56232    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56233    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56234    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56235    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56236      # Going to short mode and back again did indeed matter. Since short mode is
56237      # case insensitive, let's make it lowercase to improve readability.
56238      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56239      # Now convert it back to Unix-style (cygpath)
56240      input_path=`$CYGPATH -u "$shortmode_path"`
56241      new_path="$input_path"
56242    fi
56243  fi
56244
56245  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56246  if test "x$test_cygdrive_prefix" = x; then
56247    # As a simple fix, exclude /usr/bin since it's not a real path.
56248    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56249      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56250      # a path prefixed by /cygdrive for fixpath to work.
56251      new_path="$CYGWIN_ROOT_PATH$input_path"
56252    fi
56253  fi
56254
56255
56256  if test "x$path" != "x$new_path"; then
56257    MSVC_DLL="$new_path"
56258    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56259$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56260  fi
56261
56262    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56263
56264  path="$MSVC_DLL"
56265  has_colon=`$ECHO $path | $GREP ^.:`
56266  new_path="$path"
56267  if test "x$has_colon" = x; then
56268    # Not in mixed or Windows style, start by that.
56269    new_path=`cmd //c echo $path`
56270  fi
56271
56272
56273  input_path="$new_path"
56274  # Check if we need to convert this using DOS-style short mode. If the path
56275  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56276  # take no chances and rewrite it.
56277  # Note: m4 eats our [], so we need to use [ and ] instead.
56278  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56279  if test "x$has_forbidden_chars" != x; then
56280    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56281    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56282  fi
56283
56284
56285  windows_path="$new_path"
56286  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56287    unix_path=`$CYGPATH -u "$windows_path"`
56288    new_path="$unix_path"
56289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56290    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56291    new_path="$unix_path"
56292  fi
56293
56294  if test "x$path" != "x$new_path"; then
56295    MSVC_DLL="$new_path"
56296    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56297$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56298  fi
56299
56300  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56301  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56302
56303    else
56304      # We're on a unix platform. Hooray! :)
56305      path="$MSVC_DLL"
56306      has_space=`$ECHO "$path" | $GREP " "`
56307      if test "x$has_space" != x; then
56308        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56309$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56310        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56311      fi
56312
56313      # Use eval to expand a potential ~
56314      eval path="$path"
56315      if test ! -f "$path" && test ! -d "$path"; then
56316        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56317      fi
56318
56319      if test -d "$path"; then
56320        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56321      else
56322        dir="`$DIRNAME "$path"`"
56323        base="`$BASENAME "$path"`"
56324        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56325      fi
56326    fi
56327  fi
56328
56329      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56330$as_echo_n "checking for $DLL_NAME... " >&6; }
56331      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56332$as_echo "$MSVC_DLL" >&6; }
56333    else
56334      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56335$as_echo "incorrect, ignoring" >&6; }
56336      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56337$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56338    fi
56339  fi
56340
56341    fi
56342  fi
56343
56344  if test "x$MSVC_DLL" = x; then
56345    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
56346    # (This was the original behaviour; kept since it might turn something up)
56347    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
56348      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56349        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56350	    | $GREP x64 | $HEAD --lines 1`
56351      else
56352        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56353	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
56354        if test "x$POSSIBLE_MSVC_DLL" = x; then
56355          # We're grasping at straws now...
56356          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56357	      | $HEAD --lines 1`
56358        fi
56359      fi
56360
56361
56362  DLL_NAME="$DLL_NAME"
56363  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56364  METHOD="search of VCINSTALLDIR"
56365  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56366    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56367$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56368
56369    # Need to check if the found msvcr is correct architecture
56370    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56371$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56372    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56373    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56374      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56375      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56376      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56377        CORRECT_MSVCR_ARCH="PE32 executable"
56378      else
56379        CORRECT_MSVCR_ARCH="PE32+ executable"
56380      fi
56381    else
56382      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56383        CORRECT_MSVCR_ARCH=386
56384      else
56385        CORRECT_MSVCR_ARCH=x86-64
56386      fi
56387    fi
56388    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56389      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56390$as_echo "ok" >&6; }
56391      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56392
56393  # Only process if variable expands to non-empty
56394
56395  if test "x$MSVC_DLL" != x; then
56396    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56397
56398  # Input might be given as Windows format, start by converting to
56399  # unix format.
56400  path="$MSVC_DLL"
56401  new_path=`$CYGPATH -u "$path"`
56402
56403  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56404  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56405  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56406  # "foo.exe" is OK but "foo" is an error.
56407  #
56408  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56409  # It is also a way to make sure we got the proper file name for the real test later on.
56410  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56411  if test "x$test_shortpath" = x; then
56412    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56413$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56414    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56415  fi
56416
56417  # Call helper function which possibly converts this using DOS-style short mode.
56418  # If so, the updated path is stored in $new_path.
56419
56420  input_path="$new_path"
56421  # Check if we need to convert this using DOS-style short mode. If the path
56422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56423  # take no chances and rewrite it.
56424  # Note: m4 eats our [], so we need to use [ and ] instead.
56425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56426  if test "x$has_forbidden_chars" != x; then
56427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56428    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56429    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56430    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56431      # Going to short mode and back again did indeed matter. Since short mode is
56432      # case insensitive, let's make it lowercase to improve readability.
56433      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56434      # Now convert it back to Unix-style (cygpath)
56435      input_path=`$CYGPATH -u "$shortmode_path"`
56436      new_path="$input_path"
56437    fi
56438  fi
56439
56440  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56441  if test "x$test_cygdrive_prefix" = x; then
56442    # As a simple fix, exclude /usr/bin since it's not a real path.
56443    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56444      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56445      # a path prefixed by /cygdrive for fixpath to work.
56446      new_path="$CYGWIN_ROOT_PATH$input_path"
56447    fi
56448  fi
56449
56450
56451  if test "x$path" != "x$new_path"; then
56452    MSVC_DLL="$new_path"
56453    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56454$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56455  fi
56456
56457    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56458
56459  path="$MSVC_DLL"
56460  has_colon=`$ECHO $path | $GREP ^.:`
56461  new_path="$path"
56462  if test "x$has_colon" = x; then
56463    # Not in mixed or Windows style, start by that.
56464    new_path=`cmd //c echo $path`
56465  fi
56466
56467
56468  input_path="$new_path"
56469  # Check if we need to convert this using DOS-style short mode. If the path
56470  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56471  # take no chances and rewrite it.
56472  # Note: m4 eats our [], so we need to use [ and ] instead.
56473  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56474  if test "x$has_forbidden_chars" != x; then
56475    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56476    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56477  fi
56478
56479
56480  windows_path="$new_path"
56481  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56482    unix_path=`$CYGPATH -u "$windows_path"`
56483    new_path="$unix_path"
56484  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56485    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56486    new_path="$unix_path"
56487  fi
56488
56489  if test "x$path" != "x$new_path"; then
56490    MSVC_DLL="$new_path"
56491    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56492$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56493  fi
56494
56495  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56496  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56497
56498    else
56499      # We're on a unix platform. Hooray! :)
56500      path="$MSVC_DLL"
56501      has_space=`$ECHO "$path" | $GREP " "`
56502      if test "x$has_space" != x; then
56503        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56504$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56505        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56506      fi
56507
56508      # Use eval to expand a potential ~
56509      eval path="$path"
56510      if test ! -f "$path" && test ! -d "$path"; then
56511        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56512      fi
56513
56514      if test -d "$path"; then
56515        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56516      else
56517        dir="`$DIRNAME "$path"`"
56518        base="`$BASENAME "$path"`"
56519        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56520      fi
56521    fi
56522  fi
56523
56524      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56525$as_echo_n "checking for $DLL_NAME... " >&6; }
56526      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56527$as_echo "$MSVC_DLL" >&6; }
56528    else
56529      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56530$as_echo "incorrect, ignoring" >&6; }
56531      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56532$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56533    fi
56534  fi
56535
56536    fi
56537  fi
56538
56539  if test "x$MSVC_DLL" = x; then
56540    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56541$as_echo_n "checking for $DLL_NAME... " >&6; }
56542    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56543$as_echo "no" >&6; }
56544    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
56545  fi
56546
56547      MSVCP_DLL="$MSVC_DLL"
56548    fi
56549
56550  fi
56551
56552  fi
56553
56554
56555  if test "x$NEEDS_LIB_X11" = xfalse; then
56556    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
56557      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
56558$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
56559    fi
56560    X_CFLAGS=
56561    X_LIBS=
56562  else
56563
56564    if test "x${with_x}" = xno; then
56565      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
56566    fi
56567
56568    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
56569      # The user has specified a X11 base directory. Use it for includes and
56570      # libraries, unless explicitly overridden.
56571      if test "x$x_includes" = xNONE; then
56572        x_includes="${with_x}/include"
56573      fi
56574      if test "x$x_libraries" = xNONE; then
56575        x_libraries="${with_x}/lib"
56576      fi
56577    else
56578      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
56579      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
56580      # --x-libraries for the sysroot, if that seems to be correct.
56581      if test "x$SYSROOT" != "x"; then
56582        if test "x$x_includes" = xNONE; then
56583          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
56584            x_includes="$SYSROOT/usr/X11R6/include"
56585          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
56586            x_includes="$SYSROOT/usr/include"
56587          fi
56588        fi
56589        if test "x$x_libraries" = xNONE; then
56590          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
56591            x_libraries="$SYSROOT/usr/X11R6/lib"
56592          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56593            x_libraries="$SYSROOT/usr/lib64"
56594          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
56595            x_libraries="$SYSROOT/usr/lib"
56596          fi
56597        fi
56598      fi
56599    fi
56600
56601    # Now let autoconf do it's magic
56602    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
56603$as_echo_n "checking for X... " >&6; }
56604
56605
56606# Check whether --with-x was given.
56607if test "${with_x+set}" = set; then :
56608  withval=$with_x;
56609fi
56610
56611# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
56612if test "x$with_x" = xno; then
56613  # The user explicitly disabled X.
56614  have_x=disabled
56615else
56616  case $x_includes,$x_libraries in #(
56617    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
56618    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
56619  $as_echo_n "(cached) " >&6
56620else
56621  # One or both of the vars are not set, and there is no cached value.
56622ac_x_includes=no ac_x_libraries=no
56623rm -f -r conftest.dir
56624if mkdir conftest.dir; then
56625  cd conftest.dir
56626  cat >Imakefile <<'_ACEOF'
56627incroot:
56628	@echo incroot='${INCROOT}'
56629usrlibdir:
56630	@echo usrlibdir='${USRLIBDIR}'
56631libdir:
56632	@echo libdir='${LIBDIR}'
56633_ACEOF
56634  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
56635    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
56636    for ac_var in incroot usrlibdir libdir; do
56637      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
56638    done
56639    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
56640    for ac_extension in a so sl dylib la dll; do
56641      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
56642	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
56643	ac_im_usrlibdir=$ac_im_libdir; break
56644      fi
56645    done
56646    # Screen out bogus values from the imake configuration.  They are
56647    # bogus both because they are the default anyway, and because
56648    # using them would break gcc on systems where it needs fixed includes.
56649    case $ac_im_incroot in
56650	/usr/include) ac_x_includes= ;;
56651	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
56652    esac
56653    case $ac_im_usrlibdir in
56654	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
56655	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
56656    esac
56657  fi
56658  cd ..
56659  rm -f -r conftest.dir
56660fi
56661
56662# Standard set of common directories for X headers.
56663# Check X11 before X11Rn because it is often a symlink to the current release.
56664ac_x_header_dirs='
56665/usr/X11/include
56666/usr/X11R7/include
56667/usr/X11R6/include
56668/usr/X11R5/include
56669/usr/X11R4/include
56670
56671/usr/include/X11
56672/usr/include/X11R7
56673/usr/include/X11R6
56674/usr/include/X11R5
56675/usr/include/X11R4
56676
56677/usr/local/X11/include
56678/usr/local/X11R7/include
56679/usr/local/X11R6/include
56680/usr/local/X11R5/include
56681/usr/local/X11R4/include
56682
56683/usr/local/include/X11
56684/usr/local/include/X11R7
56685/usr/local/include/X11R6
56686/usr/local/include/X11R5
56687/usr/local/include/X11R4
56688
56689/usr/X386/include
56690/usr/x386/include
56691/usr/XFree86/include/X11
56692
56693/usr/include
56694/usr/local/include
56695/usr/unsupported/include
56696/usr/athena/include
56697/usr/local/x11r5/include
56698/usr/lpp/Xamples/include
56699
56700/usr/openwin/include
56701/usr/openwin/share/include'
56702
56703if test "$ac_x_includes" = no; then
56704  # Guess where to find include files, by looking for Xlib.h.
56705  # First, try using that file with no special directory specified.
56706  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56707/* end confdefs.h.  */
56708#include <X11/Xlib.h>
56709_ACEOF
56710if ac_fn_cxx_try_cpp "$LINENO"; then :
56711  # We can compile using X headers with no special include directory.
56712ac_x_includes=
56713else
56714  for ac_dir in $ac_x_header_dirs; do
56715  if test -r "$ac_dir/X11/Xlib.h"; then
56716    ac_x_includes=$ac_dir
56717    break
56718  fi
56719done
56720fi
56721rm -f conftest.err conftest.i conftest.$ac_ext
56722fi # $ac_x_includes = no
56723
56724if test "$ac_x_libraries" = no; then
56725  # Check for the libraries.
56726  # See if we find them without any special options.
56727  # Don't add to $LIBS permanently.
56728  ac_save_LIBS=$LIBS
56729  LIBS="-lX11 $LIBS"
56730  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56731/* end confdefs.h.  */
56732#include <X11/Xlib.h>
56733int
56734main ()
56735{
56736XrmInitialize ()
56737  ;
56738  return 0;
56739}
56740_ACEOF
56741if ac_fn_cxx_try_link "$LINENO"; then :
56742  LIBS=$ac_save_LIBS
56743# We can link X programs with no special library path.
56744ac_x_libraries=
56745else
56746  LIBS=$ac_save_LIBS
56747for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56748do
56749  # Don't even attempt the hair of trying to link an X program!
56750  for ac_extension in a so sl dylib la dll; do
56751    if test -r "$ac_dir/libX11.$ac_extension"; then
56752      ac_x_libraries=$ac_dir
56753      break 2
56754    fi
56755  done
56756done
56757fi
56758rm -f core conftest.err conftest.$ac_objext \
56759    conftest$ac_exeext conftest.$ac_ext
56760fi # $ac_x_libraries = no
56761
56762case $ac_x_includes,$ac_x_libraries in #(
56763  no,* | *,no | *\'*)
56764    # Didn't find X, or a directory has "'" in its name.
56765    ac_cv_have_x="have_x=no";; #(
56766  *)
56767    # Record where we found X for the cache.
56768    ac_cv_have_x="have_x=yes\
56769	ac_x_includes='$ac_x_includes'\
56770	ac_x_libraries='$ac_x_libraries'"
56771esac
56772fi
56773;; #(
56774    *) have_x=yes;;
56775  esac
56776  eval "$ac_cv_have_x"
56777fi # $with_x != no
56778
56779if test "$have_x" != yes; then
56780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56781$as_echo "$have_x" >&6; }
56782  no_x=yes
56783else
56784  # If each of the values was on the command line, it overrides each guess.
56785  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56786  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56787  # Update the cache value to reflect the command line values.
56788  ac_cv_have_x="have_x=yes\
56789	ac_x_includes='$x_includes'\
56790	ac_x_libraries='$x_libraries'"
56791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56792$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56793fi
56794
56795    if test "$no_x" = yes; then
56796  # Not all programs may use this symbol, but it does not hurt to define it.
56797
56798$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56799
56800  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56801else
56802  if test -n "$x_includes"; then
56803    X_CFLAGS="$X_CFLAGS -I$x_includes"
56804  fi
56805
56806  # It would also be nice to do this for all -L options, not just this one.
56807  if test -n "$x_libraries"; then
56808    X_LIBS="$X_LIBS -L$x_libraries"
56809    # For Solaris; some versions of Sun CC require a space after -R and
56810    # others require no space.  Words are not sufficient . . . .
56811    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56812$as_echo_n "checking whether -R must be followed by a space... " >&6; }
56813    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56814    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56815    ac_cxx_werror_flag=yes
56816    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56817/* end confdefs.h.  */
56818
56819int
56820main ()
56821{
56822
56823  ;
56824  return 0;
56825}
56826_ACEOF
56827if ac_fn_cxx_try_link "$LINENO"; then :
56828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56829$as_echo "no" >&6; }
56830       X_LIBS="$X_LIBS -R$x_libraries"
56831else
56832  LIBS="$ac_xsave_LIBS -R $x_libraries"
56833       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56834/* end confdefs.h.  */
56835
56836int
56837main ()
56838{
56839
56840  ;
56841  return 0;
56842}
56843_ACEOF
56844if ac_fn_cxx_try_link "$LINENO"; then :
56845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56846$as_echo "yes" >&6; }
56847	  X_LIBS="$X_LIBS -R $x_libraries"
56848else
56849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56850$as_echo "neither works" >&6; }
56851fi
56852rm -f core conftest.err conftest.$ac_objext \
56853    conftest$ac_exeext conftest.$ac_ext
56854fi
56855rm -f core conftest.err conftest.$ac_objext \
56856    conftest$ac_exeext conftest.$ac_ext
56857    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56858    LIBS=$ac_xsave_LIBS
56859  fi
56860
56861  # Check for system-dependent libraries X programs must link with.
56862  # Do this before checking for the system-independent R6 libraries
56863  # (-lICE), since we may need -lsocket or whatever for X linking.
56864
56865  if test "$ISC" = yes; then
56866    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56867  else
56868    # Martyn Johnson says this is needed for Ultrix, if the X
56869    # libraries were built with DECnet support.  And Karl Berry says
56870    # the Alpha needs dnet_stub (dnet does not exist).
56871    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56872    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56873/* end confdefs.h.  */
56874
56875/* Override any GCC internal prototype to avoid an error.
56876   Use char because int might match the return type of a GCC
56877   builtin and then its argument prototype would still apply.  */
56878#ifdef __cplusplus
56879extern "C"
56880#endif
56881char XOpenDisplay ();
56882int
56883main ()
56884{
56885return XOpenDisplay ();
56886  ;
56887  return 0;
56888}
56889_ACEOF
56890if ac_fn_cxx_try_link "$LINENO"; then :
56891
56892else
56893  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56894$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56895if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56896  $as_echo_n "(cached) " >&6
56897else
56898  ac_check_lib_save_LIBS=$LIBS
56899LIBS="-ldnet  $LIBS"
56900cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56901/* end confdefs.h.  */
56902
56903/* Override any GCC internal prototype to avoid an error.
56904   Use char because int might match the return type of a GCC
56905   builtin and then its argument prototype would still apply.  */
56906#ifdef __cplusplus
56907extern "C"
56908#endif
56909char dnet_ntoa ();
56910int
56911main ()
56912{
56913return dnet_ntoa ();
56914  ;
56915  return 0;
56916}
56917_ACEOF
56918if ac_fn_cxx_try_link "$LINENO"; then :
56919  ac_cv_lib_dnet_dnet_ntoa=yes
56920else
56921  ac_cv_lib_dnet_dnet_ntoa=no
56922fi
56923rm -f core conftest.err conftest.$ac_objext \
56924    conftest$ac_exeext conftest.$ac_ext
56925LIBS=$ac_check_lib_save_LIBS
56926fi
56927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56928$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56929if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56930  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56931fi
56932
56933    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56934      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56935$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56936if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56937  $as_echo_n "(cached) " >&6
56938else
56939  ac_check_lib_save_LIBS=$LIBS
56940LIBS="-ldnet_stub  $LIBS"
56941cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56942/* end confdefs.h.  */
56943
56944/* Override any GCC internal prototype to avoid an error.
56945   Use char because int might match the return type of a GCC
56946   builtin and then its argument prototype would still apply.  */
56947#ifdef __cplusplus
56948extern "C"
56949#endif
56950char dnet_ntoa ();
56951int
56952main ()
56953{
56954return dnet_ntoa ();
56955  ;
56956  return 0;
56957}
56958_ACEOF
56959if ac_fn_cxx_try_link "$LINENO"; then :
56960  ac_cv_lib_dnet_stub_dnet_ntoa=yes
56961else
56962  ac_cv_lib_dnet_stub_dnet_ntoa=no
56963fi
56964rm -f core conftest.err conftest.$ac_objext \
56965    conftest$ac_exeext conftest.$ac_ext
56966LIBS=$ac_check_lib_save_LIBS
56967fi
56968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56969$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56970if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56971  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56972fi
56973
56974    fi
56975fi
56976rm -f core conftest.err conftest.$ac_objext \
56977    conftest$ac_exeext conftest.$ac_ext
56978    LIBS="$ac_xsave_LIBS"
56979
56980    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56981    # to get the SysV transport functions.
56982    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56983    # needs -lnsl.
56984    # The nsl library prevents programs from opening the X display
56985    # on Irix 5.2, according to T.E. Dickey.
56986    # The functions gethostbyname, getservbyname, and inet_addr are
56987    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56988    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56989if test "x$ac_cv_func_gethostbyname" = xyes; then :
56990
56991fi
56992
56993    if test $ac_cv_func_gethostbyname = no; then
56994      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56995$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56996if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56997  $as_echo_n "(cached) " >&6
56998else
56999  ac_check_lib_save_LIBS=$LIBS
57000LIBS="-lnsl  $LIBS"
57001cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57002/* end confdefs.h.  */
57003
57004/* Override any GCC internal prototype to avoid an error.
57005   Use char because int might match the return type of a GCC
57006   builtin and then its argument prototype would still apply.  */
57007#ifdef __cplusplus
57008extern "C"
57009#endif
57010char gethostbyname ();
57011int
57012main ()
57013{
57014return gethostbyname ();
57015  ;
57016  return 0;
57017}
57018_ACEOF
57019if ac_fn_cxx_try_link "$LINENO"; then :
57020  ac_cv_lib_nsl_gethostbyname=yes
57021else
57022  ac_cv_lib_nsl_gethostbyname=no
57023fi
57024rm -f core conftest.err conftest.$ac_objext \
57025    conftest$ac_exeext conftest.$ac_ext
57026LIBS=$ac_check_lib_save_LIBS
57027fi
57028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
57029$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
57030if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
57031  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
57032fi
57033
57034      if test $ac_cv_lib_nsl_gethostbyname = no; then
57035	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
57036$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
57037if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
57038  $as_echo_n "(cached) " >&6
57039else
57040  ac_check_lib_save_LIBS=$LIBS
57041LIBS="-lbsd  $LIBS"
57042cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57043/* end confdefs.h.  */
57044
57045/* Override any GCC internal prototype to avoid an error.
57046   Use char because int might match the return type of a GCC
57047   builtin and then its argument prototype would still apply.  */
57048#ifdef __cplusplus
57049extern "C"
57050#endif
57051char gethostbyname ();
57052int
57053main ()
57054{
57055return gethostbyname ();
57056  ;
57057  return 0;
57058}
57059_ACEOF
57060if ac_fn_cxx_try_link "$LINENO"; then :
57061  ac_cv_lib_bsd_gethostbyname=yes
57062else
57063  ac_cv_lib_bsd_gethostbyname=no
57064fi
57065rm -f core conftest.err conftest.$ac_objext \
57066    conftest$ac_exeext conftest.$ac_ext
57067LIBS=$ac_check_lib_save_LIBS
57068fi
57069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
57070$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
57071if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
57072  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
57073fi
57074
57075      fi
57076    fi
57077
57078    # lieder@skyler.mavd.honeywell.com says without -lsocket,
57079    # socket/setsockopt and other routines are undefined under SCO ODT
57080    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
57081    # on later versions), says Simon Leinen: it contains gethostby*
57082    # variants that don't use the name server (or something).  -lsocket
57083    # must be given before -lnsl if both are needed.  We assume that
57084    # if connect needs -lnsl, so does gethostbyname.
57085    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
57086if test "x$ac_cv_func_connect" = xyes; then :
57087
57088fi
57089
57090    if test $ac_cv_func_connect = no; then
57091      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
57092$as_echo_n "checking for connect in -lsocket... " >&6; }
57093if ${ac_cv_lib_socket_connect+:} false; then :
57094  $as_echo_n "(cached) " >&6
57095else
57096  ac_check_lib_save_LIBS=$LIBS
57097LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
57098cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57099/* end confdefs.h.  */
57100
57101/* Override any GCC internal prototype to avoid an error.
57102   Use char because int might match the return type of a GCC
57103   builtin and then its argument prototype would still apply.  */
57104#ifdef __cplusplus
57105extern "C"
57106#endif
57107char connect ();
57108int
57109main ()
57110{
57111return connect ();
57112  ;
57113  return 0;
57114}
57115_ACEOF
57116if ac_fn_cxx_try_link "$LINENO"; then :
57117  ac_cv_lib_socket_connect=yes
57118else
57119  ac_cv_lib_socket_connect=no
57120fi
57121rm -f core conftest.err conftest.$ac_objext \
57122    conftest$ac_exeext conftest.$ac_ext
57123LIBS=$ac_check_lib_save_LIBS
57124fi
57125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
57126$as_echo "$ac_cv_lib_socket_connect" >&6; }
57127if test "x$ac_cv_lib_socket_connect" = xyes; then :
57128  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
57129fi
57130
57131    fi
57132
57133    # Guillermo Gomez says -lposix is necessary on A/UX.
57134    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
57135if test "x$ac_cv_func_remove" = xyes; then :
57136
57137fi
57138
57139    if test $ac_cv_func_remove = no; then
57140      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
57141$as_echo_n "checking for remove in -lposix... " >&6; }
57142if ${ac_cv_lib_posix_remove+:} false; then :
57143  $as_echo_n "(cached) " >&6
57144else
57145  ac_check_lib_save_LIBS=$LIBS
57146LIBS="-lposix  $LIBS"
57147cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57148/* end confdefs.h.  */
57149
57150/* Override any GCC internal prototype to avoid an error.
57151   Use char because int might match the return type of a GCC
57152   builtin and then its argument prototype would still apply.  */
57153#ifdef __cplusplus
57154extern "C"
57155#endif
57156char remove ();
57157int
57158main ()
57159{
57160return remove ();
57161  ;
57162  return 0;
57163}
57164_ACEOF
57165if ac_fn_cxx_try_link "$LINENO"; then :
57166  ac_cv_lib_posix_remove=yes
57167else
57168  ac_cv_lib_posix_remove=no
57169fi
57170rm -f core conftest.err conftest.$ac_objext \
57171    conftest$ac_exeext conftest.$ac_ext
57172LIBS=$ac_check_lib_save_LIBS
57173fi
57174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
57175$as_echo "$ac_cv_lib_posix_remove" >&6; }
57176if test "x$ac_cv_lib_posix_remove" = xyes; then :
57177  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
57178fi
57179
57180    fi
57181
57182    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
57183    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
57184if test "x$ac_cv_func_shmat" = xyes; then :
57185
57186fi
57187
57188    if test $ac_cv_func_shmat = no; then
57189      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
57190$as_echo_n "checking for shmat in -lipc... " >&6; }
57191if ${ac_cv_lib_ipc_shmat+:} false; then :
57192  $as_echo_n "(cached) " >&6
57193else
57194  ac_check_lib_save_LIBS=$LIBS
57195LIBS="-lipc  $LIBS"
57196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57197/* end confdefs.h.  */
57198
57199/* Override any GCC internal prototype to avoid an error.
57200   Use char because int might match the return type of a GCC
57201   builtin and then its argument prototype would still apply.  */
57202#ifdef __cplusplus
57203extern "C"
57204#endif
57205char shmat ();
57206int
57207main ()
57208{
57209return shmat ();
57210  ;
57211  return 0;
57212}
57213_ACEOF
57214if ac_fn_cxx_try_link "$LINENO"; then :
57215  ac_cv_lib_ipc_shmat=yes
57216else
57217  ac_cv_lib_ipc_shmat=no
57218fi
57219rm -f core conftest.err conftest.$ac_objext \
57220    conftest$ac_exeext conftest.$ac_ext
57221LIBS=$ac_check_lib_save_LIBS
57222fi
57223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
57224$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
57225if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
57226  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
57227fi
57228
57229    fi
57230  fi
57231
57232  # Check for libraries that X11R6 Xt/Xaw programs need.
57233  ac_save_LDFLAGS=$LDFLAGS
57234  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
57235  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
57236  # check for ICE first), but we must link in the order -lSM -lICE or
57237  # we get undefined symbols.  So assume we have SM if we have ICE.
57238  # These have to be linked with before -lX11, unlike the other
57239  # libraries we check for below, so use a different variable.
57240  # John Interrante, Karl Berry
57241  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
57242$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
57243if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
57244  $as_echo_n "(cached) " >&6
57245else
57246  ac_check_lib_save_LIBS=$LIBS
57247LIBS="-lICE $X_EXTRA_LIBS $LIBS"
57248cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57249/* end confdefs.h.  */
57250
57251/* Override any GCC internal prototype to avoid an error.
57252   Use char because int might match the return type of a GCC
57253   builtin and then its argument prototype would still apply.  */
57254#ifdef __cplusplus
57255extern "C"
57256#endif
57257char IceConnectionNumber ();
57258int
57259main ()
57260{
57261return IceConnectionNumber ();
57262  ;
57263  return 0;
57264}
57265_ACEOF
57266if ac_fn_cxx_try_link "$LINENO"; then :
57267  ac_cv_lib_ICE_IceConnectionNumber=yes
57268else
57269  ac_cv_lib_ICE_IceConnectionNumber=no
57270fi
57271rm -f core conftest.err conftest.$ac_objext \
57272    conftest$ac_exeext conftest.$ac_ext
57273LIBS=$ac_check_lib_save_LIBS
57274fi
57275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
57276$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
57277if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
57278  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
57279fi
57280
57281  LDFLAGS=$ac_save_LDFLAGS
57282
57283fi
57284
57285
57286    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
57287    # this doesn't make sense so we remove it.
57288    if test "x$COMPILE_TYPE" = xcross; then
57289      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
57290    fi
57291
57292    if test "x$no_x" = xyes; then
57293
57294  # Print a helpful message on how to acquire the necessary build dependency.
57295  # x11 is the help tag: freetype, cups, alsa etc
57296  MISSING_DEPENDENCY=x11
57297
57298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57299    cygwin_help $MISSING_DEPENDENCY
57300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57301    msys_help $MISSING_DEPENDENCY
57302  else
57303    PKGHANDLER_COMMAND=
57304
57305    case $PKGHANDLER in
57306      apt-get)
57307        apt_help     $MISSING_DEPENDENCY ;;
57308      yum)
57309        yum_help     $MISSING_DEPENDENCY ;;
57310      brew)
57311        brew_help    $MISSING_DEPENDENCY ;;
57312      port)
57313        port_help    $MISSING_DEPENDENCY ;;
57314      pkgutil)
57315        pkgutil_help $MISSING_DEPENDENCY ;;
57316      pkgadd)
57317        pkgadd_help  $MISSING_DEPENDENCY ;;
57318    esac
57319
57320    if test "x$PKGHANDLER_COMMAND" != x; then
57321      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57322    fi
57323  fi
57324
57325      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
57326    fi
57327
57328    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
57329      OPENWIN_HOME="/usr/openwin"
57330      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
57331      X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
57332          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
57333    fi
57334
57335    ac_ext=c
57336ac_cpp='$CPP $CPPFLAGS'
57337ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57338ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57339ac_compiler_gnu=$ac_cv_c_compiler_gnu
57340
57341    OLD_CFLAGS="$CFLAGS"
57342    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
57343
57344    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
57345    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
57346do :
57347  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57348ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
57349          # include <X11/Xlib.h>
57350          # include <X11/Xutil.h>
57351
57352
57353"
57354if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57355  cat >>confdefs.h <<_ACEOF
57356#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57357_ACEOF
57358 X11_HEADERS_OK=yes
57359else
57360  X11_HEADERS_OK=no; break
57361fi
57362
57363done
57364
57365
57366    if test "x$X11_HEADERS_OK" = xno; then
57367
57368  # Print a helpful message on how to acquire the necessary build dependency.
57369  # x11 is the help tag: freetype, cups, alsa etc
57370  MISSING_DEPENDENCY=x11
57371
57372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57373    cygwin_help $MISSING_DEPENDENCY
57374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57375    msys_help $MISSING_DEPENDENCY
57376  else
57377    PKGHANDLER_COMMAND=
57378
57379    case $PKGHANDLER in
57380      apt-get)
57381        apt_help     $MISSING_DEPENDENCY ;;
57382      yum)
57383        yum_help     $MISSING_DEPENDENCY ;;
57384      brew)
57385        brew_help    $MISSING_DEPENDENCY ;;
57386      port)
57387        port_help    $MISSING_DEPENDENCY ;;
57388      pkgutil)
57389        pkgutil_help $MISSING_DEPENDENCY ;;
57390      pkgadd)
57391        pkgadd_help  $MISSING_DEPENDENCY ;;
57392    esac
57393
57394    if test "x$PKGHANDLER_COMMAND" != x; then
57395      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57396    fi
57397  fi
57398
57399      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
57400    fi
57401
57402    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
57403    # defined in libawt_xawt.
57404    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
57405$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
57406    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57407/* end confdefs.h.  */
57408#include <X11/extensions/Xrender.h>
57409int
57410main ()
57411{
57412XLinearGradient x;
57413  ;
57414  return 0;
57415}
57416_ACEOF
57417if ac_fn_c_try_compile "$LINENO"; then :
57418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57419$as_echo "yes" >&6; }
57420else
57421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57422$as_echo "no" >&6; }
57423         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
57424fi
57425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
57426
57427    CFLAGS="$OLD_CFLAGS"
57428    ac_ext=cpp
57429ac_cpp='$CXXCPP $CPPFLAGS'
57430ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57431ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57432ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
57433
57434  fi # NEEDS_LIB_X11
57435
57436
57437
57438
57439
57440
57441# Check whether --with-cups was given.
57442if test "${with_cups+set}" = set; then :
57443  withval=$with_cups;
57444fi
57445
57446
57447# Check whether --with-cups-include was given.
57448if test "${with_cups_include+set}" = set; then :
57449  withval=$with_cups_include;
57450fi
57451
57452
57453  if test "x$NEEDS_LIB_CUPS" = xfalse; then
57454    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
57455        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
57456      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
57457$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
57458    fi
57459    CUPS_CFLAGS=
57460  else
57461    CUPS_FOUND=no
57462
57463    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
57464      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
57465    fi
57466
57467    if test "x${with_cups}" != x; then
57468      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57469$as_echo_n "checking for cups headers... " >&6; }
57470      if test -s "${with_cups}/include/cups/cups.h"; then
57471        CUPS_CFLAGS="-I${with_cups}/include"
57472        CUPS_FOUND=yes
57473        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57474$as_echo "$CUPS_FOUND" >&6; }
57475      else
57476        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
57477      fi
57478    fi
57479    if test "x${with_cups_include}" != x; then
57480      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57481$as_echo_n "checking for cups headers... " >&6; }
57482      if test -s "${with_cups_include}/cups/cups.h"; then
57483        CUPS_CFLAGS="-I${with_cups_include}"
57484        CUPS_FOUND=yes
57485        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57486$as_echo "$CUPS_FOUND" >&6; }
57487      else
57488        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
57489      fi
57490    fi
57491    if test "x$CUPS_FOUND" = xno; then
57492      # Are the cups headers installed in the default /usr/include location?
57493      for ac_header in cups/cups.h cups/ppd.h
57494do :
57495  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57496ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
57497if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57498  cat >>confdefs.h <<_ACEOF
57499#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57500_ACEOF
57501
57502          CUPS_FOUND=yes
57503          CUPS_CFLAGS=
57504          DEFAULT_CUPS=yes
57505
57506fi
57507
57508done
57509
57510    fi
57511    if test "x$CUPS_FOUND" = xno; then
57512
57513  # Print a helpful message on how to acquire the necessary build dependency.
57514  # cups is the help tag: freetype, cups, alsa etc
57515  MISSING_DEPENDENCY=cups
57516
57517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57518    cygwin_help $MISSING_DEPENDENCY
57519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57520    msys_help $MISSING_DEPENDENCY
57521  else
57522    PKGHANDLER_COMMAND=
57523
57524    case $PKGHANDLER in
57525      apt-get)
57526        apt_help     $MISSING_DEPENDENCY ;;
57527      yum)
57528        yum_help     $MISSING_DEPENDENCY ;;
57529      brew)
57530        brew_help    $MISSING_DEPENDENCY ;;
57531      port)
57532        port_help    $MISSING_DEPENDENCY ;;
57533      pkgutil)
57534        pkgutil_help $MISSING_DEPENDENCY ;;
57535      pkgadd)
57536        pkgadd_help  $MISSING_DEPENDENCY ;;
57537    esac
57538
57539    if test "x$PKGHANDLER_COMMAND" != x; then
57540      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57541    fi
57542  fi
57543
57544      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
57545    fi
57546  fi
57547
57548
57549
57550
57551
57552# Check whether --with-freetype was given.
57553if test "${with_freetype+set}" = set; then :
57554  withval=$with_freetype;
57555fi
57556
57557
57558# Check whether --with-freetype-include was given.
57559if test "${with_freetype_include+set}" = set; then :
57560  withval=$with_freetype_include;
57561fi
57562
57563
57564# Check whether --with-freetype-lib was given.
57565if test "${with_freetype_lib+set}" = set; then :
57566  withval=$with_freetype_lib;
57567fi
57568
57569
57570# Check whether --with-freetype-src was given.
57571if test "${with_freetype_src+set}" = set; then :
57572  withval=$with_freetype_src;
57573fi
57574
57575  # Check whether --enable-freetype-bundling was given.
57576if test "${enable_freetype_bundling+set}" = set; then :
57577  enableval=$enable_freetype_bundling;
57578fi
57579
57580
57581  # Need to specify explicitly since it needs to be overridden on some versions of macosx
57582  FREETYPE_BASE_NAME=freetype
57583  FREETYPE_CFLAGS=
57584  FREETYPE_LIBS=
57585  FREETYPE_BUNDLE_LIB_PATH=
57586
57587  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
57588    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
57589        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
57590        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
57591        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
57592      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
57593$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
57594    fi
57595    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
57596      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
57597$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
57598    fi
57599  else
57600    # freetype is needed to build; go get it!
57601
57602    BUNDLE_FREETYPE="$enable_freetype_bundling"
57603
57604    if  test "x$with_freetype_src" != x; then
57605      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57606        # Try to build freetype if --with-freetype-src was given on Windows
57607
57608  FREETYPE_SRC_PATH="$with_freetype_src"
57609  BUILD_FREETYPE=yes
57610
57611  # Check if the freetype sources are acessible..
57612  if ! test -d $FREETYPE_SRC_PATH; then
57613    { $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
57614$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
57615    BUILD_FREETYPE=no
57616  fi
57617  # ..and contain a vc2010 project file
57618  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
57619  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
57620    { $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
57621$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
57622    BUILD_FREETYPE=no
57623  fi
57624  # Now check if configure found a version of 'msbuild.exe'
57625  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
57626    { $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
57627$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;}
57628    BUILD_FREETYPE=no
57629  fi
57630
57631  # Ready to go..
57632  if test "x$BUILD_FREETYPE" = xyes; then
57633    # msbuild requires trailing slashes for output directories
57634    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
57635    freetype_lib_path_unix="$freetype_lib_path"
57636    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
57637
57638  unix_path="$vcxproj_path"
57639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57640    windows_path=`$CYGPATH -m "$unix_path"`
57641    vcxproj_path="$windows_path"
57642  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57643    windows_path=`cmd //c echo $unix_path`
57644    vcxproj_path="$windows_path"
57645  fi
57646
57647
57648  unix_path="$freetype_lib_path"
57649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57650    windows_path=`$CYGPATH -m "$unix_path"`
57651    freetype_lib_path="$windows_path"
57652  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57653    windows_path=`cmd //c echo $unix_path`
57654    freetype_lib_path="$windows_path"
57655  fi
57656
57657
57658  unix_path="$freetype_obj_path"
57659  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57660    windows_path=`$CYGPATH -m "$unix_path"`
57661    freetype_obj_path="$windows_path"
57662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57663    windows_path=`cmd //c echo $unix_path`
57664    freetype_obj_path="$windows_path"
57665  fi
57666
57667    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57668      freetype_platform=x64
57669    else
57670      freetype_platform=win32
57671    fi
57672
57673    # The original freetype project file is for VS 2010 (i.e. 'v100'),
57674    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
57675    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
57676    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
57677    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
57678$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
57679
57680    # First we try to build the freetype.dll
57681    $ECHO -e "@echo off\n"\
57682        "$MSBUILD $vcxproj_path "\
57683        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57684        "/p:Configuration=\"Release Multithreaded\" "\
57685        "/p:Platform=$freetype_platform "\
57686        "/p:ConfigurationType=DynamicLibrary "\
57687        "/p:TargetName=freetype "\
57688        "/p:OutDir=\"$freetype_lib_path\" "\
57689        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
57690    cmd /c freetype.bat
57691
57692    if test -s "$freetype_lib_path_unix/freetype.dll"; then
57693      # If that succeeds we also build freetype.lib
57694      $ECHO -e "@echo off\n"\
57695          "$MSBUILD $vcxproj_path "\
57696          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57697          "/p:Configuration=\"Release Multithreaded\" "\
57698          "/p:Platform=$freetype_platform "\
57699          "/p:ConfigurationType=StaticLibrary "\
57700          "/p:TargetName=freetype "\
57701          "/p:OutDir=\"$freetype_lib_path\" "\
57702          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
57703      cmd /c freetype.bat
57704
57705      if test -s "$freetype_lib_path_unix/freetype.lib"; then
57706        # Once we build both, lib and dll, set freetype lib and include path appropriately
57707        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
57708        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
57709        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
57710$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
57711      else
57712        BUILD_FREETYPE=no
57713      fi
57714    else
57715      BUILD_FREETYPE=no
57716    fi
57717  fi
57718
57719        if test "x$BUILD_FREETYPE" = xyes; then
57720          # Okay, we built it. Check that it works.
57721
57722  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57723  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57724  METHOD="--with-freetype-src"
57725
57726  # Let's start with an optimistic view of the world :-)
57727  FOUND_FREETYPE=yes
57728
57729  # First look for the canonical freetype main include file ft2build.h.
57730  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57731    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57732    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57733    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57734      # Fail.
57735      FOUND_FREETYPE=no
57736    fi
57737  fi
57738
57739  if test "x$FOUND_FREETYPE" = xyes; then
57740    # Include file found, let's continue the sanity check.
57741    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57742$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57743
57744    # Reset to default value
57745    FREETYPE_BASE_NAME=freetype
57746    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57747    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57748      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57749          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57750        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57751        # for the .6 version explicitly.
57752        FREETYPE_BASE_NAME=freetype.6
57753        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57754        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57755$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57756      else
57757        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57758$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57759        FOUND_FREETYPE=no
57760      fi
57761    else
57762      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57763        # On Windows, we will need both .lib and .dll file.
57764        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57765          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57766$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57767          FOUND_FREETYPE=no
57768        fi
57769      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57770          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57771        # Found lib in isa dir, use that instead.
57772        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57773        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57774$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57775      fi
57776    fi
57777  fi
57778
57779  if test "x$FOUND_FREETYPE" = xyes; then
57780
57781  # Only process if variable expands to non-empty
57782
57783  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57784    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57785
57786  # Input might be given as Windows format, start by converting to
57787  # unix format.
57788  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57789  new_path=`$CYGPATH -u "$path"`
57790
57791  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57792  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57793  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57794  # "foo.exe" is OK but "foo" is an error.
57795  #
57796  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57797  # It is also a way to make sure we got the proper file name for the real test later on.
57798  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57799  if test "x$test_shortpath" = x; then
57800    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57801$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57802    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57803  fi
57804
57805  # Call helper function which possibly converts this using DOS-style short mode.
57806  # If so, the updated path is stored in $new_path.
57807
57808  input_path="$new_path"
57809  # Check if we need to convert this using DOS-style short mode. If the path
57810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57811  # take no chances and rewrite it.
57812  # Note: m4 eats our [], so we need to use [ and ] instead.
57813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57814  if test "x$has_forbidden_chars" != x; then
57815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57816    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57817    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57818    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57819      # Going to short mode and back again did indeed matter. Since short mode is
57820      # case insensitive, let's make it lowercase to improve readability.
57821      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57822      # Now convert it back to Unix-style (cygpath)
57823      input_path=`$CYGPATH -u "$shortmode_path"`
57824      new_path="$input_path"
57825    fi
57826  fi
57827
57828  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57829  if test "x$test_cygdrive_prefix" = x; then
57830    # As a simple fix, exclude /usr/bin since it's not a real path.
57831    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57832      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57833      # a path prefixed by /cygdrive for fixpath to work.
57834      new_path="$CYGWIN_ROOT_PATH$input_path"
57835    fi
57836  fi
57837
57838
57839  if test "x$path" != "x$new_path"; then
57840    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57841    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57842$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57843  fi
57844
57845    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57846
57847  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57848  has_colon=`$ECHO $path | $GREP ^.:`
57849  new_path="$path"
57850  if test "x$has_colon" = x; then
57851    # Not in mixed or Windows style, start by that.
57852    new_path=`cmd //c echo $path`
57853  fi
57854
57855
57856  input_path="$new_path"
57857  # Check if we need to convert this using DOS-style short mode. If the path
57858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57859  # take no chances and rewrite it.
57860  # Note: m4 eats our [], so we need to use [ and ] instead.
57861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57862  if test "x$has_forbidden_chars" != x; then
57863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57864    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57865  fi
57866
57867
57868  windows_path="$new_path"
57869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57870    unix_path=`$CYGPATH -u "$windows_path"`
57871    new_path="$unix_path"
57872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57874    new_path="$unix_path"
57875  fi
57876
57877  if test "x$path" != "x$new_path"; then
57878    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57879    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57880$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57881  fi
57882
57883  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57884  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57885
57886    else
57887      # We're on a unix platform. Hooray! :)
57888      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57889      has_space=`$ECHO "$path" | $GREP " "`
57890      if test "x$has_space" != x; then
57891        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57892$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57893        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57894      fi
57895
57896      # Use eval to expand a potential ~
57897      eval path="$path"
57898      if test ! -f "$path" && test ! -d "$path"; then
57899        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57900      fi
57901
57902      if test -d "$path"; then
57903        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57904      else
57905        dir="`$DIRNAME "$path"`"
57906        base="`$BASENAME "$path"`"
57907        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57908      fi
57909    fi
57910  fi
57911
57912
57913  # Only process if variable expands to non-empty
57914
57915  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57916    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57917
57918  # Input might be given as Windows format, start by converting to
57919  # unix format.
57920  path="$POTENTIAL_FREETYPE_LIB_PATH"
57921  new_path=`$CYGPATH -u "$path"`
57922
57923  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57924  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57925  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57926  # "foo.exe" is OK but "foo" is an error.
57927  #
57928  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57929  # It is also a way to make sure we got the proper file name for the real test later on.
57930  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57931  if test "x$test_shortpath" = x; then
57932    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57933$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57934    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57935  fi
57936
57937  # Call helper function which possibly converts this using DOS-style short mode.
57938  # If so, the updated path is stored in $new_path.
57939
57940  input_path="$new_path"
57941  # Check if we need to convert this using DOS-style short mode. If the path
57942  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57943  # take no chances and rewrite it.
57944  # Note: m4 eats our [], so we need to use [ and ] instead.
57945  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57946  if test "x$has_forbidden_chars" != x; then
57947    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57948    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57949    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57950    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57951      # Going to short mode and back again did indeed matter. Since short mode is
57952      # case insensitive, let's make it lowercase to improve readability.
57953      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57954      # Now convert it back to Unix-style (cygpath)
57955      input_path=`$CYGPATH -u "$shortmode_path"`
57956      new_path="$input_path"
57957    fi
57958  fi
57959
57960  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57961  if test "x$test_cygdrive_prefix" = x; then
57962    # As a simple fix, exclude /usr/bin since it's not a real path.
57963    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57964      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57965      # a path prefixed by /cygdrive for fixpath to work.
57966      new_path="$CYGWIN_ROOT_PATH$input_path"
57967    fi
57968  fi
57969
57970
57971  if test "x$path" != "x$new_path"; then
57972    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57973    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57974$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57975  fi
57976
57977    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57978
57979  path="$POTENTIAL_FREETYPE_LIB_PATH"
57980  has_colon=`$ECHO $path | $GREP ^.:`
57981  new_path="$path"
57982  if test "x$has_colon" = x; then
57983    # Not in mixed or Windows style, start by that.
57984    new_path=`cmd //c echo $path`
57985  fi
57986
57987
57988  input_path="$new_path"
57989  # Check if we need to convert this using DOS-style short mode. If the path
57990  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57991  # take no chances and rewrite it.
57992  # Note: m4 eats our [], so we need to use [ and ] instead.
57993  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57994  if test "x$has_forbidden_chars" != x; then
57995    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57996    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57997  fi
57998
57999
58000  windows_path="$new_path"
58001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58002    unix_path=`$CYGPATH -u "$windows_path"`
58003    new_path="$unix_path"
58004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58005    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58006    new_path="$unix_path"
58007  fi
58008
58009  if test "x$path" != "x$new_path"; then
58010    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58011    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58012$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58013  fi
58014
58015  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58016  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58017
58018    else
58019      # We're on a unix platform. Hooray! :)
58020      path="$POTENTIAL_FREETYPE_LIB_PATH"
58021      has_space=`$ECHO "$path" | $GREP " "`
58022      if test "x$has_space" != x; then
58023        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58024$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58025        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58026      fi
58027
58028      # Use eval to expand a potential ~
58029      eval path="$path"
58030      if test ! -f "$path" && test ! -d "$path"; then
58031        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58032      fi
58033
58034      if test -d "$path"; then
58035        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58036      else
58037        dir="`$DIRNAME "$path"`"
58038        base="`$BASENAME "$path"`"
58039        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58040      fi
58041    fi
58042  fi
58043
58044
58045    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58046    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58047$as_echo_n "checking for freetype includes... " >&6; }
58048    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58049$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58050    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58051    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58052$as_echo_n "checking for freetype libraries... " >&6; }
58053    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58054$as_echo "$FREETYPE_LIB_PATH" >&6; }
58055  fi
58056
58057          if test "x$FOUND_FREETYPE" != xyes; then
58058            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
58059          fi
58060        else
58061          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
58062$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
58063          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
58064        fi
58065      else
58066        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
58067$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
58068      fi
58069    fi
58070
58071    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
58072      # User has specified settings
58073
58074      if test "x$BUNDLE_FREETYPE" = x; then
58075        # If not specified, default is to bundle freetype
58076        BUNDLE_FREETYPE=yes
58077      fi
58078
58079      if test "x$with_freetype" != x; then
58080        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
58081        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
58082      fi
58083
58084      # Allow --with-freetype-lib and --with-freetype-include to override
58085      if test "x$with_freetype_include" != x; then
58086        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
58087      fi
58088      if test "x$with_freetype_lib" != x; then
58089        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
58090      fi
58091
58092      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58093        # Okay, we got it. Check that it works.
58094
58095  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58096  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58097  METHOD="--with-freetype"
58098
58099  # Let's start with an optimistic view of the world :-)
58100  FOUND_FREETYPE=yes
58101
58102  # First look for the canonical freetype main include file ft2build.h.
58103  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58104    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58105    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58106    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58107      # Fail.
58108      FOUND_FREETYPE=no
58109    fi
58110  fi
58111
58112  if test "x$FOUND_FREETYPE" = xyes; then
58113    # Include file found, let's continue the sanity check.
58114    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58115$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58116
58117    # Reset to default value
58118    FREETYPE_BASE_NAME=freetype
58119    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58120    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58121      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58122          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58123        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58124        # for the .6 version explicitly.
58125        FREETYPE_BASE_NAME=freetype.6
58126        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58127        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58128$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58129      else
58130        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58131$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58132        FOUND_FREETYPE=no
58133      fi
58134    else
58135      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58136        # On Windows, we will need both .lib and .dll file.
58137        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58138          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58139$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58140          FOUND_FREETYPE=no
58141        fi
58142      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58143          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58144        # Found lib in isa dir, use that instead.
58145        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58146        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58147$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58148      fi
58149    fi
58150  fi
58151
58152  if test "x$FOUND_FREETYPE" = xyes; then
58153
58154  # Only process if variable expands to non-empty
58155
58156  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58157    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58158
58159  # Input might be given as Windows format, start by converting to
58160  # unix format.
58161  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58162  new_path=`$CYGPATH -u "$path"`
58163
58164  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58165  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58166  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58167  # "foo.exe" is OK but "foo" is an error.
58168  #
58169  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58170  # It is also a way to make sure we got the proper file name for the real test later on.
58171  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58172  if test "x$test_shortpath" = x; then
58173    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58174$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58175    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58176  fi
58177
58178  # Call helper function which possibly converts this using DOS-style short mode.
58179  # If so, the updated path is stored in $new_path.
58180
58181  input_path="$new_path"
58182  # Check if we need to convert this using DOS-style short mode. If the path
58183  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58184  # take no chances and rewrite it.
58185  # Note: m4 eats our [], so we need to use [ and ] instead.
58186  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58187  if test "x$has_forbidden_chars" != x; then
58188    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58189    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58190    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58191    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58192      # Going to short mode and back again did indeed matter. Since short mode is
58193      # case insensitive, let's make it lowercase to improve readability.
58194      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58195      # Now convert it back to Unix-style (cygpath)
58196      input_path=`$CYGPATH -u "$shortmode_path"`
58197      new_path="$input_path"
58198    fi
58199  fi
58200
58201  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58202  if test "x$test_cygdrive_prefix" = x; then
58203    # As a simple fix, exclude /usr/bin since it's not a real path.
58204    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58205      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58206      # a path prefixed by /cygdrive for fixpath to work.
58207      new_path="$CYGWIN_ROOT_PATH$input_path"
58208    fi
58209  fi
58210
58211
58212  if test "x$path" != "x$new_path"; then
58213    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58214    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58215$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58216  fi
58217
58218    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58219
58220  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58221  has_colon=`$ECHO $path | $GREP ^.:`
58222  new_path="$path"
58223  if test "x$has_colon" = x; then
58224    # Not in mixed or Windows style, start by that.
58225    new_path=`cmd //c echo $path`
58226  fi
58227
58228
58229  input_path="$new_path"
58230  # Check if we need to convert this using DOS-style short mode. If the path
58231  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58232  # take no chances and rewrite it.
58233  # Note: m4 eats our [], so we need to use [ and ] instead.
58234  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58235  if test "x$has_forbidden_chars" != x; then
58236    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58237    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58238  fi
58239
58240
58241  windows_path="$new_path"
58242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58243    unix_path=`$CYGPATH -u "$windows_path"`
58244    new_path="$unix_path"
58245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58246    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58247    new_path="$unix_path"
58248  fi
58249
58250  if test "x$path" != "x$new_path"; then
58251    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58252    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58253$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58254  fi
58255
58256  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58257  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58258
58259    else
58260      # We're on a unix platform. Hooray! :)
58261      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58262      has_space=`$ECHO "$path" | $GREP " "`
58263      if test "x$has_space" != x; then
58264        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58265$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58266        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58267      fi
58268
58269      # Use eval to expand a potential ~
58270      eval path="$path"
58271      if test ! -f "$path" && test ! -d "$path"; then
58272        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58273      fi
58274
58275      if test -d "$path"; then
58276        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58277      else
58278        dir="`$DIRNAME "$path"`"
58279        base="`$BASENAME "$path"`"
58280        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58281      fi
58282    fi
58283  fi
58284
58285
58286  # Only process if variable expands to non-empty
58287
58288  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58289    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58290
58291  # Input might be given as Windows format, start by converting to
58292  # unix format.
58293  path="$POTENTIAL_FREETYPE_LIB_PATH"
58294  new_path=`$CYGPATH -u "$path"`
58295
58296  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58297  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58298  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58299  # "foo.exe" is OK but "foo" is an error.
58300  #
58301  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58302  # It is also a way to make sure we got the proper file name for the real test later on.
58303  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58304  if test "x$test_shortpath" = x; then
58305    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58306$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58307    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58308  fi
58309
58310  # Call helper function which possibly converts this using DOS-style short mode.
58311  # If so, the updated path is stored in $new_path.
58312
58313  input_path="$new_path"
58314  # Check if we need to convert this using DOS-style short mode. If the path
58315  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58316  # take no chances and rewrite it.
58317  # Note: m4 eats our [], so we need to use [ and ] instead.
58318  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58319  if test "x$has_forbidden_chars" != x; then
58320    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58321    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58322    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58323    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58324      # Going to short mode and back again did indeed matter. Since short mode is
58325      # case insensitive, let's make it lowercase to improve readability.
58326      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58327      # Now convert it back to Unix-style (cygpath)
58328      input_path=`$CYGPATH -u "$shortmode_path"`
58329      new_path="$input_path"
58330    fi
58331  fi
58332
58333  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58334  if test "x$test_cygdrive_prefix" = x; then
58335    # As a simple fix, exclude /usr/bin since it's not a real path.
58336    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58337      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58338      # a path prefixed by /cygdrive for fixpath to work.
58339      new_path="$CYGWIN_ROOT_PATH$input_path"
58340    fi
58341  fi
58342
58343
58344  if test "x$path" != "x$new_path"; then
58345    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58346    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58347$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58348  fi
58349
58350    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58351
58352  path="$POTENTIAL_FREETYPE_LIB_PATH"
58353  has_colon=`$ECHO $path | $GREP ^.:`
58354  new_path="$path"
58355  if test "x$has_colon" = x; then
58356    # Not in mixed or Windows style, start by that.
58357    new_path=`cmd //c echo $path`
58358  fi
58359
58360
58361  input_path="$new_path"
58362  # Check if we need to convert this using DOS-style short mode. If the path
58363  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58364  # take no chances and rewrite it.
58365  # Note: m4 eats our [], so we need to use [ and ] instead.
58366  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58367  if test "x$has_forbidden_chars" != x; then
58368    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58369    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58370  fi
58371
58372
58373  windows_path="$new_path"
58374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58375    unix_path=`$CYGPATH -u "$windows_path"`
58376    new_path="$unix_path"
58377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58379    new_path="$unix_path"
58380  fi
58381
58382  if test "x$path" != "x$new_path"; then
58383    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58384    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58385$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58386  fi
58387
58388  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58389  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58390
58391    else
58392      # We're on a unix platform. Hooray! :)
58393      path="$POTENTIAL_FREETYPE_LIB_PATH"
58394      has_space=`$ECHO "$path" | $GREP " "`
58395      if test "x$has_space" != x; then
58396        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58397$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58398        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58399      fi
58400
58401      # Use eval to expand a potential ~
58402      eval path="$path"
58403      if test ! -f "$path" && test ! -d "$path"; then
58404        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58405      fi
58406
58407      if test -d "$path"; then
58408        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58409      else
58410        dir="`$DIRNAME "$path"`"
58411        base="`$BASENAME "$path"`"
58412        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58413      fi
58414    fi
58415  fi
58416
58417
58418    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58419    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58420$as_echo_n "checking for freetype includes... " >&6; }
58421    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58422$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58423    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58424    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58425$as_echo_n "checking for freetype libraries... " >&6; }
58426    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58427$as_echo "$FREETYPE_LIB_PATH" >&6; }
58428  fi
58429
58430        if test "x$FOUND_FREETYPE" != xyes; then
58431          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
58432        fi
58433      else
58434        # User specified only one of lib or include. This is an error.
58435        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
58436          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
58437$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
58438          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
58439        else
58440          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
58441$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
58442          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
58443        fi
58444      fi
58445    else
58446      # User did not specify settings, but we need freetype. Try to locate it.
58447
58448      if test "x$BUNDLE_FREETYPE" = x; then
58449        # If not specified, default is to bundle freetype only on windows
58450        if test "x$OPENJDK_TARGET_OS" = xwindows; then
58451          BUNDLE_FREETYPE=yes
58452        else
58453          BUNDLE_FREETYPE=no
58454        fi
58455      fi
58456
58457      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
58458      if test "x$SYSROOT" = x; then
58459        if test "x$FOUND_FREETYPE" != xyes; then
58460          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
58461          if test "x$PKG_CONFIG" != x; then
58462
58463pkg_failed=no
58464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
58465$as_echo_n "checking for FREETYPE... " >&6; }
58466
58467if test -n "$FREETYPE_CFLAGS"; then
58468    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
58469 elif test -n "$PKG_CONFIG"; then
58470    if test -n "$PKG_CONFIG" && \
58471    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
58472  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
58473  ac_status=$?
58474  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58475  test $ac_status = 0; }; then
58476  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
58477else
58478  pkg_failed=yes
58479fi
58480 else
58481    pkg_failed=untried
58482fi
58483if test -n "$FREETYPE_LIBS"; then
58484    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
58485 elif test -n "$PKG_CONFIG"; then
58486    if test -n "$PKG_CONFIG" && \
58487    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
58488  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
58489  ac_status=$?
58490  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58491  test $ac_status = 0; }; then
58492  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
58493else
58494  pkg_failed=yes
58495fi
58496 else
58497    pkg_failed=untried
58498fi
58499
58500
58501
58502if test $pkg_failed = yes; then
58503
58504if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58505        _pkg_short_errors_supported=yes
58506else
58507        _pkg_short_errors_supported=no
58508fi
58509        if test $_pkg_short_errors_supported = yes; then
58510	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
58511        else
58512	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
58513        fi
58514	# Put the nasty error message in config.log where it belongs
58515	echo "$FREETYPE_PKG_ERRORS" >&5
58516
58517	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58518$as_echo "no" >&6; }
58519                FOUND_FREETYPE=no
58520elif test $pkg_failed = untried; then
58521	FOUND_FREETYPE=no
58522else
58523	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
58524	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
58525        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58526$as_echo "yes" >&6; }
58527	FOUND_FREETYPE=yes
58528fi
58529            if test "x$FOUND_FREETYPE" = xyes; then
58530              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
58531              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
58532              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
58533              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
58534                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
58535              fi
58536              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
58537              if test "x$BUNDLE_FREETYPE" = xyes; then
58538                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
58539$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
58540                FOUND_FREETYPE=no
58541              else
58542                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
58543$as_echo_n "checking for freetype... " >&6; }
58544                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
58545$as_echo "yes (using pkg-config)" >&6; }
58546              fi
58547            fi
58548          fi
58549        fi
58550      fi
58551
58552      if test "x$FOUND_FREETYPE" != xyes; then
58553        # Check in well-known locations
58554        if test "x$OPENJDK_TARGET_OS" = xwindows; then
58555          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
58556
58557  windows_path="$FREETYPE_BASE_DIR"
58558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58559    unix_path=`$CYGPATH -u "$windows_path"`
58560    FREETYPE_BASE_DIR="$unix_path"
58561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58563    FREETYPE_BASE_DIR="$unix_path"
58564  fi
58565
58566
58567  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58568  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58569  METHOD="well-known location"
58570
58571  # Let's start with an optimistic view of the world :-)
58572  FOUND_FREETYPE=yes
58573
58574  # First look for the canonical freetype main include file ft2build.h.
58575  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58576    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58577    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58578    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58579      # Fail.
58580      FOUND_FREETYPE=no
58581    fi
58582  fi
58583
58584  if test "x$FOUND_FREETYPE" = xyes; then
58585    # Include file found, let's continue the sanity check.
58586    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58587$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58588
58589    # Reset to default value
58590    FREETYPE_BASE_NAME=freetype
58591    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58592    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58593      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58594          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58595        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58596        # for the .6 version explicitly.
58597        FREETYPE_BASE_NAME=freetype.6
58598        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58599        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58600$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58601      else
58602        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58603$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58604        FOUND_FREETYPE=no
58605      fi
58606    else
58607      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58608        # On Windows, we will need both .lib and .dll file.
58609        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58610          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58611$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58612          FOUND_FREETYPE=no
58613        fi
58614      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58615          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58616        # Found lib in isa dir, use that instead.
58617        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58618        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58619$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58620      fi
58621    fi
58622  fi
58623
58624  if test "x$FOUND_FREETYPE" = xyes; then
58625
58626  # Only process if variable expands to non-empty
58627
58628  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58629    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58630
58631  # Input might be given as Windows format, start by converting to
58632  # unix format.
58633  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58634  new_path=`$CYGPATH -u "$path"`
58635
58636  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58637  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58638  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58639  # "foo.exe" is OK but "foo" is an error.
58640  #
58641  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58642  # It is also a way to make sure we got the proper file name for the real test later on.
58643  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58644  if test "x$test_shortpath" = x; then
58645    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58646$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58647    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58648  fi
58649
58650  # Call helper function which possibly converts this using DOS-style short mode.
58651  # If so, the updated path is stored in $new_path.
58652
58653  input_path="$new_path"
58654  # Check if we need to convert this using DOS-style short mode. If the path
58655  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58656  # take no chances and rewrite it.
58657  # Note: m4 eats our [], so we need to use [ and ] instead.
58658  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58659  if test "x$has_forbidden_chars" != x; then
58660    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58661    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58662    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58663    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58664      # Going to short mode and back again did indeed matter. Since short mode is
58665      # case insensitive, let's make it lowercase to improve readability.
58666      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58667      # Now convert it back to Unix-style (cygpath)
58668      input_path=`$CYGPATH -u "$shortmode_path"`
58669      new_path="$input_path"
58670    fi
58671  fi
58672
58673  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58674  if test "x$test_cygdrive_prefix" = x; then
58675    # As a simple fix, exclude /usr/bin since it's not a real path.
58676    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58677      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58678      # a path prefixed by /cygdrive for fixpath to work.
58679      new_path="$CYGWIN_ROOT_PATH$input_path"
58680    fi
58681  fi
58682
58683
58684  if test "x$path" != "x$new_path"; then
58685    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58686    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58687$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58688  fi
58689
58690    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58691
58692  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58693  has_colon=`$ECHO $path | $GREP ^.:`
58694  new_path="$path"
58695  if test "x$has_colon" = x; then
58696    # Not in mixed or Windows style, start by that.
58697    new_path=`cmd //c echo $path`
58698  fi
58699
58700
58701  input_path="$new_path"
58702  # Check if we need to convert this using DOS-style short mode. If the path
58703  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58704  # take no chances and rewrite it.
58705  # Note: m4 eats our [], so we need to use [ and ] instead.
58706  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58707  if test "x$has_forbidden_chars" != x; then
58708    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58709    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58710  fi
58711
58712
58713  windows_path="$new_path"
58714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58715    unix_path=`$CYGPATH -u "$windows_path"`
58716    new_path="$unix_path"
58717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58718    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58719    new_path="$unix_path"
58720  fi
58721
58722  if test "x$path" != "x$new_path"; then
58723    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58724    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58725$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58726  fi
58727
58728  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58729  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58730
58731    else
58732      # We're on a unix platform. Hooray! :)
58733      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58734      has_space=`$ECHO "$path" | $GREP " "`
58735      if test "x$has_space" != x; then
58736        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58737$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58738        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58739      fi
58740
58741      # Use eval to expand a potential ~
58742      eval path="$path"
58743      if test ! -f "$path" && test ! -d "$path"; then
58744        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58745      fi
58746
58747      if test -d "$path"; then
58748        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58749      else
58750        dir="`$DIRNAME "$path"`"
58751        base="`$BASENAME "$path"`"
58752        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58753      fi
58754    fi
58755  fi
58756
58757
58758  # Only process if variable expands to non-empty
58759
58760  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58761    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58762
58763  # Input might be given as Windows format, start by converting to
58764  # unix format.
58765  path="$POTENTIAL_FREETYPE_LIB_PATH"
58766  new_path=`$CYGPATH -u "$path"`
58767
58768  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58769  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58770  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58771  # "foo.exe" is OK but "foo" is an error.
58772  #
58773  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58774  # It is also a way to make sure we got the proper file name for the real test later on.
58775  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58776  if test "x$test_shortpath" = x; then
58777    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58778$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58779    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58780  fi
58781
58782  # Call helper function which possibly converts this using DOS-style short mode.
58783  # If so, the updated path is stored in $new_path.
58784
58785  input_path="$new_path"
58786  # Check if we need to convert this using DOS-style short mode. If the path
58787  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58788  # take no chances and rewrite it.
58789  # Note: m4 eats our [], so we need to use [ and ] instead.
58790  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58791  if test "x$has_forbidden_chars" != x; then
58792    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58793    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58794    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58795    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58796      # Going to short mode and back again did indeed matter. Since short mode is
58797      # case insensitive, let's make it lowercase to improve readability.
58798      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58799      # Now convert it back to Unix-style (cygpath)
58800      input_path=`$CYGPATH -u "$shortmode_path"`
58801      new_path="$input_path"
58802    fi
58803  fi
58804
58805  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58806  if test "x$test_cygdrive_prefix" = x; then
58807    # As a simple fix, exclude /usr/bin since it's not a real path.
58808    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58809      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58810      # a path prefixed by /cygdrive for fixpath to work.
58811      new_path="$CYGWIN_ROOT_PATH$input_path"
58812    fi
58813  fi
58814
58815
58816  if test "x$path" != "x$new_path"; then
58817    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58818    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58819$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58820  fi
58821
58822    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58823
58824  path="$POTENTIAL_FREETYPE_LIB_PATH"
58825  has_colon=`$ECHO $path | $GREP ^.:`
58826  new_path="$path"
58827  if test "x$has_colon" = x; then
58828    # Not in mixed or Windows style, start by that.
58829    new_path=`cmd //c echo $path`
58830  fi
58831
58832
58833  input_path="$new_path"
58834  # Check if we need to convert this using DOS-style short mode. If the path
58835  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58836  # take no chances and rewrite it.
58837  # Note: m4 eats our [], so we need to use [ and ] instead.
58838  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58839  if test "x$has_forbidden_chars" != x; then
58840    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58841    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58842  fi
58843
58844
58845  windows_path="$new_path"
58846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58847    unix_path=`$CYGPATH -u "$windows_path"`
58848    new_path="$unix_path"
58849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58851    new_path="$unix_path"
58852  fi
58853
58854  if test "x$path" != "x$new_path"; then
58855    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58856    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58857$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58858  fi
58859
58860  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58861  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58862
58863    else
58864      # We're on a unix platform. Hooray! :)
58865      path="$POTENTIAL_FREETYPE_LIB_PATH"
58866      has_space=`$ECHO "$path" | $GREP " "`
58867      if test "x$has_space" != x; then
58868        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58869$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58870        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58871      fi
58872
58873      # Use eval to expand a potential ~
58874      eval path="$path"
58875      if test ! -f "$path" && test ! -d "$path"; then
58876        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58877      fi
58878
58879      if test -d "$path"; then
58880        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58881      else
58882        dir="`$DIRNAME "$path"`"
58883        base="`$BASENAME "$path"`"
58884        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58885      fi
58886    fi
58887  fi
58888
58889
58890    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58891    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58892$as_echo_n "checking for freetype includes... " >&6; }
58893    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58894$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58895    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58896    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58897$as_echo_n "checking for freetype libraries... " >&6; }
58898    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58899$as_echo "$FREETYPE_LIB_PATH" >&6; }
58900  fi
58901
58902          if test "x$FOUND_FREETYPE" != xyes; then
58903            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58904
58905  windows_path="$FREETYPE_BASE_DIR"
58906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58907    unix_path=`$CYGPATH -u "$windows_path"`
58908    FREETYPE_BASE_DIR="$unix_path"
58909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58911    FREETYPE_BASE_DIR="$unix_path"
58912  fi
58913
58914
58915  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58916  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58917  METHOD="well-known location"
58918
58919  # Let's start with an optimistic view of the world :-)
58920  FOUND_FREETYPE=yes
58921
58922  # First look for the canonical freetype main include file ft2build.h.
58923  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58924    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58925    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58926    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58927      # Fail.
58928      FOUND_FREETYPE=no
58929    fi
58930  fi
58931
58932  if test "x$FOUND_FREETYPE" = xyes; then
58933    # Include file found, let's continue the sanity check.
58934    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58935$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58936
58937    # Reset to default value
58938    FREETYPE_BASE_NAME=freetype
58939    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58940    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58941      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58942          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58943        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58944        # for the .6 version explicitly.
58945        FREETYPE_BASE_NAME=freetype.6
58946        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58947        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58948$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58949      else
58950        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58951$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58952        FOUND_FREETYPE=no
58953      fi
58954    else
58955      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58956        # On Windows, we will need both .lib and .dll file.
58957        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58958          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58959$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58960          FOUND_FREETYPE=no
58961        fi
58962      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58963          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58964        # Found lib in isa dir, use that instead.
58965        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58966        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58967$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58968      fi
58969    fi
58970  fi
58971
58972  if test "x$FOUND_FREETYPE" = xyes; then
58973
58974  # Only process if variable expands to non-empty
58975
58976  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58977    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58978
58979  # Input might be given as Windows format, start by converting to
58980  # unix format.
58981  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58982  new_path=`$CYGPATH -u "$path"`
58983
58984  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58985  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58986  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58987  # "foo.exe" is OK but "foo" is an error.
58988  #
58989  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58990  # It is also a way to make sure we got the proper file name for the real test later on.
58991  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58992  if test "x$test_shortpath" = x; then
58993    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58994$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58995    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58996  fi
58997
58998  # Call helper function which possibly converts this using DOS-style short mode.
58999  # If so, the updated path is stored in $new_path.
59000
59001  input_path="$new_path"
59002  # Check if we need to convert this using DOS-style short mode. If the path
59003  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59004  # take no chances and rewrite it.
59005  # Note: m4 eats our [], so we need to use [ and ] instead.
59006  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59007  if test "x$has_forbidden_chars" != x; then
59008    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59009    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59010    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59011    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59012      # Going to short mode and back again did indeed matter. Since short mode is
59013      # case insensitive, let's make it lowercase to improve readability.
59014      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59015      # Now convert it back to Unix-style (cygpath)
59016      input_path=`$CYGPATH -u "$shortmode_path"`
59017      new_path="$input_path"
59018    fi
59019  fi
59020
59021  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59022  if test "x$test_cygdrive_prefix" = x; then
59023    # As a simple fix, exclude /usr/bin since it's not a real path.
59024    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59025      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59026      # a path prefixed by /cygdrive for fixpath to work.
59027      new_path="$CYGWIN_ROOT_PATH$input_path"
59028    fi
59029  fi
59030
59031
59032  if test "x$path" != "x$new_path"; then
59033    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59034    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59035$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59036  fi
59037
59038    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59039
59040  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59041  has_colon=`$ECHO $path | $GREP ^.:`
59042  new_path="$path"
59043  if test "x$has_colon" = x; then
59044    # Not in mixed or Windows style, start by that.
59045    new_path=`cmd //c echo $path`
59046  fi
59047
59048
59049  input_path="$new_path"
59050  # Check if we need to convert this using DOS-style short mode. If the path
59051  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59052  # take no chances and rewrite it.
59053  # Note: m4 eats our [], so we need to use [ and ] instead.
59054  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59055  if test "x$has_forbidden_chars" != x; then
59056    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59057    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59058  fi
59059
59060
59061  windows_path="$new_path"
59062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59063    unix_path=`$CYGPATH -u "$windows_path"`
59064    new_path="$unix_path"
59065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59066    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59067    new_path="$unix_path"
59068  fi
59069
59070  if test "x$path" != "x$new_path"; then
59071    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59072    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59073$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59074  fi
59075
59076  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59077  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59078
59079    else
59080      # We're on a unix platform. Hooray! :)
59081      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59082      has_space=`$ECHO "$path" | $GREP " "`
59083      if test "x$has_space" != x; then
59084        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59085$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59086        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59087      fi
59088
59089      # Use eval to expand a potential ~
59090      eval path="$path"
59091      if test ! -f "$path" && test ! -d "$path"; then
59092        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59093      fi
59094
59095      if test -d "$path"; then
59096        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59097      else
59098        dir="`$DIRNAME "$path"`"
59099        base="`$BASENAME "$path"`"
59100        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59101      fi
59102    fi
59103  fi
59104
59105
59106  # Only process if variable expands to non-empty
59107
59108  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59109    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59110
59111  # Input might be given as Windows format, start by converting to
59112  # unix format.
59113  path="$POTENTIAL_FREETYPE_LIB_PATH"
59114  new_path=`$CYGPATH -u "$path"`
59115
59116  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59117  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59118  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59119  # "foo.exe" is OK but "foo" is an error.
59120  #
59121  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59122  # It is also a way to make sure we got the proper file name for the real test later on.
59123  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59124  if test "x$test_shortpath" = x; then
59125    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59126$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59127    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59128  fi
59129
59130  # Call helper function which possibly converts this using DOS-style short mode.
59131  # If so, the updated path is stored in $new_path.
59132
59133  input_path="$new_path"
59134  # Check if we need to convert this using DOS-style short mode. If the path
59135  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59136  # take no chances and rewrite it.
59137  # Note: m4 eats our [], so we need to use [ and ] instead.
59138  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59139  if test "x$has_forbidden_chars" != x; then
59140    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59141    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59142    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59143    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59144      # Going to short mode and back again did indeed matter. Since short mode is
59145      # case insensitive, let's make it lowercase to improve readability.
59146      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59147      # Now convert it back to Unix-style (cygpath)
59148      input_path=`$CYGPATH -u "$shortmode_path"`
59149      new_path="$input_path"
59150    fi
59151  fi
59152
59153  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59154  if test "x$test_cygdrive_prefix" = x; then
59155    # As a simple fix, exclude /usr/bin since it's not a real path.
59156    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59157      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59158      # a path prefixed by /cygdrive for fixpath to work.
59159      new_path="$CYGWIN_ROOT_PATH$input_path"
59160    fi
59161  fi
59162
59163
59164  if test "x$path" != "x$new_path"; then
59165    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59166    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59167$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59168  fi
59169
59170    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59171
59172  path="$POTENTIAL_FREETYPE_LIB_PATH"
59173  has_colon=`$ECHO $path | $GREP ^.:`
59174  new_path="$path"
59175  if test "x$has_colon" = x; then
59176    # Not in mixed or Windows style, start by that.
59177    new_path=`cmd //c echo $path`
59178  fi
59179
59180
59181  input_path="$new_path"
59182  # Check if we need to convert this using DOS-style short mode. If the path
59183  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59184  # take no chances and rewrite it.
59185  # Note: m4 eats our [], so we need to use [ and ] instead.
59186  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59187  if test "x$has_forbidden_chars" != x; then
59188    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59189    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59190  fi
59191
59192
59193  windows_path="$new_path"
59194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59195    unix_path=`$CYGPATH -u "$windows_path"`
59196    new_path="$unix_path"
59197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59198    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59199    new_path="$unix_path"
59200  fi
59201
59202  if test "x$path" != "x$new_path"; then
59203    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59204    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59205$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59206  fi
59207
59208  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59209  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59210
59211    else
59212      # We're on a unix platform. Hooray! :)
59213      path="$POTENTIAL_FREETYPE_LIB_PATH"
59214      has_space=`$ECHO "$path" | $GREP " "`
59215      if test "x$has_space" != x; then
59216        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59217$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59218        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59219      fi
59220
59221      # Use eval to expand a potential ~
59222      eval path="$path"
59223      if test ! -f "$path" && test ! -d "$path"; then
59224        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59225      fi
59226
59227      if test -d "$path"; then
59228        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59229      else
59230        dir="`$DIRNAME "$path"`"
59231        base="`$BASENAME "$path"`"
59232        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59233      fi
59234    fi
59235  fi
59236
59237
59238    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59239    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59240$as_echo_n "checking for freetype includes... " >&6; }
59241    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59242$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59243    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59244    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59245$as_echo_n "checking for freetype libraries... " >&6; }
59246    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59247$as_echo "$FREETYPE_LIB_PATH" >&6; }
59248  fi
59249
59250          fi
59251          if test "x$FOUND_FREETYPE" != xyes; then
59252            FREETYPE_BASE_DIR="$HOME/freetype"
59253
59254  windows_path="$FREETYPE_BASE_DIR"
59255  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59256    unix_path=`$CYGPATH -u "$windows_path"`
59257    FREETYPE_BASE_DIR="$unix_path"
59258  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59259    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59260    FREETYPE_BASE_DIR="$unix_path"
59261  fi
59262
59263            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59264
59265  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59266  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59267  METHOD="well-known location"
59268
59269  # Let's start with an optimistic view of the world :-)
59270  FOUND_FREETYPE=yes
59271
59272  # First look for the canonical freetype main include file ft2build.h.
59273  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59274    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59275    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59276    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59277      # Fail.
59278      FOUND_FREETYPE=no
59279    fi
59280  fi
59281
59282  if test "x$FOUND_FREETYPE" = xyes; then
59283    # Include file found, let's continue the sanity check.
59284    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59285$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59286
59287    # Reset to default value
59288    FREETYPE_BASE_NAME=freetype
59289    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59290    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59291      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59292          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59293        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59294        # for the .6 version explicitly.
59295        FREETYPE_BASE_NAME=freetype.6
59296        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59297        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59298$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59299      else
59300        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59301$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59302        FOUND_FREETYPE=no
59303      fi
59304    else
59305      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59306        # On Windows, we will need both .lib and .dll file.
59307        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59308          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59309$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59310          FOUND_FREETYPE=no
59311        fi
59312      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59313          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59314        # Found lib in isa dir, use that instead.
59315        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59316        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59317$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59318      fi
59319    fi
59320  fi
59321
59322  if test "x$FOUND_FREETYPE" = xyes; then
59323
59324  # Only process if variable expands to non-empty
59325
59326  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59327    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59328
59329  # Input might be given as Windows format, start by converting to
59330  # unix format.
59331  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59332  new_path=`$CYGPATH -u "$path"`
59333
59334  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59335  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59336  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59337  # "foo.exe" is OK but "foo" is an error.
59338  #
59339  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59340  # It is also a way to make sure we got the proper file name for the real test later on.
59341  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59342  if test "x$test_shortpath" = x; then
59343    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59344$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59345    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59346  fi
59347
59348  # Call helper function which possibly converts this using DOS-style short mode.
59349  # If so, the updated path is stored in $new_path.
59350
59351  input_path="$new_path"
59352  # Check if we need to convert this using DOS-style short mode. If the path
59353  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59354  # take no chances and rewrite it.
59355  # Note: m4 eats our [], so we need to use [ and ] instead.
59356  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59357  if test "x$has_forbidden_chars" != x; then
59358    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59359    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59360    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59361    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59362      # Going to short mode and back again did indeed matter. Since short mode is
59363      # case insensitive, let's make it lowercase to improve readability.
59364      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59365      # Now convert it back to Unix-style (cygpath)
59366      input_path=`$CYGPATH -u "$shortmode_path"`
59367      new_path="$input_path"
59368    fi
59369  fi
59370
59371  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59372  if test "x$test_cygdrive_prefix" = x; then
59373    # As a simple fix, exclude /usr/bin since it's not a real path.
59374    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59375      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59376      # a path prefixed by /cygdrive for fixpath to work.
59377      new_path="$CYGWIN_ROOT_PATH$input_path"
59378    fi
59379  fi
59380
59381
59382  if test "x$path" != "x$new_path"; then
59383    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59384    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59385$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59386  fi
59387
59388    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59389
59390  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59391  has_colon=`$ECHO $path | $GREP ^.:`
59392  new_path="$path"
59393  if test "x$has_colon" = x; then
59394    # Not in mixed or Windows style, start by that.
59395    new_path=`cmd //c echo $path`
59396  fi
59397
59398
59399  input_path="$new_path"
59400  # Check if we need to convert this using DOS-style short mode. If the path
59401  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59402  # take no chances and rewrite it.
59403  # Note: m4 eats our [], so we need to use [ and ] instead.
59404  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59405  if test "x$has_forbidden_chars" != x; then
59406    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59407    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59408  fi
59409
59410
59411  windows_path="$new_path"
59412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59413    unix_path=`$CYGPATH -u "$windows_path"`
59414    new_path="$unix_path"
59415  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59416    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59417    new_path="$unix_path"
59418  fi
59419
59420  if test "x$path" != "x$new_path"; then
59421    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59422    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59423$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59424  fi
59425
59426  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59427  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59428
59429    else
59430      # We're on a unix platform. Hooray! :)
59431      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59432      has_space=`$ECHO "$path" | $GREP " "`
59433      if test "x$has_space" != x; then
59434        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59435$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59436        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59437      fi
59438
59439      # Use eval to expand a potential ~
59440      eval path="$path"
59441      if test ! -f "$path" && test ! -d "$path"; then
59442        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59443      fi
59444
59445      if test -d "$path"; then
59446        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59447      else
59448        dir="`$DIRNAME "$path"`"
59449        base="`$BASENAME "$path"`"
59450        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59451      fi
59452    fi
59453  fi
59454
59455
59456  # Only process if variable expands to non-empty
59457
59458  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59459    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59460
59461  # Input might be given as Windows format, start by converting to
59462  # unix format.
59463  path="$POTENTIAL_FREETYPE_LIB_PATH"
59464  new_path=`$CYGPATH -u "$path"`
59465
59466  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59467  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59468  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59469  # "foo.exe" is OK but "foo" is an error.
59470  #
59471  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59472  # It is also a way to make sure we got the proper file name for the real test later on.
59473  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59474  if test "x$test_shortpath" = x; then
59475    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59476$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59477    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59478  fi
59479
59480  # Call helper function which possibly converts this using DOS-style short mode.
59481  # If so, the updated path is stored in $new_path.
59482
59483  input_path="$new_path"
59484  # Check if we need to convert this using DOS-style short mode. If the path
59485  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59486  # take no chances and rewrite it.
59487  # Note: m4 eats our [], so we need to use [ and ] instead.
59488  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59489  if test "x$has_forbidden_chars" != x; then
59490    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59491    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59492    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59493    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59494      # Going to short mode and back again did indeed matter. Since short mode is
59495      # case insensitive, let's make it lowercase to improve readability.
59496      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59497      # Now convert it back to Unix-style (cygpath)
59498      input_path=`$CYGPATH -u "$shortmode_path"`
59499      new_path="$input_path"
59500    fi
59501  fi
59502
59503  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59504  if test "x$test_cygdrive_prefix" = x; then
59505    # As a simple fix, exclude /usr/bin since it's not a real path.
59506    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59507      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59508      # a path prefixed by /cygdrive for fixpath to work.
59509      new_path="$CYGWIN_ROOT_PATH$input_path"
59510    fi
59511  fi
59512
59513
59514  if test "x$path" != "x$new_path"; then
59515    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59516    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59517$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59518  fi
59519
59520    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59521
59522  path="$POTENTIAL_FREETYPE_LIB_PATH"
59523  has_colon=`$ECHO $path | $GREP ^.:`
59524  new_path="$path"
59525  if test "x$has_colon" = x; then
59526    # Not in mixed or Windows style, start by that.
59527    new_path=`cmd //c echo $path`
59528  fi
59529
59530
59531  input_path="$new_path"
59532  # Check if we need to convert this using DOS-style short mode. If the path
59533  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59534  # take no chances and rewrite it.
59535  # Note: m4 eats our [], so we need to use [ and ] instead.
59536  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59537  if test "x$has_forbidden_chars" != x; then
59538    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59539    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59540  fi
59541
59542
59543  windows_path="$new_path"
59544  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59545    unix_path=`$CYGPATH -u "$windows_path"`
59546    new_path="$unix_path"
59547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59548    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59549    new_path="$unix_path"
59550  fi
59551
59552  if test "x$path" != "x$new_path"; then
59553    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59554    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59555$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59556  fi
59557
59558  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59559  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59560
59561    else
59562      # We're on a unix platform. Hooray! :)
59563      path="$POTENTIAL_FREETYPE_LIB_PATH"
59564      has_space=`$ECHO "$path" | $GREP " "`
59565      if test "x$has_space" != x; then
59566        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59567$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59568        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59569      fi
59570
59571      # Use eval to expand a potential ~
59572      eval path="$path"
59573      if test ! -f "$path" && test ! -d "$path"; then
59574        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59575      fi
59576
59577      if test -d "$path"; then
59578        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59579      else
59580        dir="`$DIRNAME "$path"`"
59581        base="`$BASENAME "$path"`"
59582        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59583      fi
59584    fi
59585  fi
59586
59587
59588    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59589    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59590$as_echo_n "checking for freetype includes... " >&6; }
59591    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59592$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59593    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59594    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59595$as_echo_n "checking for freetype libraries... " >&6; }
59596    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59597$as_echo "$FREETYPE_LIB_PATH" >&6; }
59598  fi
59599
59600            else
59601
59602  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59603  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59604  METHOD="well-known location"
59605
59606  # Let's start with an optimistic view of the world :-)
59607  FOUND_FREETYPE=yes
59608
59609  # First look for the canonical freetype main include file ft2build.h.
59610  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59611    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59612    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59613    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59614      # Fail.
59615      FOUND_FREETYPE=no
59616    fi
59617  fi
59618
59619  if test "x$FOUND_FREETYPE" = xyes; then
59620    # Include file found, let's continue the sanity check.
59621    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59622$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59623
59624    # Reset to default value
59625    FREETYPE_BASE_NAME=freetype
59626    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59627    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59628      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59629          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59630        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59631        # for the .6 version explicitly.
59632        FREETYPE_BASE_NAME=freetype.6
59633        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59634        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59635$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59636      else
59637        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59638$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59639        FOUND_FREETYPE=no
59640      fi
59641    else
59642      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59643        # On Windows, we will need both .lib and .dll file.
59644        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59645          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59646$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59647          FOUND_FREETYPE=no
59648        fi
59649      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59650          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59651        # Found lib in isa dir, use that instead.
59652        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59653        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59654$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59655      fi
59656    fi
59657  fi
59658
59659  if test "x$FOUND_FREETYPE" = xyes; then
59660
59661  # Only process if variable expands to non-empty
59662
59663  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59664    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59665
59666  # Input might be given as Windows format, start by converting to
59667  # unix format.
59668  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59669  new_path=`$CYGPATH -u "$path"`
59670
59671  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59672  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59673  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59674  # "foo.exe" is OK but "foo" is an error.
59675  #
59676  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59677  # It is also a way to make sure we got the proper file name for the real test later on.
59678  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59679  if test "x$test_shortpath" = x; then
59680    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59681$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59682    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59683  fi
59684
59685  # Call helper function which possibly converts this using DOS-style short mode.
59686  # If so, the updated path is stored in $new_path.
59687
59688  input_path="$new_path"
59689  # Check if we need to convert this using DOS-style short mode. If the path
59690  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59691  # take no chances and rewrite it.
59692  # Note: m4 eats our [], so we need to use [ and ] instead.
59693  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59694  if test "x$has_forbidden_chars" != x; then
59695    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59696    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59697    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59698    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59699      # Going to short mode and back again did indeed matter. Since short mode is
59700      # case insensitive, let's make it lowercase to improve readability.
59701      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59702      # Now convert it back to Unix-style (cygpath)
59703      input_path=`$CYGPATH -u "$shortmode_path"`
59704      new_path="$input_path"
59705    fi
59706  fi
59707
59708  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59709  if test "x$test_cygdrive_prefix" = x; then
59710    # As a simple fix, exclude /usr/bin since it's not a real path.
59711    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59712      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59713      # a path prefixed by /cygdrive for fixpath to work.
59714      new_path="$CYGWIN_ROOT_PATH$input_path"
59715    fi
59716  fi
59717
59718
59719  if test "x$path" != "x$new_path"; then
59720    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59721    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59722$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59723  fi
59724
59725    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59726
59727  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59728  has_colon=`$ECHO $path | $GREP ^.:`
59729  new_path="$path"
59730  if test "x$has_colon" = x; then
59731    # Not in mixed or Windows style, start by that.
59732    new_path=`cmd //c echo $path`
59733  fi
59734
59735
59736  input_path="$new_path"
59737  # Check if we need to convert this using DOS-style short mode. If the path
59738  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59739  # take no chances and rewrite it.
59740  # Note: m4 eats our [], so we need to use [ and ] instead.
59741  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59742  if test "x$has_forbidden_chars" != x; then
59743    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59744    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59745  fi
59746
59747
59748  windows_path="$new_path"
59749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59750    unix_path=`$CYGPATH -u "$windows_path"`
59751    new_path="$unix_path"
59752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59753    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59754    new_path="$unix_path"
59755  fi
59756
59757  if test "x$path" != "x$new_path"; then
59758    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59759    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59760$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59761  fi
59762
59763  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59764  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59765
59766    else
59767      # We're on a unix platform. Hooray! :)
59768      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59769      has_space=`$ECHO "$path" | $GREP " "`
59770      if test "x$has_space" != x; then
59771        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59772$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59773        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59774      fi
59775
59776      # Use eval to expand a potential ~
59777      eval path="$path"
59778      if test ! -f "$path" && test ! -d "$path"; then
59779        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59780      fi
59781
59782      if test -d "$path"; then
59783        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59784      else
59785        dir="`$DIRNAME "$path"`"
59786        base="`$BASENAME "$path"`"
59787        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59788      fi
59789    fi
59790  fi
59791
59792
59793  # Only process if variable expands to non-empty
59794
59795  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59796    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59797
59798  # Input might be given as Windows format, start by converting to
59799  # unix format.
59800  path="$POTENTIAL_FREETYPE_LIB_PATH"
59801  new_path=`$CYGPATH -u "$path"`
59802
59803  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59804  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59805  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59806  # "foo.exe" is OK but "foo" is an error.
59807  #
59808  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59809  # It is also a way to make sure we got the proper file name for the real test later on.
59810  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59811  if test "x$test_shortpath" = x; then
59812    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59813$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59814    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59815  fi
59816
59817  # Call helper function which possibly converts this using DOS-style short mode.
59818  # If so, the updated path is stored in $new_path.
59819
59820  input_path="$new_path"
59821  # Check if we need to convert this using DOS-style short mode. If the path
59822  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59823  # take no chances and rewrite it.
59824  # Note: m4 eats our [], so we need to use [ and ] instead.
59825  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59826  if test "x$has_forbidden_chars" != x; then
59827    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59828    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59829    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59830    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59831      # Going to short mode and back again did indeed matter. Since short mode is
59832      # case insensitive, let's make it lowercase to improve readability.
59833      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59834      # Now convert it back to Unix-style (cygpath)
59835      input_path=`$CYGPATH -u "$shortmode_path"`
59836      new_path="$input_path"
59837    fi
59838  fi
59839
59840  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59841  if test "x$test_cygdrive_prefix" = x; then
59842    # As a simple fix, exclude /usr/bin since it's not a real path.
59843    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59844      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59845      # a path prefixed by /cygdrive for fixpath to work.
59846      new_path="$CYGWIN_ROOT_PATH$input_path"
59847    fi
59848  fi
59849
59850
59851  if test "x$path" != "x$new_path"; then
59852    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59853    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59854$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59855  fi
59856
59857    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59858
59859  path="$POTENTIAL_FREETYPE_LIB_PATH"
59860  has_colon=`$ECHO $path | $GREP ^.:`
59861  new_path="$path"
59862  if test "x$has_colon" = x; then
59863    # Not in mixed or Windows style, start by that.
59864    new_path=`cmd //c echo $path`
59865  fi
59866
59867
59868  input_path="$new_path"
59869  # Check if we need to convert this using DOS-style short mode. If the path
59870  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59871  # take no chances and rewrite it.
59872  # Note: m4 eats our [], so we need to use [ and ] instead.
59873  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59874  if test "x$has_forbidden_chars" != x; then
59875    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59876    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59877  fi
59878
59879
59880  windows_path="$new_path"
59881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59882    unix_path=`$CYGPATH -u "$windows_path"`
59883    new_path="$unix_path"
59884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59885    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59886    new_path="$unix_path"
59887  fi
59888
59889  if test "x$path" != "x$new_path"; then
59890    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59891    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59892$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59893  fi
59894
59895  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59896  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59897
59898    else
59899      # We're on a unix platform. Hooray! :)
59900      path="$POTENTIAL_FREETYPE_LIB_PATH"
59901      has_space=`$ECHO "$path" | $GREP " "`
59902      if test "x$has_space" != x; then
59903        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59904$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59905        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59906      fi
59907
59908      # Use eval to expand a potential ~
59909      eval path="$path"
59910      if test ! -f "$path" && test ! -d "$path"; then
59911        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59912      fi
59913
59914      if test -d "$path"; then
59915        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59916      else
59917        dir="`$DIRNAME "$path"`"
59918        base="`$BASENAME "$path"`"
59919        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59920      fi
59921    fi
59922  fi
59923
59924
59925    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59926    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59927$as_echo_n "checking for freetype includes... " >&6; }
59928    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59929$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59930    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59931    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59932$as_echo_n "checking for freetype libraries... " >&6; }
59933    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59934$as_echo "$FREETYPE_LIB_PATH" >&6; }
59935  fi
59936
59937            fi
59938            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59939                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59940              # Source is available, as a last resort try to build freetype in default location
59941
59942  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59943  BUILD_FREETYPE=yes
59944
59945  # Check if the freetype sources are acessible..
59946  if ! test -d $FREETYPE_SRC_PATH; then
59947    { $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
59948$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59949    BUILD_FREETYPE=no
59950  fi
59951  # ..and contain a vc2010 project file
59952  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59953  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59954    { $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
59955$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59956    BUILD_FREETYPE=no
59957  fi
59958  # Now check if configure found a version of 'msbuild.exe'
59959  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59960    { $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
59961$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;}
59962    BUILD_FREETYPE=no
59963  fi
59964
59965  # Ready to go..
59966  if test "x$BUILD_FREETYPE" = xyes; then
59967    # msbuild requires trailing slashes for output directories
59968    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59969    freetype_lib_path_unix="$freetype_lib_path"
59970    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59971
59972  unix_path="$vcxproj_path"
59973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59974    windows_path=`$CYGPATH -m "$unix_path"`
59975    vcxproj_path="$windows_path"
59976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59977    windows_path=`cmd //c echo $unix_path`
59978    vcxproj_path="$windows_path"
59979  fi
59980
59981
59982  unix_path="$freetype_lib_path"
59983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59984    windows_path=`$CYGPATH -m "$unix_path"`
59985    freetype_lib_path="$windows_path"
59986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59987    windows_path=`cmd //c echo $unix_path`
59988    freetype_lib_path="$windows_path"
59989  fi
59990
59991
59992  unix_path="$freetype_obj_path"
59993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59994    windows_path=`$CYGPATH -m "$unix_path"`
59995    freetype_obj_path="$windows_path"
59996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59997    windows_path=`cmd //c echo $unix_path`
59998    freetype_obj_path="$windows_path"
59999  fi
60000
60001    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
60002      freetype_platform=x64
60003    else
60004      freetype_platform=win32
60005    fi
60006
60007    # The original freetype project file is for VS 2010 (i.e. 'v100'),
60008    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
60009    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
60010    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
60011    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
60012$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
60013
60014    # First we try to build the freetype.dll
60015    $ECHO -e "@echo off\n"\
60016        "$MSBUILD $vcxproj_path "\
60017        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
60018        "/p:Configuration=\"Release Multithreaded\" "\
60019        "/p:Platform=$freetype_platform "\
60020        "/p:ConfigurationType=DynamicLibrary "\
60021        "/p:TargetName=freetype "\
60022        "/p:OutDir=\"$freetype_lib_path\" "\
60023        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
60024    cmd /c freetype.bat
60025
60026    if test -s "$freetype_lib_path_unix/freetype.dll"; then
60027      # If that succeeds we also build freetype.lib
60028      $ECHO -e "@echo off\n"\
60029          "$MSBUILD $vcxproj_path "\
60030          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
60031          "/p:Configuration=\"Release Multithreaded\" "\
60032          "/p:Platform=$freetype_platform "\
60033          "/p:ConfigurationType=StaticLibrary "\
60034          "/p:TargetName=freetype "\
60035          "/p:OutDir=\"$freetype_lib_path\" "\
60036          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
60037      cmd /c freetype.bat
60038
60039      if test -s "$freetype_lib_path_unix/freetype.lib"; then
60040        # Once we build both, lib and dll, set freetype lib and include path appropriately
60041        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
60042        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
60043        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
60044$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
60045      else
60046        BUILD_FREETYPE=no
60047      fi
60048    else
60049      BUILD_FREETYPE=no
60050    fi
60051  fi
60052
60053              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
60054
60055  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60056  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
60057  METHOD="well-known location"
60058
60059  # Let's start with an optimistic view of the world :-)
60060  FOUND_FREETYPE=yes
60061
60062  # First look for the canonical freetype main include file ft2build.h.
60063  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60064    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60065    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60066    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60067      # Fail.
60068      FOUND_FREETYPE=no
60069    fi
60070  fi
60071
60072  if test "x$FOUND_FREETYPE" = xyes; then
60073    # Include file found, let's continue the sanity check.
60074    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60075$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60076
60077    # Reset to default value
60078    FREETYPE_BASE_NAME=freetype
60079    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60080    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60081      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60082          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60083        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60084        # for the .6 version explicitly.
60085        FREETYPE_BASE_NAME=freetype.6
60086        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60087        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60088$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60089      else
60090        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60091$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60092        FOUND_FREETYPE=no
60093      fi
60094    else
60095      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60096        # On Windows, we will need both .lib and .dll file.
60097        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60098          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60099$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60100          FOUND_FREETYPE=no
60101        fi
60102      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60103          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60104        # Found lib in isa dir, use that instead.
60105        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60106        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60107$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60108      fi
60109    fi
60110  fi
60111
60112  if test "x$FOUND_FREETYPE" = xyes; then
60113
60114  # Only process if variable expands to non-empty
60115
60116  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60117    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60118
60119  # Input might be given as Windows format, start by converting to
60120  # unix format.
60121  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60122  new_path=`$CYGPATH -u "$path"`
60123
60124  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60125  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60126  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60127  # "foo.exe" is OK but "foo" is an error.
60128  #
60129  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60130  # It is also a way to make sure we got the proper file name for the real test later on.
60131  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60132  if test "x$test_shortpath" = x; then
60133    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60134$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60135    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60136  fi
60137
60138  # Call helper function which possibly converts this using DOS-style short mode.
60139  # If so, the updated path is stored in $new_path.
60140
60141  input_path="$new_path"
60142  # Check if we need to convert this using DOS-style short mode. If the path
60143  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60144  # take no chances and rewrite it.
60145  # Note: m4 eats our [], so we need to use [ and ] instead.
60146  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60147  if test "x$has_forbidden_chars" != x; then
60148    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60149    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60150    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60151    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60152      # Going to short mode and back again did indeed matter. Since short mode is
60153      # case insensitive, let's make it lowercase to improve readability.
60154      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60155      # Now convert it back to Unix-style (cygpath)
60156      input_path=`$CYGPATH -u "$shortmode_path"`
60157      new_path="$input_path"
60158    fi
60159  fi
60160
60161  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60162  if test "x$test_cygdrive_prefix" = x; then
60163    # As a simple fix, exclude /usr/bin since it's not a real path.
60164    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60165      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60166      # a path prefixed by /cygdrive for fixpath to work.
60167      new_path="$CYGWIN_ROOT_PATH$input_path"
60168    fi
60169  fi
60170
60171
60172  if test "x$path" != "x$new_path"; then
60173    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60174    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60175$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60176  fi
60177
60178    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60179
60180  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60181  has_colon=`$ECHO $path | $GREP ^.:`
60182  new_path="$path"
60183  if test "x$has_colon" = x; then
60184    # Not in mixed or Windows style, start by that.
60185    new_path=`cmd //c echo $path`
60186  fi
60187
60188
60189  input_path="$new_path"
60190  # Check if we need to convert this using DOS-style short mode. If the path
60191  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60192  # take no chances and rewrite it.
60193  # Note: m4 eats our [], so we need to use [ and ] instead.
60194  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60195  if test "x$has_forbidden_chars" != x; then
60196    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60197    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60198  fi
60199
60200
60201  windows_path="$new_path"
60202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60203    unix_path=`$CYGPATH -u "$windows_path"`
60204    new_path="$unix_path"
60205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60206    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60207    new_path="$unix_path"
60208  fi
60209
60210  if test "x$path" != "x$new_path"; then
60211    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60212    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60213$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60214  fi
60215
60216  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60217  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60218
60219    else
60220      # We're on a unix platform. Hooray! :)
60221      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60222      has_space=`$ECHO "$path" | $GREP " "`
60223      if test "x$has_space" != x; then
60224        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60225$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60226        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60227      fi
60228
60229      # Use eval to expand a potential ~
60230      eval path="$path"
60231      if test ! -f "$path" && test ! -d "$path"; then
60232        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60233      fi
60234
60235      if test -d "$path"; then
60236        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60237      else
60238        dir="`$DIRNAME "$path"`"
60239        base="`$BASENAME "$path"`"
60240        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60241      fi
60242    fi
60243  fi
60244
60245
60246  # Only process if variable expands to non-empty
60247
60248  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60249    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60250
60251  # Input might be given as Windows format, start by converting to
60252  # unix format.
60253  path="$POTENTIAL_FREETYPE_LIB_PATH"
60254  new_path=`$CYGPATH -u "$path"`
60255
60256  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60257  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60258  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60259  # "foo.exe" is OK but "foo" is an error.
60260  #
60261  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60262  # It is also a way to make sure we got the proper file name for the real test later on.
60263  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60264  if test "x$test_shortpath" = x; then
60265    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60266$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60267    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60268  fi
60269
60270  # Call helper function which possibly converts this using DOS-style short mode.
60271  # If so, the updated path is stored in $new_path.
60272
60273  input_path="$new_path"
60274  # Check if we need to convert this using DOS-style short mode. If the path
60275  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60276  # take no chances and rewrite it.
60277  # Note: m4 eats our [], so we need to use [ and ] instead.
60278  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60279  if test "x$has_forbidden_chars" != x; then
60280    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60281    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60282    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60283    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60284      # Going to short mode and back again did indeed matter. Since short mode is
60285      # case insensitive, let's make it lowercase to improve readability.
60286      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60287      # Now convert it back to Unix-style (cygpath)
60288      input_path=`$CYGPATH -u "$shortmode_path"`
60289      new_path="$input_path"
60290    fi
60291  fi
60292
60293  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60294  if test "x$test_cygdrive_prefix" = x; then
60295    # As a simple fix, exclude /usr/bin since it's not a real path.
60296    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60297      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60298      # a path prefixed by /cygdrive for fixpath to work.
60299      new_path="$CYGWIN_ROOT_PATH$input_path"
60300    fi
60301  fi
60302
60303
60304  if test "x$path" != "x$new_path"; then
60305    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60306    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60307$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60308  fi
60309
60310    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60311
60312  path="$POTENTIAL_FREETYPE_LIB_PATH"
60313  has_colon=`$ECHO $path | $GREP ^.:`
60314  new_path="$path"
60315  if test "x$has_colon" = x; then
60316    # Not in mixed or Windows style, start by that.
60317    new_path=`cmd //c echo $path`
60318  fi
60319
60320
60321  input_path="$new_path"
60322  # Check if we need to convert this using DOS-style short mode. If the path
60323  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60324  # take no chances and rewrite it.
60325  # Note: m4 eats our [], so we need to use [ and ] instead.
60326  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60327  if test "x$has_forbidden_chars" != x; then
60328    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60329    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60330  fi
60331
60332
60333  windows_path="$new_path"
60334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60335    unix_path=`$CYGPATH -u "$windows_path"`
60336    new_path="$unix_path"
60337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60338    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60339    new_path="$unix_path"
60340  fi
60341
60342  if test "x$path" != "x$new_path"; then
60343    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60344    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60345$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60346  fi
60347
60348  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60349  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60350
60351    else
60352      # We're on a unix platform. Hooray! :)
60353      path="$POTENTIAL_FREETYPE_LIB_PATH"
60354      has_space=`$ECHO "$path" | $GREP " "`
60355      if test "x$has_space" != x; then
60356        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60357$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60358        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60359      fi
60360
60361      # Use eval to expand a potential ~
60362      eval path="$path"
60363      if test ! -f "$path" && test ! -d "$path"; then
60364        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60365      fi
60366
60367      if test -d "$path"; then
60368        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60369      else
60370        dir="`$DIRNAME "$path"`"
60371        base="`$BASENAME "$path"`"
60372        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60373      fi
60374    fi
60375  fi
60376
60377
60378    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60379    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60380$as_echo_n "checking for freetype includes... " >&6; }
60381    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60382$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60383    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60384    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60385$as_echo_n "checking for freetype libraries... " >&6; }
60386    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60387$as_echo "$FREETYPE_LIB_PATH" >&6; }
60388  fi
60389
60390              else
60391
60392  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60393  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
60394  METHOD="well-known location"
60395
60396  # Let's start with an optimistic view of the world :-)
60397  FOUND_FREETYPE=yes
60398
60399  # First look for the canonical freetype main include file ft2build.h.
60400  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60401    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60402    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60403    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60404      # Fail.
60405      FOUND_FREETYPE=no
60406    fi
60407  fi
60408
60409  if test "x$FOUND_FREETYPE" = xyes; then
60410    # Include file found, let's continue the sanity check.
60411    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60412$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60413
60414    # Reset to default value
60415    FREETYPE_BASE_NAME=freetype
60416    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60417    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60418      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60419          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60420        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60421        # for the .6 version explicitly.
60422        FREETYPE_BASE_NAME=freetype.6
60423        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60424        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60425$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60426      else
60427        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60428$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60429        FOUND_FREETYPE=no
60430      fi
60431    else
60432      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60433        # On Windows, we will need both .lib and .dll file.
60434        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60435          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60436$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60437          FOUND_FREETYPE=no
60438        fi
60439      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60440          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60441        # Found lib in isa dir, use that instead.
60442        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60443        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60444$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60445      fi
60446    fi
60447  fi
60448
60449  if test "x$FOUND_FREETYPE" = xyes; then
60450
60451  # Only process if variable expands to non-empty
60452
60453  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60454    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60455
60456  # Input might be given as Windows format, start by converting to
60457  # unix format.
60458  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60459  new_path=`$CYGPATH -u "$path"`
60460
60461  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60462  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60463  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60464  # "foo.exe" is OK but "foo" is an error.
60465  #
60466  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60467  # It is also a way to make sure we got the proper file name for the real test later on.
60468  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60469  if test "x$test_shortpath" = x; then
60470    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60471$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60472    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60473  fi
60474
60475  # Call helper function which possibly converts this using DOS-style short mode.
60476  # If so, the updated path is stored in $new_path.
60477
60478  input_path="$new_path"
60479  # Check if we need to convert this using DOS-style short mode. If the path
60480  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60481  # take no chances and rewrite it.
60482  # Note: m4 eats our [], so we need to use [ and ] instead.
60483  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60484  if test "x$has_forbidden_chars" != x; then
60485    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60486    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60487    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60488    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60489      # Going to short mode and back again did indeed matter. Since short mode is
60490      # case insensitive, let's make it lowercase to improve readability.
60491      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60492      # Now convert it back to Unix-style (cygpath)
60493      input_path=`$CYGPATH -u "$shortmode_path"`
60494      new_path="$input_path"
60495    fi
60496  fi
60497
60498  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60499  if test "x$test_cygdrive_prefix" = x; then
60500    # As a simple fix, exclude /usr/bin since it's not a real path.
60501    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60502      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60503      # a path prefixed by /cygdrive for fixpath to work.
60504      new_path="$CYGWIN_ROOT_PATH$input_path"
60505    fi
60506  fi
60507
60508
60509  if test "x$path" != "x$new_path"; then
60510    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60511    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60512$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60513  fi
60514
60515    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60516
60517  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60518  has_colon=`$ECHO $path | $GREP ^.:`
60519  new_path="$path"
60520  if test "x$has_colon" = x; then
60521    # Not in mixed or Windows style, start by that.
60522    new_path=`cmd //c echo $path`
60523  fi
60524
60525
60526  input_path="$new_path"
60527  # Check if we need to convert this using DOS-style short mode. If the path
60528  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60529  # take no chances and rewrite it.
60530  # Note: m4 eats our [], so we need to use [ and ] instead.
60531  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60532  if test "x$has_forbidden_chars" != x; then
60533    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60534    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60535  fi
60536
60537
60538  windows_path="$new_path"
60539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60540    unix_path=`$CYGPATH -u "$windows_path"`
60541    new_path="$unix_path"
60542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60544    new_path="$unix_path"
60545  fi
60546
60547  if test "x$path" != "x$new_path"; then
60548    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60549    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60550$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60551  fi
60552
60553  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60554  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60555
60556    else
60557      # We're on a unix platform. Hooray! :)
60558      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60559      has_space=`$ECHO "$path" | $GREP " "`
60560      if test "x$has_space" != x; then
60561        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60562$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60563        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60564      fi
60565
60566      # Use eval to expand a potential ~
60567      eval path="$path"
60568      if test ! -f "$path" && test ! -d "$path"; then
60569        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60570      fi
60571
60572      if test -d "$path"; then
60573        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60574      else
60575        dir="`$DIRNAME "$path"`"
60576        base="`$BASENAME "$path"`"
60577        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60578      fi
60579    fi
60580  fi
60581
60582
60583  # Only process if variable expands to non-empty
60584
60585  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60586    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60587
60588  # Input might be given as Windows format, start by converting to
60589  # unix format.
60590  path="$POTENTIAL_FREETYPE_LIB_PATH"
60591  new_path=`$CYGPATH -u "$path"`
60592
60593  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60594  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60595  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60596  # "foo.exe" is OK but "foo" is an error.
60597  #
60598  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60599  # It is also a way to make sure we got the proper file name for the real test later on.
60600  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60601  if test "x$test_shortpath" = x; then
60602    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60603$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60604    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60605  fi
60606
60607  # Call helper function which possibly converts this using DOS-style short mode.
60608  # If so, the updated path is stored in $new_path.
60609
60610  input_path="$new_path"
60611  # Check if we need to convert this using DOS-style short mode. If the path
60612  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60613  # take no chances and rewrite it.
60614  # Note: m4 eats our [], so we need to use [ and ] instead.
60615  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60616  if test "x$has_forbidden_chars" != x; then
60617    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60618    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60619    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60620    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60621      # Going to short mode and back again did indeed matter. Since short mode is
60622      # case insensitive, let's make it lowercase to improve readability.
60623      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60624      # Now convert it back to Unix-style (cygpath)
60625      input_path=`$CYGPATH -u "$shortmode_path"`
60626      new_path="$input_path"
60627    fi
60628  fi
60629
60630  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60631  if test "x$test_cygdrive_prefix" = x; then
60632    # As a simple fix, exclude /usr/bin since it's not a real path.
60633    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60634      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60635      # a path prefixed by /cygdrive for fixpath to work.
60636      new_path="$CYGWIN_ROOT_PATH$input_path"
60637    fi
60638  fi
60639
60640
60641  if test "x$path" != "x$new_path"; then
60642    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60643    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60644$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60645  fi
60646
60647    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60648
60649  path="$POTENTIAL_FREETYPE_LIB_PATH"
60650  has_colon=`$ECHO $path | $GREP ^.:`
60651  new_path="$path"
60652  if test "x$has_colon" = x; then
60653    # Not in mixed or Windows style, start by that.
60654    new_path=`cmd //c echo $path`
60655  fi
60656
60657
60658  input_path="$new_path"
60659  # Check if we need to convert this using DOS-style short mode. If the path
60660  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60661  # take no chances and rewrite it.
60662  # Note: m4 eats our [], so we need to use [ and ] instead.
60663  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60664  if test "x$has_forbidden_chars" != x; then
60665    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60666    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60667  fi
60668
60669
60670  windows_path="$new_path"
60671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60672    unix_path=`$CYGPATH -u "$windows_path"`
60673    new_path="$unix_path"
60674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60675    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60676    new_path="$unix_path"
60677  fi
60678
60679  if test "x$path" != "x$new_path"; then
60680    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60681    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60682$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60683  fi
60684
60685  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60686  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60687
60688    else
60689      # We're on a unix platform. Hooray! :)
60690      path="$POTENTIAL_FREETYPE_LIB_PATH"
60691      has_space=`$ECHO "$path" | $GREP " "`
60692      if test "x$has_space" != x; then
60693        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60694$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60695        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60696      fi
60697
60698      # Use eval to expand a potential ~
60699      eval path="$path"
60700      if test ! -f "$path" && test ! -d "$path"; then
60701        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60702      fi
60703
60704      if test -d "$path"; then
60705        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60706      else
60707        dir="`$DIRNAME "$path"`"
60708        base="`$BASENAME "$path"`"
60709        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60710      fi
60711    fi
60712  fi
60713
60714
60715    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60716    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60717$as_echo_n "checking for freetype includes... " >&6; }
60718    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60719$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60720    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60721    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60722$as_echo_n "checking for freetype libraries... " >&6; }
60723    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60724$as_echo "$FREETYPE_LIB_PATH" >&6; }
60725  fi
60726
60727              fi
60728            fi
60729          fi
60730        else
60731          FREETYPE_BASE_DIR="$SYSROOT/usr"
60732
60733  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60734  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60735  METHOD="well-known location"
60736
60737  # Let's start with an optimistic view of the world :-)
60738  FOUND_FREETYPE=yes
60739
60740  # First look for the canonical freetype main include file ft2build.h.
60741  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60742    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60743    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60744    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60745      # Fail.
60746      FOUND_FREETYPE=no
60747    fi
60748  fi
60749
60750  if test "x$FOUND_FREETYPE" = xyes; then
60751    # Include file found, let's continue the sanity check.
60752    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60753$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60754
60755    # Reset to default value
60756    FREETYPE_BASE_NAME=freetype
60757    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60758    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60759      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60760          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60761        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60762        # for the .6 version explicitly.
60763        FREETYPE_BASE_NAME=freetype.6
60764        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60765        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60766$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60767      else
60768        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60769$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60770        FOUND_FREETYPE=no
60771      fi
60772    else
60773      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60774        # On Windows, we will need both .lib and .dll file.
60775        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60776          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60777$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60778          FOUND_FREETYPE=no
60779        fi
60780      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60781          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60782        # Found lib in isa dir, use that instead.
60783        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60784        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60785$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60786      fi
60787    fi
60788  fi
60789
60790  if test "x$FOUND_FREETYPE" = xyes; then
60791
60792  # Only process if variable expands to non-empty
60793
60794  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60795    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60796
60797  # Input might be given as Windows format, start by converting to
60798  # unix format.
60799  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60800  new_path=`$CYGPATH -u "$path"`
60801
60802  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60803  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60804  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60805  # "foo.exe" is OK but "foo" is an error.
60806  #
60807  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60808  # It is also a way to make sure we got the proper file name for the real test later on.
60809  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60810  if test "x$test_shortpath" = x; then
60811    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60812$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60813    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60814  fi
60815
60816  # Call helper function which possibly converts this using DOS-style short mode.
60817  # If so, the updated path is stored in $new_path.
60818
60819  input_path="$new_path"
60820  # Check if we need to convert this using DOS-style short mode. If the path
60821  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60822  # take no chances and rewrite it.
60823  # Note: m4 eats our [], so we need to use [ and ] instead.
60824  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60825  if test "x$has_forbidden_chars" != x; then
60826    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60827    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60828    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60829    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60830      # Going to short mode and back again did indeed matter. Since short mode is
60831      # case insensitive, let's make it lowercase to improve readability.
60832      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60833      # Now convert it back to Unix-style (cygpath)
60834      input_path=`$CYGPATH -u "$shortmode_path"`
60835      new_path="$input_path"
60836    fi
60837  fi
60838
60839  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60840  if test "x$test_cygdrive_prefix" = x; then
60841    # As a simple fix, exclude /usr/bin since it's not a real path.
60842    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60843      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60844      # a path prefixed by /cygdrive for fixpath to work.
60845      new_path="$CYGWIN_ROOT_PATH$input_path"
60846    fi
60847  fi
60848
60849
60850  if test "x$path" != "x$new_path"; then
60851    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60852    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60853$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60854  fi
60855
60856    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60857
60858  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60859  has_colon=`$ECHO $path | $GREP ^.:`
60860  new_path="$path"
60861  if test "x$has_colon" = x; then
60862    # Not in mixed or Windows style, start by that.
60863    new_path=`cmd //c echo $path`
60864  fi
60865
60866
60867  input_path="$new_path"
60868  # Check if we need to convert this using DOS-style short mode. If the path
60869  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60870  # take no chances and rewrite it.
60871  # Note: m4 eats our [], so we need to use [ and ] instead.
60872  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60873  if test "x$has_forbidden_chars" != x; then
60874    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60875    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60876  fi
60877
60878
60879  windows_path="$new_path"
60880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60881    unix_path=`$CYGPATH -u "$windows_path"`
60882    new_path="$unix_path"
60883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60885    new_path="$unix_path"
60886  fi
60887
60888  if test "x$path" != "x$new_path"; then
60889    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60890    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60891$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60892  fi
60893
60894  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60895  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60896
60897    else
60898      # We're on a unix platform. Hooray! :)
60899      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60900      has_space=`$ECHO "$path" | $GREP " "`
60901      if test "x$has_space" != x; then
60902        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60903$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60904        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60905      fi
60906
60907      # Use eval to expand a potential ~
60908      eval path="$path"
60909      if test ! -f "$path" && test ! -d "$path"; then
60910        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60911      fi
60912
60913      if test -d "$path"; then
60914        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60915      else
60916        dir="`$DIRNAME "$path"`"
60917        base="`$BASENAME "$path"`"
60918        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60919      fi
60920    fi
60921  fi
60922
60923
60924  # Only process if variable expands to non-empty
60925
60926  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60927    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60928
60929  # Input might be given as Windows format, start by converting to
60930  # unix format.
60931  path="$POTENTIAL_FREETYPE_LIB_PATH"
60932  new_path=`$CYGPATH -u "$path"`
60933
60934  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60935  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60936  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60937  # "foo.exe" is OK but "foo" is an error.
60938  #
60939  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60940  # It is also a way to make sure we got the proper file name for the real test later on.
60941  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60942  if test "x$test_shortpath" = x; then
60943    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60944$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60945    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60946  fi
60947
60948  # Call helper function which possibly converts this using DOS-style short mode.
60949  # If so, the updated path is stored in $new_path.
60950
60951  input_path="$new_path"
60952  # Check if we need to convert this using DOS-style short mode. If the path
60953  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60954  # take no chances and rewrite it.
60955  # Note: m4 eats our [], so we need to use [ and ] instead.
60956  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60957  if test "x$has_forbidden_chars" != x; then
60958    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60959    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60960    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60961    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60962      # Going to short mode and back again did indeed matter. Since short mode is
60963      # case insensitive, let's make it lowercase to improve readability.
60964      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60965      # Now convert it back to Unix-style (cygpath)
60966      input_path=`$CYGPATH -u "$shortmode_path"`
60967      new_path="$input_path"
60968    fi
60969  fi
60970
60971  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60972  if test "x$test_cygdrive_prefix" = x; then
60973    # As a simple fix, exclude /usr/bin since it's not a real path.
60974    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60975      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60976      # a path prefixed by /cygdrive for fixpath to work.
60977      new_path="$CYGWIN_ROOT_PATH$input_path"
60978    fi
60979  fi
60980
60981
60982  if test "x$path" != "x$new_path"; then
60983    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60984    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60985$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60986  fi
60987
60988    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60989
60990  path="$POTENTIAL_FREETYPE_LIB_PATH"
60991  has_colon=`$ECHO $path | $GREP ^.:`
60992  new_path="$path"
60993  if test "x$has_colon" = x; then
60994    # Not in mixed or Windows style, start by that.
60995    new_path=`cmd //c echo $path`
60996  fi
60997
60998
60999  input_path="$new_path"
61000  # Check if we need to convert this using DOS-style short mode. If the path
61001  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61002  # take no chances and rewrite it.
61003  # Note: m4 eats our [], so we need to use [ and ] instead.
61004  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61005  if test "x$has_forbidden_chars" != x; then
61006    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61007    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61008  fi
61009
61010
61011  windows_path="$new_path"
61012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61013    unix_path=`$CYGPATH -u "$windows_path"`
61014    new_path="$unix_path"
61015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61017    new_path="$unix_path"
61018  fi
61019
61020  if test "x$path" != "x$new_path"; then
61021    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61022    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61023$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61024  fi
61025
61026  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61027  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61028
61029    else
61030      # We're on a unix platform. Hooray! :)
61031      path="$POTENTIAL_FREETYPE_LIB_PATH"
61032      has_space=`$ECHO "$path" | $GREP " "`
61033      if test "x$has_space" != x; then
61034        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61035$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61036        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61037      fi
61038
61039      # Use eval to expand a potential ~
61040      eval path="$path"
61041      if test ! -f "$path" && test ! -d "$path"; then
61042        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61043      fi
61044
61045      if test -d "$path"; then
61046        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61047      else
61048        dir="`$DIRNAME "$path"`"
61049        base="`$BASENAME "$path"`"
61050        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61051      fi
61052    fi
61053  fi
61054
61055
61056    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61057    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61058$as_echo_n "checking for freetype includes... " >&6; }
61059    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61060$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61061    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61062    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61063$as_echo_n "checking for freetype libraries... " >&6; }
61064    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61065$as_echo "$FREETYPE_LIB_PATH" >&6; }
61066  fi
61067
61068
61069          if test "x$FOUND_FREETYPE" != xyes; then
61070            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
61071
61072  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61073  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61074  METHOD="well-known location"
61075
61076  # Let's start with an optimistic view of the world :-)
61077  FOUND_FREETYPE=yes
61078
61079  # First look for the canonical freetype main include file ft2build.h.
61080  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61081    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61082    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61083    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61084      # Fail.
61085      FOUND_FREETYPE=no
61086    fi
61087  fi
61088
61089  if test "x$FOUND_FREETYPE" = xyes; then
61090    # Include file found, let's continue the sanity check.
61091    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61092$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61093
61094    # Reset to default value
61095    FREETYPE_BASE_NAME=freetype
61096    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61097    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61098      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61099          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61100        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61101        # for the .6 version explicitly.
61102        FREETYPE_BASE_NAME=freetype.6
61103        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61104        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61105$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61106      else
61107        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61108$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61109        FOUND_FREETYPE=no
61110      fi
61111    else
61112      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61113        # On Windows, we will need both .lib and .dll file.
61114        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61115          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61116$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61117          FOUND_FREETYPE=no
61118        fi
61119      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61120          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61121        # Found lib in isa dir, use that instead.
61122        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61123        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61124$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61125      fi
61126    fi
61127  fi
61128
61129  if test "x$FOUND_FREETYPE" = xyes; then
61130
61131  # Only process if variable expands to non-empty
61132
61133  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61134    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61135
61136  # Input might be given as Windows format, start by converting to
61137  # unix format.
61138  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61139  new_path=`$CYGPATH -u "$path"`
61140
61141  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61142  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61143  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61144  # "foo.exe" is OK but "foo" is an error.
61145  #
61146  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61147  # It is also a way to make sure we got the proper file name for the real test later on.
61148  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61149  if test "x$test_shortpath" = x; then
61150    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61151$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61152    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61153  fi
61154
61155  # Call helper function which possibly converts this using DOS-style short mode.
61156  # If so, the updated path is stored in $new_path.
61157
61158  input_path="$new_path"
61159  # Check if we need to convert this using DOS-style short mode. If the path
61160  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61161  # take no chances and rewrite it.
61162  # Note: m4 eats our [], so we need to use [ and ] instead.
61163  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61164  if test "x$has_forbidden_chars" != x; then
61165    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61166    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61167    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61168    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61169      # Going to short mode and back again did indeed matter. Since short mode is
61170      # case insensitive, let's make it lowercase to improve readability.
61171      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61172      # Now convert it back to Unix-style (cygpath)
61173      input_path=`$CYGPATH -u "$shortmode_path"`
61174      new_path="$input_path"
61175    fi
61176  fi
61177
61178  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61179  if test "x$test_cygdrive_prefix" = x; then
61180    # As a simple fix, exclude /usr/bin since it's not a real path.
61181    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61182      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61183      # a path prefixed by /cygdrive for fixpath to work.
61184      new_path="$CYGWIN_ROOT_PATH$input_path"
61185    fi
61186  fi
61187
61188
61189  if test "x$path" != "x$new_path"; then
61190    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61191    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61192$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61193  fi
61194
61195    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61196
61197  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61198  has_colon=`$ECHO $path | $GREP ^.:`
61199  new_path="$path"
61200  if test "x$has_colon" = x; then
61201    # Not in mixed or Windows style, start by that.
61202    new_path=`cmd //c echo $path`
61203  fi
61204
61205
61206  input_path="$new_path"
61207  # Check if we need to convert this using DOS-style short mode. If the path
61208  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61209  # take no chances and rewrite it.
61210  # Note: m4 eats our [], so we need to use [ and ] instead.
61211  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61212  if test "x$has_forbidden_chars" != x; then
61213    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61214    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61215  fi
61216
61217
61218  windows_path="$new_path"
61219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61220    unix_path=`$CYGPATH -u "$windows_path"`
61221    new_path="$unix_path"
61222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61223    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61224    new_path="$unix_path"
61225  fi
61226
61227  if test "x$path" != "x$new_path"; then
61228    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61229    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61230$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61231  fi
61232
61233  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61234  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61235
61236    else
61237      # We're on a unix platform. Hooray! :)
61238      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61239      has_space=`$ECHO "$path" | $GREP " "`
61240      if test "x$has_space" != x; then
61241        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61242$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61243        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61244      fi
61245
61246      # Use eval to expand a potential ~
61247      eval path="$path"
61248      if test ! -f "$path" && test ! -d "$path"; then
61249        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61250      fi
61251
61252      if test -d "$path"; then
61253        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61254      else
61255        dir="`$DIRNAME "$path"`"
61256        base="`$BASENAME "$path"`"
61257        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61258      fi
61259    fi
61260  fi
61261
61262
61263  # Only process if variable expands to non-empty
61264
61265  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61266    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61267
61268  # Input might be given as Windows format, start by converting to
61269  # unix format.
61270  path="$POTENTIAL_FREETYPE_LIB_PATH"
61271  new_path=`$CYGPATH -u "$path"`
61272
61273  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61274  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61275  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61276  # "foo.exe" is OK but "foo" is an error.
61277  #
61278  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61279  # It is also a way to make sure we got the proper file name for the real test later on.
61280  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61281  if test "x$test_shortpath" = x; then
61282    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61283$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61284    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61285  fi
61286
61287  # Call helper function which possibly converts this using DOS-style short mode.
61288  # If so, the updated path is stored in $new_path.
61289
61290  input_path="$new_path"
61291  # Check if we need to convert this using DOS-style short mode. If the path
61292  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61293  # take no chances and rewrite it.
61294  # Note: m4 eats our [], so we need to use [ and ] instead.
61295  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61296  if test "x$has_forbidden_chars" != x; then
61297    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61298    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61299    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61300    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61301      # Going to short mode and back again did indeed matter. Since short mode is
61302      # case insensitive, let's make it lowercase to improve readability.
61303      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61304      # Now convert it back to Unix-style (cygpath)
61305      input_path=`$CYGPATH -u "$shortmode_path"`
61306      new_path="$input_path"
61307    fi
61308  fi
61309
61310  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61311  if test "x$test_cygdrive_prefix" = x; then
61312    # As a simple fix, exclude /usr/bin since it's not a real path.
61313    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61314      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61315      # a path prefixed by /cygdrive for fixpath to work.
61316      new_path="$CYGWIN_ROOT_PATH$input_path"
61317    fi
61318  fi
61319
61320
61321  if test "x$path" != "x$new_path"; then
61322    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61323    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61324$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61325  fi
61326
61327    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61328
61329  path="$POTENTIAL_FREETYPE_LIB_PATH"
61330  has_colon=`$ECHO $path | $GREP ^.:`
61331  new_path="$path"
61332  if test "x$has_colon" = x; then
61333    # Not in mixed or Windows style, start by that.
61334    new_path=`cmd //c echo $path`
61335  fi
61336
61337
61338  input_path="$new_path"
61339  # Check if we need to convert this using DOS-style short mode. If the path
61340  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61341  # take no chances and rewrite it.
61342  # Note: m4 eats our [], so we need to use [ and ] instead.
61343  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61344  if test "x$has_forbidden_chars" != x; then
61345    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61346    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61347  fi
61348
61349
61350  windows_path="$new_path"
61351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61352    unix_path=`$CYGPATH -u "$windows_path"`
61353    new_path="$unix_path"
61354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61355    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61356    new_path="$unix_path"
61357  fi
61358
61359  if test "x$path" != "x$new_path"; then
61360    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61361    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61362$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61363  fi
61364
61365  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61366  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61367
61368    else
61369      # We're on a unix platform. Hooray! :)
61370      path="$POTENTIAL_FREETYPE_LIB_PATH"
61371      has_space=`$ECHO "$path" | $GREP " "`
61372      if test "x$has_space" != x; then
61373        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61374$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61375        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61376      fi
61377
61378      # Use eval to expand a potential ~
61379      eval path="$path"
61380      if test ! -f "$path" && test ! -d "$path"; then
61381        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61382      fi
61383
61384      if test -d "$path"; then
61385        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61386      else
61387        dir="`$DIRNAME "$path"`"
61388        base="`$BASENAME "$path"`"
61389        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61390      fi
61391    fi
61392  fi
61393
61394
61395    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61396    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61397$as_echo_n "checking for freetype includes... " >&6; }
61398    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61399$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61400    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61401    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61402$as_echo_n "checking for freetype libraries... " >&6; }
61403    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61404$as_echo "$FREETYPE_LIB_PATH" >&6; }
61405  fi
61406
61407          fi
61408          if test "x$FOUND_FREETYPE" != xyes; then
61409            FREETYPE_BASE_DIR="$SYSROOT/usr/local"
61410
61411  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61412  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61413  METHOD="well-known location"
61414
61415  # Let's start with an optimistic view of the world :-)
61416  FOUND_FREETYPE=yes
61417
61418  # First look for the canonical freetype main include file ft2build.h.
61419  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61420    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61421    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61422    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61423      # Fail.
61424      FOUND_FREETYPE=no
61425    fi
61426  fi
61427
61428  if test "x$FOUND_FREETYPE" = xyes; then
61429    # Include file found, let's continue the sanity check.
61430    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61431$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61432
61433    # Reset to default value
61434    FREETYPE_BASE_NAME=freetype
61435    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61436    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61437      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61438          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61439        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61440        # for the .6 version explicitly.
61441        FREETYPE_BASE_NAME=freetype.6
61442        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61443        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61444$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61445      else
61446        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61447$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61448        FOUND_FREETYPE=no
61449      fi
61450    else
61451      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61452        # On Windows, we will need both .lib and .dll file.
61453        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61454          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61455$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61456          FOUND_FREETYPE=no
61457        fi
61458      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61459          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61460        # Found lib in isa dir, use that instead.
61461        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61462        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61463$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61464      fi
61465    fi
61466  fi
61467
61468  if test "x$FOUND_FREETYPE" = xyes; then
61469
61470  # Only process if variable expands to non-empty
61471
61472  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61473    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61474
61475  # Input might be given as Windows format, start by converting to
61476  # unix format.
61477  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61478  new_path=`$CYGPATH -u "$path"`
61479
61480  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61481  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61482  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61483  # "foo.exe" is OK but "foo" is an error.
61484  #
61485  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61486  # It is also a way to make sure we got the proper file name for the real test later on.
61487  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61488  if test "x$test_shortpath" = x; then
61489    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61490$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61491    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61492  fi
61493
61494  # Call helper function which possibly converts this using DOS-style short mode.
61495  # If so, the updated path is stored in $new_path.
61496
61497  input_path="$new_path"
61498  # Check if we need to convert this using DOS-style short mode. If the path
61499  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61500  # take no chances and rewrite it.
61501  # Note: m4 eats our [], so we need to use [ and ] instead.
61502  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61503  if test "x$has_forbidden_chars" != x; then
61504    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61505    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61506    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61507    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61508      # Going to short mode and back again did indeed matter. Since short mode is
61509      # case insensitive, let's make it lowercase to improve readability.
61510      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61511      # Now convert it back to Unix-style (cygpath)
61512      input_path=`$CYGPATH -u "$shortmode_path"`
61513      new_path="$input_path"
61514    fi
61515  fi
61516
61517  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61518  if test "x$test_cygdrive_prefix" = x; then
61519    # As a simple fix, exclude /usr/bin since it's not a real path.
61520    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61521      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61522      # a path prefixed by /cygdrive for fixpath to work.
61523      new_path="$CYGWIN_ROOT_PATH$input_path"
61524    fi
61525  fi
61526
61527
61528  if test "x$path" != "x$new_path"; then
61529    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61530    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61531$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61532  fi
61533
61534    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61535
61536  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61537  has_colon=`$ECHO $path | $GREP ^.:`
61538  new_path="$path"
61539  if test "x$has_colon" = x; then
61540    # Not in mixed or Windows style, start by that.
61541    new_path=`cmd //c echo $path`
61542  fi
61543
61544
61545  input_path="$new_path"
61546  # Check if we need to convert this using DOS-style short mode. If the path
61547  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61548  # take no chances and rewrite it.
61549  # Note: m4 eats our [], so we need to use [ and ] instead.
61550  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61551  if test "x$has_forbidden_chars" != x; then
61552    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61553    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61554  fi
61555
61556
61557  windows_path="$new_path"
61558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61559    unix_path=`$CYGPATH -u "$windows_path"`
61560    new_path="$unix_path"
61561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61563    new_path="$unix_path"
61564  fi
61565
61566  if test "x$path" != "x$new_path"; then
61567    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61568    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61569$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61570  fi
61571
61572  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61573  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61574
61575    else
61576      # We're on a unix platform. Hooray! :)
61577      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61578      has_space=`$ECHO "$path" | $GREP " "`
61579      if test "x$has_space" != x; then
61580        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61581$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61582        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61583      fi
61584
61585      # Use eval to expand a potential ~
61586      eval path="$path"
61587      if test ! -f "$path" && test ! -d "$path"; then
61588        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61589      fi
61590
61591      if test -d "$path"; then
61592        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61593      else
61594        dir="`$DIRNAME "$path"`"
61595        base="`$BASENAME "$path"`"
61596        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61597      fi
61598    fi
61599  fi
61600
61601
61602  # Only process if variable expands to non-empty
61603
61604  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61605    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61606
61607  # Input might be given as Windows format, start by converting to
61608  # unix format.
61609  path="$POTENTIAL_FREETYPE_LIB_PATH"
61610  new_path=`$CYGPATH -u "$path"`
61611
61612  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61613  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61614  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61615  # "foo.exe" is OK but "foo" is an error.
61616  #
61617  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61618  # It is also a way to make sure we got the proper file name for the real test later on.
61619  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61620  if test "x$test_shortpath" = x; then
61621    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61622$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61623    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61624  fi
61625
61626  # Call helper function which possibly converts this using DOS-style short mode.
61627  # If so, the updated path is stored in $new_path.
61628
61629  input_path="$new_path"
61630  # Check if we need to convert this using DOS-style short mode. If the path
61631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61632  # take no chances and rewrite it.
61633  # Note: m4 eats our [], so we need to use [ and ] instead.
61634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61635  if test "x$has_forbidden_chars" != x; then
61636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61637    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61638    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61639    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61640      # Going to short mode and back again did indeed matter. Since short mode is
61641      # case insensitive, let's make it lowercase to improve readability.
61642      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61643      # Now convert it back to Unix-style (cygpath)
61644      input_path=`$CYGPATH -u "$shortmode_path"`
61645      new_path="$input_path"
61646    fi
61647  fi
61648
61649  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61650  if test "x$test_cygdrive_prefix" = x; then
61651    # As a simple fix, exclude /usr/bin since it's not a real path.
61652    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61653      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61654      # a path prefixed by /cygdrive for fixpath to work.
61655      new_path="$CYGWIN_ROOT_PATH$input_path"
61656    fi
61657  fi
61658
61659
61660  if test "x$path" != "x$new_path"; then
61661    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61662    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61663$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61664  fi
61665
61666    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61667
61668  path="$POTENTIAL_FREETYPE_LIB_PATH"
61669  has_colon=`$ECHO $path | $GREP ^.:`
61670  new_path="$path"
61671  if test "x$has_colon" = x; then
61672    # Not in mixed or Windows style, start by that.
61673    new_path=`cmd //c echo $path`
61674  fi
61675
61676
61677  input_path="$new_path"
61678  # Check if we need to convert this using DOS-style short mode. If the path
61679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61680  # take no chances and rewrite it.
61681  # Note: m4 eats our [], so we need to use [ and ] instead.
61682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61683  if test "x$has_forbidden_chars" != x; then
61684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61685    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61686  fi
61687
61688
61689  windows_path="$new_path"
61690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61691    unix_path=`$CYGPATH -u "$windows_path"`
61692    new_path="$unix_path"
61693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61694    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61695    new_path="$unix_path"
61696  fi
61697
61698  if test "x$path" != "x$new_path"; then
61699    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61700    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61701$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61702  fi
61703
61704  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61705  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61706
61707    else
61708      # We're on a unix platform. Hooray! :)
61709      path="$POTENTIAL_FREETYPE_LIB_PATH"
61710      has_space=`$ECHO "$path" | $GREP " "`
61711      if test "x$has_space" != x; then
61712        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61713$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61714        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61715      fi
61716
61717      # Use eval to expand a potential ~
61718      eval path="$path"
61719      if test ! -f "$path" && test ! -d "$path"; then
61720        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61721      fi
61722
61723      if test -d "$path"; then
61724        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61725      else
61726        dir="`$DIRNAME "$path"`"
61727        base="`$BASENAME "$path"`"
61728        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61729      fi
61730    fi
61731  fi
61732
61733
61734    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61735    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61736$as_echo_n "checking for freetype includes... " >&6; }
61737    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61738$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61739    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61740    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61741$as_echo_n "checking for freetype libraries... " >&6; }
61742    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61743$as_echo "$FREETYPE_LIB_PATH" >&6; }
61744  fi
61745
61746          fi
61747
61748          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
61749            if test "x$FOUND_FREETYPE" != xyes; then
61750              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
61751              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
61752
61753  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61754  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61755  METHOD="well-known location"
61756
61757  # Let's start with an optimistic view of the world :-)
61758  FOUND_FREETYPE=yes
61759
61760  # First look for the canonical freetype main include file ft2build.h.
61761  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61762    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61763    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61764    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61765      # Fail.
61766      FOUND_FREETYPE=no
61767    fi
61768  fi
61769
61770  if test "x$FOUND_FREETYPE" = xyes; then
61771    # Include file found, let's continue the sanity check.
61772    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61773$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61774
61775    # Reset to default value
61776    FREETYPE_BASE_NAME=freetype
61777    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61778    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61779      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61780          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61781        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61782        # for the .6 version explicitly.
61783        FREETYPE_BASE_NAME=freetype.6
61784        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61785        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61786$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61787      else
61788        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61789$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61790        FOUND_FREETYPE=no
61791      fi
61792    else
61793      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61794        # On Windows, we will need both .lib and .dll file.
61795        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61796          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61797$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61798          FOUND_FREETYPE=no
61799        fi
61800      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61801          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61802        # Found lib in isa dir, use that instead.
61803        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61804        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61805$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61806      fi
61807    fi
61808  fi
61809
61810  if test "x$FOUND_FREETYPE" = xyes; then
61811
61812  # Only process if variable expands to non-empty
61813
61814  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61815    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61816
61817  # Input might be given as Windows format, start by converting to
61818  # unix format.
61819  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61820  new_path=`$CYGPATH -u "$path"`
61821
61822  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61823  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61824  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61825  # "foo.exe" is OK but "foo" is an error.
61826  #
61827  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61828  # It is also a way to make sure we got the proper file name for the real test later on.
61829  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61830  if test "x$test_shortpath" = x; then
61831    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61832$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61833    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61834  fi
61835
61836  # Call helper function which possibly converts this using DOS-style short mode.
61837  # If so, the updated path is stored in $new_path.
61838
61839  input_path="$new_path"
61840  # Check if we need to convert this using DOS-style short mode. If the path
61841  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61842  # take no chances and rewrite it.
61843  # Note: m4 eats our [], so we need to use [ and ] instead.
61844  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61845  if test "x$has_forbidden_chars" != x; then
61846    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61847    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61848    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61849    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61850      # Going to short mode and back again did indeed matter. Since short mode is
61851      # case insensitive, let's make it lowercase to improve readability.
61852      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61853      # Now convert it back to Unix-style (cygpath)
61854      input_path=`$CYGPATH -u "$shortmode_path"`
61855      new_path="$input_path"
61856    fi
61857  fi
61858
61859  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61860  if test "x$test_cygdrive_prefix" = x; then
61861    # As a simple fix, exclude /usr/bin since it's not a real path.
61862    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61863      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61864      # a path prefixed by /cygdrive for fixpath to work.
61865      new_path="$CYGWIN_ROOT_PATH$input_path"
61866    fi
61867  fi
61868
61869
61870  if test "x$path" != "x$new_path"; then
61871    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61872    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61873$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61874  fi
61875
61876    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61877
61878  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61879  has_colon=`$ECHO $path | $GREP ^.:`
61880  new_path="$path"
61881  if test "x$has_colon" = x; then
61882    # Not in mixed or Windows style, start by that.
61883    new_path=`cmd //c echo $path`
61884  fi
61885
61886
61887  input_path="$new_path"
61888  # Check if we need to convert this using DOS-style short mode. If the path
61889  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61890  # take no chances and rewrite it.
61891  # Note: m4 eats our [], so we need to use [ and ] instead.
61892  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61893  if test "x$has_forbidden_chars" != x; then
61894    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61895    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61896  fi
61897
61898
61899  windows_path="$new_path"
61900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61901    unix_path=`$CYGPATH -u "$windows_path"`
61902    new_path="$unix_path"
61903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61904    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61905    new_path="$unix_path"
61906  fi
61907
61908  if test "x$path" != "x$new_path"; then
61909    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61910    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61911$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61912  fi
61913
61914  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61915  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61916
61917    else
61918      # We're on a unix platform. Hooray! :)
61919      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61920      has_space=`$ECHO "$path" | $GREP " "`
61921      if test "x$has_space" != x; then
61922        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61923$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61924        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61925      fi
61926
61927      # Use eval to expand a potential ~
61928      eval path="$path"
61929      if test ! -f "$path" && test ! -d "$path"; then
61930        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61931      fi
61932
61933      if test -d "$path"; then
61934        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61935      else
61936        dir="`$DIRNAME "$path"`"
61937        base="`$BASENAME "$path"`"
61938        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61939      fi
61940    fi
61941  fi
61942
61943
61944  # Only process if variable expands to non-empty
61945
61946  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61947    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61948
61949  # Input might be given as Windows format, start by converting to
61950  # unix format.
61951  path="$POTENTIAL_FREETYPE_LIB_PATH"
61952  new_path=`$CYGPATH -u "$path"`
61953
61954  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61955  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61956  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61957  # "foo.exe" is OK but "foo" is an error.
61958  #
61959  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61960  # It is also a way to make sure we got the proper file name for the real test later on.
61961  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61962  if test "x$test_shortpath" = x; then
61963    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61964$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61965    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61966  fi
61967
61968  # Call helper function which possibly converts this using DOS-style short mode.
61969  # If so, the updated path is stored in $new_path.
61970
61971  input_path="$new_path"
61972  # Check if we need to convert this using DOS-style short mode. If the path
61973  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61974  # take no chances and rewrite it.
61975  # Note: m4 eats our [], so we need to use [ and ] instead.
61976  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61977  if test "x$has_forbidden_chars" != x; then
61978    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61979    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61980    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61981    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61982      # Going to short mode and back again did indeed matter. Since short mode is
61983      # case insensitive, let's make it lowercase to improve readability.
61984      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61985      # Now convert it back to Unix-style (cygpath)
61986      input_path=`$CYGPATH -u "$shortmode_path"`
61987      new_path="$input_path"
61988    fi
61989  fi
61990
61991  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61992  if test "x$test_cygdrive_prefix" = x; then
61993    # As a simple fix, exclude /usr/bin since it's not a real path.
61994    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61995      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61996      # a path prefixed by /cygdrive for fixpath to work.
61997      new_path="$CYGWIN_ROOT_PATH$input_path"
61998    fi
61999  fi
62000
62001
62002  if test "x$path" != "x$new_path"; then
62003    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62004    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62005$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62006  fi
62007
62008    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62009
62010  path="$POTENTIAL_FREETYPE_LIB_PATH"
62011  has_colon=`$ECHO $path | $GREP ^.:`
62012  new_path="$path"
62013  if test "x$has_colon" = x; then
62014    # Not in mixed or Windows style, start by that.
62015    new_path=`cmd //c echo $path`
62016  fi
62017
62018
62019  input_path="$new_path"
62020  # Check if we need to convert this using DOS-style short mode. If the path
62021  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62022  # take no chances and rewrite it.
62023  # Note: m4 eats our [], so we need to use [ and ] instead.
62024  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62025  if test "x$has_forbidden_chars" != x; then
62026    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62027    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62028  fi
62029
62030
62031  windows_path="$new_path"
62032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62033    unix_path=`$CYGPATH -u "$windows_path"`
62034    new_path="$unix_path"
62035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62036    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62037    new_path="$unix_path"
62038  fi
62039
62040  if test "x$path" != "x$new_path"; then
62041    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62042    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62043$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62044  fi
62045
62046  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62047  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62048
62049    else
62050      # We're on a unix platform. Hooray! :)
62051      path="$POTENTIAL_FREETYPE_LIB_PATH"
62052      has_space=`$ECHO "$path" | $GREP " "`
62053      if test "x$has_space" != x; then
62054        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62055$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62056        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62057      fi
62058
62059      # Use eval to expand a potential ~
62060      eval path="$path"
62061      if test ! -f "$path" && test ! -d "$path"; then
62062        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62063      fi
62064
62065      if test -d "$path"; then
62066        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62067      else
62068        dir="`$DIRNAME "$path"`"
62069        base="`$BASENAME "$path"`"
62070        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62071      fi
62072    fi
62073  fi
62074
62075
62076    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62077    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62078$as_echo_n "checking for freetype includes... " >&6; }
62079    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62080$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62081    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62082    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62083$as_echo_n "checking for freetype libraries... " >&6; }
62084    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62085$as_echo "$FREETYPE_LIB_PATH" >&6; }
62086  fi
62087
62088            fi
62089          fi
62090
62091          if test "x$FOUND_FREETYPE" != xyes; then
62092            FREETYPE_BASE_DIR="$SYSROOT/usr"
62093            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
62094
62095  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62096  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
62097  METHOD="well-known location"
62098
62099  # Let's start with an optimistic view of the world :-)
62100  FOUND_FREETYPE=yes
62101
62102  # First look for the canonical freetype main include file ft2build.h.
62103  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62104    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62105    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62106    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62107      # Fail.
62108      FOUND_FREETYPE=no
62109    fi
62110  fi
62111
62112  if test "x$FOUND_FREETYPE" = xyes; then
62113    # Include file found, let's continue the sanity check.
62114    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62115$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62116
62117    # Reset to default value
62118    FREETYPE_BASE_NAME=freetype
62119    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62120    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62121      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62122          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62123        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62124        # for the .6 version explicitly.
62125        FREETYPE_BASE_NAME=freetype.6
62126        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62127        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62128$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62129      else
62130        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62131$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62132        FOUND_FREETYPE=no
62133      fi
62134    else
62135      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62136        # On Windows, we will need both .lib and .dll file.
62137        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62138          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62139$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62140          FOUND_FREETYPE=no
62141        fi
62142      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62143          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62144        # Found lib in isa dir, use that instead.
62145        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62146        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62147$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62148      fi
62149    fi
62150  fi
62151
62152  if test "x$FOUND_FREETYPE" = xyes; then
62153
62154  # Only process if variable expands to non-empty
62155
62156  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62157    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62158
62159  # Input might be given as Windows format, start by converting to
62160  # unix format.
62161  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62162  new_path=`$CYGPATH -u "$path"`
62163
62164  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62165  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62166  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62167  # "foo.exe" is OK but "foo" is an error.
62168  #
62169  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62170  # It is also a way to make sure we got the proper file name for the real test later on.
62171  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62172  if test "x$test_shortpath" = x; then
62173    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62174$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62175    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62176  fi
62177
62178  # Call helper function which possibly converts this using DOS-style short mode.
62179  # If so, the updated path is stored in $new_path.
62180
62181  input_path="$new_path"
62182  # Check if we need to convert this using DOS-style short mode. If the path
62183  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62184  # take no chances and rewrite it.
62185  # Note: m4 eats our [], so we need to use [ and ] instead.
62186  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62187  if test "x$has_forbidden_chars" != x; then
62188    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62189    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62190    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62191    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62192      # Going to short mode and back again did indeed matter. Since short mode is
62193      # case insensitive, let's make it lowercase to improve readability.
62194      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62195      # Now convert it back to Unix-style (cygpath)
62196      input_path=`$CYGPATH -u "$shortmode_path"`
62197      new_path="$input_path"
62198    fi
62199  fi
62200
62201  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62202  if test "x$test_cygdrive_prefix" = x; then
62203    # As a simple fix, exclude /usr/bin since it's not a real path.
62204    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62205      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62206      # a path prefixed by /cygdrive for fixpath to work.
62207      new_path="$CYGWIN_ROOT_PATH$input_path"
62208    fi
62209  fi
62210
62211
62212  if test "x$path" != "x$new_path"; then
62213    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62214    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62215$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62216  fi
62217
62218    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62219
62220  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62221  has_colon=`$ECHO $path | $GREP ^.:`
62222  new_path="$path"
62223  if test "x$has_colon" = x; then
62224    # Not in mixed or Windows style, start by that.
62225    new_path=`cmd //c echo $path`
62226  fi
62227
62228
62229  input_path="$new_path"
62230  # Check if we need to convert this using DOS-style short mode. If the path
62231  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62232  # take no chances and rewrite it.
62233  # Note: m4 eats our [], so we need to use [ and ] instead.
62234  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62235  if test "x$has_forbidden_chars" != x; then
62236    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62237    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62238  fi
62239
62240
62241  windows_path="$new_path"
62242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62243    unix_path=`$CYGPATH -u "$windows_path"`
62244    new_path="$unix_path"
62245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62246    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62247    new_path="$unix_path"
62248  fi
62249
62250  if test "x$path" != "x$new_path"; then
62251    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62252    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62253$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62254  fi
62255
62256  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62257  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62258
62259    else
62260      # We're on a unix platform. Hooray! :)
62261      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62262      has_space=`$ECHO "$path" | $GREP " "`
62263      if test "x$has_space" != x; then
62264        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62265$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62266        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62267      fi
62268
62269      # Use eval to expand a potential ~
62270      eval path="$path"
62271      if test ! -f "$path" && test ! -d "$path"; then
62272        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62273      fi
62274
62275      if test -d "$path"; then
62276        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62277      else
62278        dir="`$DIRNAME "$path"`"
62279        base="`$BASENAME "$path"`"
62280        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62281      fi
62282    fi
62283  fi
62284
62285
62286  # Only process if variable expands to non-empty
62287
62288  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62289    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62290
62291  # Input might be given as Windows format, start by converting to
62292  # unix format.
62293  path="$POTENTIAL_FREETYPE_LIB_PATH"
62294  new_path=`$CYGPATH -u "$path"`
62295
62296  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62297  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62298  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62299  # "foo.exe" is OK but "foo" is an error.
62300  #
62301  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62302  # It is also a way to make sure we got the proper file name for the real test later on.
62303  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62304  if test "x$test_shortpath" = x; then
62305    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62306$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62307    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62308  fi
62309
62310  # Call helper function which possibly converts this using DOS-style short mode.
62311  # If so, the updated path is stored in $new_path.
62312
62313  input_path="$new_path"
62314  # Check if we need to convert this using DOS-style short mode. If the path
62315  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62316  # take no chances and rewrite it.
62317  # Note: m4 eats our [], so we need to use [ and ] instead.
62318  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62319  if test "x$has_forbidden_chars" != x; then
62320    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62321    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62322    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62323    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62324      # Going to short mode and back again did indeed matter. Since short mode is
62325      # case insensitive, let's make it lowercase to improve readability.
62326      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62327      # Now convert it back to Unix-style (cygpath)
62328      input_path=`$CYGPATH -u "$shortmode_path"`
62329      new_path="$input_path"
62330    fi
62331  fi
62332
62333  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62334  if test "x$test_cygdrive_prefix" = x; then
62335    # As a simple fix, exclude /usr/bin since it's not a real path.
62336    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62337      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62338      # a path prefixed by /cygdrive for fixpath to work.
62339      new_path="$CYGWIN_ROOT_PATH$input_path"
62340    fi
62341  fi
62342
62343
62344  if test "x$path" != "x$new_path"; then
62345    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62346    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62347$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62348  fi
62349
62350    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62351
62352  path="$POTENTIAL_FREETYPE_LIB_PATH"
62353  has_colon=`$ECHO $path | $GREP ^.:`
62354  new_path="$path"
62355  if test "x$has_colon" = x; then
62356    # Not in mixed or Windows style, start by that.
62357    new_path=`cmd //c echo $path`
62358  fi
62359
62360
62361  input_path="$new_path"
62362  # Check if we need to convert this using DOS-style short mode. If the path
62363  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62364  # take no chances and rewrite it.
62365  # Note: m4 eats our [], so we need to use [ and ] instead.
62366  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62367  if test "x$has_forbidden_chars" != x; then
62368    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62369    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62370  fi
62371
62372
62373  windows_path="$new_path"
62374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62375    unix_path=`$CYGPATH -u "$windows_path"`
62376    new_path="$unix_path"
62377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62379    new_path="$unix_path"
62380  fi
62381
62382  if test "x$path" != "x$new_path"; then
62383    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62384    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62385$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62386  fi
62387
62388  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62389  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62390
62391    else
62392      # We're on a unix platform. Hooray! :)
62393      path="$POTENTIAL_FREETYPE_LIB_PATH"
62394      has_space=`$ECHO "$path" | $GREP " "`
62395      if test "x$has_space" != x; then
62396        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62397$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62398        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62399      fi
62400
62401      # Use eval to expand a potential ~
62402      eval path="$path"
62403      if test ! -f "$path" && test ! -d "$path"; then
62404        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62405      fi
62406
62407      if test -d "$path"; then
62408        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62409      else
62410        dir="`$DIRNAME "$path"`"
62411        base="`$BASENAME "$path"`"
62412        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62413      fi
62414    fi
62415  fi
62416
62417
62418    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62419    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62420$as_echo_n "checking for freetype includes... " >&6; }
62421    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62422$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62423    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62424    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62425$as_echo_n "checking for freetype libraries... " >&6; }
62426    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62427$as_echo "$FREETYPE_LIB_PATH" >&6; }
62428  fi
62429
62430            else
62431
62432  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62433  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
62434  METHOD="well-known location"
62435
62436  # Let's start with an optimistic view of the world :-)
62437  FOUND_FREETYPE=yes
62438
62439  # First look for the canonical freetype main include file ft2build.h.
62440  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62441    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62442    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62443    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62444      # Fail.
62445      FOUND_FREETYPE=no
62446    fi
62447  fi
62448
62449  if test "x$FOUND_FREETYPE" = xyes; then
62450    # Include file found, let's continue the sanity check.
62451    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62452$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62453
62454    # Reset to default value
62455    FREETYPE_BASE_NAME=freetype
62456    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62457    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62458      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62459          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62460        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62461        # for the .6 version explicitly.
62462        FREETYPE_BASE_NAME=freetype.6
62463        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62464        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62465$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62466      else
62467        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62468$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62469        FOUND_FREETYPE=no
62470      fi
62471    else
62472      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62473        # On Windows, we will need both .lib and .dll file.
62474        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62475          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62476$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62477          FOUND_FREETYPE=no
62478        fi
62479      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62480          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62481        # Found lib in isa dir, use that instead.
62482        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62483        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62484$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62485      fi
62486    fi
62487  fi
62488
62489  if test "x$FOUND_FREETYPE" = xyes; then
62490
62491  # Only process if variable expands to non-empty
62492
62493  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62494    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62495
62496  # Input might be given as Windows format, start by converting to
62497  # unix format.
62498  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62499  new_path=`$CYGPATH -u "$path"`
62500
62501  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62502  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62503  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62504  # "foo.exe" is OK but "foo" is an error.
62505  #
62506  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62507  # It is also a way to make sure we got the proper file name for the real test later on.
62508  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62509  if test "x$test_shortpath" = x; then
62510    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62511$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62512    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62513  fi
62514
62515  # Call helper function which possibly converts this using DOS-style short mode.
62516  # If so, the updated path is stored in $new_path.
62517
62518  input_path="$new_path"
62519  # Check if we need to convert this using DOS-style short mode. If the path
62520  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62521  # take no chances and rewrite it.
62522  # Note: m4 eats our [], so we need to use [ and ] instead.
62523  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62524  if test "x$has_forbidden_chars" != x; then
62525    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62526    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62527    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62528    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62529      # Going to short mode and back again did indeed matter. Since short mode is
62530      # case insensitive, let's make it lowercase to improve readability.
62531      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62532      # Now convert it back to Unix-style (cygpath)
62533      input_path=`$CYGPATH -u "$shortmode_path"`
62534      new_path="$input_path"
62535    fi
62536  fi
62537
62538  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62539  if test "x$test_cygdrive_prefix" = x; then
62540    # As a simple fix, exclude /usr/bin since it's not a real path.
62541    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62542      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62543      # a path prefixed by /cygdrive for fixpath to work.
62544      new_path="$CYGWIN_ROOT_PATH$input_path"
62545    fi
62546  fi
62547
62548
62549  if test "x$path" != "x$new_path"; then
62550    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62551    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62552$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62553  fi
62554
62555    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62556
62557  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62558  has_colon=`$ECHO $path | $GREP ^.:`
62559  new_path="$path"
62560  if test "x$has_colon" = x; then
62561    # Not in mixed or Windows style, start by that.
62562    new_path=`cmd //c echo $path`
62563  fi
62564
62565
62566  input_path="$new_path"
62567  # Check if we need to convert this using DOS-style short mode. If the path
62568  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62569  # take no chances and rewrite it.
62570  # Note: m4 eats our [], so we need to use [ and ] instead.
62571  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62572  if test "x$has_forbidden_chars" != x; then
62573    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62574    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62575  fi
62576
62577
62578  windows_path="$new_path"
62579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62580    unix_path=`$CYGPATH -u "$windows_path"`
62581    new_path="$unix_path"
62582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62583    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62584    new_path="$unix_path"
62585  fi
62586
62587  if test "x$path" != "x$new_path"; then
62588    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62589    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62590$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62591  fi
62592
62593  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62594  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62595
62596    else
62597      # We're on a unix platform. Hooray! :)
62598      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62599      has_space=`$ECHO "$path" | $GREP " "`
62600      if test "x$has_space" != x; then
62601        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62602$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62603        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62604      fi
62605
62606      # Use eval to expand a potential ~
62607      eval path="$path"
62608      if test ! -f "$path" && test ! -d "$path"; then
62609        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62610      fi
62611
62612      if test -d "$path"; then
62613        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62614      else
62615        dir="`$DIRNAME "$path"`"
62616        base="`$BASENAME "$path"`"
62617        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62618      fi
62619    fi
62620  fi
62621
62622
62623  # Only process if variable expands to non-empty
62624
62625  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62626    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62627
62628  # Input might be given as Windows format, start by converting to
62629  # unix format.
62630  path="$POTENTIAL_FREETYPE_LIB_PATH"
62631  new_path=`$CYGPATH -u "$path"`
62632
62633  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62634  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62635  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62636  # "foo.exe" is OK but "foo" is an error.
62637  #
62638  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62639  # It is also a way to make sure we got the proper file name for the real test later on.
62640  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62641  if test "x$test_shortpath" = x; then
62642    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62643$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62644    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62645  fi
62646
62647  # Call helper function which possibly converts this using DOS-style short mode.
62648  # If so, the updated path is stored in $new_path.
62649
62650  input_path="$new_path"
62651  # Check if we need to convert this using DOS-style short mode. If the path
62652  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62653  # take no chances and rewrite it.
62654  # Note: m4 eats our [], so we need to use [ and ] instead.
62655  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62656  if test "x$has_forbidden_chars" != x; then
62657    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62658    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62659    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62660    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62661      # Going to short mode and back again did indeed matter. Since short mode is
62662      # case insensitive, let's make it lowercase to improve readability.
62663      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62664      # Now convert it back to Unix-style (cygpath)
62665      input_path=`$CYGPATH -u "$shortmode_path"`
62666      new_path="$input_path"
62667    fi
62668  fi
62669
62670  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62671  if test "x$test_cygdrive_prefix" = x; then
62672    # As a simple fix, exclude /usr/bin since it's not a real path.
62673    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62674      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62675      # a path prefixed by /cygdrive for fixpath to work.
62676      new_path="$CYGWIN_ROOT_PATH$input_path"
62677    fi
62678  fi
62679
62680
62681  if test "x$path" != "x$new_path"; then
62682    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62683    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62684$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62685  fi
62686
62687    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62688
62689  path="$POTENTIAL_FREETYPE_LIB_PATH"
62690  has_colon=`$ECHO $path | $GREP ^.:`
62691  new_path="$path"
62692  if test "x$has_colon" = x; then
62693    # Not in mixed or Windows style, start by that.
62694    new_path=`cmd //c echo $path`
62695  fi
62696
62697
62698  input_path="$new_path"
62699  # Check if we need to convert this using DOS-style short mode. If the path
62700  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62701  # take no chances and rewrite it.
62702  # Note: m4 eats our [], so we need to use [ and ] instead.
62703  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62704  if test "x$has_forbidden_chars" != x; then
62705    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62706    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62707  fi
62708
62709
62710  windows_path="$new_path"
62711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62712    unix_path=`$CYGPATH -u "$windows_path"`
62713    new_path="$unix_path"
62714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62715    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62716    new_path="$unix_path"
62717  fi
62718
62719  if test "x$path" != "x$new_path"; then
62720    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62721    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62722$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62723  fi
62724
62725  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62726  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62727
62728    else
62729      # We're on a unix platform. Hooray! :)
62730      path="$POTENTIAL_FREETYPE_LIB_PATH"
62731      has_space=`$ECHO "$path" | $GREP " "`
62732      if test "x$has_space" != x; then
62733        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62734$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62735        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62736      fi
62737
62738      # Use eval to expand a potential ~
62739      eval path="$path"
62740      if test ! -f "$path" && test ! -d "$path"; then
62741        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62742      fi
62743
62744      if test -d "$path"; then
62745        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62746      else
62747        dir="`$DIRNAME "$path"`"
62748        base="`$BASENAME "$path"`"
62749        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62750      fi
62751    fi
62752  fi
62753
62754
62755    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62756    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62757$as_echo_n "checking for freetype includes... " >&6; }
62758    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62759$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62760    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62761    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62762$as_echo_n "checking for freetype libraries... " >&6; }
62763    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62764$as_echo "$FREETYPE_LIB_PATH" >&6; }
62765  fi
62766
62767              if test "x$FOUND_FREETYPE" != xyes; then
62768
62769  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62770  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
62771  METHOD="well-known location"
62772
62773  # Let's start with an optimistic view of the world :-)
62774  FOUND_FREETYPE=yes
62775
62776  # First look for the canonical freetype main include file ft2build.h.
62777  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62778    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62779    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62780    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62781      # Fail.
62782      FOUND_FREETYPE=no
62783    fi
62784  fi
62785
62786  if test "x$FOUND_FREETYPE" = xyes; then
62787    # Include file found, let's continue the sanity check.
62788    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62789$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62790
62791    # Reset to default value
62792    FREETYPE_BASE_NAME=freetype
62793    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62794    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62795      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62796          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62797        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62798        # for the .6 version explicitly.
62799        FREETYPE_BASE_NAME=freetype.6
62800        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62801        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62802$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62803      else
62804        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62805$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62806        FOUND_FREETYPE=no
62807      fi
62808    else
62809      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62810        # On Windows, we will need both .lib and .dll file.
62811        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62812          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62813$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62814          FOUND_FREETYPE=no
62815        fi
62816      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62817          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62818        # Found lib in isa dir, use that instead.
62819        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62820        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62821$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62822      fi
62823    fi
62824  fi
62825
62826  if test "x$FOUND_FREETYPE" = xyes; then
62827
62828  # Only process if variable expands to non-empty
62829
62830  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62831    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62832
62833  # Input might be given as Windows format, start by converting to
62834  # unix format.
62835  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62836  new_path=`$CYGPATH -u "$path"`
62837
62838  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62839  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62840  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62841  # "foo.exe" is OK but "foo" is an error.
62842  #
62843  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62844  # It is also a way to make sure we got the proper file name for the real test later on.
62845  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62846  if test "x$test_shortpath" = x; then
62847    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62848$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62849    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62850  fi
62851
62852  # Call helper function which possibly converts this using DOS-style short mode.
62853  # If so, the updated path is stored in $new_path.
62854
62855  input_path="$new_path"
62856  # Check if we need to convert this using DOS-style short mode. If the path
62857  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62858  # take no chances and rewrite it.
62859  # Note: m4 eats our [], so we need to use [ and ] instead.
62860  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62861  if test "x$has_forbidden_chars" != x; then
62862    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62863    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62864    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62865    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62866      # Going to short mode and back again did indeed matter. Since short mode is
62867      # case insensitive, let's make it lowercase to improve readability.
62868      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62869      # Now convert it back to Unix-style (cygpath)
62870      input_path=`$CYGPATH -u "$shortmode_path"`
62871      new_path="$input_path"
62872    fi
62873  fi
62874
62875  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62876  if test "x$test_cygdrive_prefix" = x; then
62877    # As a simple fix, exclude /usr/bin since it's not a real path.
62878    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62879      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62880      # a path prefixed by /cygdrive for fixpath to work.
62881      new_path="$CYGWIN_ROOT_PATH$input_path"
62882    fi
62883  fi
62884
62885
62886  if test "x$path" != "x$new_path"; then
62887    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62888    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62889$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62890  fi
62891
62892    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62893
62894  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62895  has_colon=`$ECHO $path | $GREP ^.:`
62896  new_path="$path"
62897  if test "x$has_colon" = x; then
62898    # Not in mixed or Windows style, start by that.
62899    new_path=`cmd //c echo $path`
62900  fi
62901
62902
62903  input_path="$new_path"
62904  # Check if we need to convert this using DOS-style short mode. If the path
62905  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62906  # take no chances and rewrite it.
62907  # Note: m4 eats our [], so we need to use [ and ] instead.
62908  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62909  if test "x$has_forbidden_chars" != x; then
62910    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62911    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62912  fi
62913
62914
62915  windows_path="$new_path"
62916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62917    unix_path=`$CYGPATH -u "$windows_path"`
62918    new_path="$unix_path"
62919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62921    new_path="$unix_path"
62922  fi
62923
62924  if test "x$path" != "x$new_path"; then
62925    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62926    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62927$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62928  fi
62929
62930  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62931  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62932
62933    else
62934      # We're on a unix platform. Hooray! :)
62935      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62936      has_space=`$ECHO "$path" | $GREP " "`
62937      if test "x$has_space" != x; then
62938        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62939$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62940        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62941      fi
62942
62943      # Use eval to expand a potential ~
62944      eval path="$path"
62945      if test ! -f "$path" && test ! -d "$path"; then
62946        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62947      fi
62948
62949      if test -d "$path"; then
62950        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62951      else
62952        dir="`$DIRNAME "$path"`"
62953        base="`$BASENAME "$path"`"
62954        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62955      fi
62956    fi
62957  fi
62958
62959
62960  # Only process if variable expands to non-empty
62961
62962  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62963    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62964
62965  # Input might be given as Windows format, start by converting to
62966  # unix format.
62967  path="$POTENTIAL_FREETYPE_LIB_PATH"
62968  new_path=`$CYGPATH -u "$path"`
62969
62970  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62971  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62972  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62973  # "foo.exe" is OK but "foo" is an error.
62974  #
62975  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62976  # It is also a way to make sure we got the proper file name for the real test later on.
62977  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62978  if test "x$test_shortpath" = x; then
62979    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62980$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62981    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62982  fi
62983
62984  # Call helper function which possibly converts this using DOS-style short mode.
62985  # If so, the updated path is stored in $new_path.
62986
62987  input_path="$new_path"
62988  # Check if we need to convert this using DOS-style short mode. If the path
62989  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62990  # take no chances and rewrite it.
62991  # Note: m4 eats our [], so we need to use [ and ] instead.
62992  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62993  if test "x$has_forbidden_chars" != x; then
62994    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62995    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62996    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62997    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62998      # Going to short mode and back again did indeed matter. Since short mode is
62999      # case insensitive, let's make it lowercase to improve readability.
63000      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63001      # Now convert it back to Unix-style (cygpath)
63002      input_path=`$CYGPATH -u "$shortmode_path"`
63003      new_path="$input_path"
63004    fi
63005  fi
63006
63007  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63008  if test "x$test_cygdrive_prefix" = x; then
63009    # As a simple fix, exclude /usr/bin since it's not a real path.
63010    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63011      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63012      # a path prefixed by /cygdrive for fixpath to work.
63013      new_path="$CYGWIN_ROOT_PATH$input_path"
63014    fi
63015  fi
63016
63017
63018  if test "x$path" != "x$new_path"; then
63019    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63020    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63021$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63022  fi
63023
63024    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63025
63026  path="$POTENTIAL_FREETYPE_LIB_PATH"
63027  has_colon=`$ECHO $path | $GREP ^.:`
63028  new_path="$path"
63029  if test "x$has_colon" = x; then
63030    # Not in mixed or Windows style, start by that.
63031    new_path=`cmd //c echo $path`
63032  fi
63033
63034
63035  input_path="$new_path"
63036  # Check if we need to convert this using DOS-style short mode. If the path
63037  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63038  # take no chances and rewrite it.
63039  # Note: m4 eats our [], so we need to use [ and ] instead.
63040  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63041  if test "x$has_forbidden_chars" != x; then
63042    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63043    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63044  fi
63045
63046
63047  windows_path="$new_path"
63048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63049    unix_path=`$CYGPATH -u "$windows_path"`
63050    new_path="$unix_path"
63051  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63052    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63053    new_path="$unix_path"
63054  fi
63055
63056  if test "x$path" != "x$new_path"; then
63057    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63058    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63059$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63060  fi
63061
63062  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63063  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63064
63065    else
63066      # We're on a unix platform. Hooray! :)
63067      path="$POTENTIAL_FREETYPE_LIB_PATH"
63068      has_space=`$ECHO "$path" | $GREP " "`
63069      if test "x$has_space" != x; then
63070        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63071$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63072        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63073      fi
63074
63075      # Use eval to expand a potential ~
63076      eval path="$path"
63077      if test ! -f "$path" && test ! -d "$path"; then
63078        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63079      fi
63080
63081      if test -d "$path"; then
63082        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63083      else
63084        dir="`$DIRNAME "$path"`"
63085        base="`$BASENAME "$path"`"
63086        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63087      fi
63088    fi
63089  fi
63090
63091
63092    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63093    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
63094$as_echo_n "checking for freetype includes... " >&6; }
63095    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
63096$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
63097    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
63098    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
63099$as_echo_n "checking for freetype libraries... " >&6; }
63100    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
63101$as_echo "$FREETYPE_LIB_PATH" >&6; }
63102  fi
63103
63104              fi
63105            fi
63106          fi
63107        fi
63108      fi # end check in well-known locations
63109
63110      if test "x$FOUND_FREETYPE" != xyes; then
63111
63112  # Print a helpful message on how to acquire the necessary build dependency.
63113  # freetype is the help tag: freetype, cups, alsa etc
63114  MISSING_DEPENDENCY=freetype
63115
63116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63117    cygwin_help $MISSING_DEPENDENCY
63118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63119    msys_help $MISSING_DEPENDENCY
63120  else
63121    PKGHANDLER_COMMAND=
63122
63123    case $PKGHANDLER in
63124      apt-get)
63125        apt_help     $MISSING_DEPENDENCY ;;
63126      yum)
63127        yum_help     $MISSING_DEPENDENCY ;;
63128      brew)
63129        brew_help    $MISSING_DEPENDENCY ;;
63130      port)
63131        port_help    $MISSING_DEPENDENCY ;;
63132      pkgutil)
63133        pkgutil_help $MISSING_DEPENDENCY ;;
63134      pkgadd)
63135        pkgadd_help  $MISSING_DEPENDENCY ;;
63136    esac
63137
63138    if test "x$PKGHANDLER_COMMAND" != x; then
63139      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63140    fi
63141  fi
63142
63143        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
63144      fi
63145    fi # end user specified settings
63146
63147    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
63148    if test "x$FREETYPE_CFLAGS" = x; then
63149
63150  # Only process if variable expands to non-empty
63151
63152  if test "x$FREETYPE_INCLUDE_PATH" != x; then
63153    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63154
63155  # Input might be given as Windows format, start by converting to
63156  # unix format.
63157  path="$FREETYPE_INCLUDE_PATH"
63158  new_path=`$CYGPATH -u "$path"`
63159
63160  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63161  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63162  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63163  # "foo.exe" is OK but "foo" is an error.
63164  #
63165  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63166  # It is also a way to make sure we got the proper file name for the real test later on.
63167  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63168  if test "x$test_shortpath" = x; then
63169    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63170$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63171    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
63172  fi
63173
63174  # Call helper function which possibly converts this using DOS-style short mode.
63175  # If so, the updated path is stored in $new_path.
63176
63177  input_path="$new_path"
63178  # Check if we need to convert this using DOS-style short mode. If the path
63179  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63180  # take no chances and rewrite it.
63181  # Note: m4 eats our [], so we need to use [ and ] instead.
63182  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63183  if test "x$has_forbidden_chars" != x; then
63184    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63185    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63186    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63187    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63188      # Going to short mode and back again did indeed matter. Since short mode is
63189      # case insensitive, let's make it lowercase to improve readability.
63190      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63191      # Now convert it back to Unix-style (cygpath)
63192      input_path=`$CYGPATH -u "$shortmode_path"`
63193      new_path="$input_path"
63194    fi
63195  fi
63196
63197  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63198  if test "x$test_cygdrive_prefix" = x; then
63199    # As a simple fix, exclude /usr/bin since it's not a real path.
63200    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63201      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63202      # a path prefixed by /cygdrive for fixpath to work.
63203      new_path="$CYGWIN_ROOT_PATH$input_path"
63204    fi
63205  fi
63206
63207
63208  if test "x$path" != "x$new_path"; then
63209    FREETYPE_INCLUDE_PATH="$new_path"
63210    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63211$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63212  fi
63213
63214    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63215
63216  path="$FREETYPE_INCLUDE_PATH"
63217  has_colon=`$ECHO $path | $GREP ^.:`
63218  new_path="$path"
63219  if test "x$has_colon" = x; then
63220    # Not in mixed or Windows style, start by that.
63221    new_path=`cmd //c echo $path`
63222  fi
63223
63224
63225  input_path="$new_path"
63226  # Check if we need to convert this using DOS-style short mode. If the path
63227  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63228  # take no chances and rewrite it.
63229  # Note: m4 eats our [], so we need to use [ and ] instead.
63230  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63231  if test "x$has_forbidden_chars" != x; then
63232    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63233    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63234  fi
63235
63236
63237  windows_path="$new_path"
63238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63239    unix_path=`$CYGPATH -u "$windows_path"`
63240    new_path="$unix_path"
63241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63242    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63243    new_path="$unix_path"
63244  fi
63245
63246  if test "x$path" != "x$new_path"; then
63247    FREETYPE_INCLUDE_PATH="$new_path"
63248    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63249$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63250  fi
63251
63252  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63253  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63254
63255    else
63256      # We're on a unix platform. Hooray! :)
63257      path="$FREETYPE_INCLUDE_PATH"
63258      has_space=`$ECHO "$path" | $GREP " "`
63259      if test "x$has_space" != x; then
63260        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63261$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63262        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63263      fi
63264
63265      # Use eval to expand a potential ~
63266      eval path="$path"
63267      if test ! -f "$path" && test ! -d "$path"; then
63268        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63269      fi
63270
63271      if test -d "$path"; then
63272        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63273      else
63274        dir="`$DIRNAME "$path"`"
63275        base="`$BASENAME "$path"`"
63276        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63277      fi
63278    fi
63279  fi
63280
63281      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
63282        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
63283      else
63284        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
63285      fi
63286    fi
63287
63288    if test "x$FREETYPE_LIBS" = x; then
63289
63290  # Only process if variable expands to non-empty
63291
63292  if test "x$FREETYPE_LIB_PATH" != x; then
63293    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63294
63295  # Input might be given as Windows format, start by converting to
63296  # unix format.
63297  path="$FREETYPE_LIB_PATH"
63298  new_path=`$CYGPATH -u "$path"`
63299
63300  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63301  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63302  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63303  # "foo.exe" is OK but "foo" is an error.
63304  #
63305  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63306  # It is also a way to make sure we got the proper file name for the real test later on.
63307  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63308  if test "x$test_shortpath" = x; then
63309    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63310$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63311    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
63312  fi
63313
63314  # Call helper function which possibly converts this using DOS-style short mode.
63315  # If so, the updated path is stored in $new_path.
63316
63317  input_path="$new_path"
63318  # Check if we need to convert this using DOS-style short mode. If the path
63319  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63320  # take no chances and rewrite it.
63321  # Note: m4 eats our [], so we need to use [ and ] instead.
63322  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63323  if test "x$has_forbidden_chars" != x; then
63324    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63325    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63326    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63327    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63328      # Going to short mode and back again did indeed matter. Since short mode is
63329      # case insensitive, let's make it lowercase to improve readability.
63330      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63331      # Now convert it back to Unix-style (cygpath)
63332      input_path=`$CYGPATH -u "$shortmode_path"`
63333      new_path="$input_path"
63334    fi
63335  fi
63336
63337  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63338  if test "x$test_cygdrive_prefix" = x; then
63339    # As a simple fix, exclude /usr/bin since it's not a real path.
63340    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63341      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63342      # a path prefixed by /cygdrive for fixpath to work.
63343      new_path="$CYGWIN_ROOT_PATH$input_path"
63344    fi
63345  fi
63346
63347
63348  if test "x$path" != "x$new_path"; then
63349    FREETYPE_LIB_PATH="$new_path"
63350    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63351$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63352  fi
63353
63354    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63355
63356  path="$FREETYPE_LIB_PATH"
63357  has_colon=`$ECHO $path | $GREP ^.:`
63358  new_path="$path"
63359  if test "x$has_colon" = x; then
63360    # Not in mixed or Windows style, start by that.
63361    new_path=`cmd //c echo $path`
63362  fi
63363
63364
63365  input_path="$new_path"
63366  # Check if we need to convert this using DOS-style short mode. If the path
63367  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63368  # take no chances and rewrite it.
63369  # Note: m4 eats our [], so we need to use [ and ] instead.
63370  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63371  if test "x$has_forbidden_chars" != x; then
63372    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63373    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63374  fi
63375
63376
63377  windows_path="$new_path"
63378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63379    unix_path=`$CYGPATH -u "$windows_path"`
63380    new_path="$unix_path"
63381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63382    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63383    new_path="$unix_path"
63384  fi
63385
63386  if test "x$path" != "x$new_path"; then
63387    FREETYPE_LIB_PATH="$new_path"
63388    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63389$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63390  fi
63391
63392  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63393  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63394
63395    else
63396      # We're on a unix platform. Hooray! :)
63397      path="$FREETYPE_LIB_PATH"
63398      has_space=`$ECHO "$path" | $GREP " "`
63399      if test "x$has_space" != x; then
63400        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63401$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63402        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63403      fi
63404
63405      # Use eval to expand a potential ~
63406      eval path="$path"
63407      if test ! -f "$path" && test ! -d "$path"; then
63408        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63409      fi
63410
63411      if test -d "$path"; then
63412        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63413      else
63414        dir="`$DIRNAME "$path"`"
63415        base="`$BASENAME "$path"`"
63416        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63417      fi
63418    fi
63419  fi
63420
63421      if test "x$OPENJDK_TARGET_OS" = xwindows; then
63422        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
63423      else
63424        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
63425      fi
63426    fi
63427
63428    # Try to compile it
63429    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
63430$as_echo_n "checking if we can compile and link with freetype... " >&6; }
63431    ac_ext=cpp
63432ac_cpp='$CXXCPP $CPPFLAGS'
63433ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63434ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63435ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63436
63437    PREV_CXXCFLAGS="$CXXFLAGS"
63438    PREV_LIBS="$LIBS"
63439    PREV_CXX="$CXX"
63440    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
63441    LIBS="$LIBS $FREETYPE_LIBS"
63442    CXX="$FIXPATH $CXX"
63443    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63444/* end confdefs.h.  */
63445
63446          #include<ft2build.h>
63447          #include FT_FREETYPE_H
63448          int main () {
63449            FT_Init_FreeType(NULL);
63450            return 0;
63451          }
63452
63453_ACEOF
63454if ac_fn_cxx_try_link "$LINENO"; then :
63455
63456          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63457$as_echo "yes" >&6; }
63458
63459else
63460
63461          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63462$as_echo "no" >&6; }
63463          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
63464$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
63465          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
63466$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
63467
63468
63469  # Print a helpful message on how to acquire the necessary build dependency.
63470  # freetype is the help tag: freetype, cups, alsa etc
63471  MISSING_DEPENDENCY=freetype
63472
63473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63474    cygwin_help $MISSING_DEPENDENCY
63475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63476    msys_help $MISSING_DEPENDENCY
63477  else
63478    PKGHANDLER_COMMAND=
63479
63480    case $PKGHANDLER in
63481      apt-get)
63482        apt_help     $MISSING_DEPENDENCY ;;
63483      yum)
63484        yum_help     $MISSING_DEPENDENCY ;;
63485      brew)
63486        brew_help    $MISSING_DEPENDENCY ;;
63487      port)
63488        port_help    $MISSING_DEPENDENCY ;;
63489      pkgutil)
63490        pkgutil_help $MISSING_DEPENDENCY ;;
63491      pkgadd)
63492        pkgadd_help  $MISSING_DEPENDENCY ;;
63493    esac
63494
63495    if test "x$PKGHANDLER_COMMAND" != x; then
63496      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63497    fi
63498  fi
63499
63500
63501          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
63502
63503
63504fi
63505rm -f core conftest.err conftest.$ac_objext \
63506    conftest$ac_exeext conftest.$ac_ext
63507    CXXCFLAGS="$PREV_CXXFLAGS"
63508    LIBS="$PREV_LIBS"
63509    CXX="$PREV_CXX"
63510    ac_ext=cpp
63511ac_cpp='$CXXCPP $CPPFLAGS'
63512ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63513ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63514ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63515
63516
63517    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
63518$as_echo_n "checking if we should bundle freetype... " >&6; }
63519    if test "x$BUNDLE_FREETYPE" = xyes; then
63520      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
63521    fi
63522    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
63523$as_echo "$BUNDLE_FREETYPE" >&6; }
63524
63525  fi # end freetype needed
63526
63527
63528
63529
63530
63531
63532
63533# Check whether --with-alsa was given.
63534if test "${with_alsa+set}" = set; then :
63535  withval=$with_alsa;
63536fi
63537
63538
63539# Check whether --with-alsa-include was given.
63540if test "${with_alsa_include+set}" = set; then :
63541  withval=$with_alsa_include;
63542fi
63543
63544
63545# Check whether --with-alsa-lib was given.
63546if test "${with_alsa_lib+set}" = set; then :
63547  withval=$with_alsa_lib;
63548fi
63549
63550
63551  if test "x$NEEDS_LIB_ALSA" = xfalse; then
63552    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
63553        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
63554        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
63555      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
63556$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
63557    fi
63558    ALSA_CFLAGS=
63559    ALSA_LIBS=
63560  else
63561    ALSA_FOUND=no
63562
63563    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
63564      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
63565    fi
63566
63567    if test "x${with_alsa}" != x; then
63568      ALSA_LIBS="-L${with_alsa}/lib -lasound"
63569      ALSA_CFLAGS="-I${with_alsa}/include"
63570      ALSA_FOUND=yes
63571    fi
63572    if test "x${with_alsa_include}" != x; then
63573      ALSA_CFLAGS="-I${with_alsa_include}"
63574      ALSA_FOUND=yes
63575    fi
63576    if test "x${with_alsa_lib}" != x; then
63577      ALSA_LIBS="-L${with_alsa_lib} -lasound"
63578      ALSA_FOUND=yes
63579    fi
63580    # Do not try pkg-config if we have a sysroot set.
63581    if test "x$SYSROOT" = x; then
63582      if test "x$ALSA_FOUND" = xno; then
63583
63584pkg_failed=no
63585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
63586$as_echo_n "checking for ALSA... " >&6; }
63587
63588if test -n "$ALSA_CFLAGS"; then
63589    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
63590 elif test -n "$PKG_CONFIG"; then
63591    if test -n "$PKG_CONFIG" && \
63592    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
63593  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
63594  ac_status=$?
63595  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63596  test $ac_status = 0; }; then
63597  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
63598else
63599  pkg_failed=yes
63600fi
63601 else
63602    pkg_failed=untried
63603fi
63604if test -n "$ALSA_LIBS"; then
63605    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
63606 elif test -n "$PKG_CONFIG"; then
63607    if test -n "$PKG_CONFIG" && \
63608    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
63609  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
63610  ac_status=$?
63611  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63612  test $ac_status = 0; }; then
63613  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
63614else
63615  pkg_failed=yes
63616fi
63617 else
63618    pkg_failed=untried
63619fi
63620
63621
63622
63623if test $pkg_failed = yes; then
63624
63625if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63626        _pkg_short_errors_supported=yes
63627else
63628        _pkg_short_errors_supported=no
63629fi
63630        if test $_pkg_short_errors_supported = yes; then
63631	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
63632        else
63633	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
63634        fi
63635	# Put the nasty error message in config.log where it belongs
63636	echo "$ALSA_PKG_ERRORS" >&5
63637
63638	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63639$as_echo "no" >&6; }
63640                ALSA_FOUND=no
63641elif test $pkg_failed = untried; then
63642	ALSA_FOUND=no
63643else
63644	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
63645	ALSA_LIBS=$pkg_cv_ALSA_LIBS
63646        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63647$as_echo "yes" >&6; }
63648	ALSA_FOUND=yes
63649fi
63650      fi
63651    fi
63652    if test "x$ALSA_FOUND" = xno; then
63653      for ac_header in alsa/asoundlib.h
63654do :
63655  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
63656if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
63657  cat >>confdefs.h <<_ACEOF
63658#define HAVE_ALSA_ASOUNDLIB_H 1
63659_ACEOF
63660
63661            ALSA_FOUND=yes
63662            ALSA_CFLAGS=-Iignoreme
63663            ALSA_LIBS=-lasound
63664            DEFAULT_ALSA=yes
63665
63666else
63667  ALSA_FOUND=no
63668
63669fi
63670
63671done
63672
63673    fi
63674    if test "x$ALSA_FOUND" = xno; then
63675
63676  # Print a helpful message on how to acquire the necessary build dependency.
63677  # alsa is the help tag: freetype, cups, alsa etc
63678  MISSING_DEPENDENCY=alsa
63679
63680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63681    cygwin_help $MISSING_DEPENDENCY
63682  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63683    msys_help $MISSING_DEPENDENCY
63684  else
63685    PKGHANDLER_COMMAND=
63686
63687    case $PKGHANDLER in
63688      apt-get)
63689        apt_help     $MISSING_DEPENDENCY ;;
63690      yum)
63691        yum_help     $MISSING_DEPENDENCY ;;
63692      brew)
63693        brew_help    $MISSING_DEPENDENCY ;;
63694      port)
63695        port_help    $MISSING_DEPENDENCY ;;
63696      pkgutil)
63697        pkgutil_help $MISSING_DEPENDENCY ;;
63698      pkgadd)
63699        pkgadd_help  $MISSING_DEPENDENCY ;;
63700    esac
63701
63702    if test "x$PKGHANDLER_COMMAND" != x; then
63703      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63704    fi
63705  fi
63706
63707      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
63708    fi
63709  fi
63710
63711
63712
63713
63714
63715
63716# Check whether --with-libffi was given.
63717if test "${with_libffi+set}" = set; then :
63718  withval=$with_libffi;
63719fi
63720
63721
63722# Check whether --with-libffi-include was given.
63723if test "${with_libffi_include+set}" = set; then :
63724  withval=$with_libffi_include;
63725fi
63726
63727
63728# Check whether --with-libffi-lib was given.
63729if test "${with_libffi_lib+set}" = set; then :
63730  withval=$with_libffi_lib;
63731fi
63732
63733  # Check whether --enable-libffi-bundling was given.
63734if test "${enable_libffi_bundling+set}" = set; then :
63735  enableval=$enable_libffi_bundling;
63736fi
63737
63738
63739  if test "x$NEEDS_LIB_FFI" = xfalse; then
63740    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
63741        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
63742        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
63743      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
63744$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
63745    fi
63746    LIBFFI_CFLAGS=
63747    LIBFFI_LIBS=
63748  else
63749    LIBFFI_FOUND=no
63750
63751    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
63752      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
63753    fi
63754
63755    if test "x${with_libffi}" != x; then
63756      LIBFFI_LIB_PATH="${with_libffi}/lib"
63757      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
63758      LIBFFI_CFLAGS="-I${with_libffi}/include"
63759      LIBFFI_FOUND=yes
63760    fi
63761    if test "x${with_libffi_include}" != x; then
63762      LIBFFI_CFLAGS="-I${with_libffi_include}"
63763      LIBFFI_FOUND=yes
63764    fi
63765    if test "x${with_libffi_lib}" != x; then
63766      LIBFFI_LIB_PATH="${with_libffi_lib}"
63767      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
63768      LIBFFI_FOUND=yes
63769    fi
63770    # Do not try pkg-config if we have a sysroot set.
63771    if test "x$SYSROOT" = x; then
63772      if test "x$LIBFFI_FOUND" = xno; then
63773        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
63774
63775pkg_failed=no
63776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
63777$as_echo_n "checking for LIBFFI... " >&6; }
63778
63779if test -n "$LIBFFI_CFLAGS"; then
63780    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
63781 elif test -n "$PKG_CONFIG"; then
63782    if test -n "$PKG_CONFIG" && \
63783    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63784  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63785  ac_status=$?
63786  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63787  test $ac_status = 0; }; then
63788  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
63789else
63790  pkg_failed=yes
63791fi
63792 else
63793    pkg_failed=untried
63794fi
63795if test -n "$LIBFFI_LIBS"; then
63796    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
63797 elif test -n "$PKG_CONFIG"; then
63798    if test -n "$PKG_CONFIG" && \
63799    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63800  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63801  ac_status=$?
63802  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63803  test $ac_status = 0; }; then
63804  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
63805else
63806  pkg_failed=yes
63807fi
63808 else
63809    pkg_failed=untried
63810fi
63811
63812
63813
63814if test $pkg_failed = yes; then
63815
63816if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63817        _pkg_short_errors_supported=yes
63818else
63819        _pkg_short_errors_supported=no
63820fi
63821        if test $_pkg_short_errors_supported = yes; then
63822	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
63823        else
63824	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
63825        fi
63826	# Put the nasty error message in config.log where it belongs
63827	echo "$LIBFFI_PKG_ERRORS" >&5
63828
63829	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63830$as_echo "no" >&6; }
63831                LIBFFI_FOUND=no
63832elif test $pkg_failed = untried; then
63833	LIBFFI_FOUND=no
63834else
63835	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
63836	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
63837        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63838$as_echo "yes" >&6; }
63839	LIBFFI_FOUND=yes
63840fi
63841      fi
63842    fi
63843    if test "x$LIBFFI_FOUND" = xno; then
63844      for ac_header in ffi.h
63845do :
63846  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
63847if test "x$ac_cv_header_ffi_h" = xyes; then :
63848  cat >>confdefs.h <<_ACEOF
63849#define HAVE_FFI_H 1
63850_ACEOF
63851
63852            LIBFFI_FOUND=yes
63853            LIBFFI_CFLAGS=
63854            LIBFFI_LIBS=-lffi
63855
63856else
63857  LIBFFI_FOUND=no
63858
63859fi
63860
63861done
63862
63863    fi
63864    if test "x$LIBFFI_FOUND" = xno; then
63865
63866  # Print a helpful message on how to acquire the necessary build dependency.
63867  # ffi is the help tag: freetype, cups, alsa etc
63868  MISSING_DEPENDENCY=ffi
63869
63870  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63871    cygwin_help $MISSING_DEPENDENCY
63872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63873    msys_help $MISSING_DEPENDENCY
63874  else
63875    PKGHANDLER_COMMAND=
63876
63877    case $PKGHANDLER in
63878      apt-get)
63879        apt_help     $MISSING_DEPENDENCY ;;
63880      yum)
63881        yum_help     $MISSING_DEPENDENCY ;;
63882      brew)
63883        brew_help    $MISSING_DEPENDENCY ;;
63884      port)
63885        port_help    $MISSING_DEPENDENCY ;;
63886      pkgutil)
63887        pkgutil_help $MISSING_DEPENDENCY ;;
63888      pkgadd)
63889        pkgadd_help  $MISSING_DEPENDENCY ;;
63890    esac
63891
63892    if test "x$PKGHANDLER_COMMAND" != x; then
63893      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63894    fi
63895  fi
63896
63897      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
63898    fi
63899
63900    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
63901$as_echo_n "checking if libffi works... " >&6; }
63902    ac_ext=c
63903ac_cpp='$CPP $CPPFLAGS'
63904ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63905ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63906ac_compiler_gnu=$ac_cv_c_compiler_gnu
63907
63908    OLD_CFLAGS="$CFLAGS"
63909    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
63910    OLD_LIBS="$LIBS"
63911    LIBS="$LIBS $LIBFFI_LIBS"
63912    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63913/* end confdefs.h.  */
63914#include <ffi.h>
63915int
63916main ()
63917{
63918
63919          ffi_call(NULL, NULL, NULL, NULL);
63920          return 0;
63921
63922  ;
63923  return 0;
63924}
63925_ACEOF
63926if ac_fn_c_try_link "$LINENO"; then :
63927  LIBFFI_WORKS=yes
63928else
63929  LIBFFI_WORKS=no
63930
63931fi
63932rm -f core conftest.err conftest.$ac_objext \
63933    conftest$ac_exeext conftest.$ac_ext
63934    CFLAGS="$OLD_CFLAGS"
63935    LIBS="$OLD_LIBS"
63936    ac_ext=cpp
63937ac_cpp='$CXXCPP $CPPFLAGS'
63938ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63939ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63940ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63941
63942    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
63943$as_echo "$LIBFFI_WORKS" >&6; }
63944
63945    if test "x$LIBFFI_WORKS" = xno; then
63946
63947  # Print a helpful message on how to acquire the necessary build dependency.
63948  # ffi is the help tag: freetype, cups, alsa etc
63949  MISSING_DEPENDENCY=ffi
63950
63951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63952    cygwin_help $MISSING_DEPENDENCY
63953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63954    msys_help $MISSING_DEPENDENCY
63955  else
63956    PKGHANDLER_COMMAND=
63957
63958    case $PKGHANDLER in
63959      apt-get)
63960        apt_help     $MISSING_DEPENDENCY ;;
63961      yum)
63962        yum_help     $MISSING_DEPENDENCY ;;
63963      brew)
63964        brew_help    $MISSING_DEPENDENCY ;;
63965      port)
63966        port_help    $MISSING_DEPENDENCY ;;
63967      pkgutil)
63968        pkgutil_help $MISSING_DEPENDENCY ;;
63969      pkgadd)
63970        pkgadd_help  $MISSING_DEPENDENCY ;;
63971    esac
63972
63973    if test "x$PKGHANDLER_COMMAND" != x; then
63974      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63975    fi
63976  fi
63977
63978      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
63979    fi
63980
63981    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi should be bundled" >&5
63982$as_echo_n "checking if libffi should be bundled... " >&6; }
63983    if test "x$enable_libffi_bundling" = "x"; then
63984      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63985$as_echo "no" >&6; }
63986      ENABLE_LIBFFI_BUNDLING=false
63987    elif  test "x$enable_libffi_bundling" = "xno"; then
63988      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63989$as_echo "no, forced" >&6; }
63990      ENABLE_LIBFFI_BUNDLING=false
63991    elif  test "x$enable_libffi_bundling" = "xyes"; then
63992      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63993$as_echo "yes, forced" >&6; }
63994      ENABLE_LIBFFI_BUNDLING=true
63995    else
63996      as_fn_error $? "Invalid value for --enable-libffi-bundling" "$LINENO" 5
63997    fi
63998
63999    # Find the libffi.so.X to bundle
64000    if test "x${ENABLE_LIBFFI_BUNDLING}" = "xtrue"; then
64001      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libffi lib file location" >&5
64002$as_echo_n "checking for libffi lib file location... " >&6; }
64003      if test "x${LIBFFI_LIB_PATH}" != x; then
64004        if test -e ${LIBFFI_LIB_PATH}/libffi.so.?; then
64005          LIBFFI_LIB_FILE="${LIBFFI_LIB_PATH}/libffi.so.?"
64006        else
64007          as_fn_error $? "Could not locate libffi.so.? for bundling in ${LIBFFI_LIB_PATH}" "$LINENO" 5
64008        fi
64009      else
64010        # If we don't have an explicit path, look in a few obvious places
64011        if test "x${OPENJDK_TARGET_CPU}" = "xx86"; then
64012          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
64013            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
64014          elif test -e ${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.? ; then
64015            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.?"
64016          else
64017            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64018          fi
64019        elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64"; then
64020          if test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
64021            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
64022          elif test -e ${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.? ; then
64023            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.?"
64024          else
64025            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64026          fi
64027        else
64028          # Fallback on the default /usr/lib dir
64029          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
64030            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
64031          else
64032            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64033          fi
64034        fi
64035      fi
64036      # Make sure the wildcard is evaluated
64037      LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
64038      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBFFI_LIB_FILE}" >&5
64039$as_echo "${LIBFFI_LIB_FILE}" >&6; }
64040    fi
64041  fi
64042
64043
64044
64045
64046
64047
64048
64049  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64050    # Extract the first word of "llvm-config", so it can be a program name with args.
64051set dummy llvm-config; ac_word=$2
64052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64053$as_echo_n "checking for $ac_word... " >&6; }
64054if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
64055  $as_echo_n "(cached) " >&6
64056else
64057  if test -n "$LLVM_CONFIG"; then
64058  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
64059else
64060as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64061for as_dir in $PATH
64062do
64063  IFS=$as_save_IFS
64064  test -z "$as_dir" && as_dir=.
64065    for ac_exec_ext in '' $ac_executable_extensions; do
64066  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64067    ac_cv_prog_LLVM_CONFIG="llvm-config"
64068    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64069    break 2
64070  fi
64071done
64072  done
64073IFS=$as_save_IFS
64074
64075fi
64076fi
64077LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
64078if test -n "$LLVM_CONFIG"; then
64079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
64080$as_echo "$LLVM_CONFIG" >&6; }
64081else
64082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64083$as_echo "no" >&6; }
64084fi
64085
64086
64087
64088    if test "x$LLVM_CONFIG" != xllvm-config; then
64089      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
64090    fi
64091
64092    llvm_components="jit mcjit engine nativecodegen native"
64093    unset LLVM_CFLAGS
64094    for flag in $("$LLVM_CONFIG" --cxxflags); do
64095      if echo "${flag}" | grep -q '^-[ID]'; then
64096        if test "${flag}" != "-D_DEBUG" ; then
64097          if test "${LLVM_CFLAGS}" != "" ; then
64098            LLVM_CFLAGS="${LLVM_CFLAGS} "
64099          fi
64100          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
64101        fi
64102      fi
64103    done
64104    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
64105    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
64106
64107    unset LLVM_LDFLAGS
64108    for flag in $("${LLVM_CONFIG}" --ldflags); do
64109      if echo "${flag}" | grep -q '^-L'; then
64110        if test "${LLVM_LDFLAGS}" != ""; then
64111          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
64112        fi
64113        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
64114      fi
64115    done
64116
64117    unset LLVM_LIBS
64118    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
64119      if echo "${flag}" | grep -q '^-l'; then
64120        if test "${LLVM_LIBS}" != ""; then
64121          LLVM_LIBS="${LLVM_LIBS} "
64122        fi
64123        LLVM_LIBS="${LLVM_LIBS}${flag}"
64124      fi
64125    done
64126
64127    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
64128    # always properly detect -ltinfo
64129    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
64130
64131
64132
64133
64134  fi
64135
64136
64137
64138# Check whether --with-libjpeg was given.
64139if test "${with_libjpeg+set}" = set; then :
64140  withval=$with_libjpeg;
64141fi
64142
64143
64144  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
64145$as_echo_n "checking for which libjpeg to use... " >&6; }
64146  # default is bundled
64147  DEFAULT_LIBJPEG=bundled
64148  # if user didn't specify, use DEFAULT_LIBJPEG
64149  if test "x${with_libjpeg}" = "x"; then
64150    with_libjpeg=${DEFAULT_LIBJPEG}
64151  fi
64152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
64153$as_echo "${with_libjpeg}" >&6; }
64154
64155  if test "x${with_libjpeg}" = "xbundled"; then
64156    USE_EXTERNAL_LIBJPEG=false
64157  elif test "x${with_libjpeg}" = "xsystem"; then
64158    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
64159if test "x$ac_cv_header_jpeglib_h" = xyes; then :
64160
64161else
64162   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
64163fi
64164
64165
64166    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
64167$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
64168if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
64169  $as_echo_n "(cached) " >&6
64170else
64171  ac_check_lib_save_LIBS=$LIBS
64172LIBS="-ljpeg  $LIBS"
64173cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64174/* end confdefs.h.  */
64175
64176/* Override any GCC internal prototype to avoid an error.
64177   Use char because int might match the return type of a GCC
64178   builtin and then its argument prototype would still apply.  */
64179#ifdef __cplusplus
64180extern "C"
64181#endif
64182char jpeg_CreateDecompress ();
64183int
64184main ()
64185{
64186return jpeg_CreateDecompress ();
64187  ;
64188  return 0;
64189}
64190_ACEOF
64191if ac_fn_cxx_try_link "$LINENO"; then :
64192  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
64193else
64194  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
64195fi
64196rm -f core conftest.err conftest.$ac_objext \
64197    conftest$ac_exeext conftest.$ac_ext
64198LIBS=$ac_check_lib_save_LIBS
64199fi
64200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
64201$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
64202if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
64203  cat >>confdefs.h <<_ACEOF
64204#define HAVE_LIBJPEG 1
64205_ACEOF
64206
64207  LIBS="-ljpeg $LIBS"
64208
64209else
64210   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
64211fi
64212
64213
64214    USE_EXTERNAL_LIBJPEG=true
64215  else
64216    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
64217  fi
64218
64219
64220
64221
64222
64223# Check whether --with-giflib was given.
64224if test "${with_giflib+set}" = set; then :
64225  withval=$with_giflib;
64226fi
64227
64228
64229  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
64230$as_echo_n "checking for which giflib to use... " >&6; }
64231  # default is bundled
64232  DEFAULT_GIFLIB=bundled
64233  # if user didn't specify, use DEFAULT_GIFLIB
64234  if test "x${with_giflib}" = "x"; then
64235    with_giflib=${DEFAULT_GIFLIB}
64236  fi
64237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
64238$as_echo "${with_giflib}" >&6; }
64239
64240  if test "x${with_giflib}" = "xbundled"; then
64241    USE_EXTERNAL_LIBGIF=false
64242  elif test "x${with_giflib}" = "xsystem"; then
64243    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
64244if test "x$ac_cv_header_gif_lib_h" = xyes; then :
64245
64246else
64247   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
64248fi
64249
64250
64251    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
64252$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
64253if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
64254  $as_echo_n "(cached) " >&6
64255else
64256  ac_check_lib_save_LIBS=$LIBS
64257LIBS="-lgif  $LIBS"
64258cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64259/* end confdefs.h.  */
64260
64261/* Override any GCC internal prototype to avoid an error.
64262   Use char because int might match the return type of a GCC
64263   builtin and then its argument prototype would still apply.  */
64264#ifdef __cplusplus
64265extern "C"
64266#endif
64267char DGifGetCode ();
64268int
64269main ()
64270{
64271return DGifGetCode ();
64272  ;
64273  return 0;
64274}
64275_ACEOF
64276if ac_fn_cxx_try_link "$LINENO"; then :
64277  ac_cv_lib_gif_DGifGetCode=yes
64278else
64279  ac_cv_lib_gif_DGifGetCode=no
64280fi
64281rm -f core conftest.err conftest.$ac_objext \
64282    conftest$ac_exeext conftest.$ac_ext
64283LIBS=$ac_check_lib_save_LIBS
64284fi
64285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
64286$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
64287if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
64288  cat >>confdefs.h <<_ACEOF
64289#define HAVE_LIBGIF 1
64290_ACEOF
64291
64292  LIBS="-lgif $LIBS"
64293
64294else
64295   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
64296fi
64297
64298
64299    USE_EXTERNAL_LIBGIF=true
64300  else
64301    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
64302  fi
64303
64304
64305
64306
64307
64308# Check whether --with-libpng was given.
64309if test "${with_libpng+set}" = set; then :
64310  withval=$with_libpng;
64311fi
64312
64313
64314  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
64315$as_echo_n "checking for which libpng to use... " >&6; }
64316
64317  # default is bundled
64318  DEFAULT_LIBPNG=bundled
64319  # if user didn't specify, use DEFAULT_LIBPNG
64320  if test "x${with_libpng}" = "x"; then
64321    with_libpng=${DEFAULT_LIBPNG}
64322  fi
64323
64324  if test "x${with_libpng}" = "xbundled"; then
64325    USE_EXTERNAL_LIBPNG=false
64326    PNG_CFLAGS=""
64327    PNG_LIBS=""
64328    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64329$as_echo "bundled" >&6; }
64330  elif test "x${with_libpng}" = "xsystem"; then
64331
64332pkg_failed=no
64333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
64334$as_echo_n "checking for PNG... " >&6; }
64335
64336if test -n "$PNG_CFLAGS"; then
64337    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
64338 elif test -n "$PKG_CONFIG"; then
64339    if test -n "$PKG_CONFIG" && \
64340    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
64341  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
64342  ac_status=$?
64343  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64344  test $ac_status = 0; }; then
64345  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
64346else
64347  pkg_failed=yes
64348fi
64349 else
64350    pkg_failed=untried
64351fi
64352if test -n "$PNG_LIBS"; then
64353    pkg_cv_PNG_LIBS="$PNG_LIBS"
64354 elif test -n "$PKG_CONFIG"; then
64355    if test -n "$PKG_CONFIG" && \
64356    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
64357  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
64358  ac_status=$?
64359  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64360  test $ac_status = 0; }; then
64361  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
64362else
64363  pkg_failed=yes
64364fi
64365 else
64366    pkg_failed=untried
64367fi
64368
64369
64370
64371if test $pkg_failed = yes; then
64372
64373if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64374        _pkg_short_errors_supported=yes
64375else
64376        _pkg_short_errors_supported=no
64377fi
64378        if test $_pkg_short_errors_supported = yes; then
64379	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
64380        else
64381	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
64382        fi
64383	# Put the nasty error message in config.log where it belongs
64384	echo "$PNG_PKG_ERRORS" >&5
64385
64386	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64387$as_echo "no" >&6; }
64388                LIBPNG_FOUND=no
64389elif test $pkg_failed = untried; then
64390	LIBPNG_FOUND=no
64391else
64392	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
64393	PNG_LIBS=$pkg_cv_PNG_LIBS
64394        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64395$as_echo "yes" >&6; }
64396	LIBPNG_FOUND=yes
64397fi
64398    if test "x${LIBPNG_FOUND}" = "xyes"; then
64399      # PKG_CHECK_MODULES will set PNG_CFLAGS and PNG_LIBS
64400      USE_EXTERNAL_LIBPNG=true
64401      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64402$as_echo "system" >&6; }
64403    else
64404      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
64405$as_echo "system not found" >&6; }
64406      as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
64407    fi
64408  else
64409    as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
64410  fi
64411
64412
64413
64414
64415
64416
64417
64418# Check whether --with-zlib was given.
64419if test "${with_zlib+set}" = set; then :
64420  withval=$with_zlib;
64421fi
64422
64423
64424  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
64425$as_echo_n "checking for compress in -lz... " >&6; }
64426if ${ac_cv_lib_z_compress+:} false; then :
64427  $as_echo_n "(cached) " >&6
64428else
64429  ac_check_lib_save_LIBS=$LIBS
64430LIBS="-lz  $LIBS"
64431cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64432/* end confdefs.h.  */
64433
64434/* Override any GCC internal prototype to avoid an error.
64435   Use char because int might match the return type of a GCC
64436   builtin and then its argument prototype would still apply.  */
64437#ifdef __cplusplus
64438extern "C"
64439#endif
64440char compress ();
64441int
64442main ()
64443{
64444return compress ();
64445  ;
64446  return 0;
64447}
64448_ACEOF
64449if ac_fn_cxx_try_link "$LINENO"; then :
64450  ac_cv_lib_z_compress=yes
64451else
64452  ac_cv_lib_z_compress=no
64453fi
64454rm -f core conftest.err conftest.$ac_objext \
64455    conftest$ac_exeext conftest.$ac_ext
64456LIBS=$ac_check_lib_save_LIBS
64457fi
64458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
64459$as_echo "$ac_cv_lib_z_compress" >&6; }
64460if test "x$ac_cv_lib_z_compress" = xyes; then :
64461   ZLIB_FOUND=yes
64462else
64463   ZLIB_FOUND=no
64464fi
64465
64466
64467  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
64468$as_echo_n "checking for which zlib to use... " >&6; }
64469
64470  DEFAULT_ZLIB=system
64471  if test "x$OPENJDK_TARGET_OS" = xwindows; then
64472    # On windows default is bundled...on others default is system
64473    DEFAULT_ZLIB=bundled
64474  fi
64475
64476  if test "x${ZLIB_FOUND}" != "xyes"; then
64477    # If we don't find any system...set default to bundled
64478    DEFAULT_ZLIB=bundled
64479  fi
64480
64481  # If user didn't specify, use DEFAULT_ZLIB
64482  if test "x${with_zlib}" = "x"; then
64483    with_zlib=${DEFAULT_ZLIB}
64484  fi
64485
64486  if test "x${with_zlib}" = "xbundled"; then
64487    USE_EXTERNAL_LIBZ=false
64488    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64489$as_echo "bundled" >&6; }
64490  elif test "x${with_zlib}" = "xsystem"; then
64491    if test "x${ZLIB_FOUND}" = "xyes"; then
64492      USE_EXTERNAL_LIBZ=true
64493      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64494$as_echo "system" >&6; }
64495    else
64496      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
64497$as_echo "system not found" >&6; }
64498      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
64499    fi
64500  else
64501    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
64502  fi
64503
64504
64505
64506
64507
64508# Check whether --with-lcms was given.
64509if test "${with_lcms+set}" = set; then :
64510  withval=$with_lcms;
64511fi
64512
64513
64514  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
64515$as_echo_n "checking for which lcms to use... " >&6; }
64516
64517  DEFAULT_LCMS=bundled
64518  # If user didn't specify, use DEFAULT_LCMS
64519  if test "x${with_lcms}" = "x"; then
64520    with_lcms=${DEFAULT_LCMS}
64521  fi
64522
64523  if test "x${with_lcms}" = "xbundled"; then
64524    USE_EXTERNAL_LCMS=false
64525    LCMS_CFLAGS=""
64526    LCMS_LIBS=""
64527    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64528$as_echo "bundled" >&6; }
64529  elif test "x${with_lcms}" = "xsystem"; then
64530    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64531$as_echo "system" >&6; }
64532
64533pkg_failed=no
64534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
64535$as_echo_n "checking for LCMS... " >&6; }
64536
64537if test -n "$LCMS_CFLAGS"; then
64538    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
64539 elif test -n "$PKG_CONFIG"; then
64540    if test -n "$PKG_CONFIG" && \
64541    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
64542  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
64543  ac_status=$?
64544  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64545  test $ac_status = 0; }; then
64546  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
64547else
64548  pkg_failed=yes
64549fi
64550 else
64551    pkg_failed=untried
64552fi
64553if test -n "$LCMS_LIBS"; then
64554    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
64555 elif test -n "$PKG_CONFIG"; then
64556    if test -n "$PKG_CONFIG" && \
64557    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
64558  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
64559  ac_status=$?
64560  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64561  test $ac_status = 0; }; then
64562  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
64563else
64564  pkg_failed=yes
64565fi
64566 else
64567    pkg_failed=untried
64568fi
64569
64570
64571
64572if test $pkg_failed = yes; then
64573
64574if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64575        _pkg_short_errors_supported=yes
64576else
64577        _pkg_short_errors_supported=no
64578fi
64579        if test $_pkg_short_errors_supported = yes; then
64580	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
64581        else
64582	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
64583        fi
64584	# Put the nasty error message in config.log where it belongs
64585	echo "$LCMS_PKG_ERRORS" >&5
64586
64587	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64588$as_echo "no" >&6; }
64589                LCMS_FOUND=no
64590elif test $pkg_failed = untried; then
64591	LCMS_FOUND=no
64592else
64593	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
64594	LCMS_LIBS=$pkg_cv_LCMS_LIBS
64595        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64596$as_echo "yes" >&6; }
64597	LCMS_FOUND=yes
64598fi
64599    if test "x${LCMS_FOUND}" = "xyes"; then
64600      # PKG_CHECK_MODULES will set LCMS_CFLAGS and LCMS_LIBS
64601      USE_EXTERNAL_LCMS=true
64602    else
64603      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
64604    fi
64605  else
64606    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
64607  fi
64608
64609
64610
64611
64612
64613
64614
64615
64616
64617
64618
64619
64620
64621  # Setup libm (the maths library)
64622  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
64623    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
64624$as_echo_n "checking for cos in -lm... " >&6; }
64625if ${ac_cv_lib_m_cos+:} false; then :
64626  $as_echo_n "(cached) " >&6
64627else
64628  ac_check_lib_save_LIBS=$LIBS
64629LIBS="-lm  $LIBS"
64630cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64631/* end confdefs.h.  */
64632
64633/* Override any GCC internal prototype to avoid an error.
64634   Use char because int might match the return type of a GCC
64635   builtin and then its argument prototype would still apply.  */
64636#ifdef __cplusplus
64637extern "C"
64638#endif
64639char cos ();
64640int
64641main ()
64642{
64643return cos ();
64644  ;
64645  return 0;
64646}
64647_ACEOF
64648if ac_fn_cxx_try_link "$LINENO"; then :
64649  ac_cv_lib_m_cos=yes
64650else
64651  ac_cv_lib_m_cos=no
64652fi
64653rm -f core conftest.err conftest.$ac_objext \
64654    conftest$ac_exeext conftest.$ac_ext
64655LIBS=$ac_check_lib_save_LIBS
64656fi
64657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
64658$as_echo "$ac_cv_lib_m_cos" >&6; }
64659if test "x$ac_cv_lib_m_cos" = xyes; then :
64660  cat >>confdefs.h <<_ACEOF
64661#define HAVE_LIBM 1
64662_ACEOF
64663
64664  LIBS="-lm $LIBS"
64665
64666else
64667
64668        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
64669$as_echo "$as_me: Maths library was not found" >&6;}
64670
64671fi
64672
64673    LIBM="-lm"
64674  else
64675    LIBM=""
64676  fi
64677
64678
64679  # Setup libdl (for dynamic library loading)
64680  save_LIBS="$LIBS"
64681  LIBS=""
64682  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
64683$as_echo_n "checking for dlopen in -ldl... " >&6; }
64684if ${ac_cv_lib_dl_dlopen+:} false; then :
64685  $as_echo_n "(cached) " >&6
64686else
64687  ac_check_lib_save_LIBS=$LIBS
64688LIBS="-ldl  $LIBS"
64689cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64690/* end confdefs.h.  */
64691
64692/* Override any GCC internal prototype to avoid an error.
64693   Use char because int might match the return type of a GCC
64694   builtin and then its argument prototype would still apply.  */
64695#ifdef __cplusplus
64696extern "C"
64697#endif
64698char dlopen ();
64699int
64700main ()
64701{
64702return dlopen ();
64703  ;
64704  return 0;
64705}
64706_ACEOF
64707if ac_fn_cxx_try_link "$LINENO"; then :
64708  ac_cv_lib_dl_dlopen=yes
64709else
64710  ac_cv_lib_dl_dlopen=no
64711fi
64712rm -f core conftest.err conftest.$ac_objext \
64713    conftest$ac_exeext conftest.$ac_ext
64714LIBS=$ac_check_lib_save_LIBS
64715fi
64716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
64717$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
64718if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
64719  cat >>confdefs.h <<_ACEOF
64720#define HAVE_LIBDL 1
64721_ACEOF
64722
64723  LIBS="-ldl $LIBS"
64724
64725fi
64726
64727  LIBDL="$LIBS"
64728
64729  LIBS="$save_LIBS"
64730
64731  # Deprecated libraries, keep the flags for backwards compatibility
64732  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
64733
64734
64735# Check whether --with-dxsdk was given.
64736if test "${with_dxsdk+set}" = set; then :
64737  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
64738$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
64739fi
64740
64741
64742
64743
64744# Check whether --with-dxsdk-lib was given.
64745if test "${with_dxsdk_lib+set}" = set; then :
64746  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
64747$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
64748fi
64749
64750
64751
64752
64753# Check whether --with-dxsdk-include was given.
64754if test "${with_dxsdk_include+set}" = set; then :
64755  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
64756$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
64757fi
64758
64759
64760  fi
64761
64762  # Control if libzip can use mmap. Available for purposes of overriding.
64763  LIBZIP_CAN_USE_MMAP=true
64764
64765
64766
64767  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
64768    # Find the root of the Solaris Studio installation from the compiler path
64769    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
64770    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
64771    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
64772$as_echo_n "checking for libstlport.so.1... " >&6; }
64773    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
64774      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
64775      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
64776    fi
64777    if test -f "$STLPORT_LIB"; then
64778      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
64779$as_echo "yes, $STLPORT_LIB" >&6; }
64780
64781  # Only process if variable expands to non-empty
64782
64783  if test "x$STLPORT_LIB" != x; then
64784    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64785
64786  # Input might be given as Windows format, start by converting to
64787  # unix format.
64788  path="$STLPORT_LIB"
64789  new_path=`$CYGPATH -u "$path"`
64790
64791  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64792  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64793  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64794  # "foo.exe" is OK but "foo" is an error.
64795  #
64796  # This test is therefore slightly more accurate than "test -f" to check for file precense.
64797  # It is also a way to make sure we got the proper file name for the real test later on.
64798  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64799  if test "x$test_shortpath" = x; then
64800    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64801$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64802    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
64803  fi
64804
64805  # Call helper function which possibly converts this using DOS-style short mode.
64806  # If so, the updated path is stored in $new_path.
64807
64808  input_path="$new_path"
64809  # Check if we need to convert this using DOS-style short mode. If the path
64810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64811  # take no chances and rewrite it.
64812  # Note: m4 eats our [], so we need to use [ and ] instead.
64813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64814  if test "x$has_forbidden_chars" != x; then
64815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64816    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64817    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64818    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64819      # Going to short mode and back again did indeed matter. Since short mode is
64820      # case insensitive, let's make it lowercase to improve readability.
64821      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64822      # Now convert it back to Unix-style (cygpath)
64823      input_path=`$CYGPATH -u "$shortmode_path"`
64824      new_path="$input_path"
64825    fi
64826  fi
64827
64828  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64829  if test "x$test_cygdrive_prefix" = x; then
64830    # As a simple fix, exclude /usr/bin since it's not a real path.
64831    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64832      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64833      # a path prefixed by /cygdrive for fixpath to work.
64834      new_path="$CYGWIN_ROOT_PATH$input_path"
64835    fi
64836  fi
64837
64838
64839  if test "x$path" != "x$new_path"; then
64840    STLPORT_LIB="$new_path"
64841    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64842$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64843  fi
64844
64845    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64846
64847  path="$STLPORT_LIB"
64848  has_colon=`$ECHO $path | $GREP ^.:`
64849  new_path="$path"
64850  if test "x$has_colon" = x; then
64851    # Not in mixed or Windows style, start by that.
64852    new_path=`cmd //c echo $path`
64853  fi
64854
64855
64856  input_path="$new_path"
64857  # Check if we need to convert this using DOS-style short mode. If the path
64858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64859  # take no chances and rewrite it.
64860  # Note: m4 eats our [], so we need to use [ and ] instead.
64861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64862  if test "x$has_forbidden_chars" != x; then
64863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64864    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64865  fi
64866
64867
64868  windows_path="$new_path"
64869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64870    unix_path=`$CYGPATH -u "$windows_path"`
64871    new_path="$unix_path"
64872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64874    new_path="$unix_path"
64875  fi
64876
64877  if test "x$path" != "x$new_path"; then
64878    STLPORT_LIB="$new_path"
64879    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64880$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64881  fi
64882
64883  # Save the first 10 bytes of this path to the storage, so fixpath can work.
64884  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64885
64886    else
64887      # We're on a unix platform. Hooray! :)
64888      path="$STLPORT_LIB"
64889      has_space=`$ECHO "$path" | $GREP " "`
64890      if test "x$has_space" != x; then
64891        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64892$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64893        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64894      fi
64895
64896      # Use eval to expand a potential ~
64897      eval path="$path"
64898      if test ! -f "$path" && test ! -d "$path"; then
64899        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
64900      fi
64901
64902      if test -d "$path"; then
64903        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
64904      else
64905        dir="`$DIRNAME "$path"`"
64906        base="`$BASENAME "$path"`"
64907        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
64908      fi
64909    fi
64910  fi
64911
64912    else
64913      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
64914$as_echo "no, not found at $STLPORT_LIB" >&6; }
64915      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
64916    fi
64917
64918  fi
64919
64920
64921
64922# Check whether --with-libelf was given.
64923if test "${with_libelf+set}" = set; then :
64924  withval=$with_libelf;
64925fi
64926
64927
64928# Check whether --with-libelf-include was given.
64929if test "${with_libelf_include+set}" = set; then :
64930  withval=$with_libelf_include;
64931fi
64932
64933
64934# Check whether --with-libelf-lib was given.
64935if test "${with_libelf_lib+set}" = set; then :
64936  withval=$with_libelf_lib;
64937fi
64938
64939
64940  if test "x$ENABLE_AOT" = xfalse; then
64941    if (test "x${with_libelf}" != x && test "x${with_libelf}" != xno) || \
64942        (test "x${with_libelf_include}" != x && test "x${with_libelf_include}" != xno) || \
64943        (test "x${with_libelf_lib}" != x && test "x${with_libelf_lib}" != xno); then
64944      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libelf is not used, so --with-libelf[-*] is ignored" >&5
64945$as_echo "$as_me: WARNING: libelf is not used, so --with-libelf[-*] is ignored" >&2;}
64946    fi
64947    LIBELF_CFLAGS=
64948    LIBELF_LIBS=
64949  else
64950    LIBELF_FOUND=no
64951
64952    if test "x${with_libelf}" = xno || test "x${with_libelf_include}" = xno || test "x${with_libelf_lib}" = xno; then
64953      ENABLE_AOT="false"
64954      if test "x${enable_aot}" = xyes; then
64955        as_fn_error $? "libelf is explicitly disabled, cannot build AOT. Enable libelf or remove --enable-aot to disable AOT." "$LINENO" 5
64956      fi
64957    else
64958      if test "x${with_libelf}" != x; then
64959        ELF_LIBS="-L${with_libelf}/lib -lelf"
64960        ELF_CFLAGS="-I${with_libelf}/include"
64961        LIBELF_FOUND=yes
64962      fi
64963      if test "x${with_libelf_include}" != x; then
64964        ELF_CFLAGS="-I${with_libelf_include}"
64965        LIBELF_FOUND=yes
64966      fi
64967      if test "x${with_libelf_lib}" != x; then
64968        ELF_LIBS="-L${with_libelf_lib} -lelf"
64969        LIBELF_FOUND=yes
64970      fi
64971      # Do not try pkg-config if we have a sysroot set.
64972      if test "x$SYSROOT" = x; then
64973        if test "x$LIBELF_FOUND" = xno; then
64974          # Figure out ELF_CFLAGS and ELF_LIBS
64975
64976pkg_failed=no
64977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF" >&5
64978$as_echo_n "checking for ELF... " >&6; }
64979
64980if test -n "$ELF_CFLAGS"; then
64981    pkg_cv_ELF_CFLAGS="$ELF_CFLAGS"
64982 elif test -n "$PKG_CONFIG"; then
64983    if test -n "$PKG_CONFIG" && \
64984    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
64985  ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
64986  ac_status=$?
64987  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64988  test $ac_status = 0; }; then
64989  pkg_cv_ELF_CFLAGS=`$PKG_CONFIG --cflags "libelf" 2>/dev/null`
64990else
64991  pkg_failed=yes
64992fi
64993 else
64994    pkg_failed=untried
64995fi
64996if test -n "$ELF_LIBS"; then
64997    pkg_cv_ELF_LIBS="$ELF_LIBS"
64998 elif test -n "$PKG_CONFIG"; then
64999    if test -n "$PKG_CONFIG" && \
65000    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
65001  ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
65002  ac_status=$?
65003  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65004  test $ac_status = 0; }; then
65005  pkg_cv_ELF_LIBS=`$PKG_CONFIG --libs "libelf" 2>/dev/null`
65006else
65007  pkg_failed=yes
65008fi
65009 else
65010    pkg_failed=untried
65011fi
65012
65013
65014
65015if test $pkg_failed = yes; then
65016
65017if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
65018        _pkg_short_errors_supported=yes
65019else
65020        _pkg_short_errors_supported=no
65021fi
65022        if test $_pkg_short_errors_supported = yes; then
65023	        ELF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libelf" 2>&1`
65024        else
65025	        ELF_PKG_ERRORS=`$PKG_CONFIG --print-errors "libelf" 2>&1`
65026        fi
65027	# Put the nasty error message in config.log where it belongs
65028	echo "$ELF_PKG_ERRORS" >&5
65029
65030	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65031$as_echo "no" >&6; }
65032                LIBELF_FOUND=no
65033elif test $pkg_failed = untried; then
65034	LIBELF_FOUND=no
65035else
65036	ELF_CFLAGS=$pkg_cv_ELF_CFLAGS
65037	ELF_LIBS=$pkg_cv_ELF_LIBS
65038        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65039$as_echo "yes" >&6; }
65040	LIBELF_FOUND=yes
65041fi
65042        fi
65043      fi
65044      if test "x$LIBELF_FOUND" = xno; then
65045        for ac_header in libelf.h
65046do :
65047  ac_fn_cxx_check_header_mongrel "$LINENO" "libelf.h" "ac_cv_header_libelf_h" "$ac_includes_default"
65048if test "x$ac_cv_header_libelf_h" = xyes; then :
65049  cat >>confdefs.h <<_ACEOF
65050#define HAVE_LIBELF_H 1
65051_ACEOF
65052
65053              LIBELF_FOUND=yes
65054              ELF_CFLAGS=
65055              ELF_LIBS=-lelf
65056
65057else
65058  LIBELF_FOUND=no
65059
65060fi
65061
65062done
65063
65064      fi
65065      if test "x$LIBELF_FOUND" = xno; then
65066        ENABLE_AOT="false"
65067
65068  # Print a helpful message on how to acquire the necessary build dependency.
65069  # elf is the help tag: freetype, cups, alsa etc
65070  MISSING_DEPENDENCY=elf
65071
65072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65073    cygwin_help $MISSING_DEPENDENCY
65074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65075    msys_help $MISSING_DEPENDENCY
65076  else
65077    PKGHANDLER_COMMAND=
65078
65079    case $PKGHANDLER in
65080      apt-get)
65081        apt_help     $MISSING_DEPENDENCY ;;
65082      yum)
65083        yum_help     $MISSING_DEPENDENCY ;;
65084      brew)
65085        brew_help    $MISSING_DEPENDENCY ;;
65086      port)
65087        port_help    $MISSING_DEPENDENCY ;;
65088      pkgutil)
65089        pkgutil_help $MISSING_DEPENDENCY ;;
65090      pkgadd)
65091        pkgadd_help  $MISSING_DEPENDENCY ;;
65092    esac
65093
65094    if test "x$PKGHANDLER_COMMAND" != x; then
65095      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
65096    fi
65097  fi
65098
65099        if test "x${enable_aot}" = xyes; then
65100          as_fn_error $? "libelf not found, cannot build AOT. Remove --enable-aot to disable AOT or: $HELP_MSG" "$LINENO" 5
65101        else
65102          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libelf not found, cannot build AOT. $HELP_MSG" >&5
65103$as_echo "$as_me: WARNING: libelf not found, cannot build AOT. $HELP_MSG" >&2;}
65104        fi
65105      else
65106        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libelf works" >&5
65107$as_echo_n "checking if libelf works... " >&6; }
65108        ac_ext=c
65109ac_cpp='$CPP $CPPFLAGS'
65110ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
65111ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
65112ac_compiler_gnu=$ac_cv_c_compiler_gnu
65113
65114        OLD_CFLAGS="$CFLAGS"
65115        CFLAGS="$CFLAGS $ELF_CFLAGS"
65116        OLD_LIBS="$LIBS"
65117        LIBS="$LIBS $ELF_LIBS"
65118        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65119/* end confdefs.h.  */
65120#include <libelf.h>
65121int
65122main ()
65123{
65124
65125              elf_version(0);
65126              return 0;
65127
65128  ;
65129  return 0;
65130}
65131_ACEOF
65132if ac_fn_c_try_link "$LINENO"; then :
65133  LIBELF_WORKS=yes
65134else
65135  LIBELF_WORKS=no
65136
65137fi
65138rm -f core conftest.err conftest.$ac_objext \
65139    conftest$ac_exeext conftest.$ac_ext
65140        CFLAGS="$OLD_CFLAGS"
65141        LIBS="$OLD_LIBS"
65142        ac_ext=cpp
65143ac_cpp='$CXXCPP $CPPFLAGS'
65144ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
65145ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
65146ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
65147
65148        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBELF_WORKS" >&5
65149$as_echo "$LIBELF_WORKS" >&6; }
65150
65151        if test "x$LIBELF_WORKS" = xno; then
65152          ENABLE_AOT="false"
65153
65154  # Print a helpful message on how to acquire the necessary build dependency.
65155  # elf is the help tag: freetype, cups, alsa etc
65156  MISSING_DEPENDENCY=elf
65157
65158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65159    cygwin_help $MISSING_DEPENDENCY
65160  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65161    msys_help $MISSING_DEPENDENCY
65162  else
65163    PKGHANDLER_COMMAND=
65164
65165    case $PKGHANDLER in
65166      apt-get)
65167        apt_help     $MISSING_DEPENDENCY ;;
65168      yum)
65169        yum_help     $MISSING_DEPENDENCY ;;
65170      brew)
65171        brew_help    $MISSING_DEPENDENCY ;;
65172      port)
65173        port_help    $MISSING_DEPENDENCY ;;
65174      pkgutil)
65175        pkgutil_help $MISSING_DEPENDENCY ;;
65176      pkgadd)
65177        pkgadd_help  $MISSING_DEPENDENCY ;;
65178    esac
65179
65180    if test "x$PKGHANDLER_COMMAND" != x; then
65181      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
65182    fi
65183  fi
65184
65185          if test "x$enable_aot" = "xyes"; then
65186            as_fn_error $? "Found libelf but could not link and compile with it. Remove --enable-aot to disable AOT or: $HELP_MSG" "$LINENO" 5
65187          else
65188            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found libelf but could not link and compile with it. $HELP_MSG" >&5
65189$as_echo "$as_me: WARNING: Found libelf but could not link and compile with it. $HELP_MSG" >&2;}
65190          fi
65191        fi
65192      fi
65193    fi
65194  fi
65195
65196
65197
65198
65199
65200
65201
65202
65203
65204
65205
65206
65207
65208
65209
65210
65211
65212
65213# Hotspot setup depends on lib checks (AOT needs libelf).
65214
65215
65216  # The user can in some cases supply additional jvm features. For the custom
65217  # variant, this defines the entire variant.
65218
65219# Check whether --with-jvm-features was given.
65220if test "${with_jvm_features+set}" = set; then :
65221  withval=$with_jvm_features;
65222fi
65223
65224  if test "x$with_jvm_features" != x; then
65225    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
65226$as_echo_n "checking additional JVM features... " >&6; }
65227    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
65228    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
65229$as_echo "$JVM_FEATURES" >&6; }
65230  fi
65231
65232  # Override hotspot cpu definitions for ARM platforms
65233  if test "x$OPENJDK_TARGET_CPU" = xarm; then
65234    HOTSPOT_TARGET_CPU=arm_32
65235    HOTSPOT_TARGET_CPU_DEFINE="ARM32"
65236    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
65237    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
65238  elif test "x$OPENJDK_TARGET_CPU" = xaarch64 && test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
65239    HOTSPOT_TARGET_CPU=arm_64
65240    HOTSPOT_TARGET_CPU_ARCH=arm
65241    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
65242    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
65243  fi
65244
65245  # Verify that dependencies are met for explicitly set features.
65246  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
65247    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
65248  fi
65249
65250  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
65251    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
65252  fi
65253
65254  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
65255    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
65256  fi
65257
65258  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
65259    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
65260  fi
65261
65262  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
65263    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
65264  fi
65265
65266  # Turn on additional features based on other parts of configure
65267  if test "x$INCLUDE_DTRACE" = "xtrue"; then
65268    JVM_FEATURES="$JVM_FEATURES dtrace"
65269  else
65270    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
65271      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
65272    fi
65273  fi
65274
65275  if test "x$STATIC_BUILD" = "xtrue"; then
65276    JVM_FEATURES="$JVM_FEATURES static-build"
65277  else
65278    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
65279      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
65280    fi
65281  fi
65282
65283  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
65284    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
65285      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
65286    fi
65287  fi
65288
65289  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
65290    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
65291      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
65292    fi
65293  fi
65294
65295  # Only enable jvmci on x86_64, sparcv9 and aarch64.
65296  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
65297     test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
65298     test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
65299    JVM_FEATURES_jvmci="jvmci"
65300  else
65301    JVM_FEATURES_jvmci=""
65302  fi
65303
65304  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jdk.internal.vm.compiler should be built" >&5
65305$as_echo_n "checking if jdk.internal.vm.compiler should be built... " >&6; }
65306  if   [[ " $JVM_FEATURES " =~ " graal " ]]  ; then
65307    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65308$as_echo "yes, forced" >&6; }
65309    if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
65310      as_fn_error $? "Specified JVM feature 'graal' requires feature 'jvmci'" "$LINENO" 5
65311    fi
65312    INCLUDE_GRAAL="true"
65313  else
65314    # By default enable graal build where AOT is available
65315    if test "x$ENABLE_AOT" = "xtrue"; then
65316      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65317$as_echo "yes" >&6; }
65318      JVM_FEATURES_graal="graal"
65319      INCLUDE_GRAAL="true"
65320    else
65321      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65322$as_echo "no" >&6; }
65323      JVM_FEATURES_graal=""
65324      INCLUDE_GRAAL="false"
65325    fi
65326  fi
65327
65328
65329
65330  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
65331$as_echo_n "checking if aot should be enabled... " >&6; }
65332  if test "x$ENABLE_AOT" = "xtrue"; then
65333    if test "x$enable_aot" = "xyes"; then
65334      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65335$as_echo "yes, forced" >&6; }
65336    else
65337      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65338$as_echo "yes" >&6; }
65339    fi
65340    JVM_FEATURES_aot="aot"
65341  else
65342    if test "x$enable_aot" = "xno"; then
65343      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65344$as_echo "no, forced" >&6; }
65345    else
65346      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65347$as_echo "no" >&6; }
65348    fi
65349    JVM_FEATURES_aot=""
65350  fi
65351
65352  if test "x$OPENJDK_TARGET_CPU" = xarm ; then
65353    # Default to use link time optimizations on minimal on arm
65354    JVM_FEATURES_link_time_opt="link-time-opt"
65355  else
65356    JVM_FEATURES_link_time_opt=""
65357  fi
65358
65359  # All variants but minimal (and custom) get these features
65360  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
65361
65362  # Enable features depending on variant.
65363  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
65364  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
65365  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
65366  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES $JVM_FEATURES_link_time_opt"
65367  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
65368  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
65369  JVM_FEATURES_custom="$JVM_FEATURES"
65370
65371
65372
65373
65374
65375
65376
65377
65378
65379  # Used for verification of Makefiles by check-jvm-feature
65380
65381
65382  # We don't support --with-jvm-interpreter anymore, use zero instead.
65383
65384
65385# Check whether --with-jvm-interpreter was given.
65386if test "${with_jvm_interpreter+set}" = set; then :
65387  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
65388$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
65389fi
65390
65391
65392
65393
65394###############################################################################
65395#
65396# We need to do some final tweaking, when everything else is done.
65397#
65398###############################################################################
65399
65400
65401  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
65402$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
65403
65404  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
65405    ENABLE_INTREE_EC=true
65406    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65407$as_echo "yes" >&6; }
65408  else
65409    ENABLE_INTREE_EC=false
65410    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65411$as_echo "no" >&6; }
65412  fi
65413
65414
65415
65416
65417  # Check whether --enable-jtreg-failure-handler was given.
65418if test "${enable_jtreg_failure_handler+set}" = set; then :
65419  enableval=$enable_jtreg_failure_handler;
65420fi
65421
65422
65423  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
65424$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
65425
65426  if test "x$enable_jtreg_failure_handler" = "xyes"; then
65427    if test "x$JT_HOME" = "x"; then
65428      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
65429    else
65430      BUILD_FAILURE_HANDLER=true
65431      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65432$as_echo "yes, forced" >&6; }
65433    fi
65434  elif test "x$enable_jtreg_failure_handler" = "xno"; then
65435    BUILD_FAILURE_HANDLER=false
65436    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65437$as_echo "no, forced" >&6; }
65438  elif test "x$enable_jtreg_failure_handler" = "xauto" \
65439      || test "x$enable_jtreg_failure_handler" = "x"; then
65440    if test "x$JT_HOME" = "x"; then
65441      BUILD_FAILURE_HANDLER=false
65442      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
65443$as_echo "no, missing jtreg" >&6; }
65444    else
65445      BUILD_FAILURE_HANDLER=true
65446      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
65447$as_echo "yes, jtreg present" >&6; }
65448    fi
65449  else
65450    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
65451  fi
65452
65453
65454
65455
65456  # Check whether --enable-generate-classlist was given.
65457if test "${enable_generate_classlist+set}" = set; then :
65458  enableval=$enable_generate_classlist;
65459fi
65460
65461
65462  # Check if it's likely that it's possible to generate the classlist. Depending
65463  # on exact jvm configuration it could be possible anyway.
65464  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
65465    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
65466  else
65467    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
65468  fi
65469
65470  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
65471$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
65472  if test "x$enable_generate_classlist" = "xyes"; then
65473    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65474$as_echo "yes, forced" >&6; }
65475    ENABLE_GENERATE_CLASSLIST="true"
65476    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
65477      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
65478$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
65479    fi
65480  elif test "x$enable_generate_classlist" = "xno"; then
65481    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65482$as_echo "no, forced" >&6; }
65483    ENABLE_GENERATE_CLASSLIST="false"
65484  elif test "x$enable_generate_classlist" = "x"; then
65485    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
65486      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65487$as_echo "yes" >&6; }
65488      ENABLE_GENERATE_CLASSLIST="true"
65489    else
65490      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65491$as_echo "no" >&6; }
65492      ENABLE_GENERATE_CLASSLIST="false"
65493    fi
65494  else
65495    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
65496  fi
65497
65498
65499
65500
65501###############################################################################
65502#
65503# Configure parts of the build that only affect the build performance,
65504# not the result.
65505#
65506###############################################################################
65507
65508
65509  # How many cores do we have on this build system?
65510
65511# Check whether --with-num-cores was given.
65512if test "${with_num_cores+set}" = set; then :
65513  withval=$with_num_cores;
65514fi
65515
65516  if test "x$with_num_cores" = x; then
65517    # The number of cores were not specified, try to probe them.
65518
65519  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
65520$as_echo_n "checking for number of cores... " >&6; }
65521  NUM_CORES=1
65522  FOUND_CORES=no
65523
65524  if test -f /proc/cpuinfo; then
65525    # Looks like a Linux (or cygwin) system
65526    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
65527    FOUND_CORES=yes
65528  elif test -x /usr/sbin/psrinfo; then
65529    # Looks like a Solaris system
65530    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
65531    FOUND_CORES=yes
65532  elif test -x /usr/sbin/sysctl; then
65533    # Looks like a MacOSX system
65534    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
65535    FOUND_CORES=yes
65536  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
65537    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
65538    FOUND_CORES=yes
65539  elif test -n "$NUMBER_OF_PROCESSORS"; then
65540    # On windows, look in the env
65541    NUM_CORES=$NUMBER_OF_PROCESSORS
65542    FOUND_CORES=yes
65543  fi
65544
65545  if test "x$FOUND_CORES" = xyes; then
65546    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
65547$as_echo "$NUM_CORES" >&6; }
65548  else
65549    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
65550$as_echo "could not detect number of cores, defaulting to 1" >&6; }
65551    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
65552$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
65553  fi
65554
65555  else
65556    NUM_CORES=$with_num_cores
65557  fi
65558
65559
65560
65561  # How much memory do we have on this build system?
65562
65563# Check whether --with-memory-size was given.
65564if test "${with_memory_size+set}" = set; then :
65565  withval=$with_memory_size;
65566fi
65567
65568  if test "x$with_memory_size" = x; then
65569    # The memory size was not specified, try to probe it.
65570
65571  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
65572$as_echo_n "checking for memory size... " >&6; }
65573  # Default to 1024 MB
65574  MEMORY_SIZE=1024
65575  FOUND_MEM=no
65576
65577  if test -f /proc/meminfo; then
65578    # Looks like a Linux (or cygwin) system
65579    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
65580    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
65581    FOUND_MEM=yes
65582  elif test -x /usr/sbin/prtconf; then
65583    # Looks like a Solaris or AIX system
65584    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
65585    FOUND_MEM=yes
65586  elif test -x /usr/sbin/sysctl; then
65587    # Looks like a MacOSX system
65588    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
65589    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
65590    FOUND_MEM=yes
65591  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
65592    # Windows, but without cygwin
65593    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
65594    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
65595    FOUND_MEM=yes
65596  fi
65597
65598  if test "x$FOUND_MEM" = xyes; then
65599    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
65600$as_echo "$MEMORY_SIZE MB" >&6; }
65601  else
65602    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
65603$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
65604    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
65605$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
65606  fi
65607
65608  else
65609    MEMORY_SIZE=$with_memory_size
65610  fi
65611
65612
65613
65614  # Provide a decent default number of parallel jobs for make depending on
65615  # number of cores, amount of memory and machine architecture.
65616
65617# Check whether --with-jobs was given.
65618if test "${with_jobs+set}" = set; then :
65619  withval=$with_jobs;
65620fi
65621
65622  if test "x$with_jobs" = x; then
65623    # Number of jobs was not specified, calculate.
65624    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
65625$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
65626    # Approximate memory in GB.
65627    memory_gb=`expr $MEMORY_SIZE / 1024`
65628    # Pick the lowest of memory in gb and number of cores.
65629    if test "$memory_gb" -lt "$NUM_CORES"; then
65630      JOBS="$memory_gb"
65631    else
65632      JOBS="$NUM_CORES"
65633    fi
65634    if test "$JOBS" -eq "0"; then
65635      JOBS=1
65636    fi
65637    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
65638$as_echo "$JOBS" >&6; }
65639  else
65640    JOBS=$with_jobs
65641  fi
65642
65643
65644
65645  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
65646
65647# Check whether --with-test-jobs was given.
65648if test "${with_test_jobs+set}" = set; then :
65649  withval=$with_test_jobs;
65650fi
65651
65652  if test "x$with_test_jobs" = x; then
65653      TEST_JOBS=0
65654  else
65655      TEST_JOBS=$with_test_jobs
65656  fi
65657
65658
65659
65660# Setup arguments for the boot jdk (after cores and memory have been setup)
65661
65662  ##############################################################################
65663  #
65664  # Specify jvm options for anything that is run with the Boot JDK.
65665  # Not all JVM:s accept the same arguments on the command line.
65666  #
65667
65668# Check whether --with-boot-jdk-jvmargs was given.
65669if test "${with_boot_jdk_jvmargs+set}" = set; then :
65670  withval=$with_boot_jdk_jvmargs;
65671fi
65672
65673
65674  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
65675$as_echo_n "checking flags for boot jdk java command ... " >&6; }
65676
65677  # Disable special log output when a debug build is used as Boot JDK...
65678
65679  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
65680  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
65681  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
65682  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65683  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65684  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65685    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
65686    JVM_ARG_OK=true
65687  else
65688    $ECHO "Arg failed:" >&5
65689    $ECHO "$OUTPUT" >&5
65690    JVM_ARG_OK=false
65691  fi
65692
65693
65694  # Force en-US environment
65695
65696  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
65697  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
65698  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
65699  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65700  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65701  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65702    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
65703    JVM_ARG_OK=true
65704  else
65705    $ECHO "Arg failed:" >&5
65706    $ECHO "$OUTPUT" >&5
65707    JVM_ARG_OK=false
65708  fi
65709
65710
65711  # Apply user provided options.
65712
65713  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
65714  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
65715  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
65716  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65717  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65718  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65719    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
65720    JVM_ARG_OK=true
65721  else
65722    $ECHO "Arg failed:" >&5
65723    $ECHO "$OUTPUT" >&5
65724    JVM_ARG_OK=false
65725  fi
65726
65727
65728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
65729$as_echo "$boot_jdk_jvmargs" >&6; }
65730
65731  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
65732  JAVA_FLAGS=$boot_jdk_jvmargs
65733
65734
65735
65736  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
65737$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
65738
65739  # Starting amount of heap memory.
65740
65741  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
65742  $ECHO "Command: $JAVA -Xms64M -version" >&5
65743  OUTPUT=`$JAVA -Xms64M -version 2>&1`
65744  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65745  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65746  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65747    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
65748    JVM_ARG_OK=true
65749  else
65750    $ECHO "Arg failed:" >&5
65751    $ECHO "$OUTPUT" >&5
65752    JVM_ARG_OK=false
65753  fi
65754
65755  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
65756
65757  # Maximum amount of heap memory and stack size.
65758  JVM_HEAP_LIMIT_32="1024"
65759  # Running a 64 bit JVM allows for and requires a bigger heap
65760  JVM_HEAP_LIMIT_64="1600"
65761  STACK_SIZE_32=768
65762  STACK_SIZE_64=1536
65763  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
65764  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
65765    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
65766  fi
65767  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
65768    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
65769  fi
65770  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
65771    JVM_HEAP_LIMIT_32=512
65772    JVM_HEAP_LIMIT_64=512
65773  fi
65774
65775  if test "x$BOOT_JDK_BITS" = "x32"; then
65776    STACK_SIZE=$STACK_SIZE_32
65777    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
65778  else
65779    STACK_SIZE=$STACK_SIZE_64
65780    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
65781  fi
65782
65783  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
65784  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
65785  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
65786  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65787  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65788  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65789    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
65790    JVM_ARG_OK=true
65791  else
65792    $ECHO "Arg failed:" >&5
65793    $ECHO "$OUTPUT" >&5
65794    JVM_ARG_OK=false
65795  fi
65796
65797
65798  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
65799  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
65800  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
65801  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65802  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65803  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65804    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
65805    JVM_ARG_OK=true
65806  else
65807    $ECHO "Arg failed:" >&5
65808    $ECHO "$OUTPUT" >&5
65809    JVM_ARG_OK=false
65810  fi
65811
65812
65813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
65814$as_echo "$boot_jdk_jvmargs_big" >&6; }
65815
65816  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
65817
65818
65819  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
65820    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
65821    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
65822  else
65823    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
65824    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
65825  fi
65826  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
65827  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
65828  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
65829$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
65830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
65831$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
65832
65833
65834  # By default, the main javac compilations use big
65835  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
65836
65837
65838  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
65839$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
65840
65841  # Use serial gc for small short lived tools if possible
65842
65843  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
65844  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
65845  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
65846  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65847  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65848  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65849    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
65850    JVM_ARG_OK=true
65851  else
65852    $ECHO "Arg failed:" >&5
65853    $ECHO "$OUTPUT" >&5
65854    JVM_ARG_OK=false
65855  fi
65856
65857
65858  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
65859  $ECHO "Command: $JAVA -Xms32M -version" >&5
65860  OUTPUT=`$JAVA -Xms32M -version 2>&1`
65861  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65862  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65863  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65864    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
65865    JVM_ARG_OK=true
65866  else
65867    $ECHO "Arg failed:" >&5
65868    $ECHO "$OUTPUT" >&5
65869    JVM_ARG_OK=false
65870  fi
65871
65872
65873  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
65874  $ECHO "Command: $JAVA -Xmx512M -version" >&5
65875  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
65876  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65877  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65878  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65879    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
65880    JVM_ARG_OK=true
65881  else
65882    $ECHO "Arg failed:" >&5
65883    $ECHO "$OUTPUT" >&5
65884    JVM_ARG_OK=false
65885  fi
65886
65887
65888  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
65889  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
65890  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
65891  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65892  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65893  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65894    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
65895    JVM_ARG_OK=true
65896  else
65897    $ECHO "Arg failed:" >&5
65898    $ECHO "$OUTPUT" >&5
65899    JVM_ARG_OK=false
65900  fi
65901
65902
65903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
65904$as_echo "$boot_jdk_jvmargs_small" >&6; }
65905
65906  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
65907
65908
65909  JAVA_TOOL_FLAGS_SMALL=""
65910  for f in $JAVA_FLAGS_SMALL; do
65911    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
65912  done
65913
65914
65915
65916# Setup smart javac (after cores and memory have been setup)
65917
65918
65919# Check whether --with-sjavac-server-java was given.
65920if test "${with_sjavac_server_java+set}" = set; then :
65921  withval=$with_sjavac_server_java;
65922fi
65923
65924
65925  if test "x$with_sjavac_server_java" != x; then
65926    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
65927    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
65928    if test "x$FOUND_VERSION" = x; then
65929      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
65930    fi
65931  else
65932    SJAVAC_SERVER_JAVA="$JAVA"
65933  fi
65934
65935
65936  if test "$MEMORY_SIZE" -gt "3000"; then
65937
65938  $ECHO "Check if jvm arg is ok: -d64" >&5
65939  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
65940  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
65941  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65942  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65943  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65944    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
65945    JVM_ARG_OK=true
65946  else
65947    $ECHO "Arg failed:" >&5
65948    $ECHO "$OUTPUT" >&5
65949    JVM_ARG_OK=false
65950  fi
65951
65952    if test "$JVM_ARG_OK" = true; then
65953      JVM_64BIT=true
65954      JVM_ARG_OK=false
65955    fi
65956  fi
65957
65958  MX_VALUE=`expr $MEMORY_SIZE / 2`
65959  if test "$JVM_64BIT" = true; then
65960    # Set ms lower than mx since more than one instance of the server might
65961    # get launched at the same time before they figure out which instance won.
65962    MS_VALUE=512
65963    if test "$MX_VALUE" -gt "2048"; then
65964      MX_VALUE=2048
65965    fi
65966  else
65967    MS_VALUE=256
65968    if test "$MX_VALUE" -gt "1500"; then
65969      MX_VALUE=1500
65970    fi
65971  fi
65972  if test "$MX_VALUE" -lt "512"; then
65973    MX_VALUE=512
65974  fi
65975
65976  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
65977  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
65978  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
65979  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65980  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65981  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65982    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
65983    JVM_ARG_OK=true
65984  else
65985    $ECHO "Arg failed:" >&5
65986    $ECHO "$OUTPUT" >&5
65987    JVM_ARG_OK=false
65988  fi
65989
65990
65991
65992  # Check whether --enable-sjavac was given.
65993if test "${enable_sjavac+set}" = set; then :
65994  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
65995else
65996  ENABLE_SJAVAC="no"
65997fi
65998
65999  if test "x$JVM_ARG_OK" = "xfalse"; then
66000    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
66001$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
66002    ENABLE_SJAVAC="no"
66003  fi
66004  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
66005$as_echo_n "checking whether to use sjavac... " >&6; }
66006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
66007$as_echo "$ENABLE_SJAVAC" >&6; }
66008
66009
66010  # Check whether --enable-javac-server was given.
66011if test "${enable_javac_server+set}" = set; then :
66012  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
66013else
66014  ENABLE_JAVAC_SERVER="yes"
66015fi
66016
66017  if test "x$JVM_ARG_OK" = "xfalse"; then
66018    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
66019$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
66020    ENABLE_JAVAC_SERVER="no"
66021  fi
66022  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
66023$as_echo_n "checking whether to use javac server... " >&6; }
66024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
66025$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
66026
66027
66028  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
66029    # When using a server javac, the small client instances do not need much
66030    # resources.
66031    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
66032  fi
66033
66034
66035# Setup use of icecc if requested
66036
66037  # Check whether --enable-icecc was given.
66038if test "${enable_icecc+set}" = set; then :
66039  enableval=$enable_icecc;
66040fi
66041
66042
66043  if test "x${enable_icecc}" = "xyes"; then
66044
66045
66046
66047  # Publish this variable in the help.
66048
66049
66050  if [ -z "${ICECC_CMD+x}" ]; then
66051    # The variable is not set by user, try to locate tool using the code snippet
66052    for ac_prog in icecc
66053do
66054  # Extract the first word of "$ac_prog", so it can be a program name with args.
66055set dummy $ac_prog; ac_word=$2
66056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66057$as_echo_n "checking for $ac_word... " >&6; }
66058if ${ac_cv_path_ICECC_CMD+:} false; then :
66059  $as_echo_n "(cached) " >&6
66060else
66061  case $ICECC_CMD in
66062  [\\/]* | ?:[\\/]*)
66063  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
66064  ;;
66065  *)
66066  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66067for as_dir in $PATH
66068do
66069  IFS=$as_save_IFS
66070  test -z "$as_dir" && as_dir=.
66071    for ac_exec_ext in '' $ac_executable_extensions; do
66072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66073    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
66074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66075    break 2
66076  fi
66077done
66078  done
66079IFS=$as_save_IFS
66080
66081  ;;
66082esac
66083fi
66084ICECC_CMD=$ac_cv_path_ICECC_CMD
66085if test -n "$ICECC_CMD"; then
66086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
66087$as_echo "$ICECC_CMD" >&6; }
66088else
66089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66090$as_echo "no" >&6; }
66091fi
66092
66093
66094  test -n "$ICECC_CMD" && break
66095done
66096
66097  else
66098    # The variable is set, but is it from the command line or the environment?
66099
66100    # Try to remove the string !ICECC_CMD! from our list.
66101    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
66102    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66103      # If it failed, the variable was not from the command line. Ignore it,
66104      # but warn the user (except for BASH, which is always set by the calling BASH).
66105      if test "xICECC_CMD" != xBASH; then
66106        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
66107$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
66108      fi
66109      # Try to locate tool using the code snippet
66110      for ac_prog in icecc
66111do
66112  # Extract the first word of "$ac_prog", so it can be a program name with args.
66113set dummy $ac_prog; ac_word=$2
66114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66115$as_echo_n "checking for $ac_word... " >&6; }
66116if ${ac_cv_path_ICECC_CMD+:} false; then :
66117  $as_echo_n "(cached) " >&6
66118else
66119  case $ICECC_CMD in
66120  [\\/]* | ?:[\\/]*)
66121  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
66122  ;;
66123  *)
66124  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66125for as_dir in $PATH
66126do
66127  IFS=$as_save_IFS
66128  test -z "$as_dir" && as_dir=.
66129    for ac_exec_ext in '' $ac_executable_extensions; do
66130  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66131    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
66132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66133    break 2
66134  fi
66135done
66136  done
66137IFS=$as_save_IFS
66138
66139  ;;
66140esac
66141fi
66142ICECC_CMD=$ac_cv_path_ICECC_CMD
66143if test -n "$ICECC_CMD"; then
66144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
66145$as_echo "$ICECC_CMD" >&6; }
66146else
66147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66148$as_echo "no" >&6; }
66149fi
66150
66151
66152  test -n "$ICECC_CMD" && break
66153done
66154
66155    else
66156      # If it succeeded, then it was overridden by the user. We will use it
66157      # for the tool.
66158
66159      # First remove it from the list of overridden variables, so we can test
66160      # for unknown variables in the end.
66161      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66162
66163      # Check if we try to supply an empty value
66164      if test "x$ICECC_CMD" = x; then
66165        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
66166$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
66167        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
66168$as_echo_n "checking for ICECC_CMD... " >&6; }
66169        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66170$as_echo "disabled" >&6; }
66171      else
66172        # Check if the provided tool contains a complete path.
66173        tool_specified="$ICECC_CMD"
66174        tool_basename="${tool_specified##*/}"
66175        if test "x$tool_basename" = "x$tool_specified"; then
66176          # A command without a complete path is provided, search $PATH.
66177          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
66178$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
66179          # Extract the first word of "$tool_basename", so it can be a program name with args.
66180set dummy $tool_basename; ac_word=$2
66181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66182$as_echo_n "checking for $ac_word... " >&6; }
66183if ${ac_cv_path_ICECC_CMD+:} false; then :
66184  $as_echo_n "(cached) " >&6
66185else
66186  case $ICECC_CMD in
66187  [\\/]* | ?:[\\/]*)
66188  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
66189  ;;
66190  *)
66191  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66192for as_dir in $PATH
66193do
66194  IFS=$as_save_IFS
66195  test -z "$as_dir" && as_dir=.
66196    for ac_exec_ext in '' $ac_executable_extensions; do
66197  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66198    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
66199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66200    break 2
66201  fi
66202done
66203  done
66204IFS=$as_save_IFS
66205
66206  ;;
66207esac
66208fi
66209ICECC_CMD=$ac_cv_path_ICECC_CMD
66210if test -n "$ICECC_CMD"; then
66211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
66212$as_echo "$ICECC_CMD" >&6; }
66213else
66214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66215$as_echo "no" >&6; }
66216fi
66217
66218
66219          if test "x$ICECC_CMD" = x; then
66220            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66221          fi
66222        else
66223          # Otherwise we believe it is a complete path. Use it as it is.
66224          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
66225$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
66226          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
66227$as_echo_n "checking for ICECC_CMD... " >&6; }
66228          if test ! -x "$tool_specified"; then
66229            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66230$as_echo "not found" >&6; }
66231            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
66232          fi
66233          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66234$as_echo "$tool_specified" >&6; }
66235        fi
66236      fi
66237    fi
66238
66239  fi
66240
66241
66242
66243  if test "x$ICECC_CMD" = x; then
66244    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
66245  fi
66246
66247
66248    old_path="$PATH"
66249
66250    # Look for icecc-create-env in some known places
66251    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
66252
66253
66254
66255  # Publish this variable in the help.
66256
66257
66258  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
66259    # The variable is not set by user, try to locate tool using the code snippet
66260    for ac_prog in icecc-create-env
66261do
66262  # Extract the first word of "$ac_prog", so it can be a program name with args.
66263set dummy $ac_prog; ac_word=$2
66264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66265$as_echo_n "checking for $ac_word... " >&6; }
66266if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66267  $as_echo_n "(cached) " >&6
66268else
66269  case $ICECC_CREATE_ENV in
66270  [\\/]* | ?:[\\/]*)
66271  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66272  ;;
66273  *)
66274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66275for as_dir in $PATH
66276do
66277  IFS=$as_save_IFS
66278  test -z "$as_dir" && as_dir=.
66279    for ac_exec_ext in '' $ac_executable_extensions; do
66280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66281    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66283    break 2
66284  fi
66285done
66286  done
66287IFS=$as_save_IFS
66288
66289  ;;
66290esac
66291fi
66292ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66293if test -n "$ICECC_CREATE_ENV"; then
66294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66295$as_echo "$ICECC_CREATE_ENV" >&6; }
66296else
66297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66298$as_echo "no" >&6; }
66299fi
66300
66301
66302  test -n "$ICECC_CREATE_ENV" && break
66303done
66304
66305  else
66306    # The variable is set, but is it from the command line or the environment?
66307
66308    # Try to remove the string !ICECC_CREATE_ENV! from our list.
66309    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
66310    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66311      # If it failed, the variable was not from the command line. Ignore it,
66312      # but warn the user (except for BASH, which is always set by the calling BASH).
66313      if test "xICECC_CREATE_ENV" != xBASH; then
66314        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
66315$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
66316      fi
66317      # Try to locate tool using the code snippet
66318      for ac_prog in icecc-create-env
66319do
66320  # Extract the first word of "$ac_prog", so it can be a program name with args.
66321set dummy $ac_prog; ac_word=$2
66322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66323$as_echo_n "checking for $ac_word... " >&6; }
66324if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66325  $as_echo_n "(cached) " >&6
66326else
66327  case $ICECC_CREATE_ENV in
66328  [\\/]* | ?:[\\/]*)
66329  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66330  ;;
66331  *)
66332  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66333for as_dir in $PATH
66334do
66335  IFS=$as_save_IFS
66336  test -z "$as_dir" && as_dir=.
66337    for ac_exec_ext in '' $ac_executable_extensions; do
66338  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66339    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66340    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66341    break 2
66342  fi
66343done
66344  done
66345IFS=$as_save_IFS
66346
66347  ;;
66348esac
66349fi
66350ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66351if test -n "$ICECC_CREATE_ENV"; then
66352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66353$as_echo "$ICECC_CREATE_ENV" >&6; }
66354else
66355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66356$as_echo "no" >&6; }
66357fi
66358
66359
66360  test -n "$ICECC_CREATE_ENV" && break
66361done
66362
66363    else
66364      # If it succeeded, then it was overridden by the user. We will use it
66365      # for the tool.
66366
66367      # First remove it from the list of overridden variables, so we can test
66368      # for unknown variables in the end.
66369      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66370
66371      # Check if we try to supply an empty value
66372      if test "x$ICECC_CREATE_ENV" = x; then
66373        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
66374$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
66375        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
66376$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
66377        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66378$as_echo "disabled" >&6; }
66379      else
66380        # Check if the provided tool contains a complete path.
66381        tool_specified="$ICECC_CREATE_ENV"
66382        tool_basename="${tool_specified##*/}"
66383        if test "x$tool_basename" = "x$tool_specified"; then
66384          # A command without a complete path is provided, search $PATH.
66385          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
66386$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
66387          # Extract the first word of "$tool_basename", so it can be a program name with args.
66388set dummy $tool_basename; ac_word=$2
66389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66390$as_echo_n "checking for $ac_word... " >&6; }
66391if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66392  $as_echo_n "(cached) " >&6
66393else
66394  case $ICECC_CREATE_ENV in
66395  [\\/]* | ?:[\\/]*)
66396  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66397  ;;
66398  *)
66399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66400for as_dir in $PATH
66401do
66402  IFS=$as_save_IFS
66403  test -z "$as_dir" && as_dir=.
66404    for ac_exec_ext in '' $ac_executable_extensions; do
66405  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66406    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66408    break 2
66409  fi
66410done
66411  done
66412IFS=$as_save_IFS
66413
66414  ;;
66415esac
66416fi
66417ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66418if test -n "$ICECC_CREATE_ENV"; then
66419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66420$as_echo "$ICECC_CREATE_ENV" >&6; }
66421else
66422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66423$as_echo "no" >&6; }
66424fi
66425
66426
66427          if test "x$ICECC_CREATE_ENV" = x; then
66428            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66429          fi
66430        else
66431          # Otherwise we believe it is a complete path. Use it as it is.
66432          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
66433$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
66434          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
66435$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
66436          if test ! -x "$tool_specified"; then
66437            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66438$as_echo "not found" >&6; }
66439            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
66440          fi
66441          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66442$as_echo "$tool_specified" >&6; }
66443        fi
66444      fi
66445    fi
66446
66447  fi
66448
66449
66450
66451  if test "x$ICECC_CREATE_ENV" = x; then
66452    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
66453  fi
66454
66455
66456    # Use icecc-create-env to create a minimal compilation environment that can
66457    # be sent to the other hosts in the icecream cluster.
66458    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
66459    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
66460    # Older versions of icecc does not have the --gcc parameter
66461    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
66462      icecc_gcc_arg="--gcc"
66463    fi
66464    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
66465
66466  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66467      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
66468          ${icecc_create_env_log} 2>&1 )
66469  if test "$?" != "0"; then
66470    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66471$as_echo "$as_me: icecc-create-env output:" >&6;}
66472    cat \
66473          ${icecc_create_env_log}
66474    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66475  fi
66476
66477    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
66478      # For clang, the icecc compilerwrapper is needed. It usually resides next
66479      # to icecc-create-env.
66480
66481
66482
66483  # Publish this variable in the help.
66484
66485
66486  if [ -z "${ICECC_WRAPPER+x}" ]; then
66487    # The variable is not set by user, try to locate tool using the code snippet
66488    for ac_prog in compilerwrapper
66489do
66490  # Extract the first word of "$ac_prog", so it can be a program name with args.
66491set dummy $ac_prog; ac_word=$2
66492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66493$as_echo_n "checking for $ac_word... " >&6; }
66494if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66495  $as_echo_n "(cached) " >&6
66496else
66497  case $ICECC_WRAPPER in
66498  [\\/]* | ?:[\\/]*)
66499  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66500  ;;
66501  *)
66502  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66503for as_dir in $PATH
66504do
66505  IFS=$as_save_IFS
66506  test -z "$as_dir" && as_dir=.
66507    for ac_exec_ext in '' $ac_executable_extensions; do
66508  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66509    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66510    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66511    break 2
66512  fi
66513done
66514  done
66515IFS=$as_save_IFS
66516
66517  ;;
66518esac
66519fi
66520ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66521if test -n "$ICECC_WRAPPER"; then
66522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66523$as_echo "$ICECC_WRAPPER" >&6; }
66524else
66525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66526$as_echo "no" >&6; }
66527fi
66528
66529
66530  test -n "$ICECC_WRAPPER" && break
66531done
66532
66533  else
66534    # The variable is set, but is it from the command line or the environment?
66535
66536    # Try to remove the string !ICECC_WRAPPER! from our list.
66537    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
66538    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66539      # If it failed, the variable was not from the command line. Ignore it,
66540      # but warn the user (except for BASH, which is always set by the calling BASH).
66541      if test "xICECC_WRAPPER" != xBASH; then
66542        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
66543$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
66544      fi
66545      # Try to locate tool using the code snippet
66546      for ac_prog in compilerwrapper
66547do
66548  # Extract the first word of "$ac_prog", so it can be a program name with args.
66549set dummy $ac_prog; ac_word=$2
66550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66551$as_echo_n "checking for $ac_word... " >&6; }
66552if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66553  $as_echo_n "(cached) " >&6
66554else
66555  case $ICECC_WRAPPER in
66556  [\\/]* | ?:[\\/]*)
66557  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66558  ;;
66559  *)
66560  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66561for as_dir in $PATH
66562do
66563  IFS=$as_save_IFS
66564  test -z "$as_dir" && as_dir=.
66565    for ac_exec_ext in '' $ac_executable_extensions; do
66566  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66567    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66569    break 2
66570  fi
66571done
66572  done
66573IFS=$as_save_IFS
66574
66575  ;;
66576esac
66577fi
66578ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66579if test -n "$ICECC_WRAPPER"; then
66580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66581$as_echo "$ICECC_WRAPPER" >&6; }
66582else
66583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66584$as_echo "no" >&6; }
66585fi
66586
66587
66588  test -n "$ICECC_WRAPPER" && break
66589done
66590
66591    else
66592      # If it succeeded, then it was overridden by the user. We will use it
66593      # for the tool.
66594
66595      # First remove it from the list of overridden variables, so we can test
66596      # for unknown variables in the end.
66597      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66598
66599      # Check if we try to supply an empty value
66600      if test "x$ICECC_WRAPPER" = x; then
66601        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
66602$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
66603        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
66604$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
66605        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66606$as_echo "disabled" >&6; }
66607      else
66608        # Check if the provided tool contains a complete path.
66609        tool_specified="$ICECC_WRAPPER"
66610        tool_basename="${tool_specified##*/}"
66611        if test "x$tool_basename" = "x$tool_specified"; then
66612          # A command without a complete path is provided, search $PATH.
66613          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
66614$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
66615          # Extract the first word of "$tool_basename", so it can be a program name with args.
66616set dummy $tool_basename; ac_word=$2
66617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66618$as_echo_n "checking for $ac_word... " >&6; }
66619if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66620  $as_echo_n "(cached) " >&6
66621else
66622  case $ICECC_WRAPPER in
66623  [\\/]* | ?:[\\/]*)
66624  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66625  ;;
66626  *)
66627  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66628for as_dir in $PATH
66629do
66630  IFS=$as_save_IFS
66631  test -z "$as_dir" && as_dir=.
66632    for ac_exec_ext in '' $ac_executable_extensions; do
66633  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66634    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66635    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66636    break 2
66637  fi
66638done
66639  done
66640IFS=$as_save_IFS
66641
66642  ;;
66643esac
66644fi
66645ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66646if test -n "$ICECC_WRAPPER"; then
66647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66648$as_echo "$ICECC_WRAPPER" >&6; }
66649else
66650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66651$as_echo "no" >&6; }
66652fi
66653
66654
66655          if test "x$ICECC_WRAPPER" = x; then
66656            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66657          fi
66658        else
66659          # Otherwise we believe it is a complete path. Use it as it is.
66660          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
66661$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
66662          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
66663$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
66664          if test ! -x "$tool_specified"; then
66665            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66666$as_echo "not found" >&6; }
66667            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
66668          fi
66669          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66670$as_echo "$tool_specified" >&6; }
66671        fi
66672      fi
66673    fi
66674
66675  fi
66676
66677
66678
66679  if test "x$ICECC_WRAPPER" = x; then
66680    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
66681  fi
66682
66683
66684
66685  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66686      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
66687  if test "$?" != "0"; then
66688    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66689$as_echo "$as_me: icecc-create-env output:" >&6;}
66690    cat ${icecc_create_env_log}
66691    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66692  fi
66693
66694    else
66695      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
66696    fi
66697    PATH="$old_path"
66698    # The bundle with the compiler gets a name based on checksums. Parse log file
66699    # to find it.
66700    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
66701    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
66702    if test ! -f ${ICECC_ENV_BUNDLE}; then
66703      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
66704    fi
66705    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
66706$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
66707    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
66708$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
66709    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
66710
66711    if test "x${COMPILE_TYPE}" = "xcross"; then
66712      # If cross compiling, create a separate env package for the build compiler
66713      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
66714      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
66715      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
66716
66717  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66718      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
66719            ${icecc_create_env_log_build} 2>&1 )
66720  if test "$?" != "0"; then
66721    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66722$as_echo "$as_me: icecc-create-env output:" >&6;}
66723    cat \
66724            ${icecc_create_env_log_build}
66725    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66726  fi
66727
66728      elif test "x${BUILD_CC##*/}" = "xclang"; then
66729
66730  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66731      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
66732  if test "$?" != "0"; then
66733    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66734$as_echo "$as_me: icecc-create-env output:" >&6;}
66735    cat ${icecc_create_env_log_build}
66736    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66737  fi
66738
66739      else
66740        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
66741      fi
66742      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
66743      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
66744      if test ! -f ${ICECC_ENV_BUNDLE}; then
66745        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
66746      fi
66747      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
66748$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
66749      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
66750$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
66751      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
66752          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
66753    else
66754      BUILD_ICECC="${ICECC}"
66755    fi
66756
66757
66758  fi
66759
66760
66761# Can the C/C++ compiler use precompiled headers?
66762
66763
66764  ###############################################################################
66765  #
66766  # Can the C/C++ compiler use precompiled headers?
66767  #
66768  # Check whether --enable-precompiled-headers was given.
66769if test "${enable_precompiled_headers+set}" = set; then :
66770  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
66771else
66772  ENABLE_PRECOMPH=yes
66773fi
66774
66775
66776  USE_PRECOMPILED_HEADER=true
66777  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
66778$as_echo_n "checking If precompiled header is enabled... " >&6; }
66779  if test "x$ENABLE_PRECOMPH" = xno; then
66780    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
66781$as_echo "no, forced" >&6; }
66782    USE_PRECOMPILED_HEADER=false
66783  elif test "x$ICECC" != "x"; then
66784    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
66785$as_echo "no, does not work effectively with icecc" >&6; }
66786    USE_PRECOMPILED_HEADER=false
66787  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
66788    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
66789$as_echo "no, does not work with Solaris Studio" >&6; }
66790    USE_PRECOMPILED_HEADER=false
66791  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
66792    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
66793$as_echo "no, does not work with xlc" >&6; }
66794    USE_PRECOMPILED_HEADER=false
66795  else
66796    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66797$as_echo "yes" >&6; }
66798  fi
66799
66800  if test "x$ENABLE_PRECOMPH" = xyes; then
66801    # Check that the compiler actually supports precomp headers.
66802    if test "x$TOOLCHAIN_TYPE" = xgcc; then
66803      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
66804$as_echo_n "checking that precompiled headers work... " >&6; }
66805      echo "int alfa();" > conftest.h
66806      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
66807      if test ! -f conftest.hpp.gch; then
66808        USE_PRECOMPILED_HEADER=false
66809        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66810$as_echo "no" >&6; }
66811      else
66812        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66813$as_echo "yes" >&6; }
66814      fi
66815      $RM conftest.h conftest.hpp.gch
66816    fi
66817  fi
66818
66819
66820
66821
66822# Setup use of ccache, if available
66823
66824  # Check whether --enable-ccache was given.
66825if test "${enable_ccache+set}" = set; then :
66826  enableval=$enable_ccache;
66827fi
66828
66829
66830  CCACHE_STATUS=
66831  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
66832$as_echo_n "checking is ccache enabled... " >&6; }
66833  if test "x$enable_ccache" = xyes; then
66834    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
66835      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66836$as_echo "yes" >&6; }
66837      OLD_PATH="$PATH"
66838      if test "x$TOOLCHAIN_PATH" != x; then
66839        PATH=$TOOLCHAIN_PATH:$PATH
66840      fi
66841
66842
66843
66844  # Publish this variable in the help.
66845
66846
66847  if [ -z "${CCACHE+x}" ]; then
66848    # The variable is not set by user, try to locate tool using the code snippet
66849    for ac_prog in ccache
66850do
66851  # Extract the first word of "$ac_prog", so it can be a program name with args.
66852set dummy $ac_prog; ac_word=$2
66853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66854$as_echo_n "checking for $ac_word... " >&6; }
66855if ${ac_cv_path_CCACHE+:} false; then :
66856  $as_echo_n "(cached) " >&6
66857else
66858  case $CCACHE in
66859  [\\/]* | ?:[\\/]*)
66860  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66861  ;;
66862  *)
66863  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66864for as_dir in $PATH
66865do
66866  IFS=$as_save_IFS
66867  test -z "$as_dir" && as_dir=.
66868    for ac_exec_ext in '' $ac_executable_extensions; do
66869  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66870    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66871    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66872    break 2
66873  fi
66874done
66875  done
66876IFS=$as_save_IFS
66877
66878  ;;
66879esac
66880fi
66881CCACHE=$ac_cv_path_CCACHE
66882if test -n "$CCACHE"; then
66883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66884$as_echo "$CCACHE" >&6; }
66885else
66886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66887$as_echo "no" >&6; }
66888fi
66889
66890
66891  test -n "$CCACHE" && break
66892done
66893
66894  else
66895    # The variable is set, but is it from the command line or the environment?
66896
66897    # Try to remove the string !CCACHE! from our list.
66898    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
66899    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66900      # If it failed, the variable was not from the command line. Ignore it,
66901      # but warn the user (except for BASH, which is always set by the calling BASH).
66902      if test "xCCACHE" != xBASH; then
66903        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
66904$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
66905      fi
66906      # Try to locate tool using the code snippet
66907      for ac_prog in ccache
66908do
66909  # Extract the first word of "$ac_prog", so it can be a program name with args.
66910set dummy $ac_prog; ac_word=$2
66911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66912$as_echo_n "checking for $ac_word... " >&6; }
66913if ${ac_cv_path_CCACHE+:} false; then :
66914  $as_echo_n "(cached) " >&6
66915else
66916  case $CCACHE in
66917  [\\/]* | ?:[\\/]*)
66918  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66919  ;;
66920  *)
66921  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66922for as_dir in $PATH
66923do
66924  IFS=$as_save_IFS
66925  test -z "$as_dir" && as_dir=.
66926    for ac_exec_ext in '' $ac_executable_extensions; do
66927  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66928    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66929    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66930    break 2
66931  fi
66932done
66933  done
66934IFS=$as_save_IFS
66935
66936  ;;
66937esac
66938fi
66939CCACHE=$ac_cv_path_CCACHE
66940if test -n "$CCACHE"; then
66941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66942$as_echo "$CCACHE" >&6; }
66943else
66944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66945$as_echo "no" >&6; }
66946fi
66947
66948
66949  test -n "$CCACHE" && break
66950done
66951
66952    else
66953      # If it succeeded, then it was overridden by the user. We will use it
66954      # for the tool.
66955
66956      # First remove it from the list of overridden variables, so we can test
66957      # for unknown variables in the end.
66958      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66959
66960      # Check if we try to supply an empty value
66961      if test "x$CCACHE" = x; then
66962        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
66963$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
66964        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66965$as_echo_n "checking for CCACHE... " >&6; }
66966        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66967$as_echo "disabled" >&6; }
66968      else
66969        # Check if the provided tool contains a complete path.
66970        tool_specified="$CCACHE"
66971        tool_basename="${tool_specified##*/}"
66972        if test "x$tool_basename" = "x$tool_specified"; then
66973          # A command without a complete path is provided, search $PATH.
66974          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
66975$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
66976          # Extract the first word of "$tool_basename", so it can be a program name with args.
66977set dummy $tool_basename; ac_word=$2
66978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66979$as_echo_n "checking for $ac_word... " >&6; }
66980if ${ac_cv_path_CCACHE+:} false; then :
66981  $as_echo_n "(cached) " >&6
66982else
66983  case $CCACHE in
66984  [\\/]* | ?:[\\/]*)
66985  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66986  ;;
66987  *)
66988  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66989for as_dir in $PATH
66990do
66991  IFS=$as_save_IFS
66992  test -z "$as_dir" && as_dir=.
66993    for ac_exec_ext in '' $ac_executable_extensions; do
66994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66995    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66997    break 2
66998  fi
66999done
67000  done
67001IFS=$as_save_IFS
67002
67003  ;;
67004esac
67005fi
67006CCACHE=$ac_cv_path_CCACHE
67007if test -n "$CCACHE"; then
67008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
67009$as_echo "$CCACHE" >&6; }
67010else
67011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67012$as_echo "no" >&6; }
67013fi
67014
67015
67016          if test "x$CCACHE" = x; then
67017            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
67018          fi
67019        else
67020          # Otherwise we believe it is a complete path. Use it as it is.
67021          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
67022$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
67023          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
67024$as_echo_n "checking for CCACHE... " >&6; }
67025          if test ! -x "$tool_specified"; then
67026            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
67027$as_echo "not found" >&6; }
67028            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
67029          fi
67030          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
67031$as_echo "$tool_specified" >&6; }
67032        fi
67033      fi
67034    fi
67035
67036  fi
67037
67038
67039
67040  if test "x$CCACHE" = x; then
67041    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
67042  fi
67043
67044
67045      PATH="$OLD_PATH"
67046      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
67047      CCACHE_STATUS="Active ($CCACHE_VERSION)"
67048    else
67049      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67050$as_echo "no" >&6; }
67051      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
67052$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
67053    fi
67054  elif test "x$enable_ccache" = xno; then
67055    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
67056$as_echo "no, explicitly disabled" >&6; }
67057    CCACHE_STATUS="Disabled"
67058  elif test "x$enable_ccache" = x; then
67059    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67060$as_echo "no" >&6; }
67061  else
67062    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
67063$as_echo "unknown" >&6; }
67064    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
67065  fi
67066
67067
67068
67069# Check whether --with-ccache-dir was given.
67070if test "${with_ccache_dir+set}" = set; then :
67071  withval=$with_ccache_dir;
67072fi
67073
67074
67075  if test "x$with_ccache_dir" != x; then
67076    # When using a non home ccache directory, assume the use is to share ccache files
67077    # with other users. Thus change the umask.
67078    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
67079    if test "x$CCACHE" = x; then
67080      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
67081$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
67082    fi
67083  fi
67084
67085  if test "x$CCACHE" != x; then
67086
67087  if test "x$CCACHE" != x; then
67088    if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
67089      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
67090          $GREP -e '^1\.' -e '^2\.' -e '^3\.0\.' -e '^3\.1\.'`
67091      if test "x$HAS_BAD_CCACHE" != "x"; then
67092        as_fn_error $? "On macosx, ccache 3.2 or later is required, found $CCACHE_VERSION" "$LINENO" 5
67093      fi
67094    fi
67095    if test "x$USE_PRECOMPILED_HEADER" = "xtrue"; then
67096      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
67097          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
67098      if test "x$HAS_BAD_CCACHE" != "x"; then
67099        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
67100      fi
67101      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
67102$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
67103      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
67104      PUSHED_FLAGS="$CXXFLAGS"
67105      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
67106      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
67107/* end confdefs.h.  */
67108
67109int
67110main ()
67111{
67112
67113  ;
67114  return 0;
67115}
67116_ACEOF
67117if ac_fn_cxx_try_compile "$LINENO"; then :
67118  CC_KNOWS_CCACHE_TRICK=yes
67119else
67120  CC_KNOWS_CCACHE_TRICK=no
67121fi
67122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
67123      CXXFLAGS="$PUSHED_FLAGS"
67124      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
67125        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67126$as_echo "yes" >&6; }
67127        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
67128
67129        CCACHE_SLOPPINESS=pch_defines,time_macros
67130      else
67131        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67132$as_echo "no" >&6; }
67133        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
67134      fi
67135    fi
67136
67137    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
67138        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
67139
67140    if test "x$SET_CCACHE_DIR" != x; then
67141      mkdir -p $CCACHE_DIR > /dev/null 2>&1
67142      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
67143    fi
67144  fi
67145
67146  fi
67147
67148
67149###############################################################################
67150#
67151# And now the finish...
67152#
67153###############################################################################
67154
67155# Check for some common pitfalls
67156
67157  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
67158    file_to_test="$SRC_ROOT/LICENSE"
67159    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
67160      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
67161    fi
67162  fi
67163
67164
67165  # Did user specify any unknown variables?
67166
67167  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
67168    # Replace the separating ! with spaces before presenting for end user.
67169    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
67170    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
67171$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
67172  fi
67173
67174
67175  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
67176$as_echo_n "checking if build directory is on local disk... " >&6; }
67177
67178  # df -l lists only local disks; if the given directory is not found then
67179  # a non-zero exit code is given
67180  if test "x$DF" = x; then
67181    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
67182      # msys does not have df; use Windows "net use" instead.
67183      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
67184      if test "x$IS_NETWORK_DISK" = x; then
67185        OUTPUT_DIR_IS_LOCAL="yes"
67186      else
67187        OUTPUT_DIR_IS_LOCAL="no"
67188      fi
67189    else
67190      # No df here, say it's local
67191      OUTPUT_DIR_IS_LOCAL="yes"
67192    fi
67193  else
67194    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
67195      OUTPUT_DIR_IS_LOCAL="yes"
67196    else
67197      OUTPUT_DIR_IS_LOCAL="no"
67198    fi
67199  fi
67200
67201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
67202$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
67203
67204
67205
67206  # Check if the user has any old-style ALT_ variables set.
67207  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
67208
67209  # Before generating output files, test if they exist. If they do, this is a reconfigure.
67210  # Since we can't properly handle the dependencies for this, warn the user about the situation
67211  if test -e $OUTPUT_ROOT/spec.gmk; then
67212    IS_RECONFIGURE=yes
67213  else
67214    IS_RECONFIGURE=no
67215  fi
67216
67217
67218# At the end, call the custom hook. (Dummy macro if no custom sources available)
67219
67220
67221# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
67222
67223  # Keep feature lists sorted and free of duplicates
67224  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
67225  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
67226  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
67227  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
67228  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
67229  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
67230  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
67231
67232  # Validate features
67233  for variant in $JVM_VARIANTS; do
67234    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
67235$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
67236    features_var_name=JVM_FEATURES_$variant
67237    JVM_FEATURES_TO_TEST=${!features_var_name}
67238    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
67239$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
67240    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
67241    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
67242    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
67243    if test "x$INVALID_FEATURES" != x; then
67244      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
67245    fi
67246  done
67247
67248
67249# We're messing a bit with internal autoconf variables to put the config.status
67250# in the output directory instead of the current directory.
67251CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
67252
67253# Create the actual output files. Now the main work of configure is done.
67254cat >confcache <<\_ACEOF
67255# This file is a shell script that caches the results of configure
67256# tests run on this system so they can be shared between configure
67257# scripts and configure runs, see configure's option --config-cache.
67258# It is not useful on other systems.  If it contains results you don't
67259# want to keep, you may remove or edit it.
67260#
67261# config.status only pays attention to the cache file if you give it
67262# the --recheck option to rerun configure.
67263#
67264# `ac_cv_env_foo' variables (set or unset) will be overridden when
67265# loading this file, other *unset* `ac_cv_foo' will be assigned the
67266# following values.
67267
67268_ACEOF
67269
67270# The following way of writing the cache mishandles newlines in values,
67271# but we know of no workaround that is simple, portable, and efficient.
67272# So, we kill variables containing newlines.
67273# Ultrix sh set writes to stderr and can't be redirected directly,
67274# and sets the high bit in the cache file unless we assign to the vars.
67275(
67276  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
67277    eval ac_val=\$$ac_var
67278    case $ac_val in #(
67279    *${as_nl}*)
67280      case $ac_var in #(
67281      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
67282$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
67283      esac
67284      case $ac_var in #(
67285      _ | IFS | as_nl) ;; #(
67286      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
67287      *) { eval $ac_var=; unset $ac_var;} ;;
67288      esac ;;
67289    esac
67290  done
67291
67292  (set) 2>&1 |
67293    case $as_nl`(ac_space=' '; set) 2>&1` in #(
67294    *${as_nl}ac_space=\ *)
67295      # `set' does not quote correctly, so add quotes: double-quote
67296      # substitution turns \\\\ into \\, and sed turns \\ into \.
67297      sed -n \
67298	"s/'/'\\\\''/g;
67299	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
67300      ;; #(
67301    *)
67302      # `set' quotes correctly as required by POSIX, so do not add quotes.
67303      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
67304      ;;
67305    esac |
67306    sort
67307) |
67308  sed '
67309     /^ac_cv_env_/b end
67310     t clear
67311     :clear
67312     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
67313     t end
67314     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
67315     :end' >>confcache
67316if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
67317  if test -w "$cache_file"; then
67318    if test "x$cache_file" != "x/dev/null"; then
67319      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
67320$as_echo "$as_me: updating cache $cache_file" >&6;}
67321      if test ! -f "$cache_file" || test -h "$cache_file"; then
67322	cat confcache >"$cache_file"
67323      else
67324        case $cache_file in #(
67325        */* | ?:*)
67326	  mv -f confcache "$cache_file"$$ &&
67327	  mv -f "$cache_file"$$ "$cache_file" ;; #(
67328        *)
67329	  mv -f confcache "$cache_file" ;;
67330	esac
67331      fi
67332    fi
67333  else
67334    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
67335$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
67336  fi
67337fi
67338rm -f confcache
67339
67340test "x$prefix" = xNONE && prefix=$ac_default_prefix
67341# Let make expand exec_prefix.
67342test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
67343
67344# Transform confdefs.h into DEFS.
67345# Protect against shell expansion while executing Makefile rules.
67346# Protect against Makefile macro expansion.
67347#
67348# If the first sed substitution is executed (which looks for macros that
67349# take arguments), then branch to the quote section.  Otherwise,
67350# look for a macro that doesn't take arguments.
67351ac_script='
67352:mline
67353/\\$/{
67354 N
67355 s,\\\n,,
67356 b mline
67357}
67358t clear
67359:clear
67360s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
67361t quote
67362s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
67363t quote
67364b any
67365:quote
67366s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
67367s/\[/\\&/g
67368s/\]/\\&/g
67369s/\$/$$/g
67370H
67371:any
67372${
67373	g
67374	s/^\n//
67375	s/\n/ /g
67376	p
67377}
67378'
67379DEFS=`sed -n "$ac_script" confdefs.h`
67380
67381
67382ac_libobjs=
67383ac_ltlibobjs=
67384U=
67385for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
67386  # 1. Remove the extension, and $U if already installed.
67387  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
67388  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
67389  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
67390  #    will be set to the directory where LIBOBJS objects are built.
67391  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
67392  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
67393done
67394LIBOBJS=$ac_libobjs
67395
67396LTLIBOBJS=$ac_ltlibobjs
67397
67398
67399
67400: "${CONFIG_STATUS=./config.status}"
67401ac_write_fail=0
67402ac_clean_files_save=$ac_clean_files
67403ac_clean_files="$ac_clean_files $CONFIG_STATUS"
67404{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
67405$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
67406as_write_fail=0
67407cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
67408#! $SHELL
67409# Generated by $as_me.
67410# Run this file to recreate the current configuration.
67411# Compiler output produced by configure, useful for debugging
67412# configure, is in config.log if it exists.
67413
67414debug=false
67415ac_cs_recheck=false
67416ac_cs_silent=false
67417
67418SHELL=\${CONFIG_SHELL-$SHELL}
67419export SHELL
67420_ASEOF
67421cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
67422## -------------------- ##
67423## M4sh Initialization. ##
67424## -------------------- ##
67425
67426# Be more Bourne compatible
67427DUALCASE=1; export DUALCASE # for MKS sh
67428if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
67429  emulate sh
67430  NULLCMD=:
67431  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
67432  # is contrary to our usage.  Disable this feature.
67433  alias -g '${1+"$@"}'='"$@"'
67434  setopt NO_GLOB_SUBST
67435else
67436  case `(set -o) 2>/dev/null` in #(
67437  *posix*) :
67438    set -o posix ;; #(
67439  *) :
67440     ;;
67441esac
67442fi
67443
67444
67445as_nl='
67446'
67447export as_nl
67448# Printing a long string crashes Solaris 7 /usr/bin/printf.
67449as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
67450as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
67451as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
67452# Prefer a ksh shell builtin over an external printf program on Solaris,
67453# but without wasting forks for bash or zsh.
67454if test -z "$BASH_VERSION$ZSH_VERSION" \
67455    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
67456  as_echo='print -r --'
67457  as_echo_n='print -rn --'
67458elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
67459  as_echo='printf %s\n'
67460  as_echo_n='printf %s'
67461else
67462  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
67463    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
67464    as_echo_n='/usr/ucb/echo -n'
67465  else
67466    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
67467    as_echo_n_body='eval
67468      arg=$1;
67469      case $arg in #(
67470      *"$as_nl"*)
67471	expr "X$arg" : "X\\(.*\\)$as_nl";
67472	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67473      esac;
67474      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
67475    '
67476    export as_echo_n_body
67477    as_echo_n='sh -c $as_echo_n_body as_echo'
67478  fi
67479  export as_echo_body
67480  as_echo='sh -c $as_echo_body as_echo'
67481fi
67482
67483# The user is always right.
67484if test "${PATH_SEPARATOR+set}" != set; then
67485  PATH_SEPARATOR=:
67486  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
67487    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
67488      PATH_SEPARATOR=';'
67489  }
67490fi
67491
67492
67493# IFS
67494# We need space, tab and new line, in precisely that order.  Quoting is
67495# there to prevent editors from complaining about space-tab.
67496# (If _AS_PATH_WALK were called with IFS unset, it would disable word
67497# splitting by setting IFS to empty value.)
67498IFS=" ""	$as_nl"
67499
67500# Find who we are.  Look in the path if we contain no directory separator.
67501as_myself=
67502case $0 in #((
67503  *[\\/]* ) as_myself=$0 ;;
67504  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67505for as_dir in $PATH
67506do
67507  IFS=$as_save_IFS
67508  test -z "$as_dir" && as_dir=.
67509    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
67510  done
67511IFS=$as_save_IFS
67512
67513     ;;
67514esac
67515# We did not find ourselves, most probably we were run as `sh COMMAND'
67516# in which case we are not to be found in the path.
67517if test "x$as_myself" = x; then
67518  as_myself=$0
67519fi
67520if test ! -f "$as_myself"; then
67521  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
67522  exit 1
67523fi
67524
67525# Unset variables that we do not need and which cause bugs (e.g. in
67526# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
67527# suppresses any "Segmentation fault" message there.  '((' could
67528# trigger a bug in pdksh 5.2.14.
67529for as_var in BASH_ENV ENV MAIL MAILPATH
67530do eval test x\${$as_var+set} = xset \
67531  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
67532done
67533PS1='$ '
67534PS2='> '
67535PS4='+ '
67536
67537# NLS nuisances.
67538LC_ALL=C
67539export LC_ALL
67540LANGUAGE=C
67541export LANGUAGE
67542
67543# CDPATH.
67544(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
67545
67546
67547# as_fn_error STATUS ERROR [LINENO LOG_FD]
67548# ----------------------------------------
67549# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
67550# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
67551# script with STATUS, using 1 if that was 0.
67552as_fn_error ()
67553{
67554  as_status=$1; test $as_status -eq 0 && as_status=1
67555  if test "$4"; then
67556    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
67557    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
67558  fi
67559  $as_echo "$as_me: error: $2" >&2
67560  as_fn_exit $as_status
67561} # as_fn_error
67562
67563
67564# as_fn_set_status STATUS
67565# -----------------------
67566# Set $? to STATUS, without forking.
67567as_fn_set_status ()
67568{
67569  return $1
67570} # as_fn_set_status
67571
67572# as_fn_exit STATUS
67573# -----------------
67574# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
67575as_fn_exit ()
67576{
67577  set +e
67578  as_fn_set_status $1
67579  exit $1
67580} # as_fn_exit
67581
67582# as_fn_unset VAR
67583# ---------------
67584# Portably unset VAR.
67585as_fn_unset ()
67586{
67587  { eval $1=; unset $1;}
67588}
67589as_unset=as_fn_unset
67590# as_fn_append VAR VALUE
67591# ----------------------
67592# Append the text in VALUE to the end of the definition contained in VAR. Take
67593# advantage of any shell optimizations that allow amortized linear growth over
67594# repeated appends, instead of the typical quadratic growth present in naive
67595# implementations.
67596if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
67597  eval 'as_fn_append ()
67598  {
67599    eval $1+=\$2
67600  }'
67601else
67602  as_fn_append ()
67603  {
67604    eval $1=\$$1\$2
67605  }
67606fi # as_fn_append
67607
67608# as_fn_arith ARG...
67609# ------------------
67610# Perform arithmetic evaluation on the ARGs, and store the result in the
67611# global $as_val. Take advantage of shells that can avoid forks. The arguments
67612# must be portable across $(()) and expr.
67613if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
67614  eval 'as_fn_arith ()
67615  {
67616    as_val=$(( $* ))
67617  }'
67618else
67619  as_fn_arith ()
67620  {
67621    as_val=`expr "$@" || test $? -eq 1`
67622  }
67623fi # as_fn_arith
67624
67625
67626if expr a : '\(a\)' >/dev/null 2>&1 &&
67627   test "X`expr 00001 : '.*\(...\)'`" = X001; then
67628  as_expr=expr
67629else
67630  as_expr=false
67631fi
67632
67633if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
67634  as_basename=basename
67635else
67636  as_basename=false
67637fi
67638
67639if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
67640  as_dirname=dirname
67641else
67642  as_dirname=false
67643fi
67644
67645as_me=`$as_basename -- "$0" ||
67646$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
67647	 X"$0" : 'X\(//\)$' \| \
67648	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
67649$as_echo X/"$0" |
67650    sed '/^.*\/\([^/][^/]*\)\/*$/{
67651	    s//\1/
67652	    q
67653	  }
67654	  /^X\/\(\/\/\)$/{
67655	    s//\1/
67656	    q
67657	  }
67658	  /^X\/\(\/\).*/{
67659	    s//\1/
67660	    q
67661	  }
67662	  s/.*/./; q'`
67663
67664# Avoid depending upon Character Ranges.
67665as_cr_letters='abcdefghijklmnopqrstuvwxyz'
67666as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
67667as_cr_Letters=$as_cr_letters$as_cr_LETTERS
67668as_cr_digits='0123456789'
67669as_cr_alnum=$as_cr_Letters$as_cr_digits
67670
67671ECHO_C= ECHO_N= ECHO_T=
67672case `echo -n x` in #(((((
67673-n*)
67674  case `echo 'xy\c'` in
67675  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
67676  xy)  ECHO_C='\c';;
67677  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
67678       ECHO_T='	';;
67679  esac;;
67680*)
67681  ECHO_N='-n';;
67682esac
67683
67684rm -f conf$$ conf$$.exe conf$$.file
67685if test -d conf$$.dir; then
67686  rm -f conf$$.dir/conf$$.file
67687else
67688  rm -f conf$$.dir
67689  mkdir conf$$.dir 2>/dev/null
67690fi
67691if (echo >conf$$.file) 2>/dev/null; then
67692  if ln -s conf$$.file conf$$ 2>/dev/null; then
67693    as_ln_s='ln -s'
67694    # ... but there are two gotchas:
67695    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
67696    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
67697    # In both cases, we have to default to `cp -pR'.
67698    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
67699      as_ln_s='cp -pR'
67700  elif ln conf$$.file conf$$ 2>/dev/null; then
67701    as_ln_s=ln
67702  else
67703    as_ln_s='cp -pR'
67704  fi
67705else
67706  as_ln_s='cp -pR'
67707fi
67708rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
67709rmdir conf$$.dir 2>/dev/null
67710
67711
67712# as_fn_mkdir_p
67713# -------------
67714# Create "$as_dir" as a directory, including parents if necessary.
67715as_fn_mkdir_p ()
67716{
67717
67718  case $as_dir in #(
67719  -*) as_dir=./$as_dir;;
67720  esac
67721  test -d "$as_dir" || eval $as_mkdir_p || {
67722    as_dirs=
67723    while :; do
67724      case $as_dir in #(
67725      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
67726      *) as_qdir=$as_dir;;
67727      esac
67728      as_dirs="'$as_qdir' $as_dirs"
67729      as_dir=`$as_dirname -- "$as_dir" ||
67730$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67731	 X"$as_dir" : 'X\(//\)[^/]' \| \
67732	 X"$as_dir" : 'X\(//\)$' \| \
67733	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
67734$as_echo X"$as_dir" |
67735    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67736	    s//\1/
67737	    q
67738	  }
67739	  /^X\(\/\/\)[^/].*/{
67740	    s//\1/
67741	    q
67742	  }
67743	  /^X\(\/\/\)$/{
67744	    s//\1/
67745	    q
67746	  }
67747	  /^X\(\/\).*/{
67748	    s//\1/
67749	    q
67750	  }
67751	  s/.*/./; q'`
67752      test -d "$as_dir" && break
67753    done
67754    test -z "$as_dirs" || eval "mkdir $as_dirs"
67755  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
67756
67757
67758} # as_fn_mkdir_p
67759if mkdir -p . 2>/dev/null; then
67760  as_mkdir_p='mkdir -p "$as_dir"'
67761else
67762  test -d ./-p && rmdir ./-p
67763  as_mkdir_p=false
67764fi
67765
67766
67767# as_fn_executable_p FILE
67768# -----------------------
67769# Test if FILE is an executable regular file.
67770as_fn_executable_p ()
67771{
67772  test -f "$1" && test -x "$1"
67773} # as_fn_executable_p
67774as_test_x='test -x'
67775as_executable_p=as_fn_executable_p
67776
67777# Sed expression to map a string onto a valid CPP name.
67778as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
67779
67780# Sed expression to map a string onto a valid variable name.
67781as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
67782
67783
67784exec 6>&1
67785## ----------------------------------- ##
67786## Main body of $CONFIG_STATUS script. ##
67787## ----------------------------------- ##
67788_ASEOF
67789test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
67790
67791cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67792# Save the log message, to keep $0 and so on meaningful, and to
67793# report actual input values of CONFIG_FILES etc. instead of their
67794# values after options handling.
67795ac_log="
67796This file was extended by OpenJDK $as_me jdk9, which was
67797generated by GNU Autoconf 2.69.  Invocation command line was
67798
67799  CONFIG_FILES    = $CONFIG_FILES
67800  CONFIG_HEADERS  = $CONFIG_HEADERS
67801  CONFIG_LINKS    = $CONFIG_LINKS
67802  CONFIG_COMMANDS = $CONFIG_COMMANDS
67803  $ $0 $@
67804
67805on `(hostname || uname -n) 2>/dev/null | sed 1q`
67806"
67807
67808_ACEOF
67809
67810case $ac_config_files in *"
67811"*) set x $ac_config_files; shift; ac_config_files=$*;;
67812esac
67813
67814
67815
67816cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67817# Files that config.status was made for.
67818config_files="$ac_config_files"
67819
67820_ACEOF
67821
67822cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67823ac_cs_usage="\
67824\`$as_me' instantiates files and other configuration actions
67825from templates according to the current configuration.  Unless the files
67826and actions are specified as TAGs, all are instantiated by default.
67827
67828Usage: $0 [OPTION]... [TAG]...
67829
67830  -h, --help       print this help, then exit
67831  -V, --version    print version number and configuration settings, then exit
67832      --config     print configuration, then exit
67833  -q, --quiet, --silent
67834                   do not print progress messages
67835  -d, --debug      don't remove temporary files
67836      --recheck    update $as_me by reconfiguring in the same conditions
67837      --file=FILE[:TEMPLATE]
67838                   instantiate the configuration file FILE
67839
67840Configuration files:
67841$config_files
67842
67843Report bugs to <build-dev@openjdk.java.net>.
67844OpenJDK home page: <http://openjdk.java.net>."
67845
67846_ACEOF
67847cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67848ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
67849ac_cs_version="\\
67850OpenJDK config.status jdk9
67851configured by $0, generated by GNU Autoconf 2.69,
67852  with options \\"\$ac_cs_config\\"
67853
67854Copyright (C) 2012 Free Software Foundation, Inc.
67855This config.status script is free software; the Free Software Foundation
67856gives unlimited permission to copy, distribute and modify it."
67857
67858ac_pwd='$ac_pwd'
67859srcdir='$srcdir'
67860AWK='$AWK'
67861test -n "\$AWK" || AWK=awk
67862_ACEOF
67863
67864cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67865# The default lists apply if the user does not specify any file.
67866ac_need_defaults=:
67867while test $# != 0
67868do
67869  case $1 in
67870  --*=?*)
67871    ac_option=`expr "X$1" : 'X\([^=]*\)='`
67872    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
67873    ac_shift=:
67874    ;;
67875  --*=)
67876    ac_option=`expr "X$1" : 'X\([^=]*\)='`
67877    ac_optarg=
67878    ac_shift=:
67879    ;;
67880  *)
67881    ac_option=$1
67882    ac_optarg=$2
67883    ac_shift=shift
67884    ;;
67885  esac
67886
67887  case $ac_option in
67888  # Handling of the options.
67889  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
67890    ac_cs_recheck=: ;;
67891  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
67892    $as_echo "$ac_cs_version"; exit ;;
67893  --config | --confi | --conf | --con | --co | --c )
67894    $as_echo "$ac_cs_config"; exit ;;
67895  --debug | --debu | --deb | --de | --d | -d )
67896    debug=: ;;
67897  --file | --fil | --fi | --f )
67898    $ac_shift
67899    case $ac_optarg in
67900    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
67901    '') as_fn_error $? "missing file argument" ;;
67902    esac
67903    as_fn_append CONFIG_FILES " '$ac_optarg'"
67904    ac_need_defaults=false;;
67905  --he | --h |  --help | --hel | -h )
67906    $as_echo "$ac_cs_usage"; exit ;;
67907  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
67908  | -silent | --silent | --silen | --sile | --sil | --si | --s)
67909    ac_cs_silent=: ;;
67910
67911  # This is an error.
67912  -*) as_fn_error $? "unrecognized option: \`$1'
67913Try \`$0 --help' for more information." ;;
67914
67915  *) as_fn_append ac_config_targets " $1"
67916     ac_need_defaults=false ;;
67917
67918  esac
67919  shift
67920done
67921
67922ac_configure_extra_args=
67923
67924if $ac_cs_silent; then
67925  exec 6>/dev/null
67926  ac_configure_extra_args="$ac_configure_extra_args --silent"
67927fi
67928
67929_ACEOF
67930cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67931if \$ac_cs_recheck; then
67932  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
67933  shift
67934  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
67935  CONFIG_SHELL='$SHELL'
67936  export CONFIG_SHELL
67937  exec "\$@"
67938fi
67939
67940_ACEOF
67941cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67942exec 5>>config.log
67943{
67944  echo
67945  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
67946## Running $as_me. ##
67947_ASBOX
67948  $as_echo "$ac_log"
67949} >&5
67950
67951_ACEOF
67952cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67953_ACEOF
67954
67955cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67956
67957# Handling of arguments.
67958for ac_config_target in $ac_config_targets
67959do
67960  case $ac_config_target in
67961    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
67962    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
67963    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
67964    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
67965    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
67966
67967  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
67968  esac
67969done
67970
67971
67972# If the user did not use the arguments to specify the items to instantiate,
67973# then the envvar interface is used.  Set only those that are not.
67974# We use the long form for the default assignment because of an extremely
67975# bizarre bug on SunOS 4.1.3.
67976if $ac_need_defaults; then
67977  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
67978fi
67979
67980# Have a temporary directory for convenience.  Make it in the build tree
67981# simply because there is no reason against having it here, and in addition,
67982# creating and moving files from /tmp can sometimes cause problems.
67983# Hook for its removal unless debugging.
67984# Note that there is a small window in which the directory will not be cleaned:
67985# after its creation but before its name has been assigned to `$tmp'.
67986$debug ||
67987{
67988  tmp= ac_tmp=
67989  trap 'exit_status=$?
67990  : "${ac_tmp:=$tmp}"
67991  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
67992' 0
67993  trap 'as_fn_exit 1' 1 2 13 15
67994}
67995# Create a (secure) tmp directory for tmp files.
67996
67997{
67998  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
67999  test -d "$tmp"
68000}  ||
68001{
68002  tmp=./conf$$-$RANDOM
68003  (umask 077 && mkdir "$tmp")
68004} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
68005ac_tmp=$tmp
68006
68007# Set up the scripts for CONFIG_FILES section.
68008# No need to generate them if there are no CONFIG_FILES.
68009# This happens for instance with `./config.status config.h'.
68010if test -n "$CONFIG_FILES"; then
68011
68012
68013ac_cr=`echo X | tr X '\015'`
68014# On cygwin, bash can eat \r inside `` if the user requested igncr.
68015# But we know of no other shell where ac_cr would be empty at this
68016# point, so we can use a bashism as a fallback.
68017if test "x$ac_cr" = x; then
68018  eval ac_cr=\$\'\\r\'
68019fi
68020ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
68021if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
68022  ac_cs_awk_cr='\\r'
68023else
68024  ac_cs_awk_cr=$ac_cr
68025fi
68026
68027echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
68028_ACEOF
68029
68030
68031{
68032  echo "cat >conf$$subs.awk <<_ACEOF" &&
68033  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
68034  echo "_ACEOF"
68035} >conf$$subs.sh ||
68036  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
68037ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
68038ac_delim='%!_!# '
68039for ac_last_try in false false false false false :; do
68040  . ./conf$$subs.sh ||
68041    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
68042
68043  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
68044  if test $ac_delim_n = $ac_delim_num; then
68045    break
68046  elif $ac_last_try; then
68047    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
68048  else
68049    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
68050  fi
68051done
68052rm -f conf$$subs.sh
68053
68054cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68055cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
68056_ACEOF
68057sed -n '
68058h
68059s/^/S["/; s/!.*/"]=/
68060p
68061g
68062s/^[^!]*!//
68063:repl
68064t repl
68065s/'"$ac_delim"'$//
68066t delim
68067:nl
68068h
68069s/\(.\{148\}\)..*/\1/
68070t more1
68071s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
68072p
68073n
68074b repl
68075:more1
68076s/["\\]/\\&/g; s/^/"/; s/$/"\\/
68077p
68078g
68079s/.\{148\}//
68080t nl
68081:delim
68082h
68083s/\(.\{148\}\)..*/\1/
68084t more2
68085s/["\\]/\\&/g; s/^/"/; s/$/"/
68086p
68087b
68088:more2
68089s/["\\]/\\&/g; s/^/"/; s/$/"\\/
68090p
68091g
68092s/.\{148\}//
68093t delim
68094' <conf$$subs.awk | sed '
68095/^[^""]/{
68096  N
68097  s/\n//
68098}
68099' >>$CONFIG_STATUS || ac_write_fail=1
68100rm -f conf$$subs.awk
68101cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68102_ACAWK
68103cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
68104  for (key in S) S_is_set[key] = 1
68105  FS = ""
68106
68107}
68108{
68109  line = $ 0
68110  nfields = split(line, field, "@")
68111  substed = 0
68112  len = length(field[1])
68113  for (i = 2; i < nfields; i++) {
68114    key = field[i]
68115    keylen = length(key)
68116    if (S_is_set[key]) {
68117      value = S[key]
68118      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
68119      len += length(value) + length(field[++i])
68120      substed = 1
68121    } else
68122      len += 1 + keylen
68123  }
68124
68125  print line
68126}
68127
68128_ACAWK
68129_ACEOF
68130cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68131if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
68132  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
68133else
68134  cat
68135fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
68136  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
68137_ACEOF
68138
68139# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
68140# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
68141# trailing colons and then remove the whole line if VPATH becomes empty
68142# (actually we leave an empty line to preserve line numbers).
68143if test "x$srcdir" = x.; then
68144  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
68145h
68146s///
68147s/^/:/
68148s/[	 ]*$/:/
68149s/:\$(srcdir):/:/g
68150s/:\${srcdir}:/:/g
68151s/:@srcdir@:/:/g
68152s/^:*//
68153s/:*$//
68154x
68155s/\(=[	 ]*\).*/\1/
68156G
68157s/\n//
68158s/^[^=]*=[	 ]*$//
68159}'
68160fi
68161
68162cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68163fi # test -n "$CONFIG_FILES"
68164
68165
68166eval set X "  :F $CONFIG_FILES      "
68167shift
68168for ac_tag
68169do
68170  case $ac_tag in
68171  :[FHLC]) ac_mode=$ac_tag; continue;;
68172  esac
68173  case $ac_mode$ac_tag in
68174  :[FHL]*:*);;
68175  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
68176  :[FH]-) ac_tag=-:-;;
68177  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
68178  esac
68179  ac_save_IFS=$IFS
68180  IFS=:
68181  set x $ac_tag
68182  IFS=$ac_save_IFS
68183  shift
68184  ac_file=$1
68185  shift
68186
68187  case $ac_mode in
68188  :L) ac_source=$1;;
68189  :[FH])
68190    ac_file_inputs=
68191    for ac_f
68192    do
68193      case $ac_f in
68194      -) ac_f="$ac_tmp/stdin";;
68195      *) # Look for the file first in the build tree, then in the source tree
68196	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
68197	 # because $ac_f cannot contain `:'.
68198	 test -f "$ac_f" ||
68199	   case $ac_f in
68200	   [\\/$]*) false;;
68201	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
68202	   esac ||
68203	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
68204      esac
68205      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
68206      as_fn_append ac_file_inputs " '$ac_f'"
68207    done
68208
68209    # Let's still pretend it is `configure' which instantiates (i.e., don't
68210    # use $as_me), people would be surprised to read:
68211    #    /* config.h.  Generated by config.status.  */
68212    configure_input='Generated from '`
68213	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
68214	`' by configure.'
68215    if test x"$ac_file" != x-; then
68216      configure_input="$ac_file.  $configure_input"
68217      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
68218$as_echo "$as_me: creating $ac_file" >&6;}
68219    fi
68220    # Neutralize special characters interpreted by sed in replacement strings.
68221    case $configure_input in #(
68222    *\&* | *\|* | *\\* )
68223       ac_sed_conf_input=`$as_echo "$configure_input" |
68224       sed 's/[\\\\&|]/\\\\&/g'`;; #(
68225    *) ac_sed_conf_input=$configure_input;;
68226    esac
68227
68228    case $ac_tag in
68229    *:-:* | *:-) cat >"$ac_tmp/stdin" \
68230      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
68231    esac
68232    ;;
68233  esac
68234
68235  ac_dir=`$as_dirname -- "$ac_file" ||
68236$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
68237	 X"$ac_file" : 'X\(//\)[^/]' \| \
68238	 X"$ac_file" : 'X\(//\)$' \| \
68239	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
68240$as_echo X"$ac_file" |
68241    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
68242	    s//\1/
68243	    q
68244	  }
68245	  /^X\(\/\/\)[^/].*/{
68246	    s//\1/
68247	    q
68248	  }
68249	  /^X\(\/\/\)$/{
68250	    s//\1/
68251	    q
68252	  }
68253	  /^X\(\/\).*/{
68254	    s//\1/
68255	    q
68256	  }
68257	  s/.*/./; q'`
68258  as_dir="$ac_dir"; as_fn_mkdir_p
68259  ac_builddir=.
68260
68261case "$ac_dir" in
68262.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
68263*)
68264  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
68265  # A ".." for each directory in $ac_dir_suffix.
68266  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
68267  case $ac_top_builddir_sub in
68268  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
68269  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
68270  esac ;;
68271esac
68272ac_abs_top_builddir=$ac_pwd
68273ac_abs_builddir=$ac_pwd$ac_dir_suffix
68274# for backward compatibility:
68275ac_top_builddir=$ac_top_build_prefix
68276
68277case $srcdir in
68278  .)  # We are building in place.
68279    ac_srcdir=.
68280    ac_top_srcdir=$ac_top_builddir_sub
68281    ac_abs_top_srcdir=$ac_pwd ;;
68282  [\\/]* | ?:[\\/]* )  # Absolute name.
68283    ac_srcdir=$srcdir$ac_dir_suffix;
68284    ac_top_srcdir=$srcdir
68285    ac_abs_top_srcdir=$srcdir ;;
68286  *) # Relative name.
68287    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
68288    ac_top_srcdir=$ac_top_build_prefix$srcdir
68289    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
68290esac
68291ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
68292
68293
68294  case $ac_mode in
68295  :F)
68296  #
68297  # CONFIG_FILE
68298  #
68299
68300_ACEOF
68301
68302cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68303# If the template does not know about datarootdir, expand it.
68304# FIXME: This hack should be removed a few years after 2.60.
68305ac_datarootdir_hack=; ac_datarootdir_seen=
68306ac_sed_dataroot='
68307/datarootdir/ {
68308  p
68309  q
68310}
68311/@datadir@/p
68312/@docdir@/p
68313/@infodir@/p
68314/@localedir@/p
68315/@mandir@/p'
68316case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
68317*datarootdir*) ac_datarootdir_seen=yes;;
68318*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
68319  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
68320$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
68321_ACEOF
68322cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68323  ac_datarootdir_hack='
68324  s&@datadir@&$datadir&g
68325  s&@docdir@&$docdir&g
68326  s&@infodir@&$infodir&g
68327  s&@localedir@&$localedir&g
68328  s&@mandir@&$mandir&g
68329  s&\\\${datarootdir}&$datarootdir&g' ;;
68330esac
68331_ACEOF
68332
68333# Neutralize VPATH when `$srcdir' = `.'.
68334# Shell code in configure.ac might set extrasub.
68335# FIXME: do we really want to maintain this feature?
68336cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68337ac_sed_extra="$ac_vpsub
68338$extrasub
68339_ACEOF
68340cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68341:t
68342/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
68343s|@configure_input@|$ac_sed_conf_input|;t t
68344s&@top_builddir@&$ac_top_builddir_sub&;t t
68345s&@top_build_prefix@&$ac_top_build_prefix&;t t
68346s&@srcdir@&$ac_srcdir&;t t
68347s&@abs_srcdir@&$ac_abs_srcdir&;t t
68348s&@top_srcdir@&$ac_top_srcdir&;t t
68349s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
68350s&@builddir@&$ac_builddir&;t t
68351s&@abs_builddir@&$ac_abs_builddir&;t t
68352s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
68353$ac_datarootdir_hack
68354"
68355eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
68356  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
68357
68358test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
68359  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
68360  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
68361      "$ac_tmp/out"`; test -z "$ac_out"; } &&
68362  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
68363which seems to be undefined.  Please make sure it is defined" >&5
68364$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
68365which seems to be undefined.  Please make sure it is defined" >&2;}
68366
68367  rm -f "$ac_tmp/stdin"
68368  case $ac_file in
68369  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
68370  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
68371  esac \
68372  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
68373 ;;
68374
68375
68376
68377  esac
68378
68379done # for ac_tag
68380
68381
68382as_fn_exit 0
68383_ACEOF
68384ac_clean_files=$ac_clean_files_save
68385
68386test $ac_write_fail = 0 ||
68387  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
68388
68389
68390# configure is writing to config.log, and then calls config.status.
68391# config.status does its own redirection, appending to config.log.
68392# Unfortunately, on DOS this fails, as config.log is still kept open
68393# by configure, so config.status won't be able to write to it; its
68394# output is simply discarded.  So we exec the FD to /dev/null,
68395# effectively closing config.log, so it can be properly (re)opened and
68396# appended to by config.status.  When coming back to configure, we
68397# need to make the FD available again.
68398if test "$no_create" != yes; then
68399  ac_cs_success=:
68400  ac_config_status_args=
68401  test "$silent" = yes &&
68402    ac_config_status_args="$ac_config_status_args --quiet"
68403  exec 5>/dev/null
68404  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
68405  exec 5>>config.log
68406  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
68407  # would make configure fail if this is the last instruction.
68408  $ac_cs_success || as_fn_exit 1
68409fi
68410if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
68411  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
68412$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
68413fi
68414
68415
68416# After AC_OUTPUT, we need to do final work
68417
68418
68419  # Try to move config.log (generated by autoconf) to the configure-support directory.
68420  if test -e ./config.log; then
68421    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
68422  fi
68423
68424  # Rotate our log file (configure.log)
68425  if test -e "$OUTPUT_ROOT/configure.log.old"; then
68426    $RM -f "$OUTPUT_ROOT/configure.log.old"
68427  fi
68428  if test -e "$OUTPUT_ROOT/configure.log"; then
68429    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
68430  fi
68431
68432  # Move configure.log from current directory to the build output root
68433  if test -e ./configure.log; then
68434    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
68435  fi
68436
68437  # Make the compare script executable
68438  $CHMOD +x $OUTPUT_ROOT/compare.sh
68439
68440
68441# Finally output some useful information to the user
68442
68443  # Finally output some useful information to the user
68444
68445  printf "\n"
68446  printf "====================================================\n"
68447  if test "x$no_create" != "xyes"; then
68448    if test "x$IS_RECONFIGURE" != "xyes"; then
68449      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
68450    else
68451      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
68452    fi
68453  else
68454    if test "x$IS_RECONFIGURE" != "xyes"; then
68455      printf "A configuration has been successfully checked but not created\n"
68456    else
68457      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
68458    fi
68459  fi
68460  if test "x$CONFIGURE_COMMAND_LINE" != x; then
68461    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
68462  else
68463    printf "using default settings.\n"
68464  fi
68465
68466  printf "\n"
68467  printf "Configuration summary:\n"
68468  printf "* Debug level:    $DEBUG_LEVEL\n"
68469  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
68470  printf "* JDK variant:    $JDK_VARIANT\n"
68471  printf "* JVM variants:   $JVM_VARIANTS\n"
68472  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
68473  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
68474
68475  printf "\n"
68476  printf "Tools summary:\n"
68477  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
68478    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
68479  fi
68480  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
68481  if test "x$TOOLCHAIN_VERSION" != "x"; then
68482    print_version=" $TOOLCHAIN_VERSION"
68483  fi
68484  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
68485  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
68486  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
68487
68488  printf "\n"
68489  printf "Build performance summary:\n"
68490  printf "* Cores to use:   $JOBS\n"
68491  printf "* Memory limit:   $MEMORY_SIZE MB\n"
68492  if test "x$CCACHE_STATUS" != "x"; then
68493    printf "* ccache status:  $CCACHE_STATUS\n"
68494  fi
68495  printf "\n"
68496
68497  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
68498    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
68499    printf "will result in longer build times.\n"
68500    printf "\n"
68501  fi
68502
68503  if test "x$FOUND_ALT_VARIABLES" != "x"; then
68504    printf "WARNING: You have old-style ALT_ environment variables set.\n"
68505    printf "These are not respected, and will be ignored. It is recommended\n"
68506    printf "that you clean your environment. The following variables are set:\n"
68507    printf "$FOUND_ALT_VARIABLES\n"
68508    printf "\n"
68509  fi
68510
68511  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
68512    printf "WARNING: Your build output directory is not on a local disk.\n"
68513    printf "This will severely degrade build performance!\n"
68514    printf "It is recommended that you create an output directory on a local disk,\n"
68515    printf "and run the configure script again from that directory.\n"
68516    printf "\n"
68517  fi
68518
68519  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
68520    printf "WARNING: The result of this configuration has overridden an older\n"
68521    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
68522    printf "proper build. Failure to do so might result in strange build problems.\n"
68523    printf "\n"
68524  fi
68525
68526  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
68527    printf "WARNING: The result of this configuration was not saved.\n"
68528    printf "You should run without '--no-create | -n' to create the configuration.\n"
68529    printf "\n"
68530  fi
68531
68532
68533
68534  # Locate config.log.
68535  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
68536    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
68537  elif test -e "./config.log"; then
68538    CONFIG_LOG_PATH="."
68539  fi
68540
68541  if test -e "$CONFIG_LOG_PATH/config.log"; then
68542    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
68543    if test $? -eq 0; then
68544      printf "The following warnings were produced. Repeated here for convenience:\n"
68545      # We must quote sed expression (using []) to stop m4 from eating the [].
68546      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
68547      printf "\n"
68548    fi
68549  fi
68550
68551