generated-configure.sh revision 2527:4106007c9969
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_HEADLESS_ONLY
922DEFAULT_MAKE_TARGET
923OS_VERSION_MICRO
924OS_VERSION_MINOR
925OS_VERSION_MAJOR
926PKG_CONFIG
927BASH_ARGS
928SETFILE
929CODESIGN
930XATTR
931DSYMUTIL
932IS_GNU_TIME
933PATCH
934DTRACE
935TIME
936STAT
937HG
938READELF
939OTOOL
940LDD
941ZIPEXE
942UNZIP
943TAR_SUPPORTS_TRANSFORM
944TAR_INCLUDE_PARAM
945TAR_CREATE_EXTRA_PARAM
946TAR_TYPE
947FIND_DELETE
948OUTPUT_SYNC
949OUTPUT_SYNC_SUPPORTED
950CHECK_TOOLSDIR_MAKE
951CHECK_TOOLSDIR_GMAKE
952CHECK_MAKE
953CHECK_GMAKE
954MAKE
955PKGHANDLER
956CONFIGURESUPPORT_OUTPUTDIR
957OUTPUT_ROOT
958CONF_NAME
959SPEC
960SDKROOT
961XCODEBUILD
962JVM_VARIANT_MAIN
963VALID_JVM_VARIANTS
964JVM_VARIANTS
965DEBUG_LEVEL
966HOTSPOT_DEBUG_LEVEL
967JDK_VARIANT
968USERNAME
969CANONICAL_TOPDIR
970ORIGINAL_TOPDIR
971TOPDIR
972PATH_SEP
973HOTSPOT_BUILD_CPU_DEFINE
974HOTSPOT_BUILD_CPU_ARCH
975HOTSPOT_BUILD_CPU
976HOTSPOT_BUILD_OS_TYPE
977HOTSPOT_BUILD_OS
978OPENJDK_BUILD_BUNDLE_PLATFORM
979OPENJDK_BUILD_OS_EXPORT_DIR
980OPENJDK_BUILD_CPU_OSARCH
981OPENJDK_BUILD_CPU_ISADIR
982OPENJDK_BUILD_CPU_LEGACY_LIB
983OPENJDK_BUILD_CPU_LEGACY
984HOTSPOT_TARGET_CPU_DEFINE
985HOTSPOT_TARGET_CPU_ARCH
986HOTSPOT_TARGET_CPU
987HOTSPOT_TARGET_OS_TYPE
988HOTSPOT_TARGET_OS
989DEFINE_CROSS_COMPILE_ARCH
990OPENJDK_TARGET_BUNDLE_PLATFORM
991OPENJDK_TARGET_OS_EXPORT_DIR
992OPENJDK_TARGET_CPU_OSARCH
993OPENJDK_TARGET_CPU_ISADIR
994OPENJDK_TARGET_CPU_LEGACY_LIB
995OPENJDK_TARGET_CPU_LEGACY
996REQUIRED_OS_VERSION
997REQUIRED_OS_NAME
998COMPILE_TYPE
999OPENJDK_TARGET_CPU_ENDIAN
1000OPENJDK_TARGET_CPU_BITS
1001OPENJDK_TARGET_CPU_ARCH
1002OPENJDK_TARGET_CPU
1003OPENJDK_TARGET_OS_ENV
1004OPENJDK_TARGET_OS_TYPE
1005OPENJDK_TARGET_OS
1006OPENJDK_BUILD_CPU_ENDIAN
1007OPENJDK_BUILD_CPU_BITS
1008OPENJDK_BUILD_CPU_ARCH
1009OPENJDK_BUILD_CPU
1010OPENJDK_BUILD_OS_ENV
1011OPENJDK_BUILD_OS_TYPE
1012OPENJDK_BUILD_OS
1013OPENJDK_BUILD_AUTOCONF_NAME
1014OPENJDK_TARGET_AUTOCONF_NAME
1015target_os
1016target_vendor
1017target_cpu
1018target
1019host_os
1020host_vendor
1021host_cpu
1022host
1023build_os
1024build_vendor
1025build_cpu
1026build
1027NICE
1028CPIO
1029DF
1030READLINK
1031CYGPATH
1032SED
1033FGREP
1034EGREP
1035GREP
1036AWK
1037XARGS
1038WHICH
1039WC
1040UNIQ
1041UNAME
1042TR
1043TOUCH
1044TEE
1045TAR
1046TAIL
1047SORT
1048SH
1049RMDIR
1050RM
1051PRINTF
1052NAWK
1053MV
1054MKTEMP
1055MKDIR
1056LS
1057LN
1058GZIP
1059GUNZIP
1060HEAD
1061FIND
1062FILE
1063EXPR
1064ECHO
1065DIRNAME
1066DIFF
1067DATE
1068CUT
1069CP
1070COMM
1071CMP
1072CHMOD
1073CAT
1074BASH
1075BASENAME
1076DATE_WHEN_CONFIGURED
1077ORIGINAL_PATH
1078CONFIGURE_COMMAND_LINE
1079target_alias
1080host_alias
1081build_alias
1082LIBS
1083ECHO_T
1084ECHO_N
1085ECHO_C
1086DEFS
1087mandir
1088localedir
1089libdir
1090psdir
1091pdfdir
1092dvidir
1093htmldir
1094infodir
1095docdir
1096oldincludedir
1097includedir
1098localstatedir
1099sharedstatedir
1100sysconfdir
1101datadir
1102datarootdir
1103libexecdir
1104sbindir
1105bindir
1106program_transform_name
1107prefix
1108exec_prefix
1109PACKAGE_URL
1110PACKAGE_BUGREPORT
1111PACKAGE_STRING
1112PACKAGE_VERSION
1113PACKAGE_TARNAME
1114PACKAGE_NAME
1115PATH_SEPARATOR
1116SHELL'
1117ac_subst_files=''
1118ac_user_opts='
1119enable_option_checking
1120with_target_bits
1121enable_openjdk_only
1122with_custom_make_dir
1123with_jdk_variant
1124enable_debug
1125with_debug_level
1126with_jvm_variants
1127with_cpu_port
1128with_devkit
1129with_sys_root
1130with_sysroot
1131with_tools_dir
1132with_toolchain_path
1133with_extra_path
1134with_sdk_name
1135with_conf_name
1136with_output_sync
1137with_default_make_target
1138enable_headless_only
1139with_cacerts_file
1140enable_unlimited_crypto
1141with_copyright_year
1142enable_keep_packaged_modules
1143with_milestone
1144with_update_version
1145with_user_release_suffix
1146with_build_number
1147with_version_string
1148with_version_pre
1149with_version_opt
1150with_version_build
1151with_version_major
1152with_version_minor
1153with_version_security
1154with_version_patch
1155with_boot_jdk
1156with_build_jdk
1157with_add_source_root
1158with_override_source_root
1159with_adds_and_overrides
1160with_override_langtools
1161with_override_corba
1162with_override_jaxp
1163with_override_jaxws
1164with_override_hotspot
1165with_override_nashorn
1166with_override_jdk
1167with_import_hotspot
1168with_import_modules
1169enable_static_build
1170with_toolchain_type
1171with_extra_cflags
1172with_extra_cxxflags
1173with_extra_ldflags
1174with_toolchain_version
1175with_build_devkit
1176with_jtreg
1177with_abi_profile
1178enable_warnings_as_errors
1179with_native_debug_symbols
1180enable_debug_symbols
1181enable_zip_debug_info
1182enable_native_coverage
1183enable_dtrace
1184enable_aot
1185enable_hotspot_gtest
1186with_stdc__lib
1187with_msvcr_dll
1188with_msvcp_dll
1189with_x
1190with_cups
1191with_cups_include
1192with_freetype
1193with_freetype_include
1194with_freetype_lib
1195with_freetype_src
1196enable_freetype_bundling
1197with_alsa
1198with_alsa_include
1199with_alsa_lib
1200with_libffi
1201with_libffi_include
1202with_libffi_lib
1203enable_libffi_bundling
1204with_libjpeg
1205with_giflib
1206with_libpng
1207with_zlib
1208with_lcms
1209with_dxsdk
1210with_dxsdk_lib
1211with_dxsdk_include
1212with_libelf
1213with_libelf_include
1214with_libelf_lib
1215with_jvm_features
1216with_jvm_interpreter
1217enable_jtreg_failure_handler
1218enable_generate_classlist
1219with_num_cores
1220with_memory_size
1221with_jobs
1222with_test_jobs
1223with_boot_jdk_jvmargs
1224with_sjavac_server_java
1225enable_sjavac
1226enable_javac_server
1227enable_icecc
1228enable_precompiled_headers
1229enable_ccache
1230with_ccache_dir
1231'
1232      ac_precious_vars='build_alias
1233host_alias
1234target_alias
1235BASENAME
1236BASH
1237CAT
1238CHMOD
1239CMP
1240COMM
1241CP
1242CUT
1243DATE
1244DIFF
1245DIRNAME
1246ECHO
1247EXPR
1248FILE
1249FIND
1250HEAD
1251GUNZIP
1252GZIP
1253LN
1254LS
1255MKDIR
1256MKTEMP
1257MV
1258NAWK
1259PRINTF
1260RM
1261RMDIR
1262SH
1263SORT
1264TAIL
1265TAR
1266TEE
1267TOUCH
1268TR
1269UNAME
1270UNIQ
1271WC
1272WHICH
1273XARGS
1274AWK
1275GREP
1276EGREP
1277FGREP
1278SED
1279CYGPATH
1280READLINK
1281DF
1282CPIO
1283NICE
1284MAKE
1285UNZIP
1286ZIPEXE
1287LDD
1288OTOOL
1289READELF
1290HG
1291STAT
1292TIME
1293DTRACE
1294PATCH
1295DSYMUTIL
1296XATTR
1297CODESIGN
1298SETFILE
1299PKG_CONFIG
1300JAVA
1301JAVAC
1302JAVAH
1303JAR
1304JARSIGNER
1305CC
1306CFLAGS
1307LDFLAGS
1308LIBS
1309CPPFLAGS
1310CXX
1311CXXFLAGS
1312CCC
1313CPP
1314CXXCPP
1315AS
1316AR
1317LIPO
1318STRIP
1319NM
1320GNM
1321OBJCOPY
1322OBJDUMP
1323BUILD_CC
1324BUILD_CXX
1325BUILD_NM
1326BUILD_AR
1327BUILD_OBJCOPY
1328BUILD_STRIP
1329JTREGEXE
1330XMKMF
1331FREETYPE_CFLAGS
1332FREETYPE_LIBS
1333ALSA_CFLAGS
1334ALSA_LIBS
1335LIBFFI_CFLAGS
1336LIBFFI_LIBS
1337PNG_CFLAGS
1338PNG_LIBS
1339LCMS_CFLAGS
1340LCMS_LIBS
1341ELF_CFLAGS
1342ELF_LIBS
1343ICECC_CMD
1344ICECC_CREATE_ENV
1345ICECC_WRAPPER
1346CCACHE'
1347
1348
1349# Initialize some variables set by options.
1350ac_init_help=
1351ac_init_version=false
1352ac_unrecognized_opts=
1353ac_unrecognized_sep=
1354# The variables have the same names as the options, with
1355# dashes changed to underlines.
1356cache_file=/dev/null
1357exec_prefix=NONE
1358no_create=
1359no_recursion=
1360prefix=NONE
1361program_prefix=NONE
1362program_suffix=NONE
1363program_transform_name=s,x,x,
1364silent=
1365site=
1366srcdir=
1367verbose=
1368x_includes=NONE
1369x_libraries=NONE
1370
1371# Installation directory options.
1372# These are left unexpanded so users can "make install exec_prefix=/foo"
1373# and all the variables that are supposed to be based on exec_prefix
1374# by default will actually change.
1375# Use braces instead of parens because sh, perl, etc. also accept them.
1376# (The list follows the same order as the GNU Coding Standards.)
1377bindir='${exec_prefix}/bin'
1378sbindir='${exec_prefix}/sbin'
1379libexecdir='${exec_prefix}/libexec'
1380datarootdir='${prefix}/share'
1381datadir='${datarootdir}'
1382sysconfdir='${prefix}/etc'
1383sharedstatedir='${prefix}/com'
1384localstatedir='${prefix}/var'
1385includedir='${prefix}/include'
1386oldincludedir='/usr/include'
1387docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1388infodir='${datarootdir}/info'
1389htmldir='${docdir}'
1390dvidir='${docdir}'
1391pdfdir='${docdir}'
1392psdir='${docdir}'
1393libdir='${exec_prefix}/lib'
1394localedir='${datarootdir}/locale'
1395mandir='${datarootdir}/man'
1396
1397ac_prev=
1398ac_dashdash=
1399for ac_option
1400do
1401  # If the previous option needs an argument, assign it.
1402  if test -n "$ac_prev"; then
1403    eval $ac_prev=\$ac_option
1404    ac_prev=
1405    continue
1406  fi
1407
1408  case $ac_option in
1409  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1410  *=)   ac_optarg= ;;
1411  *)    ac_optarg=yes ;;
1412  esac
1413
1414  # Accept the important Cygnus configure options, so we can diagnose typos.
1415
1416  case $ac_dashdash$ac_option in
1417  --)
1418    ac_dashdash=yes ;;
1419
1420  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1421    ac_prev=bindir ;;
1422  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1423    bindir=$ac_optarg ;;
1424
1425  -build | --build | --buil | --bui | --bu)
1426    ac_prev=build_alias ;;
1427  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1428    build_alias=$ac_optarg ;;
1429
1430  -cache-file | --cache-file | --cache-fil | --cache-fi \
1431  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1432    ac_prev=cache_file ;;
1433  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1434  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1435    cache_file=$ac_optarg ;;
1436
1437  --config-cache | -C)
1438    cache_file=config.cache ;;
1439
1440  -datadir | --datadir | --datadi | --datad)
1441    ac_prev=datadir ;;
1442  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1443    datadir=$ac_optarg ;;
1444
1445  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1446  | --dataroo | --dataro | --datar)
1447    ac_prev=datarootdir ;;
1448  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1449  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1450    datarootdir=$ac_optarg ;;
1451
1452  -disable-* | --disable-*)
1453    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1454    # Reject names that are not valid shell variable names.
1455    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1456      as_fn_error $? "invalid feature name: $ac_useropt"
1457    ac_useropt_orig=$ac_useropt
1458    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1459    case $ac_user_opts in
1460      *"
1461"enable_$ac_useropt"
1462"*) ;;
1463      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1464	 ac_unrecognized_sep=', ';;
1465    esac
1466    eval enable_$ac_useropt=no ;;
1467
1468  -docdir | --docdir | --docdi | --doc | --do)
1469    ac_prev=docdir ;;
1470  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1471    docdir=$ac_optarg ;;
1472
1473  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1474    ac_prev=dvidir ;;
1475  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1476    dvidir=$ac_optarg ;;
1477
1478  -enable-* | --enable-*)
1479    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1480    # Reject names that are not valid shell variable names.
1481    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1482      as_fn_error $? "invalid feature name: $ac_useropt"
1483    ac_useropt_orig=$ac_useropt
1484    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1485    case $ac_user_opts in
1486      *"
1487"enable_$ac_useropt"
1488"*) ;;
1489      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1490	 ac_unrecognized_sep=', ';;
1491    esac
1492    eval enable_$ac_useropt=\$ac_optarg ;;
1493
1494  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1495  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1496  | --exec | --exe | --ex)
1497    ac_prev=exec_prefix ;;
1498  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1499  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1500  | --exec=* | --exe=* | --ex=*)
1501    exec_prefix=$ac_optarg ;;
1502
1503  -gas | --gas | --ga | --g)
1504    # Obsolete; use --with-gas.
1505    with_gas=yes ;;
1506
1507  -help | --help | --hel | --he | -h)
1508    ac_init_help=long ;;
1509  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1510    ac_init_help=recursive ;;
1511  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1512    ac_init_help=short ;;
1513
1514  -host | --host | --hos | --ho)
1515    ac_prev=host_alias ;;
1516  -host=* | --host=* | --hos=* | --ho=*)
1517    host_alias=$ac_optarg ;;
1518
1519  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1520    ac_prev=htmldir ;;
1521  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1522  | --ht=*)
1523    htmldir=$ac_optarg ;;
1524
1525  -includedir | --includedir | --includedi | --included | --include \
1526  | --includ | --inclu | --incl | --inc)
1527    ac_prev=includedir ;;
1528  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1529  | --includ=* | --inclu=* | --incl=* | --inc=*)
1530    includedir=$ac_optarg ;;
1531
1532  -infodir | --infodir | --infodi | --infod | --info | --inf)
1533    ac_prev=infodir ;;
1534  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1535    infodir=$ac_optarg ;;
1536
1537  -libdir | --libdir | --libdi | --libd)
1538    ac_prev=libdir ;;
1539  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1540    libdir=$ac_optarg ;;
1541
1542  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1543  | --libexe | --libex | --libe)
1544    ac_prev=libexecdir ;;
1545  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1546  | --libexe=* | --libex=* | --libe=*)
1547    libexecdir=$ac_optarg ;;
1548
1549  -localedir | --localedir | --localedi | --localed | --locale)
1550    ac_prev=localedir ;;
1551  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1552    localedir=$ac_optarg ;;
1553
1554  -localstatedir | --localstatedir | --localstatedi | --localstated \
1555  | --localstate | --localstat | --localsta | --localst | --locals)
1556    ac_prev=localstatedir ;;
1557  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1558  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1559    localstatedir=$ac_optarg ;;
1560
1561  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1562    ac_prev=mandir ;;
1563  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1564    mandir=$ac_optarg ;;
1565
1566  -nfp | --nfp | --nf)
1567    # Obsolete; use --without-fp.
1568    with_fp=no ;;
1569
1570  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1571  | --no-cr | --no-c | -n)
1572    no_create=yes ;;
1573
1574  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1575  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1576    no_recursion=yes ;;
1577
1578  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1579  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1580  | --oldin | --oldi | --old | --ol | --o)
1581    ac_prev=oldincludedir ;;
1582  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1583  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1584  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1585    oldincludedir=$ac_optarg ;;
1586
1587  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1588    ac_prev=prefix ;;
1589  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1590    prefix=$ac_optarg ;;
1591
1592  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1593  | --program-pre | --program-pr | --program-p)
1594    ac_prev=program_prefix ;;
1595  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1596  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1597    program_prefix=$ac_optarg ;;
1598
1599  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1600  | --program-suf | --program-su | --program-s)
1601    ac_prev=program_suffix ;;
1602  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1603  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1604    program_suffix=$ac_optarg ;;
1605
1606  -program-transform-name | --program-transform-name \
1607  | --program-transform-nam | --program-transform-na \
1608  | --program-transform-n | --program-transform- \
1609  | --program-transform | --program-transfor \
1610  | --program-transfo | --program-transf \
1611  | --program-trans | --program-tran \
1612  | --progr-tra | --program-tr | --program-t)
1613    ac_prev=program_transform_name ;;
1614  -program-transform-name=* | --program-transform-name=* \
1615  | --program-transform-nam=* | --program-transform-na=* \
1616  | --program-transform-n=* | --program-transform-=* \
1617  | --program-transform=* | --program-transfor=* \
1618  | --program-transfo=* | --program-transf=* \
1619  | --program-trans=* | --program-tran=* \
1620  | --progr-tra=* | --program-tr=* | --program-t=*)
1621    program_transform_name=$ac_optarg ;;
1622
1623  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1624    ac_prev=pdfdir ;;
1625  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1626    pdfdir=$ac_optarg ;;
1627
1628  -psdir | --psdir | --psdi | --psd | --ps)
1629    ac_prev=psdir ;;
1630  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1631    psdir=$ac_optarg ;;
1632
1633  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1634  | -silent | --silent | --silen | --sile | --sil)
1635    silent=yes ;;
1636
1637  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1638    ac_prev=sbindir ;;
1639  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1640  | --sbi=* | --sb=*)
1641    sbindir=$ac_optarg ;;
1642
1643  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1644  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1645  | --sharedst | --shareds | --shared | --share | --shar \
1646  | --sha | --sh)
1647    ac_prev=sharedstatedir ;;
1648  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1649  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1650  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1651  | --sha=* | --sh=*)
1652    sharedstatedir=$ac_optarg ;;
1653
1654  -site | --site | --sit)
1655    ac_prev=site ;;
1656  -site=* | --site=* | --sit=*)
1657    site=$ac_optarg ;;
1658
1659  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1660    ac_prev=srcdir ;;
1661  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1662    srcdir=$ac_optarg ;;
1663
1664  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1665  | --syscon | --sysco | --sysc | --sys | --sy)
1666    ac_prev=sysconfdir ;;
1667  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1668  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1669    sysconfdir=$ac_optarg ;;
1670
1671  -target | --target | --targe | --targ | --tar | --ta | --t)
1672    ac_prev=target_alias ;;
1673  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1674    target_alias=$ac_optarg ;;
1675
1676  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1677    verbose=yes ;;
1678
1679  -version | --version | --versio | --versi | --vers | -V)
1680    ac_init_version=: ;;
1681
1682  -with-* | --with-*)
1683    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1684    # Reject names that are not valid shell variable names.
1685    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1686      as_fn_error $? "invalid package name: $ac_useropt"
1687    ac_useropt_orig=$ac_useropt
1688    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1689    case $ac_user_opts in
1690      *"
1691"with_$ac_useropt"
1692"*) ;;
1693      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1694	 ac_unrecognized_sep=', ';;
1695    esac
1696    eval with_$ac_useropt=\$ac_optarg ;;
1697
1698  -without-* | --without-*)
1699    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1700    # Reject names that are not valid shell variable names.
1701    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1702      as_fn_error $? "invalid package name: $ac_useropt"
1703    ac_useropt_orig=$ac_useropt
1704    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1705    case $ac_user_opts in
1706      *"
1707"with_$ac_useropt"
1708"*) ;;
1709      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1710	 ac_unrecognized_sep=', ';;
1711    esac
1712    eval with_$ac_useropt=no ;;
1713
1714  --x)
1715    # Obsolete; use --with-x.
1716    with_x=yes ;;
1717
1718  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1719  | --x-incl | --x-inc | --x-in | --x-i)
1720    ac_prev=x_includes ;;
1721  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1722  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1723    x_includes=$ac_optarg ;;
1724
1725  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1726  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1727    ac_prev=x_libraries ;;
1728  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1729  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1730    x_libraries=$ac_optarg ;;
1731
1732  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1733Try \`$0 --help' for more information"
1734    ;;
1735
1736  *=*)
1737    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1738    # Reject names that are not valid shell variable names.
1739    case $ac_envvar in #(
1740      '' | [0-9]* | *[!_$as_cr_alnum]* )
1741      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1742    esac
1743    eval $ac_envvar=\$ac_optarg
1744    export $ac_envvar ;;
1745
1746  *)
1747    # FIXME: should be removed in autoconf 3.0.
1748    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1749    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1750      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1751    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1752    ;;
1753
1754  esac
1755done
1756
1757if test -n "$ac_prev"; then
1758  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1759  as_fn_error $? "missing argument to $ac_option"
1760fi
1761
1762if test -n "$ac_unrecognized_opts"; then
1763  case $enable_option_checking in
1764    no) ;;
1765    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1766    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1767  esac
1768fi
1769
1770# Check all directory arguments for consistency.
1771for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1772		datadir sysconfdir sharedstatedir localstatedir includedir \
1773		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1774		libdir localedir mandir
1775do
1776  eval ac_val=\$$ac_var
1777  # Remove trailing slashes.
1778  case $ac_val in
1779    */ )
1780      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1781      eval $ac_var=\$ac_val;;
1782  esac
1783  # Be sure to have absolute directory names.
1784  case $ac_val in
1785    [\\/$]* | ?:[\\/]* )  continue;;
1786    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1787  esac
1788  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1789done
1790
1791# There might be people who depend on the old broken behavior: `$host'
1792# used to hold the argument of --host etc.
1793# FIXME: To remove some day.
1794build=$build_alias
1795host=$host_alias
1796target=$target_alias
1797
1798# FIXME: To remove some day.
1799if test "x$host_alias" != x; then
1800  if test "x$build_alias" = x; then
1801    cross_compiling=maybe
1802  elif test "x$build_alias" != "x$host_alias"; then
1803    cross_compiling=yes
1804  fi
1805fi
1806
1807ac_tool_prefix=
1808test -n "$host_alias" && ac_tool_prefix=$host_alias-
1809
1810test "$silent" = yes && exec 6>/dev/null
1811
1812
1813ac_pwd=`pwd` && test -n "$ac_pwd" &&
1814ac_ls_di=`ls -di .` &&
1815ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1816  as_fn_error $? "working directory cannot be determined"
1817test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1818  as_fn_error $? "pwd does not report name of working directory"
1819
1820
1821# Find the source files, if location was not specified.
1822if test -z "$srcdir"; then
1823  ac_srcdir_defaulted=yes
1824  # Try the directory containing this script, then the parent directory.
1825  ac_confdir=`$as_dirname -- "$as_myself" ||
1826$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1827	 X"$as_myself" : 'X\(//\)[^/]' \| \
1828	 X"$as_myself" : 'X\(//\)$' \| \
1829	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1830$as_echo X"$as_myself" |
1831    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1832	    s//\1/
1833	    q
1834	  }
1835	  /^X\(\/\/\)[^/].*/{
1836	    s//\1/
1837	    q
1838	  }
1839	  /^X\(\/\/\)$/{
1840	    s//\1/
1841	    q
1842	  }
1843	  /^X\(\/\).*/{
1844	    s//\1/
1845	    q
1846	  }
1847	  s/.*/./; q'`
1848  srcdir=$ac_confdir
1849  if test ! -r "$srcdir/$ac_unique_file"; then
1850    srcdir=..
1851  fi
1852else
1853  ac_srcdir_defaulted=no
1854fi
1855if test ! -r "$srcdir/$ac_unique_file"; then
1856  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1857  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1858fi
1859ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1860ac_abs_confdir=`(
1861	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1862	pwd)`
1863# When building in place, set srcdir=.
1864if test "$ac_abs_confdir" = "$ac_pwd"; then
1865  srcdir=.
1866fi
1867# Remove unnecessary trailing slashes from srcdir.
1868# Double slashes in file names in object file debugging info
1869# mess up M-x gdb in Emacs.
1870case $srcdir in
1871*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1872esac
1873for ac_var in $ac_precious_vars; do
1874  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1875  eval ac_env_${ac_var}_value=\$${ac_var}
1876  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1877  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1878done
1879
1880#
1881# Report the --help message.
1882#
1883if test "$ac_init_help" = "long"; then
1884  # Omit some internal or obsolete options to make the list less imposing.
1885  # This message is too long to be a string in the A/UX 3.1 sh.
1886  cat <<_ACEOF
1887\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1888
1889Usage: $0 [OPTION]... [VAR=VALUE]...
1890
1891To assign environment variables (e.g., CC, CFLAGS...), specify them as
1892VAR=VALUE.  See below for descriptions of some of the useful variables.
1893
1894Defaults for the options are specified in brackets.
1895
1896Configuration:
1897  -h, --help              display this help and exit
1898      --help=short        display options specific to this package
1899      --help=recursive    display the short help of all the included packages
1900  -V, --version           display version information and exit
1901  -q, --quiet, --silent   do not print \`checking ...' messages
1902      --cache-file=FILE   cache test results in FILE [disabled]
1903  -C, --config-cache      alias for \`--cache-file=config.cache'
1904  -n, --no-create         do not create output files
1905      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1906
1907Installation directories:
1908  --prefix=PREFIX         install architecture-independent files in PREFIX
1909                          [$ac_default_prefix]
1910  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1911                          [PREFIX]
1912
1913By default, \`make install' will install all the files in
1914\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1915an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1916for instance \`--prefix=\$HOME'.
1917
1918For better control, use the options below.
1919
1920Fine tuning of the installation directories:
1921  --bindir=DIR            user executables [EPREFIX/bin]
1922  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1923  --libexecdir=DIR        program executables [EPREFIX/libexec]
1924  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1925  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1926  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1927  --libdir=DIR            object code libraries [EPREFIX/lib]
1928  --includedir=DIR        C header files [PREFIX/include]
1929  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1930  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1931  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1932  --infodir=DIR           info documentation [DATAROOTDIR/info]
1933  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1934  --mandir=DIR            man documentation [DATAROOTDIR/man]
1935  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1936  --htmldir=DIR           html documentation [DOCDIR]
1937  --dvidir=DIR            dvi documentation [DOCDIR]
1938  --pdfdir=DIR            pdf documentation [DOCDIR]
1939  --psdir=DIR             ps documentation [DOCDIR]
1940_ACEOF
1941
1942  cat <<\_ACEOF
1943
1944X features:
1945  --x-includes=DIR    X include files are in DIR
1946  --x-libraries=DIR   X library files are in DIR
1947
1948System types:
1949  --build=BUILD     configure for building on BUILD [guessed]
1950  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1951  --target=TARGET   configure for building compilers for TARGET [HOST]
1952_ACEOF
1953fi
1954
1955if test -n "$ac_init_help"; then
1956  case $ac_init_help in
1957     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1958   esac
1959  cat <<\_ACEOF
1960
1961Optional Features:
1962  --disable-option-checking  ignore unrecognized --enable/--with options
1963  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1964  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1965  --enable-openjdk-only   suppress building custom source even if present
1966                          [disabled]
1967  --enable-debug          set the debug level to fastdebug (shorthand for
1968                          --with-debug-level=fastdebug) [disabled]
1969  --enable-headless-only  only build headless (no GUI) support [disabled]
1970  --disable-unlimited-crypto
1971                          Disable unlimited crypto policy [enabled]
1972  --disable-keep-packaged-modules
1973                          Do not keep packaged modules in jdk image [enable]
1974  --enable-static-build   enable static library build [disabled]
1975  --disable-warnings-as-errors
1976                          do not consider native warnings to be an error
1977                          [enabled]
1978  --enable-debug-symbols  Deprecated. Option is kept for backwards
1979                          compatibility and is ignored
1980  --enable-zip-debug-info Deprecated. Option is kept for backwards
1981                          compatibility and is ignored
1982  --enable-native-coverage
1983                          enable native compilation with code coverage
1984                          data[disabled]
1985  --enable-dtrace[=yes/no/auto]
1986                          enable dtrace. Default is auto, where dtrace is
1987                          enabled if all dependencies are present.
1988  --enable-aot[=yes/no/auto]
1989                          enable ahead of time compilation feature. Default is
1990                          auto, where aot is enabled if all dependencies are
1991                          present.
1992  --disable-hotspot-gtest Disables building of the Hotspot unit tests
1993  --disable-freetype-bundling
1994                          disable bundling of the freetype library with the
1995                          build result [enabled on Windows or when using
1996                          --with-freetype, disabled otherwise]
1997  --enable-libffi-bundling
1998                          enable bundling of libffi.so to make the built JDK
1999                          runnable on more systems
2000  --enable-jtreg-failure-handler
2001                          forces build of the jtreg failure handler to be
2002                          enabled, missing dependencies become fatal errors.
2003                          Default is auto, where the failure handler is built
2004                          if all dependencies are present and otherwise just
2005                          disabled.
2006  --disable-generate-classlist
2007                          forces enabling or disabling of the generation of a
2008                          CDS classlist at build time. Default is to generate
2009                          it when either the server or client JVMs are built.
2010  --enable-sjavac         use sjavac to do fast incremental compiles
2011                          [disabled]
2012  --disable-javac-server  disable javac server [enabled]
2013  --enable-icecc          enable distribted compilation of native code using
2014                          icecc/icecream [disabled]
2015  --disable-precompiled-headers
2016                          disable using precompiled headers when compiling C++
2017                          [enabled]
2018  --enable-ccache         enable using ccache to speed up recompilations
2019                          [disabled]
2020
2021Optional Packages:
2022  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2023  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2024  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2025                          support it), e.g. --with-target-bits=32 [guessed]
2026  --with-custom-make-dir  Deprecated. Option is kept for backwards
2027                          compatibility and is ignored
2028  --with-jdk-variant      JDK variant to build (normal) [normal]
2029  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2030                          optimized) [release]
2031  --with-jvm-variants     JVM variants (separated by commas) to build
2032                          (server,client,minimal,core,zero,zeroshark,custom)
2033                          [server]
2034  --with-cpu-port         specify sources to use for Hotspot 64-bit ARM port
2035                          (arm64,aarch64) [aarch64]
2036  --with-devkit           use this devkit for compilers, tools and resources
2037  --with-sys-root         alias for --with-sysroot for backwards compatability
2038  --with-sysroot          use this directory as sysroot
2039  --with-tools-dir        alias for --with-toolchain-path for backwards
2040                          compatibility
2041  --with-toolchain-path   prepend these directories when searching for
2042                          toolchain binaries (compilers etc)
2043  --with-extra-path       prepend these directories to the default path
2044  --with-sdk-name         use the platform SDK of the given name. [macosx]
2045  --with-conf-name        use this as the name of the configuration [generated
2046                          from important configuration options]
2047  --with-output-sync      set make output sync type if supported by make.
2048                          [recurse]
2049  --with-default-make-target
2050                          set the default make target [exploded-image]
2051  --with-cacerts-file     specify alternative cacerts file
2052  --with-copyright-year   Set copyright year value for build [current year]
2053  --with-milestone        Deprecated. Option is kept for backwards
2054                          compatibility and is ignored
2055  --with-update-version   Deprecated. Option is kept for backwards
2056                          compatibility and is ignored
2057  --with-user-release-suffix
2058                          Deprecated. Option is kept for backwards
2059                          compatibility and is ignored
2060  --with-build-number     Deprecated. Option is kept for backwards
2061                          compatibility and is ignored
2062  --with-version-string   Set version string [calculated]
2063  --with-version-pre      Set the base part of the version 'PRE' field
2064                          (pre-release identifier) ['internal']
2065  --with-version-opt      Set version 'OPT' field (build metadata)
2066                          [<timestamp>.<user>.<dirname>]
2067  --with-version-build    Set version 'BUILD' field (build number) [not
2068                          specified]
2069  --with-version-major    Set version 'MAJOR' field (first number) [current
2070                          source value]
2071  --with-version-minor    Set version 'MINOR' field (second number) [current
2072                          source value]
2073  --with-version-security Set version 'SECURITY' field (third number) [current
2074                          source value]
2075  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2076                          specified]
2077  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2078  --with-build-jdk        path to JDK of same version as is being built[the
2079                          newly built JDK]
2080  --with-add-source-root  Deprecated. Option is kept for backwards
2081                          compatibility and is ignored
2082  --with-override-source-root
2083                          Deprecated. Option is kept for backwards
2084                          compatibility and is ignored
2085  --with-adds-and-overrides
2086                          Deprecated. Option is kept for backwards
2087                          compatibility and is ignored
2088  --with-override-langtools
2089                          Deprecated. Option is kept for backwards
2090                          compatibility and is ignored
2091  --with-override-corba   Deprecated. Option is kept for backwards
2092                          compatibility and is ignored
2093  --with-override-jaxp    Deprecated. Option is kept for backwards
2094                          compatibility and is ignored
2095  --with-override-jaxws   Deprecated. Option is kept for backwards
2096                          compatibility and is ignored
2097  --with-override-hotspot Deprecated. Option is kept for backwards
2098                          compatibility and is ignored
2099  --with-override-nashorn Deprecated. Option is kept for backwards
2100                          compatibility and is ignored
2101  --with-override-jdk     Deprecated. Option is kept for backwards
2102                          compatibility and is ignored
2103  --with-import_hotspot   Deprecated. Option is kept for backwards
2104                          compatibility and is ignored
2105  --with-import-modules   import a set of prebuilt modules either as a zip
2106                          file or an exploded directory
2107  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2108                          to show possible values [platform dependent]
2109  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2110  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2111  --with-extra-ldflags    extra flags to be used when linking jdk
2112  --with-toolchain-version
2113                          the version of the toolchain to look for, use
2114                          '--help' to show possible values [platform
2115                          dependent]
2116  --with-build-devkit     Devkit to use for the build platform toolchain
2117  --with-jtreg            Regression Test Harness [probed]
2118  --with-abi-profile      specify ABI profile for ARM builds
2119                          (arm-vfp-sflt,arm-vfp-hflt,arm-sflt,
2120                          armv5-vfp-sflt,armv6-vfp-hflt,arm64,aarch64)
2121                          [toolchain dependent]
2122  --with-native-debug-symbols
2123                          set the native debug symbol configuration (none,
2124                          internal, external, zipped) [varying]
2125  --with-stdc++lib=<static>,<dynamic>,<default>
2126                          force linking of the C++ runtime on Linux to either
2127                          static or dynamic, default is static with dynamic as
2128                          fallback
2129  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2130                          (Windows only) [probed]
2131  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2132                          (Windows only) [probed]
2133  --with-x                use the X Window System
2134  --with-cups             specify prefix directory for the cups package
2135                          (expecting the headers under PATH/include)
2136  --with-cups-include     specify directory for the cups include files
2137  --with-freetype         specify prefix directory for the freetype package
2138                          (expecting the libraries under PATH/lib and the
2139                          headers under PATH/include)
2140  --with-freetype-include specify directory for the freetype include files
2141  --with-freetype-lib     specify directory for the freetype library
2142  --with-freetype-src     specify directory with freetype sources to
2143                          automatically build the library (experimental,
2144                          Windows-only)
2145  --with-alsa             specify prefix directory for the alsa package
2146                          (expecting the libraries under PATH/lib and the
2147                          headers under PATH/include)
2148  --with-alsa-include     specify directory for the alsa include files
2149  --with-alsa-lib         specify directory for the alsa library
2150  --with-libffi           specify prefix directory for the libffi package
2151                          (expecting the libraries under PATH/lib and the
2152                          headers under PATH/include)
2153  --with-libffi-include   specify directory for the libffi include files
2154  --with-libffi-lib       specify directory for the libffi library
2155  --with-libjpeg          use libjpeg from build system or OpenJDK source
2156                          (system, bundled) [bundled]
2157  --with-giflib           use giflib from build system or OpenJDK source
2158                          (system, bundled) [bundled]
2159  --with-libpng           use libpng from build system or OpenJDK source
2160                          (system, bundled) [bundled]
2161  --with-zlib             use zlib from build system or OpenJDK source
2162                          (system, bundled) [bundled]
2163  --with-lcms             use lcms2 from build system or OpenJDK source
2164                          (system, bundled) [bundled]
2165  --with-dxsdk            Deprecated. Option is kept for backwards
2166                          compatibility and is ignored
2167  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2168                          compatibility and is ignored
2169  --with-dxsdk-include    Deprecated. Option is kept for backwards
2170                          compatibility and is ignored
2171  --with-libelf           specify prefix directory for the libelf package
2172                          (expecting the libraries under PATH/lib and the
2173                          headers under PATH/include)
2174  --with-libelf-include   specify directory for the libelf include files
2175  --with-libelf-lib       specify directory for the libelf library
2176  --with-jvm-features     additional JVM features to enable (separated by
2177                          comma), use '--help' to show possible values [none]
2178  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2179                          compatibility and is ignored
2180  --with-num-cores        number of cores in the build system, e.g.
2181                          --with-num-cores=8 [probed]
2182  --with-memory-size      memory (in MB) available in the build system, e.g.
2183                          --with-memory-size=1024 [probed]
2184  --with-jobs             number of parallel jobs to let make run [calculated
2185                          based on cores and memory]
2186  --with-test-jobs        number of parallel tests jobs to run [based on build
2187                          jobs]
2188  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2189                          invocations of boot JDK, overriding the default
2190                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2191                          -enableassertions"
2192  --with-sjavac-server-java
2193                          use this java binary for running the sjavac
2194                          background server [Boot JDK java]
2195  --with-ccache-dir       where to store ccache files [~/.ccache]
2196
2197Some influential environment variables:
2198  BASENAME    Override default value for BASENAME
2199  BASH        Override default value for BASH
2200  CAT         Override default value for CAT
2201  CHMOD       Override default value for CHMOD
2202  CMP         Override default value for CMP
2203  COMM        Override default value for COMM
2204  CP          Override default value for CP
2205  CUT         Override default value for CUT
2206  DATE        Override default value for DATE
2207  DIFF        Override default value for DIFF
2208  DIRNAME     Override default value for DIRNAME
2209  ECHO        Override default value for ECHO
2210  EXPR        Override default value for EXPR
2211  FILE        Override default value for FILE
2212  FIND        Override default value for FIND
2213  HEAD        Override default value for HEAD
2214  GUNZIP      Override default value for GUNZIP
2215  GZIP        Override default value for GZIP
2216  LN          Override default value for LN
2217  LS          Override default value for LS
2218  MKDIR       Override default value for MKDIR
2219  MKTEMP      Override default value for MKTEMP
2220  MV          Override default value for MV
2221  NAWK        Override default value for NAWK
2222  PRINTF      Override default value for PRINTF
2223  RM          Override default value for RM
2224  RMDIR       Override default value for RMDIR
2225  SH          Override default value for SH
2226  SORT        Override default value for SORT
2227  TAIL        Override default value for TAIL
2228  TAR         Override default value for TAR
2229  TEE         Override default value for TEE
2230  TOUCH       Override default value for TOUCH
2231  TR          Override default value for TR
2232  UNAME       Override default value for UNAME
2233  UNIQ        Override default value for UNIQ
2234  WC          Override default value for WC
2235  WHICH       Override default value for WHICH
2236  XARGS       Override default value for XARGS
2237  AWK         Override default value for AWK
2238  GREP        Override default value for GREP
2239  EGREP       Override default value for EGREP
2240  FGREP       Override default value for FGREP
2241  SED         Override default value for SED
2242  CYGPATH     Override default value for CYGPATH
2243  READLINK    Override default value for READLINK
2244  DF          Override default value for DF
2245  CPIO        Override default value for CPIO
2246  NICE        Override default value for NICE
2247  MAKE        Override default value for MAKE
2248  UNZIP       Override default value for UNZIP
2249  ZIPEXE      Override default value for ZIPEXE
2250  LDD         Override default value for LDD
2251  OTOOL       Override default value for OTOOL
2252  READELF     Override default value for READELF
2253  HG          Override default value for HG
2254  STAT        Override default value for STAT
2255  TIME        Override default value for TIME
2256  DTRACE      Override default value for DTRACE
2257  PATCH       Override default value for PATCH
2258  DSYMUTIL    Override default value for DSYMUTIL
2259  XATTR       Override default value for XATTR
2260  CODESIGN    Override default value for CODESIGN
2261  SETFILE     Override default value for SETFILE
2262  PKG_CONFIG  path to pkg-config utility
2263  JAVA        Override default value for JAVA
2264  JAVAC       Override default value for JAVAC
2265  JAVAH       Override default value for JAVAH
2266  JAR         Override default value for JAR
2267  JARSIGNER   Override default value for JARSIGNER
2268  CC          C compiler command
2269  CFLAGS      C compiler flags
2270  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2271              nonstandard directory <lib dir>
2272  LIBS        libraries to pass to the linker, e.g. -l<library>
2273  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2274              you have headers in a nonstandard directory <include dir>
2275  CXX         C++ compiler command
2276  CXXFLAGS    C++ compiler flags
2277  CPP         C preprocessor
2278  CXXCPP      C++ preprocessor
2279  AS          Override default value for AS
2280  AR          Override default value for AR
2281  LIPO        Override default value for LIPO
2282  STRIP       Override default value for STRIP
2283  NM          Override default value for NM
2284  GNM         Override default value for GNM
2285  OBJCOPY     Override default value for OBJCOPY
2286  OBJDUMP     Override default value for OBJDUMP
2287  BUILD_CC    Override default value for BUILD_CC
2288  BUILD_CXX   Override default value for BUILD_CXX
2289  BUILD_NM    Override default value for BUILD_NM
2290  BUILD_AR    Override default value for BUILD_AR
2291  BUILD_OBJCOPY
2292              Override default value for BUILD_OBJCOPY
2293  BUILD_STRIP Override default value for BUILD_STRIP
2294  JTREGEXE    Override default value for JTREGEXE
2295  XMKMF       Path to xmkmf, Makefile generator for X Window System
2296  FREETYPE_CFLAGS
2297              C compiler flags for FREETYPE, overriding pkg-config
2298  FREETYPE_LIBS
2299              linker flags for FREETYPE, overriding pkg-config
2300  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2301  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2302  LIBFFI_CFLAGS
2303              C compiler flags for LIBFFI, overriding pkg-config
2304  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2305  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2306  PNG_LIBS    linker flags for PNG, overriding pkg-config
2307  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2308  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2309  ELF_CFLAGS  C compiler flags for ELF, overriding pkg-config
2310  ELF_LIBS    linker flags for ELF, overriding pkg-config
2311  ICECC_CMD   Override default value for ICECC_CMD
2312  ICECC_CREATE_ENV
2313              Override default value for ICECC_CREATE_ENV
2314  ICECC_WRAPPER
2315              Override default value for ICECC_WRAPPER
2316  CCACHE      Override default value for CCACHE
2317
2318Use these variables to override the choices made by `configure' or to help
2319it to find libraries and programs with nonstandard names/locations.
2320
2321Report bugs to <build-dev@openjdk.java.net>.
2322OpenJDK home page: <http://openjdk.java.net>.
2323_ACEOF
2324ac_status=$?
2325fi
2326
2327if test "$ac_init_help" = "recursive"; then
2328  # If there are subdirs, report their specific --help.
2329  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2330    test -d "$ac_dir" ||
2331      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2332      continue
2333    ac_builddir=.
2334
2335case "$ac_dir" in
2336.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2337*)
2338  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2339  # A ".." for each directory in $ac_dir_suffix.
2340  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2341  case $ac_top_builddir_sub in
2342  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2343  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2344  esac ;;
2345esac
2346ac_abs_top_builddir=$ac_pwd
2347ac_abs_builddir=$ac_pwd$ac_dir_suffix
2348# for backward compatibility:
2349ac_top_builddir=$ac_top_build_prefix
2350
2351case $srcdir in
2352  .)  # We are building in place.
2353    ac_srcdir=.
2354    ac_top_srcdir=$ac_top_builddir_sub
2355    ac_abs_top_srcdir=$ac_pwd ;;
2356  [\\/]* | ?:[\\/]* )  # Absolute name.
2357    ac_srcdir=$srcdir$ac_dir_suffix;
2358    ac_top_srcdir=$srcdir
2359    ac_abs_top_srcdir=$srcdir ;;
2360  *) # Relative name.
2361    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2362    ac_top_srcdir=$ac_top_build_prefix$srcdir
2363    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2364esac
2365ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2366
2367    cd "$ac_dir" || { ac_status=$?; continue; }
2368    # Check for guested configure.
2369    if test -f "$ac_srcdir/configure.gnu"; then
2370      echo &&
2371      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2372    elif test -f "$ac_srcdir/configure"; then
2373      echo &&
2374      $SHELL "$ac_srcdir/configure" --help=recursive
2375    else
2376      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2377    fi || ac_status=$?
2378    cd "$ac_pwd" || { ac_status=$?; break; }
2379  done
2380fi
2381
2382test -n "$ac_init_help" && exit $ac_status
2383if $ac_init_version; then
2384  cat <<\_ACEOF
2385OpenJDK configure jdk9
2386generated by GNU Autoconf 2.69
2387
2388Copyright (C) 2012 Free Software Foundation, Inc.
2389This configure script is free software; the Free Software Foundation
2390gives unlimited permission to copy, distribute and modify it.
2391_ACEOF
2392  exit
2393fi
2394
2395## ------------------------ ##
2396## Autoconf initialization. ##
2397## ------------------------ ##
2398
2399# ac_fn_c_try_compile LINENO
2400# --------------------------
2401# Try to compile conftest.$ac_ext, and return whether this succeeded.
2402ac_fn_c_try_compile ()
2403{
2404  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2405  rm -f conftest.$ac_objext
2406  if { { ac_try="$ac_compile"
2407case "(($ac_try" in
2408  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2409  *) ac_try_echo=$ac_try;;
2410esac
2411eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2412$as_echo "$ac_try_echo"; } >&5
2413  (eval "$ac_compile") 2>conftest.err
2414  ac_status=$?
2415  if test -s conftest.err; then
2416    grep -v '^ *+' conftest.err >conftest.er1
2417    cat conftest.er1 >&5
2418    mv -f conftest.er1 conftest.err
2419  fi
2420  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2421  test $ac_status = 0; } && {
2422	 test -z "$ac_c_werror_flag" ||
2423	 test ! -s conftest.err
2424       } && test -s conftest.$ac_objext; then :
2425  ac_retval=0
2426else
2427  $as_echo "$as_me: failed program was:" >&5
2428sed 's/^/| /' conftest.$ac_ext >&5
2429
2430	ac_retval=1
2431fi
2432  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2433  as_fn_set_status $ac_retval
2434
2435} # ac_fn_c_try_compile
2436
2437# ac_fn_cxx_try_compile LINENO
2438# ----------------------------
2439# Try to compile conftest.$ac_ext, and return whether this succeeded.
2440ac_fn_cxx_try_compile ()
2441{
2442  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2443  rm -f conftest.$ac_objext
2444  if { { ac_try="$ac_compile"
2445case "(($ac_try" in
2446  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2447  *) ac_try_echo=$ac_try;;
2448esac
2449eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2450$as_echo "$ac_try_echo"; } >&5
2451  (eval "$ac_compile") 2>conftest.err
2452  ac_status=$?
2453  if test -s conftest.err; then
2454    grep -v '^ *+' conftest.err >conftest.er1
2455    cat conftest.er1 >&5
2456    mv -f conftest.er1 conftest.err
2457  fi
2458  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2459  test $ac_status = 0; } && {
2460	 test -z "$ac_cxx_werror_flag" ||
2461	 test ! -s conftest.err
2462       } && test -s conftest.$ac_objext; then :
2463  ac_retval=0
2464else
2465  $as_echo "$as_me: failed program was:" >&5
2466sed 's/^/| /' conftest.$ac_ext >&5
2467
2468	ac_retval=1
2469fi
2470  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2471  as_fn_set_status $ac_retval
2472
2473} # ac_fn_cxx_try_compile
2474
2475# ac_fn_c_try_cpp LINENO
2476# ----------------------
2477# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2478ac_fn_c_try_cpp ()
2479{
2480  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2481  if { { ac_try="$ac_cpp conftest.$ac_ext"
2482case "(($ac_try" in
2483  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2484  *) ac_try_echo=$ac_try;;
2485esac
2486eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2487$as_echo "$ac_try_echo"; } >&5
2488  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2489  ac_status=$?
2490  if test -s conftest.err; then
2491    grep -v '^ *+' conftest.err >conftest.er1
2492    cat conftest.er1 >&5
2493    mv -f conftest.er1 conftest.err
2494  fi
2495  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2496  test $ac_status = 0; } > conftest.i && {
2497	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2498	 test ! -s conftest.err
2499       }; then :
2500  ac_retval=0
2501else
2502  $as_echo "$as_me: failed program was:" >&5
2503sed 's/^/| /' conftest.$ac_ext >&5
2504
2505    ac_retval=1
2506fi
2507  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2508  as_fn_set_status $ac_retval
2509
2510} # ac_fn_c_try_cpp
2511
2512# ac_fn_cxx_try_cpp LINENO
2513# ------------------------
2514# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2515ac_fn_cxx_try_cpp ()
2516{
2517  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2518  if { { ac_try="$ac_cpp conftest.$ac_ext"
2519case "(($ac_try" in
2520  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2521  *) ac_try_echo=$ac_try;;
2522esac
2523eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2524$as_echo "$ac_try_echo"; } >&5
2525  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2526  ac_status=$?
2527  if test -s conftest.err; then
2528    grep -v '^ *+' conftest.err >conftest.er1
2529    cat conftest.er1 >&5
2530    mv -f conftest.er1 conftest.err
2531  fi
2532  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2533  test $ac_status = 0; } > conftest.i && {
2534	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2535	 test ! -s conftest.err
2536       }; then :
2537  ac_retval=0
2538else
2539  $as_echo "$as_me: failed program was:" >&5
2540sed 's/^/| /' conftest.$ac_ext >&5
2541
2542    ac_retval=1
2543fi
2544  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2545  as_fn_set_status $ac_retval
2546
2547} # ac_fn_cxx_try_cpp
2548
2549# ac_fn_c_try_link LINENO
2550# -----------------------
2551# Try to link conftest.$ac_ext, and return whether this succeeded.
2552ac_fn_c_try_link ()
2553{
2554  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2555  rm -f conftest.$ac_objext conftest$ac_exeext
2556  if { { ac_try="$ac_link"
2557case "(($ac_try" in
2558  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2559  *) ac_try_echo=$ac_try;;
2560esac
2561eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2562$as_echo "$ac_try_echo"; } >&5
2563  (eval "$ac_link") 2>conftest.err
2564  ac_status=$?
2565  if test -s conftest.err; then
2566    grep -v '^ *+' conftest.err >conftest.er1
2567    cat conftest.er1 >&5
2568    mv -f conftest.er1 conftest.err
2569  fi
2570  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2571  test $ac_status = 0; } && {
2572	 test -z "$ac_c_werror_flag" ||
2573	 test ! -s conftest.err
2574       } && test -s conftest$ac_exeext && {
2575	 test "$cross_compiling" = yes ||
2576	 test -x conftest$ac_exeext
2577       }; then :
2578  ac_retval=0
2579else
2580  $as_echo "$as_me: failed program was:" >&5
2581sed 's/^/| /' conftest.$ac_ext >&5
2582
2583	ac_retval=1
2584fi
2585  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2586  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2587  # interfere with the next link command; also delete a directory that is
2588  # left behind by Apple's compiler.  We do this before executing the actions.
2589  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2590  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2591  as_fn_set_status $ac_retval
2592
2593} # ac_fn_c_try_link
2594
2595# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2596# ---------------------------------------------------------
2597# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2598# the include files in INCLUDES and setting the cache variable VAR
2599# accordingly.
2600ac_fn_cxx_check_header_mongrel ()
2601{
2602  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2603  if eval \${$3+:} false; then :
2604  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2605$as_echo_n "checking for $2... " >&6; }
2606if eval \${$3+:} false; then :
2607  $as_echo_n "(cached) " >&6
2608fi
2609eval ac_res=\$$3
2610	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2611$as_echo "$ac_res" >&6; }
2612else
2613  # Is the header compilable?
2614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2615$as_echo_n "checking $2 usability... " >&6; }
2616cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2617/* end confdefs.h.  */
2618$4
2619#include <$2>
2620_ACEOF
2621if ac_fn_cxx_try_compile "$LINENO"; then :
2622  ac_header_compiler=yes
2623else
2624  ac_header_compiler=no
2625fi
2626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2628$as_echo "$ac_header_compiler" >&6; }
2629
2630# Is the header present?
2631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2632$as_echo_n "checking $2 presence... " >&6; }
2633cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2634/* end confdefs.h.  */
2635#include <$2>
2636_ACEOF
2637if ac_fn_cxx_try_cpp "$LINENO"; then :
2638  ac_header_preproc=yes
2639else
2640  ac_header_preproc=no
2641fi
2642rm -f conftest.err conftest.i conftest.$ac_ext
2643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2644$as_echo "$ac_header_preproc" >&6; }
2645
2646# So?  What about this header?
2647case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2648  yes:no: )
2649    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2650$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2651    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2652$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2653    ;;
2654  no:yes:* )
2655    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2656$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2657    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2658$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2659    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2660$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2661    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2662$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2663    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2664$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2665( $as_echo "## ----------------------------------------- ##
2666## Report this to build-dev@openjdk.java.net ##
2667## ----------------------------------------- ##"
2668     ) | sed "s/^/$as_me: WARNING:     /" >&2
2669    ;;
2670esac
2671  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2672$as_echo_n "checking for $2... " >&6; }
2673if eval \${$3+:} false; then :
2674  $as_echo_n "(cached) " >&6
2675else
2676  eval "$3=\$ac_header_compiler"
2677fi
2678eval ac_res=\$$3
2679	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2680$as_echo "$ac_res" >&6; }
2681fi
2682  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2683
2684} # ac_fn_cxx_check_header_mongrel
2685
2686# ac_fn_cxx_try_run LINENO
2687# ------------------------
2688# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2689# that executables *can* be run.
2690ac_fn_cxx_try_run ()
2691{
2692  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2693  if { { ac_try="$ac_link"
2694case "(($ac_try" in
2695  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2696  *) ac_try_echo=$ac_try;;
2697esac
2698eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2699$as_echo "$ac_try_echo"; } >&5
2700  (eval "$ac_link") 2>&5
2701  ac_status=$?
2702  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2703  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2704  { { case "(($ac_try" in
2705  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2706  *) ac_try_echo=$ac_try;;
2707esac
2708eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2709$as_echo "$ac_try_echo"; } >&5
2710  (eval "$ac_try") 2>&5
2711  ac_status=$?
2712  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2713  test $ac_status = 0; }; }; then :
2714  ac_retval=0
2715else
2716  $as_echo "$as_me: program exited with status $ac_status" >&5
2717       $as_echo "$as_me: failed program was:" >&5
2718sed 's/^/| /' conftest.$ac_ext >&5
2719
2720       ac_retval=$ac_status
2721fi
2722  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2723  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2724  as_fn_set_status $ac_retval
2725
2726} # ac_fn_cxx_try_run
2727
2728# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2729# ---------------------------------------------------------
2730# Tests whether HEADER exists and can be compiled using the include files in
2731# INCLUDES, setting the cache variable VAR accordingly.
2732ac_fn_cxx_check_header_compile ()
2733{
2734  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2735  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2736$as_echo_n "checking for $2... " >&6; }
2737if eval \${$3+:} false; then :
2738  $as_echo_n "(cached) " >&6
2739else
2740  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2741/* end confdefs.h.  */
2742$4
2743#include <$2>
2744_ACEOF
2745if ac_fn_cxx_try_compile "$LINENO"; then :
2746  eval "$3=yes"
2747else
2748  eval "$3=no"
2749fi
2750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2751fi
2752eval ac_res=\$$3
2753	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2754$as_echo "$ac_res" >&6; }
2755  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2756
2757} # ac_fn_cxx_check_header_compile
2758
2759# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2760# ----------------------------------------------
2761# Tries to find the compile-time value of EXPR in a program that includes
2762# INCLUDES, setting VAR accordingly. Returns whether the value could be
2763# computed
2764ac_fn_cxx_compute_int ()
2765{
2766  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2767  if test "$cross_compiling" = yes; then
2768    # Depending upon the size, compute the lo and hi bounds.
2769cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2770/* end confdefs.h.  */
2771$4
2772int
2773main ()
2774{
2775static int test_array [1 - 2 * !(($2) >= 0)];
2776test_array [0] = 0;
2777return test_array [0];
2778
2779  ;
2780  return 0;
2781}
2782_ACEOF
2783if ac_fn_cxx_try_compile "$LINENO"; then :
2784  ac_lo=0 ac_mid=0
2785  while :; do
2786    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2787/* end confdefs.h.  */
2788$4
2789int
2790main ()
2791{
2792static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2793test_array [0] = 0;
2794return test_array [0];
2795
2796  ;
2797  return 0;
2798}
2799_ACEOF
2800if ac_fn_cxx_try_compile "$LINENO"; then :
2801  ac_hi=$ac_mid; break
2802else
2803  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2804			if test $ac_lo -le $ac_mid; then
2805			  ac_lo= ac_hi=
2806			  break
2807			fi
2808			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2809fi
2810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2811  done
2812else
2813  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2814/* end confdefs.h.  */
2815$4
2816int
2817main ()
2818{
2819static int test_array [1 - 2 * !(($2) < 0)];
2820test_array [0] = 0;
2821return test_array [0];
2822
2823  ;
2824  return 0;
2825}
2826_ACEOF
2827if ac_fn_cxx_try_compile "$LINENO"; then :
2828  ac_hi=-1 ac_mid=-1
2829  while :; do
2830    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2831/* end confdefs.h.  */
2832$4
2833int
2834main ()
2835{
2836static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2837test_array [0] = 0;
2838return test_array [0];
2839
2840  ;
2841  return 0;
2842}
2843_ACEOF
2844if ac_fn_cxx_try_compile "$LINENO"; then :
2845  ac_lo=$ac_mid; break
2846else
2847  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2848			if test $ac_mid -le $ac_hi; then
2849			  ac_lo= ac_hi=
2850			  break
2851			fi
2852			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2853fi
2854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2855  done
2856else
2857  ac_lo= ac_hi=
2858fi
2859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2860fi
2861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2862# Binary search between lo and hi bounds.
2863while test "x$ac_lo" != "x$ac_hi"; do
2864  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2865  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2866/* end confdefs.h.  */
2867$4
2868int
2869main ()
2870{
2871static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2872test_array [0] = 0;
2873return test_array [0];
2874
2875  ;
2876  return 0;
2877}
2878_ACEOF
2879if ac_fn_cxx_try_compile "$LINENO"; then :
2880  ac_hi=$ac_mid
2881else
2882  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2883fi
2884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2885done
2886case $ac_lo in #((
2887?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2888'') ac_retval=1 ;;
2889esac
2890  else
2891    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2892/* end confdefs.h.  */
2893$4
2894static long int longval () { return $2; }
2895static unsigned long int ulongval () { return $2; }
2896#include <stdio.h>
2897#include <stdlib.h>
2898int
2899main ()
2900{
2901
2902  FILE *f = fopen ("conftest.val", "w");
2903  if (! f)
2904    return 1;
2905  if (($2) < 0)
2906    {
2907      long int i = longval ();
2908      if (i != ($2))
2909	return 1;
2910      fprintf (f, "%ld", i);
2911    }
2912  else
2913    {
2914      unsigned long int i = ulongval ();
2915      if (i != ($2))
2916	return 1;
2917      fprintf (f, "%lu", i);
2918    }
2919  /* Do not output a trailing newline, as this causes \r\n confusion
2920     on some platforms.  */
2921  return ferror (f) || fclose (f) != 0;
2922
2923  ;
2924  return 0;
2925}
2926_ACEOF
2927if ac_fn_cxx_try_run "$LINENO"; then :
2928  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2929else
2930  ac_retval=1
2931fi
2932rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2933  conftest.$ac_objext conftest.beam conftest.$ac_ext
2934rm -f conftest.val
2935
2936  fi
2937  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2938  as_fn_set_status $ac_retval
2939
2940} # ac_fn_cxx_compute_int
2941
2942# ac_fn_cxx_try_link LINENO
2943# -------------------------
2944# Try to link conftest.$ac_ext, and return whether this succeeded.
2945ac_fn_cxx_try_link ()
2946{
2947  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2948  rm -f conftest.$ac_objext conftest$ac_exeext
2949  if { { ac_try="$ac_link"
2950case "(($ac_try" in
2951  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2952  *) ac_try_echo=$ac_try;;
2953esac
2954eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2955$as_echo "$ac_try_echo"; } >&5
2956  (eval "$ac_link") 2>conftest.err
2957  ac_status=$?
2958  if test -s conftest.err; then
2959    grep -v '^ *+' conftest.err >conftest.er1
2960    cat conftest.er1 >&5
2961    mv -f conftest.er1 conftest.err
2962  fi
2963  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2964  test $ac_status = 0; } && {
2965	 test -z "$ac_cxx_werror_flag" ||
2966	 test ! -s conftest.err
2967       } && test -s conftest$ac_exeext && {
2968	 test "$cross_compiling" = yes ||
2969	 test -x conftest$ac_exeext
2970       }; then :
2971  ac_retval=0
2972else
2973  $as_echo "$as_me: failed program was:" >&5
2974sed 's/^/| /' conftest.$ac_ext >&5
2975
2976	ac_retval=1
2977fi
2978  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2979  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2980  # interfere with the next link command; also delete a directory that is
2981  # left behind by Apple's compiler.  We do this before executing the actions.
2982  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2983  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2984  as_fn_set_status $ac_retval
2985
2986} # ac_fn_cxx_try_link
2987
2988# ac_fn_cxx_check_func LINENO FUNC VAR
2989# ------------------------------------
2990# Tests whether FUNC exists, setting the cache variable VAR accordingly
2991ac_fn_cxx_check_func ()
2992{
2993  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2994  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2995$as_echo_n "checking for $2... " >&6; }
2996if eval \${$3+:} false; then :
2997  $as_echo_n "(cached) " >&6
2998else
2999  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3000/* end confdefs.h.  */
3001/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3002   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
3003#define $2 innocuous_$2
3004
3005/* System header to define __stub macros and hopefully few prototypes,
3006    which can conflict with char $2 (); below.
3007    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3008    <limits.h> exists even on freestanding compilers.  */
3009
3010#ifdef __STDC__
3011# include <limits.h>
3012#else
3013# include <assert.h>
3014#endif
3015
3016#undef $2
3017
3018/* Override any GCC internal prototype to avoid an error.
3019   Use char because int might match the return type of a GCC
3020   builtin and then its argument prototype would still apply.  */
3021#ifdef __cplusplus
3022extern "C"
3023#endif
3024char $2 ();
3025/* The GNU C library defines this for functions which it implements
3026    to always fail with ENOSYS.  Some functions are actually named
3027    something starting with __ and the normal name is an alias.  */
3028#if defined __stub_$2 || defined __stub___$2
3029choke me
3030#endif
3031
3032int
3033main ()
3034{
3035return $2 ();
3036  ;
3037  return 0;
3038}
3039_ACEOF
3040if ac_fn_cxx_try_link "$LINENO"; then :
3041  eval "$3=yes"
3042else
3043  eval "$3=no"
3044fi
3045rm -f core conftest.err conftest.$ac_objext \
3046    conftest$ac_exeext conftest.$ac_ext
3047fi
3048eval ac_res=\$$3
3049	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3050$as_echo "$ac_res" >&6; }
3051  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3052
3053} # ac_fn_cxx_check_func
3054
3055# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3056# -------------------------------------------------------
3057# Tests whether HEADER exists and can be compiled using the include files in
3058# INCLUDES, setting the cache variable VAR accordingly.
3059ac_fn_c_check_header_compile ()
3060{
3061  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3062  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3063$as_echo_n "checking for $2... " >&6; }
3064if eval \${$3+:} false; then :
3065  $as_echo_n "(cached) " >&6
3066else
3067  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3068/* end confdefs.h.  */
3069$4
3070#include <$2>
3071_ACEOF
3072if ac_fn_c_try_compile "$LINENO"; then :
3073  eval "$3=yes"
3074else
3075  eval "$3=no"
3076fi
3077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3078fi
3079eval ac_res=\$$3
3080	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3081$as_echo "$ac_res" >&6; }
3082  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3083
3084} # ac_fn_c_check_header_compile
3085cat >config.log <<_ACEOF
3086This file contains any messages produced by compilers while
3087running configure, to aid debugging if configure makes a mistake.
3088
3089It was created by OpenJDK $as_me jdk9, which was
3090generated by GNU Autoconf 2.69.  Invocation command line was
3091
3092  $ $0 $@
3093
3094_ACEOF
3095exec 5>>config.log
3096{
3097cat <<_ASUNAME
3098## --------- ##
3099## Platform. ##
3100## --------- ##
3101
3102hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3103uname -m = `(uname -m) 2>/dev/null || echo unknown`
3104uname -r = `(uname -r) 2>/dev/null || echo unknown`
3105uname -s = `(uname -s) 2>/dev/null || echo unknown`
3106uname -v = `(uname -v) 2>/dev/null || echo unknown`
3107
3108/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3109/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3110
3111/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3112/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3113/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3114/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3115/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3116/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3117/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3118
3119_ASUNAME
3120
3121as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3122for as_dir in $PATH
3123do
3124  IFS=$as_save_IFS
3125  test -z "$as_dir" && as_dir=.
3126    $as_echo "PATH: $as_dir"
3127  done
3128IFS=$as_save_IFS
3129
3130} >&5
3131
3132cat >&5 <<_ACEOF
3133
3134
3135## ----------- ##
3136## Core tests. ##
3137## ----------- ##
3138
3139_ACEOF
3140
3141
3142# Keep a trace of the command line.
3143# Strip out --no-create and --no-recursion so they do not pile up.
3144# Strip out --silent because we don't want to record it for future runs.
3145# Also quote any args containing shell meta-characters.
3146# Make two passes to allow for proper duplicate-argument suppression.
3147ac_configure_args=
3148ac_configure_args0=
3149ac_configure_args1=
3150ac_must_keep_next=false
3151for ac_pass in 1 2
3152do
3153  for ac_arg
3154  do
3155    case $ac_arg in
3156    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3157    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3158    | -silent | --silent | --silen | --sile | --sil)
3159      continue ;;
3160    *\'*)
3161      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3162    esac
3163    case $ac_pass in
3164    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3165    2)
3166      as_fn_append ac_configure_args1 " '$ac_arg'"
3167      if test $ac_must_keep_next = true; then
3168	ac_must_keep_next=false # Got value, back to normal.
3169      else
3170	case $ac_arg in
3171	  *=* | --config-cache | -C | -disable-* | --disable-* \
3172	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3173	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3174	  | -with-* | --with-* | -without-* | --without-* | --x)
3175	    case "$ac_configure_args0 " in
3176	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3177	    esac
3178	    ;;
3179	  -* ) ac_must_keep_next=true ;;
3180	esac
3181      fi
3182      as_fn_append ac_configure_args " '$ac_arg'"
3183      ;;
3184    esac
3185  done
3186done
3187{ ac_configure_args0=; unset ac_configure_args0;}
3188{ ac_configure_args1=; unset ac_configure_args1;}
3189
3190# When interrupted or exit'd, cleanup temporary files, and complete
3191# config.log.  We remove comments because anyway the quotes in there
3192# would cause problems or look ugly.
3193# WARNING: Use '\'' to represent an apostrophe within the trap.
3194# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3195trap 'exit_status=$?
3196  # Save into config.log some information that might help in debugging.
3197  {
3198    echo
3199
3200    $as_echo "## ---------------- ##
3201## Cache variables. ##
3202## ---------------- ##"
3203    echo
3204    # The following way of writing the cache mishandles newlines in values,
3205(
3206  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3207    eval ac_val=\$$ac_var
3208    case $ac_val in #(
3209    *${as_nl}*)
3210      case $ac_var in #(
3211      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3212$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3213      esac
3214      case $ac_var in #(
3215      _ | IFS | as_nl) ;; #(
3216      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3217      *) { eval $ac_var=; unset $ac_var;} ;;
3218      esac ;;
3219    esac
3220  done
3221  (set) 2>&1 |
3222    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3223    *${as_nl}ac_space=\ *)
3224      sed -n \
3225	"s/'\''/'\''\\\\'\'''\''/g;
3226	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3227      ;; #(
3228    *)
3229      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3230      ;;
3231    esac |
3232    sort
3233)
3234    echo
3235
3236    $as_echo "## ----------------- ##
3237## Output variables. ##
3238## ----------------- ##"
3239    echo
3240    for ac_var in $ac_subst_vars
3241    do
3242      eval ac_val=\$$ac_var
3243      case $ac_val in
3244      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3245      esac
3246      $as_echo "$ac_var='\''$ac_val'\''"
3247    done | sort
3248    echo
3249
3250    if test -n "$ac_subst_files"; then
3251      $as_echo "## ------------------- ##
3252## File substitutions. ##
3253## ------------------- ##"
3254      echo
3255      for ac_var in $ac_subst_files
3256      do
3257	eval ac_val=\$$ac_var
3258	case $ac_val in
3259	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3260	esac
3261	$as_echo "$ac_var='\''$ac_val'\''"
3262      done | sort
3263      echo
3264    fi
3265
3266    if test -s confdefs.h; then
3267      $as_echo "## ----------- ##
3268## confdefs.h. ##
3269## ----------- ##"
3270      echo
3271      cat confdefs.h
3272      echo
3273    fi
3274    test "$ac_signal" != 0 &&
3275      $as_echo "$as_me: caught signal $ac_signal"
3276    $as_echo "$as_me: exit $exit_status"
3277  } >&5
3278  rm -f core *.core core.conftest.* &&
3279    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3280    exit $exit_status
3281' 0
3282for ac_signal in 1 2 13 15; do
3283  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3284done
3285ac_signal=0
3286
3287# confdefs.h avoids OS command line length limits that DEFS can exceed.
3288rm -f -r conftest* confdefs.h
3289
3290$as_echo "/* confdefs.h */" > confdefs.h
3291
3292# Predefined preprocessor variables.
3293
3294cat >>confdefs.h <<_ACEOF
3295#define PACKAGE_NAME "$PACKAGE_NAME"
3296_ACEOF
3297
3298cat >>confdefs.h <<_ACEOF
3299#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3300_ACEOF
3301
3302cat >>confdefs.h <<_ACEOF
3303#define PACKAGE_VERSION "$PACKAGE_VERSION"
3304_ACEOF
3305
3306cat >>confdefs.h <<_ACEOF
3307#define PACKAGE_STRING "$PACKAGE_STRING"
3308_ACEOF
3309
3310cat >>confdefs.h <<_ACEOF
3311#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3312_ACEOF
3313
3314cat >>confdefs.h <<_ACEOF
3315#define PACKAGE_URL "$PACKAGE_URL"
3316_ACEOF
3317
3318
3319# Let the site file select an alternate cache file if it wants to.
3320# Prefer an explicitly selected file to automatically selected ones.
3321ac_site_file1=NONE
3322ac_site_file2=NONE
3323if test -n "$CONFIG_SITE"; then
3324  # We do not want a PATH search for config.site.
3325  case $CONFIG_SITE in #((
3326    -*)  ac_site_file1=./$CONFIG_SITE;;
3327    */*) ac_site_file1=$CONFIG_SITE;;
3328    *)   ac_site_file1=./$CONFIG_SITE;;
3329  esac
3330elif test "x$prefix" != xNONE; then
3331  ac_site_file1=$prefix/share/config.site
3332  ac_site_file2=$prefix/etc/config.site
3333else
3334  ac_site_file1=$ac_default_prefix/share/config.site
3335  ac_site_file2=$ac_default_prefix/etc/config.site
3336fi
3337for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3338do
3339  test "x$ac_site_file" = xNONE && continue
3340  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3341    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3342$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3343    sed 's/^/| /' "$ac_site_file" >&5
3344    . "$ac_site_file" \
3345      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3346$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3347as_fn_error $? "failed to load site script $ac_site_file
3348See \`config.log' for more details" "$LINENO" 5; }
3349  fi
3350done
3351
3352if test -r "$cache_file"; then
3353  # Some versions of bash will fail to source /dev/null (special files
3354  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3355  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3356    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3357$as_echo "$as_me: loading cache $cache_file" >&6;}
3358    case $cache_file in
3359      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3360      *)                      . "./$cache_file";;
3361    esac
3362  fi
3363else
3364  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3365$as_echo "$as_me: creating cache $cache_file" >&6;}
3366  >$cache_file
3367fi
3368
3369# Check that the precious variables saved in the cache have kept the same
3370# value.
3371ac_cache_corrupted=false
3372for ac_var in $ac_precious_vars; do
3373  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3374  eval ac_new_set=\$ac_env_${ac_var}_set
3375  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3376  eval ac_new_val=\$ac_env_${ac_var}_value
3377  case $ac_old_set,$ac_new_set in
3378    set,)
3379      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3380$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3381      ac_cache_corrupted=: ;;
3382    ,set)
3383      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3384$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3385      ac_cache_corrupted=: ;;
3386    ,);;
3387    *)
3388      if test "x$ac_old_val" != "x$ac_new_val"; then
3389	# differences in whitespace do not lead to failure.
3390	ac_old_val_w=`echo x $ac_old_val`
3391	ac_new_val_w=`echo x $ac_new_val`
3392	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3393	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3394$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3395	  ac_cache_corrupted=:
3396	else
3397	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3398$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3399	  eval $ac_var=\$ac_old_val
3400	fi
3401	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3402$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3403	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3404$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3405      fi;;
3406  esac
3407  # Pass precious variables to config.status.
3408  if test "$ac_new_set" = set; then
3409    case $ac_new_val in
3410    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3411    *) ac_arg=$ac_var=$ac_new_val ;;
3412    esac
3413    case " $ac_configure_args " in
3414      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3415      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3416    esac
3417  fi
3418done
3419if $ac_cache_corrupted; then
3420  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3421$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3422  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3423$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3424  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3425fi
3426## -------------------- ##
3427## Main body of script. ##
3428## -------------------- ##
3429
3430ac_ext=c
3431ac_cpp='$CPP $CPPFLAGS'
3432ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3433ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3434ac_compiler_gnu=$ac_cv_c_compiler_gnu
3435
3436
3437
3438ac_aux_dir=
3439for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3440  if test -f "$ac_dir/install-sh"; then
3441    ac_aux_dir=$ac_dir
3442    ac_install_sh="$ac_aux_dir/install-sh -c"
3443    break
3444  elif test -f "$ac_dir/install.sh"; then
3445    ac_aux_dir=$ac_dir
3446    ac_install_sh="$ac_aux_dir/install.sh -c"
3447    break
3448  elif test -f "$ac_dir/shtool"; then
3449    ac_aux_dir=$ac_dir
3450    ac_install_sh="$ac_aux_dir/shtool install -c"
3451    break
3452  fi
3453done
3454if test -z "$ac_aux_dir"; then
3455  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
3456fi
3457
3458# These three variables are undocumented and unsupported,
3459# and are intended to be withdrawn in a future Autoconf release.
3460# They can cause serious problems if a builder's source tree is in a directory
3461# whose full name contains unusual characters.
3462ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3463ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3464ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3465
3466
3467# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3468
3469#
3470# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3471# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3472#
3473# This code is free software; you can redistribute it and/or modify it
3474# under the terms of the GNU General Public License version 2 only, as
3475# published by the Free Software Foundation.  Oracle designates this
3476# particular file as subject to the "Classpath" exception as provided
3477# by Oracle in the LICENSE file that accompanied this code.
3478#
3479# This code is distributed in the hope that it will be useful, but WITHOUT
3480# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3481# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3482# version 2 for more details (a copy is included in the LICENSE file that
3483# accompanied this code).
3484#
3485# You should have received a copy of the GNU General Public License version
3486# 2 along with this work; if not, write to the Free Software Foundation,
3487# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3488#
3489# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3490# or visit www.oracle.com if you need additional information or have any
3491# questions.
3492#
3493
3494#
3495# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3496#
3497# This program is free software; you can redistribute it and/or modify
3498# it under the terms of the GNU General Public License as published by
3499# the Free Software Foundation; either version 2 of the License, or
3500# (at your option) any later version.
3501#
3502# This program is distributed in the hope that it will be useful, but
3503# WITHOUT ANY WARRANTY; without even the implied warranty of
3504# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3505# General Public License for more details.
3506#
3507# You should have received a copy of the GNU General Public License
3508# along with this program; if not, write to the Free Software
3509# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3510#
3511# As a special exception to the GNU General Public License, if you
3512# distribute this file as part of a program that contains a
3513# configuration script generated by Autoconf, you may include it under
3514# the same distribution terms that you use for the rest of that program.
3515
3516# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3517# ----------------------------------
3518# PKG_PROG_PKG_CONFIG
3519
3520# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3521#
3522# Check to see whether a particular set of modules exists.  Similar
3523# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3524#
3525#
3526# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3527# this or PKG_CHECK_MODULES is called, or make sure to call
3528# PKG_CHECK_EXISTS manually
3529# --------------------------------------------------------------
3530
3531
3532
3533# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3534# ---------------------------------------------
3535# _PKG_CONFIG
3536
3537# _PKG_SHORT_ERRORS_SUPPORTED
3538# -----------------------------
3539# _PKG_SHORT_ERRORS_SUPPORTED
3540
3541
3542# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3543# [ACTION-IF-NOT-FOUND])
3544#
3545#
3546# Note that if there is a possibility the first call to
3547# PKG_CHECK_MODULES might not happen, you should be sure to include an
3548# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3549#
3550#
3551# --------------------------------------------------------------
3552# PKG_CHECK_MODULES
3553
3554
3555# Include these first...
3556#
3557# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3558# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3559#
3560# This code is free software; you can redistribute it and/or modify it
3561# under the terms of the GNU General Public License version 2 only, as
3562# published by the Free Software Foundation.  Oracle designates this
3563# particular file as subject to the "Classpath" exception as provided
3564# by Oracle in the LICENSE file that accompanied this code.
3565#
3566# This code is distributed in the hope that it will be useful, but WITHOUT
3567# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3568# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3569# version 2 for more details (a copy is included in the LICENSE file that
3570# accompanied this code).
3571#
3572# You should have received a copy of the GNU General Public License version
3573# 2 along with this work; if not, write to the Free Software Foundation,
3574# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3575#
3576# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3577# or visit www.oracle.com if you need additional information or have any
3578# questions.
3579#
3580
3581# Create a function/macro that takes a series of named arguments. The call is
3582# similar to AC_DEFUN, but the setup of the function looks like this:
3583# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3584# ... do something
3585#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3586# ])
3587# A star (*) in front of a named argument means that it is required and it's
3588# presence will be verified. To pass e.g. the first value as a normal indexed
3589# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3590# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3591# "ARG_FOO".
3592#
3593# The generated function can be called like this:
3594# MYFUNC(FOO: [foo-val],
3595#     BAR: [
3596#         $ECHO hello world
3597#     ])
3598# Note that the argument value must start on the same line as the argument name.
3599#
3600# Argument 1: Name of the function to define
3601# Argument 2: List of legal named arguments, with a * prefix for required arguments
3602# Argument 3: Argument array to treat as named, typically $@
3603# Argument 4: The main function body
3604
3605
3606# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3607# If so, then append $1 to $2 \
3608# Also set JVM_ARG_OK to true/false depending on outcome.
3609
3610
3611# Appends a string to a path variable, only adding the : when needed.
3612
3613
3614# Prepends a string to a path variable, only adding the : when needed.
3615
3616
3617# This will make sure the given variable points to a full and proper
3618# path. This means:
3619# 1) There will be no spaces in the path. On unix platforms,
3620#    spaces in the path will result in an error. On Windows,
3621#    the path will be rewritten using short-style to be space-free.
3622# 2) The path will be absolute, and it will be in unix-style (on
3623#     cygwin).
3624# $1: The name of the variable to fix
3625
3626
3627# This will make sure the given variable points to a executable
3628# with a full and proper path. This means:
3629# 1) There will be no spaces in the path. On unix platforms,
3630#    spaces in the path will result in an error. On Windows,
3631#    the path will be rewritten using short-style to be space-free.
3632# 2) The path will be absolute, and it will be in unix-style (on
3633#     cygwin).
3634# Any arguments given to the executable is preserved.
3635# If the input variable does not have a directory specification, then
3636# it need to be in the PATH.
3637# $1: The name of the variable to fix
3638
3639
3640
3641
3642# Register a --with argument but mark it as deprecated
3643# $1: The name of the with argument to deprecate, not including --with-
3644
3645
3646# Register a --enable argument but mark it as deprecated
3647# $1: The name of the with argument to deprecate, not including --enable-
3648# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3649# $3: Messages to user.
3650
3651
3652
3653
3654# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3655# $1: variable to check
3656
3657
3658# Check that there are no unprocessed overridden variables left.
3659# If so, they are an incorrect argument and we will exit with an error.
3660
3661
3662# Setup a tool for the given variable. If correctly specified by the user,
3663# use that value, otherwise search for the tool using the supplied code snippet.
3664# $1: variable to set
3665# $2: code snippet to call to look for the tool
3666# $3: code snippet to call if variable was used to find tool
3667
3668
3669# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3670# $1: variable to set
3671# $2: executable name (or list of names) to look for
3672# $3: [path]
3673
3674
3675# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3676# $1: variable to set
3677# $2: executable name (or list of names) to look for
3678
3679
3680# Like BASIC_PATH_PROGS but fails if no tool was found.
3681# $1: variable to set
3682# $2: executable name (or list of names) to look for
3683# $3: [path]
3684
3685
3686# Like BASIC_SETUP_TOOL but fails if no tool was found.
3687# $1: variable to set
3688# $2: autoconf macro to call to look for the special tool
3689
3690
3691# Setup the most fundamental tools that relies on not much else to set up,
3692# but is used by much of the early bootstrap code.
3693
3694
3695# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3696
3697
3698# Evaluates platform specific overrides for devkit variables.
3699# $1: Name of variable
3700
3701
3702
3703
3704
3705
3706#%%% Simple tools %%%
3707
3708# Check if we have found a usable version of make
3709# $1: the path to a potential make binary (or empty)
3710# $2: the description on how we found this
3711
3712
3713
3714
3715# Goes looking for a usable version of GNU make.
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726# Check if build directory is on local disk. If not possible to determine,
3727# we prefer to claim it's local.
3728# Argument 1: directory to test
3729# Argument 2: what to do if it is on local disk
3730# Argument 3: what to do otherwise (remote disk or failure)
3731
3732
3733# Check that source files have basic read permissions set. This might
3734# not be the case in cygwin in certain conditions.
3735
3736
3737
3738
3739# Check for support for specific options in bash
3740
3741
3742################################################################################
3743#
3744# Default make target
3745#
3746
3747
3748# Code to run after AC_OUTPUT
3749
3750
3751#
3752# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3753# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3754#
3755# This code is free software; you can redistribute it and/or modify it
3756# under the terms of the GNU General Public License version 2 only, as
3757# published by the Free Software Foundation.  Oracle designates this
3758# particular file as subject to the "Classpath" exception as provided
3759# by Oracle in the LICENSE file that accompanied this code.
3760#
3761# This code is distributed in the hope that it will be useful, but WITHOUT
3762# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3763# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3764# version 2 for more details (a copy is included in the LICENSE file that
3765# accompanied this code).
3766#
3767# You should have received a copy of the GNU General Public License version
3768# 2 along with this work; if not, write to the Free Software Foundation,
3769# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3770#
3771# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3772# or visit www.oracle.com if you need additional information or have any
3773# questions.
3774#
3775
3776
3777
3778
3779
3780# Helper function which possibly converts a path using DOS-style short mode.
3781# If so, the updated path is stored in $new_path.
3782# $1: The path to check
3783
3784
3785# Helper function which possibly converts a path using DOS-style short mode.
3786# If so, the updated path is stored in $new_path.
3787# $1: The path to check
3788
3789
3790# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3791# and could probably be heavily simplified. However, all changes in this
3792# area tend to need lot of testing in different scenarios, and in lack of
3793# proper unit testing, cleaning this up has not been deemed worth the effort
3794# at the moment.
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3805
3806
3807
3808
3809# ... then the rest
3810#
3811# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3812# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3813#
3814# This code is free software; you can redistribute it and/or modify it
3815# under the terms of the GNU General Public License version 2 only, as
3816# published by the Free Software Foundation.  Oracle designates this
3817# particular file as subject to the "Classpath" exception as provided
3818# by Oracle in the LICENSE file that accompanied this code.
3819#
3820# This code is distributed in the hope that it will be useful, but WITHOUT
3821# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3822# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3823# version 2 for more details (a copy is included in the LICENSE file that
3824# accompanied this code).
3825#
3826# You should have received a copy of the GNU General Public License version
3827# 2 along with this work; if not, write to the Free Software Foundation,
3828# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3829#
3830# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3831# or visit www.oracle.com if you need additional information or have any
3832# questions.
3833#
3834
3835########################################################################
3836# This file handles detection of the Boot JDK. The Boot JDK detection
3837# process has been developed as a response to solve a complex real-world
3838# problem. Initially, it was simple, but it has grown as platform after
3839# platform, idiosyncracy after idiosyncracy has been supported.
3840#
3841# The basic idea is this:
3842# 1) You need an acceptable *) JDK to use as a Boot JDK
3843# 2) There are several ways to locate a JDK, that are mostly platform
3844#    dependent **)
3845# 3) You can have multiple JDKs installed
3846# 4) If possible, configure should try to dig out an acceptable JDK
3847#    automatically, without having to resort to command-line options
3848#
3849# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3850#     javac) and not a JRE, etc.
3851#
3852# **) On Windows we typically use a well-known path.
3853#     On MacOSX we typically use the tool java_home.
3854#     On Linux we typically find javac in the $PATH, and then follow a
3855#     chain of symlinks that often ends up in a real JDK.
3856#
3857# This leads to the code where we check in different ways to locate a
3858# JDK, and if one is found, check if it is acceptable. If not, we print
3859# our reasons for rejecting it (useful when debugging non-working
3860# configure situations) and continue checking the next one.
3861########################################################################
3862
3863# Execute the check given as argument, and verify the result
3864# If the Boot JDK was previously found, do nothing
3865# $1 A command line (typically autoconf macro) to execute
3866
3867
3868# Test: Is bootjdk explicitly set by command line arguments?
3869
3870
3871# Test: Is $JAVA_HOME set?
3872
3873
3874# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3875
3876
3877# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3878# $1: Argument to the java_home binary (optional)
3879
3880
3881# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3882
3883
3884# Look for a jdk in the given path. If there are multiple, try to select the newest.
3885# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3886# $1 = Path to directory containing jdk installations.
3887# $2 = String to append to the found JDK directory to get the proper JDK home
3888
3889
3890# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3891# environmental variable as base for where to look.
3892# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3893
3894
3895# Test: Is there a JDK installed in default, well-known locations?
3896
3897
3898# Check that a command-line tool in the Boot JDK is correct
3899# $1 = name of variable to assign
3900# $2 = name of binary
3901
3902
3903###############################################################################
3904#
3905# We need a Boot JDK to bootstrap the build.
3906#
3907
3908
3909
3910
3911
3912# BUILD_JDK: the location of the latest JDK that can run
3913#   on the host system and supports the target class file version
3914#   generated in this JDK build.  This variable should only be
3915#   used after the launchers are built.
3916#
3917
3918# Execute the check given as argument, and verify the result.
3919# If the JDK was previously found, do nothing.
3920# $1 A command line (typically autoconf macro) to execute
3921
3922
3923# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3924# is different than the host system doing the build (e.g. cross-compilation),
3925# a special BUILD_JDK is built as part of the build process.  An external
3926# prebuilt BUILD_JDK can also be supplied.
3927
3928
3929#
3930# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3931# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3932#
3933# This code is free software; you can redistribute it and/or modify it
3934# under the terms of the GNU General Public License version 2 only, as
3935# published by the Free Software Foundation.  Oracle designates this
3936# particular file as subject to the "Classpath" exception as provided
3937# by Oracle in the LICENSE file that accompanied this code.
3938#
3939# This code is distributed in the hope that it will be useful, but WITHOUT
3940# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3941# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3942# version 2 for more details (a copy is included in the LICENSE file that
3943# accompanied this code).
3944#
3945# You should have received a copy of the GNU General Public License version
3946# 2 along with this work; if not, write to the Free Software Foundation,
3947# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3948#
3949# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3950# or visit www.oracle.com if you need additional information or have any
3951# questions.
3952#
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970################################################################################
3971#
3972# Runs icecc-create-env once and prints the error if it fails
3973#
3974# $1: arguments to icecc-create-env
3975# $2: log file
3976#
3977
3978
3979################################################################################
3980#
3981# Optionally enable distributed compilation of native code using icecc/icecream
3982#
3983
3984
3985
3986
3987
3988
3989
3990#
3991# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3992# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3993#
3994# This code is free software; you can redistribute it and/or modify it
3995# under the terms of the GNU General Public License version 2 only, as
3996# published by the Free Software Foundation.  Oracle designates this
3997# particular file as subject to the "Classpath" exception as provided
3998# by Oracle in the LICENSE file that accompanied this code.
3999#
4000# This code is distributed in the hope that it will be useful, but WITHOUT
4001# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4002# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4003# version 2 for more details (a copy is included in the LICENSE file that
4004# accompanied this code).
4005#
4006# You should have received a copy of the GNU General Public License version
4007# 2 along with this work; if not, write to the Free Software Foundation,
4008# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4009#
4010# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4011# or visit www.oracle.com if you need additional information or have any
4012# questions.
4013#
4014
4015################################################################################
4016#
4017# Setup ABI profile (for arm)
4018#
4019
4020
4021# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4022# corresponding configure arguments instead
4023
4024
4025# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4026# that configure can use them while detecting compilers.
4027# TOOLCHAIN_TYPE is available here.
4028# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4029
4030
4031
4032
4033
4034
4035# Documentation on common flags used for solstudio in HIGHEST.
4036#
4037# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4038#          done with care, there are some assumptions below that need to
4039#          be understood about the use of pointers, and IEEE behavior.
4040#
4041# -fns: Use non-standard floating point mode (not IEEE 754)
4042# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4043# -fsingle: Use single precision floating point with 'float'
4044# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4045#   (Source with excessing pointer casting and data access with mixed
4046#    pointer types are not recommended)
4047# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4048#   (If you expect perfect errno behavior, do not use this)
4049# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4050# -xrestrict: Pointer parameters to functions do not overlap
4051#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4052#    If you pass in multiple pointers to the same data, do not use this)
4053# -xlibmil: Inline some library routines
4054#   (If you expect perfect errno behavior, do not use this)
4055# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4056#   (If you expect perfect errno behavior, do not use this)
4057#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4058
4059    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4060    # Bug?
4061    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4062    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4063    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4064    #fi
4065
4066
4067
4068
4069
4070
4071################################################################################
4072# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4073#      conditionals against.
4074# $2 - Optional prefix for each variable defined.
4075
4076
4077# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4078#                                  IF_FALSE: [RUN-IF-FALSE])
4079# ------------------------------------------------------------
4080# Check that the C compiler supports an argument
4081
4082
4083
4084
4085# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4086#                                    IF_FALSE: [RUN-IF-FALSE])
4087# ------------------------------------------------------------
4088# Check that the C++ compiler supports an argument
4089
4090
4091
4092
4093# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4094#                                IF_FALSE: [RUN-IF-FALSE])
4095# ------------------------------------------------------------
4096# Check that the C and C++ compilers support an argument
4097
4098
4099
4100
4101# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4102#                                   IF_FALSE: [RUN-IF-FALSE])
4103# ------------------------------------------------------------
4104# Check that the linker support an argument
4105
4106
4107
4108
4109
4110
4111# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4112# Arguments:
4113# $1 - Optional prefix for each variable defined.
4114
4115
4116#
4117# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4118# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4119#
4120# This code is free software; you can redistribute it and/or modify it
4121# under the terms of the GNU General Public License version 2 only, as
4122# published by the Free Software Foundation.  Oracle designates this
4123# particular file as subject to the "Classpath" exception as provided
4124# by Oracle in the LICENSE file that accompanied this code.
4125#
4126# This code is distributed in the hope that it will be useful, but WITHOUT
4127# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4128# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4129# version 2 for more details (a copy is included in the LICENSE file that
4130# accompanied this code).
4131#
4132# You should have received a copy of the GNU General Public License version
4133# 2 along with this work; if not, write to the Free Software Foundation,
4134# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4135#
4136# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4137# or visit www.oracle.com if you need additional information or have any
4138# questions.
4139#
4140
4141
4142
4143
4144
4145cygwin_help() {
4146  case $1 in
4147    unzip)
4148      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4149      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4150      ;;
4151    zip)
4152      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4153      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4154      ;;
4155    make)
4156      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4157      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4158      ;;
4159    freetype)
4160      HELP_MSG="
4161The freetype library can now be build during the configure process.
4162Download the freetype sources and unpack them into an arbitrary directory:
4163
4164wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4165tar -xzf freetype-2.5.3.tar.gz
4166
4167Then run configure with '--with-freetype-src=<freetype_src>'. This will
4168automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4169builds or into '<freetype_src>/lib32' for 32-bit builds.
4170Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4171and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4172
4173Alternatively you can unpack the sources like this to use the default directory:
4174
4175tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4176      ;;
4177  esac
4178}
4179
4180msys_help() {
4181  PKGHANDLER_COMMAND=""
4182}
4183
4184apt_help() {
4185  case $1 in
4186    reduced)
4187      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4188    devkit)
4189      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4190    openjdk)
4191      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4192    alsa)
4193      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4194    cups)
4195      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4196    freetype)
4197      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4198    ffi)
4199      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4200    x11)
4201      PKGHANDLER_COMMAND="sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4202    ccache)
4203      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4204    dtrace)
4205      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4206    elf)
4207      PKGHANDLER_COMMAND="sudo apt-get install libelf-dev" ;;
4208  esac
4209}
4210
4211yum_help() {
4212  case $1 in
4213    devkit)
4214      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4215    openjdk)
4216      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4217    alsa)
4218      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4219    cups)
4220      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4221    freetype)
4222      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4223    x11)
4224      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4225    ccache)
4226      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4227    elf)
4228      PKGHANDLER_COMMAND="sudo yum install elfutils-libelf-devel" ;;
4229  esac
4230}
4231
4232brew_help() {
4233  case $1 in
4234    openjdk)
4235      PKGHANDLER_COMMAND="brew cask install java" ;;
4236    freetype)
4237      PKGHANDLER_COMMAND="brew install freetype" ;;
4238    ccache)
4239      PKGHANDLER_COMMAND="brew install ccache" ;;
4240  esac
4241}
4242
4243port_help() {
4244  PKGHANDLER_COMMAND=""
4245}
4246
4247pkgutil_help() {
4248  PKGHANDLER_COMMAND=""
4249}
4250
4251pkgadd_help() {
4252  PKGHANDLER_COMMAND=""
4253}
4254
4255# This function will check if we're called from the "configure" wrapper while
4256# printing --help. If so, we will print out additional information that can
4257# only be extracted within the autoconf script, and then exit. This must be
4258# called at the very beginning in configure.ac.
4259
4260
4261
4262
4263
4264
4265#
4266# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4267# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4268#
4269# This code is free software; you can redistribute it and/or modify it
4270# under the terms of the GNU General Public License version 2 only, as
4271# published by the Free Software Foundation.  Oracle designates this
4272# particular file as subject to the "Classpath" exception as provided
4273# by Oracle in the LICENSE file that accompanied this code.
4274#
4275# This code is distributed in the hope that it will be useful, but WITHOUT
4276# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4277# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4278# version 2 for more details (a copy is included in the LICENSE file that
4279# accompanied this code).
4280#
4281# You should have received a copy of the GNU General Public License version
4282# 2 along with this work; if not, write to the Free Software Foundation,
4283# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4284#
4285# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4286# or visit www.oracle.com if you need additional information or have any
4287# questions.
4288#
4289
4290# All valid JVM features, regardless of platform
4291VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4292    graal fprof vm-structs jni-check services management all-gcs nmt cds \
4293    static-build link-time-opt aot"
4294
4295# All valid JVM variants
4296VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4297
4298###############################################################################
4299# Check if the specified JVM variant should be built. To be used in shell if
4300# constructs, like this:
4301# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4302#
4303# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4304
4305# Definition kept in one line to allow inlining in if statements.
4306# Additional [] needed to keep m4 from mangling shell constructs.
4307
4308
4309###############################################################################
4310# Check if the specified JVM features are explicitly enabled. To be used in
4311# shell if constructs, like this:
4312# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4313#
4314# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4315
4316# Definition kept in one line to allow inlining in if statements.
4317# Additional [] needed to keep m4 from mangling shell constructs.
4318
4319
4320###############################################################################
4321# Check which variants of the JVM that we want to build. Available variants are:
4322#   server: normal interpreter, and a tiered C1/C2 compiler
4323#   client: normal interpreter, and C1 (no C2 compiler)
4324#   minimal: reduced form of client with optional features stripped out
4325#   core: normal interpreter only, no compiler
4326#   zero: C++ based interpreter only, no compiler
4327#   zeroshark: C++ based interpreter, and a llvm-based compiler
4328#   custom: baseline JVM with no default features
4329#
4330
4331
4332###############################################################################
4333# Check if dtrace should be enabled and has all prerequisites present.
4334#
4335
4336
4337################################################################################
4338# Check if AOT should be enabled
4339#
4340
4341
4342###############################################################################
4343# Set up all JVM features for each JVM variant.
4344#
4345
4346
4347###############################################################################
4348# Validate JVM features once all setup is complete, including custom setup.
4349#
4350
4351
4352################################################################################
4353#
4354# Specify which sources will be used to build the 64-bit ARM port
4355#
4356# --with-cpu-port=arm64   will use hotspot/src/cpu/arm
4357# --with-cpu-port=aarch64 will use hotspot/src/cpu/aarch64
4358#
4359
4360
4361
4362################################################################################
4363# Check if gtest should be built
4364#
4365
4366
4367#
4368# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4369# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4370#
4371# This code is free software; you can redistribute it and/or modify it
4372# under the terms of the GNU General Public License version 2 only, as
4373# published by the Free Software Foundation.  Oracle designates this
4374# particular file as subject to the "Classpath" exception as provided
4375# by Oracle in the LICENSE file that accompanied this code.
4376#
4377# This code is distributed in the hope that it will be useful, but WITHOUT
4378# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4379# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4380# version 2 for more details (a copy is included in the LICENSE file that
4381# accompanied this code).
4382#
4383# You should have received a copy of the GNU General Public License version
4384# 2 along with this work; if not, write to the Free Software Foundation,
4385# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4386#
4387# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4388# or visit www.oracle.com if you need additional information or have any
4389# questions.
4390#
4391
4392###############################################################################
4393# Check which variant of the JDK that we want to build.
4394# Currently we have:
4395#    normal:   standard edition
4396# but the custom make system may add other variants
4397#
4398# Effectively the JDK variant gives a name to a specific set of
4399# modules to compile into the JDK.
4400
4401
4402###############################################################################
4403# Set the debug level
4404#    release: no debug information, all optimizations, no asserts.
4405#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4406#    fastdebug: debug information (-g), all optimizations, all asserts
4407#    slowdebug: debug information (-g), no optimizations, all asserts
4408
4409
4410###############################################################################
4411#
4412# Should we build only OpenJDK even if closed sources are present?
4413#
4414
4415
4416
4417
4418###############################################################################
4419#
4420# Enable or disable the elliptic curve crypto implementation
4421#
4422
4423
4424
4425
4426################################################################################
4427#
4428# Gcov coverage data for hotspot
4429#
4430
4431
4432################################################################################
4433#
4434# Static build support.  When enabled will generate static
4435# libraries instead of shared libraries for all JDK libs.
4436#
4437
4438
4439################################################################################
4440#
4441# jlink options.
4442# We always keep packaged modules in JDK image.
4443#
4444
4445
4446################################################################################
4447#
4448# Check if building of the jtreg failure handler should be enabled.
4449#
4450
4451
4452################################################################################
4453#
4454# Enable or disable generation of the classlist at build time
4455#
4456
4457
4458#
4459# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4460# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4461#
4462# This code is free software; you can redistribute it and/or modify it
4463# under the terms of the GNU General Public License version 2 only, as
4464# published by the Free Software Foundation.  Oracle designates this
4465# particular file as subject to the "Classpath" exception as provided
4466# by Oracle in the LICENSE file that accompanied this code.
4467#
4468# This code is distributed in the hope that it will be useful, but WITHOUT
4469# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4470# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4471# version 2 for more details (a copy is included in the LICENSE file that
4472# accompanied this code).
4473#
4474# You should have received a copy of the GNU General Public License version
4475# 2 along with this work; if not, write to the Free Software Foundation,
4476# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4477#
4478# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4479# or visit www.oracle.com if you need additional information or have any
4480# questions.
4481#
4482
4483###############################################################################
4484#
4485# Setup version numbers
4486#
4487
4488# Verify that a given string represents a valid version number, and assign it
4489# to a variable.
4490
4491# Argument 1: the variable to assign to
4492# Argument 2: the value given by the user
4493
4494
4495
4496
4497#
4498# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4499# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4500#
4501# This code is free software; you can redistribute it and/or modify it
4502# under the terms of the GNU General Public License version 2 only, as
4503# published by the Free Software Foundation.  Oracle designates this
4504# particular file as subject to the "Classpath" exception as provided
4505# by Oracle in the LICENSE file that accompanied this code.
4506#
4507# This code is distributed in the hope that it will be useful, but WITHOUT
4508# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4509# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4510# version 2 for more details (a copy is included in the LICENSE file that
4511# accompanied this code).
4512#
4513# You should have received a copy of the GNU General Public License version
4514# 2 along with this work; if not, write to the Free Software Foundation,
4515# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4516#
4517# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4518# or visit www.oracle.com if you need additional information or have any
4519# questions.
4520#
4521
4522# Major library component reside in separate files.
4523#
4524# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4525# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4526#
4527# This code is free software; you can redistribute it and/or modify it
4528# under the terms of the GNU General Public License version 2 only, as
4529# published by the Free Software Foundation.  Oracle designates this
4530# particular file as subject to the "Classpath" exception as provided
4531# by Oracle in the LICENSE file that accompanied this code.
4532#
4533# This code is distributed in the hope that it will be useful, but WITHOUT
4534# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4535# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4536# version 2 for more details (a copy is included in the LICENSE file that
4537# accompanied this code).
4538#
4539# You should have received a copy of the GNU General Public License version
4540# 2 along with this work; if not, write to the Free Software Foundation,
4541# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4542#
4543# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4544# or visit www.oracle.com if you need additional information or have any
4545# questions.
4546#
4547
4548################################################################################
4549# Setup alsa (Advanced Linux Sound Architecture)
4550################################################################################
4551
4552
4553#
4554# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4555# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4556#
4557# This code is free software; you can redistribute it and/or modify it
4558# under the terms of the GNU General Public License version 2 only, as
4559# published by the Free Software Foundation.  Oracle designates this
4560# particular file as subject to the "Classpath" exception as provided
4561# by Oracle in the LICENSE file that accompanied this code.
4562#
4563# This code is distributed in the hope that it will be useful, but WITHOUT
4564# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4565# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4566# version 2 for more details (a copy is included in the LICENSE file that
4567# accompanied this code).
4568#
4569# You should have received a copy of the GNU General Public License version
4570# 2 along with this work; if not, write to the Free Software Foundation,
4571# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4572#
4573# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4574# or visit www.oracle.com if you need additional information or have any
4575# questions.
4576#
4577
4578################################################################################
4579# Setup bundled libraries.
4580#
4581# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4582# OpenJDK repository. Default is to use these libraries as bundled, but they
4583# might be replaced by en external version by the user.
4584################################################################################
4585
4586
4587################################################################################
4588# Setup libjpeg
4589################################################################################
4590
4591
4592################################################################################
4593# Setup giflib
4594################################################################################
4595
4596
4597################################################################################
4598# Setup libpng
4599################################################################################
4600
4601
4602################################################################################
4603# Setup zlib
4604################################################################################
4605
4606
4607################################################################################
4608# Setup lcms (Little CMS)
4609################################################################################
4610
4611
4612#
4613# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4614# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4615#
4616# This code is free software; you can redistribute it and/or modify it
4617# under the terms of the GNU General Public License version 2 only, as
4618# published by the Free Software Foundation.  Oracle designates this
4619# particular file as subject to the "Classpath" exception as provided
4620# by Oracle in the LICENSE file that accompanied this code.
4621#
4622# This code is distributed in the hope that it will be useful, but WITHOUT
4623# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4624# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4625# version 2 for more details (a copy is included in the LICENSE file that
4626# accompanied this code).
4627#
4628# You should have received a copy of the GNU General Public License version
4629# 2 along with this work; if not, write to the Free Software Foundation,
4630# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4631#
4632# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4633# or visit www.oracle.com if you need additional information or have any
4634# questions.
4635#
4636
4637################################################################################
4638# Setup cups (Common Unix Printing System)
4639################################################################################
4640
4641
4642#
4643# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4644# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4645#
4646# This code is free software; you can redistribute it and/or modify it
4647# under the terms of the GNU General Public License version 2 only, as
4648# published by the Free Software Foundation.  Oracle designates this
4649# particular file as subject to the "Classpath" exception as provided
4650# by Oracle in the LICENSE file that accompanied this code.
4651#
4652# This code is distributed in the hope that it will be useful, but WITHOUT
4653# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4654# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4655# version 2 for more details (a copy is included in the LICENSE file that
4656# accompanied this code).
4657#
4658# You should have received a copy of the GNU General Public License version
4659# 2 along with this work; if not, write to the Free Software Foundation,
4660# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4661#
4662# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4663# or visit www.oracle.com if you need additional information or have any
4664# questions.
4665#
4666
4667################################################################################
4668# Setup libffi (Foreign Function Interface)
4669################################################################################
4670
4671
4672#
4673# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4674# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4675#
4676# This code is free software; you can redistribute it and/or modify it
4677# under the terms of the GNU General Public License version 2 only, as
4678# published by the Free Software Foundation.  Oracle designates this
4679# particular file as subject to the "Classpath" exception as provided
4680# by Oracle in the LICENSE file that accompanied this code.
4681#
4682# This code is distributed in the hope that it will be useful, but WITHOUT
4683# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4684# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4685# version 2 for more details (a copy is included in the LICENSE file that
4686# accompanied this code).
4687#
4688# You should have received a copy of the GNU General Public License version
4689# 2 along with this work; if not, write to the Free Software Foundation,
4690# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4691#
4692# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4693# or visit www.oracle.com if you need additional information or have any
4694# questions.
4695#
4696
4697################################################################################
4698# Build the freetype lib from source
4699################################################################################
4700
4701
4702################################################################################
4703# Check if a potential freeype library match is correct and usable
4704################################################################################
4705
4706
4707################################################################################
4708# Setup freetype (The FreeType2 font rendering library)
4709################################################################################
4710
4711
4712#
4713# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4714# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4715#
4716# This code is free software; you can redistribute it and/or modify it
4717# under the terms of the GNU General Public License version 2 only, as
4718# published by the Free Software Foundation.  Oracle designates this
4719# particular file as subject to the "Classpath" exception as provided
4720# by Oracle in the LICENSE file that accompanied this code.
4721#
4722# This code is distributed in the hope that it will be useful, but WITHOUT
4723# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4724# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4725# version 2 for more details (a copy is included in the LICENSE file that
4726# accompanied this code).
4727#
4728# You should have received a copy of the GNU General Public License version
4729# 2 along with this work; if not, write to the Free Software Foundation,
4730# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4731#
4732# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4733# or visit www.oracle.com if you need additional information or have any
4734# questions.
4735#
4736
4737################################################################################
4738# Setup the standard C/C++ runtime libraries.
4739#
4740# Most importantly, determine if stdc++ should be linked statically or
4741# dynamically.
4742################################################################################
4743
4744
4745#
4746# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4747# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4748#
4749# This code is free software; you can redistribute it and/or modify it
4750# under the terms of the GNU General Public License version 2 only, as
4751# published by the Free Software Foundation.  Oracle designates this
4752# particular file as subject to the "Classpath" exception as provided
4753# by Oracle in the LICENSE file that accompanied this code.
4754#
4755# This code is distributed in the hope that it will be useful, but WITHOUT
4756# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4757# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4758# version 2 for more details (a copy is included in the LICENSE file that
4759# accompanied this code).
4760#
4761# You should have received a copy of the GNU General Public License version
4762# 2 along with this work; if not, write to the Free Software Foundation,
4763# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4764#
4765# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4766# or visit www.oracle.com if you need additional information or have any
4767# questions.
4768#
4769
4770################################################################################
4771# Setup X11 Windows system
4772################################################################################
4773
4774
4775#
4776# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4777# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4778#
4779# This code is free software; you can redistribute it and/or modify it
4780# under the terms of the GNU General Public License version 2 only, as
4781# published by the Free Software Foundation.  Oracle designates this
4782# particular file as subject to the "Classpath" exception as provided
4783# by Oracle in the LICENSE file that accompanied this code.
4784#
4785# This code is distributed in the hope that it will be useful, but WITHOUT
4786# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4787# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4788# version 2 for more details (a copy is included in the LICENSE file that
4789# accompanied this code).
4790#
4791# You should have received a copy of the GNU General Public License version
4792# 2 along with this work; if not, write to the Free Software Foundation,
4793# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4794#
4795# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4796# or visit www.oracle.com if you need additional information or have any
4797# questions.
4798#
4799
4800################################################################################
4801# Setup libelf (ELF library)
4802################################################################################
4803
4804
4805
4806################################################################################
4807# Determine which libraries are needed for this configuration
4808################################################################################
4809
4810
4811################################################################################
4812# Parse library options, and setup needed libraries
4813################################################################################
4814
4815
4816################################################################################
4817# Setup llvm (Low-Level VM)
4818################################################################################
4819
4820
4821################################################################################
4822# Setup various libraries, typically small system libraries
4823################################################################################
4824
4825
4826################################################################################
4827# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4828# redistribute it in the test image.
4829################################################################################
4830
4831
4832
4833#
4834# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4835# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4836#
4837# This code is free software; you can redistribute it and/or modify it
4838# under the terms of the GNU General Public License version 2 only, as
4839# published by the Free Software Foundation.  Oracle designates this
4840# particular file as subject to the "Classpath" exception as provided
4841# by Oracle in the LICENSE file that accompanied this code.
4842#
4843# This code is distributed in the hope that it will be useful, but WITHOUT
4844# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4845# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4846# version 2 for more details (a copy is included in the LICENSE file that
4847# accompanied this code).
4848#
4849# You should have received a copy of the GNU General Public License version
4850# 2 along with this work; if not, write to the Free Software Foundation,
4851# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4852#
4853# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4854# or visit www.oracle.com if you need additional information or have any
4855# questions.
4856#
4857
4858# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4859# Converts autoconf style CPU name to OpenJDK style, into
4860# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4861
4862
4863# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4864# Converts autoconf style OS name to OpenJDK style, into
4865# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4866
4867
4868# Expects $host_os $host_cpu $build_os and $build_cpu
4869# and $with_target_bits to have been setup!
4870#
4871# Translate the standard triplet(quadruplet) definition
4872# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4873# OPENJDK_BUILD_OS, etc.
4874
4875
4876# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4877# accordingly. Must be done after setting up build and target system, but before
4878# doing anything else with these values.
4879
4880
4881# Setup the legacy variables, for controlling the old makefiles.
4882#
4883
4884
4885# $1 - Either TARGET or BUILD to setup the variables for.
4886
4887
4888
4889
4890#%%% Build and target systems %%%
4891
4892
4893
4894
4895# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4896# Add -mX to various FLAGS variables.
4897
4898
4899
4900
4901
4902
4903#
4904# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4905# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4906#
4907# This code is free software; you can redistribute it and/or modify it
4908# under the terms of the GNU General Public License version 2 only, as
4909# published by the Free Software Foundation.  Oracle designates this
4910# particular file as subject to the "Classpath" exception as provided
4911# by Oracle in the LICENSE file that accompanied this code.
4912#
4913# This code is distributed in the hope that it will be useful, but WITHOUT
4914# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4915# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4916# version 2 for more details (a copy is included in the LICENSE file that
4917# accompanied this code).
4918#
4919# You should have received a copy of the GNU General Public License version
4920# 2 along with this work; if not, write to the Free Software Foundation,
4921# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4922#
4923# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4924# or visit www.oracle.com if you need additional information or have any
4925# questions.
4926#
4927
4928
4929
4930
4931
4932
4933
4934################################################################################
4935# Define a mechanism for importing extra prebuilt modules
4936#
4937
4938
4939
4940#
4941# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4942# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4943#
4944# This code is free software; you can redistribute it and/or modify it
4945# under the terms of the GNU General Public License version 2 only, as
4946# published by the Free Software Foundation.  Oracle designates this
4947# particular file as subject to the "Classpath" exception as provided
4948# by Oracle in the LICENSE file that accompanied this code.
4949#
4950# This code is distributed in the hope that it will be useful, but WITHOUT
4951# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4952# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4953# version 2 for more details (a copy is included in the LICENSE file that
4954# accompanied this code).
4955#
4956# You should have received a copy of the GNU General Public License version
4957# 2 along with this work; if not, write to the Free Software Foundation,
4958# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4959#
4960# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4961# or visit www.oracle.com if you need additional information or have any
4962# questions.
4963#
4964
4965########################################################################
4966# This file is responsible for detecting, verifying and setting up the
4967# toolchain, i.e. the compiler, linker and related utilities. It will setup
4968# proper paths to the binaries, but it will not setup any flags.
4969#
4970# The binaries used is determined by the toolchain type, which is the family of
4971# compilers and related tools that are used.
4972########################################################################
4973
4974
4975# All valid toolchains, regardless of platform (used by help.m4)
4976VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4977
4978# These toolchains are valid on different platforms
4979VALID_TOOLCHAINS_linux="gcc clang"
4980VALID_TOOLCHAINS_solaris="solstudio"
4981VALID_TOOLCHAINS_macosx="gcc clang"
4982VALID_TOOLCHAINS_aix="xlc"
4983VALID_TOOLCHAINS_windows="microsoft"
4984
4985# Toolchain descriptions
4986TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4987TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4988TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4989TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4990TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4991
4992# Minimum supported versions, empty means unspecified
4993TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4994TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4995TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
4996TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
4997TOOLCHAIN_MINIMUM_VERSION_xlc=""
4998
4999# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
5000# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
5001# $1 - optional variable prefix for compiler and version variables (BUILD_)
5002# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
5003
5004
5005# Check if the configured compiler (C and C++) is of a specific version or
5006# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
5007#
5008# Arguments:
5009#   VERSION:   The version string to check against the found version
5010#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
5011#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
5012#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
5013
5014
5015
5016
5017# Setup a number of variables describing how native output files are
5018# named on this platform/toolchain.
5019
5020
5021# Determine which toolchain type to use, and make sure it is valid for this
5022# platform. Setup various information about the selected toolchain.
5023
5024
5025# Before we start detecting the toolchain executables, we might need some
5026# special setup, e.g. additional paths etc.
5027
5028
5029# Restore path, etc
5030
5031
5032# Check if a compiler is of the toolchain type we expect, and save the version
5033# information from it. If the compiler does not match the expected type,
5034# this function will abort using AC_MSG_ERROR. If it matches, the version will
5035# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
5036# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
5037#
5038# $1 = compiler to test (CC or CXX)
5039# $2 = human readable name of compiler (C or C++)
5040
5041
5042# Try to locate the given C or C++ compiler in the path, or otherwise.
5043#
5044# $1 = compiler to test (CC or CXX)
5045# $2 = human readable name of compiler (C or C++)
5046# $3 = compiler name to search for
5047
5048
5049# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
5050# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
5051# archiver (AR). Verify that the compilers are correct according to the
5052# toolchain type.
5053
5054
5055# Setup additional tools that is considered a part of the toolchain, but not the
5056# core part. Many of these are highly platform-specific and do not exist,
5057# and/or are not needed on all platforms.
5058
5059
5060# Setup the build tools (i.e, the compiler and linker used to build programs
5061# that should be run on the build platform, not the target platform, as a build
5062# helper). Since the non-cross-compile case uses the normal, target compilers
5063# for this, we can only do this after these have been setup.
5064
5065
5066# Do some additional checks on the detected tools.
5067
5068
5069# Setup the JTReg Regression Test Harness.
5070
5071
5072#
5073# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
5074# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5075#
5076# This code is free software; you can redistribute it and/or modify it
5077# under the terms of the GNU General Public License version 2 only, as
5078# published by the Free Software Foundation.  Oracle designates this
5079# particular file as subject to the "Classpath" exception as provided
5080# by Oracle in the LICENSE file that accompanied this code.
5081#
5082# This code is distributed in the hope that it will be useful, but WITHOUT
5083# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5084# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5085# version 2 for more details (a copy is included in the LICENSE file that
5086# accompanied this code).
5087#
5088# You should have received a copy of the GNU General Public License version
5089# 2 along with this work; if not, write to the Free Software Foundation,
5090# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5091#
5092# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5093# or visit www.oracle.com if you need additional information or have any
5094# questions.
5095#
5096
5097################################################################################
5098# The order of these defines the priority by which we try to find them.
5099VALID_VS_VERSIONS="2013 2012 2010"
5100
5101VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5102VS_VERSION_INTERNAL_2010=100
5103VS_MSVCR_2010=msvcr100.dll
5104# We don't use msvcp on Visual Studio 2010
5105#VS_MSVCP_2010=msvcp100.dll
5106VS_ENVVAR_2010="VS100COMNTOOLS"
5107VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5108VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5109VS_VS_PLATFORM_NAME_2010="v100"
5110VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5111
5112VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5113VS_VERSION_INTERNAL_2012=110
5114VS_MSVCR_2012=msvcr110.dll
5115VS_MSVCP_2012=msvcp110.dll
5116VS_ENVVAR_2012="VS110COMNTOOLS"
5117VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5118VS_SDK_INSTALLDIR_2012=
5119VS_VS_PLATFORM_NAME_2012="v110"
5120VS_SDK_PLATFORM_NAME_2012=
5121
5122VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5123VS_VERSION_INTERNAL_2013=120
5124VS_MSVCR_2013=msvcr120.dll
5125VS_MSVCP_2013=msvcp120.dll
5126VS_ENVVAR_2013="VS120COMNTOOLS"
5127VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5128VS_SDK_INSTALLDIR_2013=
5129VS_VS_PLATFORM_NAME_2013="v120"
5130VS_SDK_PLATFORM_NAME_2013=
5131
5132################################################################################
5133
5134
5135
5136################################################################################
5137
5138
5139
5140################################################################################
5141# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5142# build environment and assigns it to VS_ENV_CMD
5143
5144
5145################################################################################
5146
5147
5148
5149################################################################################
5150# Check if the VS env variables were setup prior to running configure.
5151# If not, then find vcvarsall.bat and run it automatically, and integrate
5152# the set env variables into the spec file.
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167# This line needs to be here, verbatim, after all includes and the dummy hook
5168# definitions. It is replaced with custom functionality when building
5169# custom sources.
5170#CUSTOM_AUTOCONF_INCLUDE
5171
5172# Do not change or remove the following line, it is needed for consistency checks:
5173DATE_WHEN_GENERATED=1487934085
5174
5175###############################################################################
5176#
5177# Initialization / Boot-strapping
5178#
5179# The bootstrapping process needs to solve the "chicken or the egg" problem,
5180# thus it jumps back and forth, each time gaining something needed later on.
5181#
5182###############################################################################
5183
5184# If we are requested to print additional help, do that and then exit.
5185# This must be the very first call.
5186
5187  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5188
5189    # Print available toolchains
5190    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5191    $PRINTF "Which are valid to use depends on the build platform.\n"
5192    for toolchain in $VALID_TOOLCHAINS_all; do
5193      # Use indirect variable referencing
5194      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5195      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5196      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5197    done
5198    $PRINTF "\n"
5199
5200    # Print available jvm features
5201    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5202    $PRINTF "Which are valid to use depends on the target platform.\n  "
5203    $PRINTF "%s " $VALID_JVM_FEATURES
5204    $PRINTF "\n"
5205
5206    # And now exit directly
5207    exit 0
5208  fi
5209
5210
5211# Basic initialization that must happen first of all in the normal process.
5212
5213  # Save the original command line. This is passed to us by the wrapper configure script.
5214
5215  # Save the path variable before it gets changed
5216  ORIGINAL_PATH="$PATH"
5217
5218  DATE_WHEN_CONFIGURED=`LANG=C date`
5219
5220  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5221$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5222  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5223$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5224
5225
5226  # Start with tools that do not need have cross compilation support
5227  # and can be expected to be found in the default PATH. These tools are
5228  # used by configure.
5229
5230  # First are all the simple required tools.
5231
5232
5233
5234  # Publish this variable in the help.
5235
5236
5237  if [ -z "${BASENAME+x}" ]; then
5238    # The variable is not set by user, try to locate tool using the code snippet
5239    for ac_prog in basename
5240do
5241  # Extract the first word of "$ac_prog", so it can be a program name with args.
5242set dummy $ac_prog; ac_word=$2
5243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5244$as_echo_n "checking for $ac_word... " >&6; }
5245if ${ac_cv_path_BASENAME+:} false; then :
5246  $as_echo_n "(cached) " >&6
5247else
5248  case $BASENAME in
5249  [\\/]* | ?:[\\/]*)
5250  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5251  ;;
5252  *)
5253  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5254for as_dir in $PATH
5255do
5256  IFS=$as_save_IFS
5257  test -z "$as_dir" && as_dir=.
5258    for ac_exec_ext in '' $ac_executable_extensions; do
5259  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5260    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5261    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5262    break 2
5263  fi
5264done
5265  done
5266IFS=$as_save_IFS
5267
5268  ;;
5269esac
5270fi
5271BASENAME=$ac_cv_path_BASENAME
5272if test -n "$BASENAME"; then
5273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5274$as_echo "$BASENAME" >&6; }
5275else
5276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5277$as_echo "no" >&6; }
5278fi
5279
5280
5281  test -n "$BASENAME" && break
5282done
5283
5284  else
5285    # The variable is set, but is it from the command line or the environment?
5286
5287    # Try to remove the string !BASENAME! from our list.
5288    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5289    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5290      # If it failed, the variable was not from the command line. Ignore it,
5291      # but warn the user (except for BASH, which is always set by the calling BASH).
5292      if test "xBASENAME" != xBASH; then
5293        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5294$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5295      fi
5296      # Try to locate tool using the code snippet
5297      for ac_prog in basename
5298do
5299  # Extract the first word of "$ac_prog", so it can be a program name with args.
5300set dummy $ac_prog; ac_word=$2
5301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5302$as_echo_n "checking for $ac_word... " >&6; }
5303if ${ac_cv_path_BASENAME+:} false; then :
5304  $as_echo_n "(cached) " >&6
5305else
5306  case $BASENAME in
5307  [\\/]* | ?:[\\/]*)
5308  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5309  ;;
5310  *)
5311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5312for as_dir in $PATH
5313do
5314  IFS=$as_save_IFS
5315  test -z "$as_dir" && as_dir=.
5316    for ac_exec_ext in '' $ac_executable_extensions; do
5317  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5318    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5320    break 2
5321  fi
5322done
5323  done
5324IFS=$as_save_IFS
5325
5326  ;;
5327esac
5328fi
5329BASENAME=$ac_cv_path_BASENAME
5330if test -n "$BASENAME"; then
5331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5332$as_echo "$BASENAME" >&6; }
5333else
5334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5335$as_echo "no" >&6; }
5336fi
5337
5338
5339  test -n "$BASENAME" && break
5340done
5341
5342    else
5343      # If it succeeded, then it was overridden by the user. We will use it
5344      # for the tool.
5345
5346      # First remove it from the list of overridden variables, so we can test
5347      # for unknown variables in the end.
5348      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5349
5350      # Check if we try to supply an empty value
5351      if test "x$BASENAME" = x; then
5352        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5353$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5354        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5355$as_echo_n "checking for BASENAME... " >&6; }
5356        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5357$as_echo "disabled" >&6; }
5358      else
5359        # Check if the provided tool contains a complete path.
5360        tool_specified="$BASENAME"
5361        tool_basename="${tool_specified##*/}"
5362        if test "x$tool_basename" = "x$tool_specified"; then
5363          # A command without a complete path is provided, search $PATH.
5364          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5365$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5366          # Extract the first word of "$tool_basename", so it can be a program name with args.
5367set dummy $tool_basename; ac_word=$2
5368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5369$as_echo_n "checking for $ac_word... " >&6; }
5370if ${ac_cv_path_BASENAME+:} false; then :
5371  $as_echo_n "(cached) " >&6
5372else
5373  case $BASENAME in
5374  [\\/]* | ?:[\\/]*)
5375  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5376  ;;
5377  *)
5378  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5379for as_dir in $PATH
5380do
5381  IFS=$as_save_IFS
5382  test -z "$as_dir" && as_dir=.
5383    for ac_exec_ext in '' $ac_executable_extensions; do
5384  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5385    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5386    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5387    break 2
5388  fi
5389done
5390  done
5391IFS=$as_save_IFS
5392
5393  ;;
5394esac
5395fi
5396BASENAME=$ac_cv_path_BASENAME
5397if test -n "$BASENAME"; then
5398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5399$as_echo "$BASENAME" >&6; }
5400else
5401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5402$as_echo "no" >&6; }
5403fi
5404
5405
5406          if test "x$BASENAME" = x; then
5407            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5408          fi
5409        else
5410          # Otherwise we believe it is a complete path. Use it as it is.
5411          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5412$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5413          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5414$as_echo_n "checking for BASENAME... " >&6; }
5415          if test ! -x "$tool_specified"; then
5416            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5417$as_echo "not found" >&6; }
5418            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5419          fi
5420          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5421$as_echo "$tool_specified" >&6; }
5422        fi
5423      fi
5424    fi
5425
5426  fi
5427
5428
5429
5430  if test "x$BASENAME" = x; then
5431    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5432  fi
5433
5434
5435
5436
5437
5438  # Publish this variable in the help.
5439
5440
5441  if [ -z "${BASH+x}" ]; then
5442    # The variable is not set by user, try to locate tool using the code snippet
5443    for ac_prog in bash
5444do
5445  # Extract the first word of "$ac_prog", so it can be a program name with args.
5446set dummy $ac_prog; ac_word=$2
5447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5448$as_echo_n "checking for $ac_word... " >&6; }
5449if ${ac_cv_path_BASH+:} false; then :
5450  $as_echo_n "(cached) " >&6
5451else
5452  case $BASH in
5453  [\\/]* | ?:[\\/]*)
5454  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5455  ;;
5456  *)
5457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5458for as_dir in $PATH
5459do
5460  IFS=$as_save_IFS
5461  test -z "$as_dir" && as_dir=.
5462    for ac_exec_ext in '' $ac_executable_extensions; do
5463  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5464    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5466    break 2
5467  fi
5468done
5469  done
5470IFS=$as_save_IFS
5471
5472  ;;
5473esac
5474fi
5475BASH=$ac_cv_path_BASH
5476if test -n "$BASH"; then
5477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5478$as_echo "$BASH" >&6; }
5479else
5480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5481$as_echo "no" >&6; }
5482fi
5483
5484
5485  test -n "$BASH" && break
5486done
5487
5488  else
5489    # The variable is set, but is it from the command line or the environment?
5490
5491    # Try to remove the string !BASH! from our list.
5492    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5493    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5494      # If it failed, the variable was not from the command line. Ignore it,
5495      # but warn the user (except for BASH, which is always set by the calling BASH).
5496      if test "xBASH" != xBASH; then
5497        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5498$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5499      fi
5500      # Try to locate tool using the code snippet
5501      for ac_prog in bash
5502do
5503  # Extract the first word of "$ac_prog", so it can be a program name with args.
5504set dummy $ac_prog; ac_word=$2
5505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5506$as_echo_n "checking for $ac_word... " >&6; }
5507if ${ac_cv_path_BASH+:} false; then :
5508  $as_echo_n "(cached) " >&6
5509else
5510  case $BASH in
5511  [\\/]* | ?:[\\/]*)
5512  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5513  ;;
5514  *)
5515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5516for as_dir in $PATH
5517do
5518  IFS=$as_save_IFS
5519  test -z "$as_dir" && as_dir=.
5520    for ac_exec_ext in '' $ac_executable_extensions; do
5521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5522    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5524    break 2
5525  fi
5526done
5527  done
5528IFS=$as_save_IFS
5529
5530  ;;
5531esac
5532fi
5533BASH=$ac_cv_path_BASH
5534if test -n "$BASH"; then
5535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5536$as_echo "$BASH" >&6; }
5537else
5538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5539$as_echo "no" >&6; }
5540fi
5541
5542
5543  test -n "$BASH" && break
5544done
5545
5546    else
5547      # If it succeeded, then it was overridden by the user. We will use it
5548      # for the tool.
5549
5550      # First remove it from the list of overridden variables, so we can test
5551      # for unknown variables in the end.
5552      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5553
5554      # Check if we try to supply an empty value
5555      if test "x$BASH" = x; then
5556        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5557$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5558        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5559$as_echo_n "checking for BASH... " >&6; }
5560        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5561$as_echo "disabled" >&6; }
5562      else
5563        # Check if the provided tool contains a complete path.
5564        tool_specified="$BASH"
5565        tool_basename="${tool_specified##*/}"
5566        if test "x$tool_basename" = "x$tool_specified"; then
5567          # A command without a complete path is provided, search $PATH.
5568          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5569$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5570          # Extract the first word of "$tool_basename", so it can be a program name with args.
5571set dummy $tool_basename; ac_word=$2
5572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5573$as_echo_n "checking for $ac_word... " >&6; }
5574if ${ac_cv_path_BASH+:} false; then :
5575  $as_echo_n "(cached) " >&6
5576else
5577  case $BASH in
5578  [\\/]* | ?:[\\/]*)
5579  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5580  ;;
5581  *)
5582  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5583for as_dir in $PATH
5584do
5585  IFS=$as_save_IFS
5586  test -z "$as_dir" && as_dir=.
5587    for ac_exec_ext in '' $ac_executable_extensions; do
5588  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5589    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5591    break 2
5592  fi
5593done
5594  done
5595IFS=$as_save_IFS
5596
5597  ;;
5598esac
5599fi
5600BASH=$ac_cv_path_BASH
5601if test -n "$BASH"; then
5602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5603$as_echo "$BASH" >&6; }
5604else
5605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5606$as_echo "no" >&6; }
5607fi
5608
5609
5610          if test "x$BASH" = x; then
5611            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5612          fi
5613        else
5614          # Otherwise we believe it is a complete path. Use it as it is.
5615          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5616$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5617          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5618$as_echo_n "checking for BASH... " >&6; }
5619          if test ! -x "$tool_specified"; then
5620            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5621$as_echo "not found" >&6; }
5622            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5623          fi
5624          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5625$as_echo "$tool_specified" >&6; }
5626        fi
5627      fi
5628    fi
5629
5630  fi
5631
5632
5633
5634  if test "x$BASH" = x; then
5635    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5636  fi
5637
5638
5639
5640
5641
5642  # Publish this variable in the help.
5643
5644
5645  if [ -z "${CAT+x}" ]; then
5646    # The variable is not set by user, try to locate tool using the code snippet
5647    for ac_prog in cat
5648do
5649  # Extract the first word of "$ac_prog", so it can be a program name with args.
5650set dummy $ac_prog; ac_word=$2
5651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5652$as_echo_n "checking for $ac_word... " >&6; }
5653if ${ac_cv_path_CAT+:} false; then :
5654  $as_echo_n "(cached) " >&6
5655else
5656  case $CAT in
5657  [\\/]* | ?:[\\/]*)
5658  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5659  ;;
5660  *)
5661  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5662for as_dir in $PATH
5663do
5664  IFS=$as_save_IFS
5665  test -z "$as_dir" && as_dir=.
5666    for ac_exec_ext in '' $ac_executable_extensions; do
5667  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5668    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5670    break 2
5671  fi
5672done
5673  done
5674IFS=$as_save_IFS
5675
5676  ;;
5677esac
5678fi
5679CAT=$ac_cv_path_CAT
5680if test -n "$CAT"; then
5681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5682$as_echo "$CAT" >&6; }
5683else
5684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5685$as_echo "no" >&6; }
5686fi
5687
5688
5689  test -n "$CAT" && break
5690done
5691
5692  else
5693    # The variable is set, but is it from the command line or the environment?
5694
5695    # Try to remove the string !CAT! from our list.
5696    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5697    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5698      # If it failed, the variable was not from the command line. Ignore it,
5699      # but warn the user (except for BASH, which is always set by the calling BASH).
5700      if test "xCAT" != xBASH; then
5701        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5702$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5703      fi
5704      # Try to locate tool using the code snippet
5705      for ac_prog in cat
5706do
5707  # Extract the first word of "$ac_prog", so it can be a program name with args.
5708set dummy $ac_prog; ac_word=$2
5709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5710$as_echo_n "checking for $ac_word... " >&6; }
5711if ${ac_cv_path_CAT+:} false; then :
5712  $as_echo_n "(cached) " >&6
5713else
5714  case $CAT in
5715  [\\/]* | ?:[\\/]*)
5716  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5717  ;;
5718  *)
5719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5720for as_dir in $PATH
5721do
5722  IFS=$as_save_IFS
5723  test -z "$as_dir" && as_dir=.
5724    for ac_exec_ext in '' $ac_executable_extensions; do
5725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5726    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5728    break 2
5729  fi
5730done
5731  done
5732IFS=$as_save_IFS
5733
5734  ;;
5735esac
5736fi
5737CAT=$ac_cv_path_CAT
5738if test -n "$CAT"; then
5739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5740$as_echo "$CAT" >&6; }
5741else
5742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5743$as_echo "no" >&6; }
5744fi
5745
5746
5747  test -n "$CAT" && break
5748done
5749
5750    else
5751      # If it succeeded, then it was overridden by the user. We will use it
5752      # for the tool.
5753
5754      # First remove it from the list of overridden variables, so we can test
5755      # for unknown variables in the end.
5756      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5757
5758      # Check if we try to supply an empty value
5759      if test "x$CAT" = x; then
5760        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5761$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5762        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5763$as_echo_n "checking for CAT... " >&6; }
5764        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5765$as_echo "disabled" >&6; }
5766      else
5767        # Check if the provided tool contains a complete path.
5768        tool_specified="$CAT"
5769        tool_basename="${tool_specified##*/}"
5770        if test "x$tool_basename" = "x$tool_specified"; then
5771          # A command without a complete path is provided, search $PATH.
5772          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5773$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5774          # Extract the first word of "$tool_basename", so it can be a program name with args.
5775set dummy $tool_basename; ac_word=$2
5776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5777$as_echo_n "checking for $ac_word... " >&6; }
5778if ${ac_cv_path_CAT+:} false; then :
5779  $as_echo_n "(cached) " >&6
5780else
5781  case $CAT in
5782  [\\/]* | ?:[\\/]*)
5783  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5784  ;;
5785  *)
5786  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5787for as_dir in $PATH
5788do
5789  IFS=$as_save_IFS
5790  test -z "$as_dir" && as_dir=.
5791    for ac_exec_ext in '' $ac_executable_extensions; do
5792  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5793    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5794    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5795    break 2
5796  fi
5797done
5798  done
5799IFS=$as_save_IFS
5800
5801  ;;
5802esac
5803fi
5804CAT=$ac_cv_path_CAT
5805if test -n "$CAT"; then
5806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5807$as_echo "$CAT" >&6; }
5808else
5809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5810$as_echo "no" >&6; }
5811fi
5812
5813
5814          if test "x$CAT" = x; then
5815            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5816          fi
5817        else
5818          # Otherwise we believe it is a complete path. Use it as it is.
5819          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5820$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5821          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5822$as_echo_n "checking for CAT... " >&6; }
5823          if test ! -x "$tool_specified"; then
5824            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5825$as_echo "not found" >&6; }
5826            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5827          fi
5828          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5829$as_echo "$tool_specified" >&6; }
5830        fi
5831      fi
5832    fi
5833
5834  fi
5835
5836
5837
5838  if test "x$CAT" = x; then
5839    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5840  fi
5841
5842
5843
5844
5845
5846  # Publish this variable in the help.
5847
5848
5849  if [ -z "${CHMOD+x}" ]; then
5850    # The variable is not set by user, try to locate tool using the code snippet
5851    for ac_prog in chmod
5852do
5853  # Extract the first word of "$ac_prog", so it can be a program name with args.
5854set dummy $ac_prog; ac_word=$2
5855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5856$as_echo_n "checking for $ac_word... " >&6; }
5857if ${ac_cv_path_CHMOD+:} false; then :
5858  $as_echo_n "(cached) " >&6
5859else
5860  case $CHMOD in
5861  [\\/]* | ?:[\\/]*)
5862  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5863  ;;
5864  *)
5865  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5866for as_dir in $PATH
5867do
5868  IFS=$as_save_IFS
5869  test -z "$as_dir" && as_dir=.
5870    for ac_exec_ext in '' $ac_executable_extensions; do
5871  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5872    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5873    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5874    break 2
5875  fi
5876done
5877  done
5878IFS=$as_save_IFS
5879
5880  ;;
5881esac
5882fi
5883CHMOD=$ac_cv_path_CHMOD
5884if test -n "$CHMOD"; then
5885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5886$as_echo "$CHMOD" >&6; }
5887else
5888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5889$as_echo "no" >&6; }
5890fi
5891
5892
5893  test -n "$CHMOD" && break
5894done
5895
5896  else
5897    # The variable is set, but is it from the command line or the environment?
5898
5899    # Try to remove the string !CHMOD! from our list.
5900    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5901    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5902      # If it failed, the variable was not from the command line. Ignore it,
5903      # but warn the user (except for BASH, which is always set by the calling BASH).
5904      if test "xCHMOD" != xBASH; then
5905        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5906$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5907      fi
5908      # Try to locate tool using the code snippet
5909      for ac_prog in chmod
5910do
5911  # Extract the first word of "$ac_prog", so it can be a program name with args.
5912set dummy $ac_prog; ac_word=$2
5913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5914$as_echo_n "checking for $ac_word... " >&6; }
5915if ${ac_cv_path_CHMOD+:} false; then :
5916  $as_echo_n "(cached) " >&6
5917else
5918  case $CHMOD in
5919  [\\/]* | ?:[\\/]*)
5920  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5921  ;;
5922  *)
5923  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5924for as_dir in $PATH
5925do
5926  IFS=$as_save_IFS
5927  test -z "$as_dir" && as_dir=.
5928    for ac_exec_ext in '' $ac_executable_extensions; do
5929  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5930    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5931    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5932    break 2
5933  fi
5934done
5935  done
5936IFS=$as_save_IFS
5937
5938  ;;
5939esac
5940fi
5941CHMOD=$ac_cv_path_CHMOD
5942if test -n "$CHMOD"; then
5943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5944$as_echo "$CHMOD" >&6; }
5945else
5946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5947$as_echo "no" >&6; }
5948fi
5949
5950
5951  test -n "$CHMOD" && break
5952done
5953
5954    else
5955      # If it succeeded, then it was overridden by the user. We will use it
5956      # for the tool.
5957
5958      # First remove it from the list of overridden variables, so we can test
5959      # for unknown variables in the end.
5960      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5961
5962      # Check if we try to supply an empty value
5963      if test "x$CHMOD" = x; then
5964        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5965$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5966        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5967$as_echo_n "checking for CHMOD... " >&6; }
5968        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5969$as_echo "disabled" >&6; }
5970      else
5971        # Check if the provided tool contains a complete path.
5972        tool_specified="$CHMOD"
5973        tool_basename="${tool_specified##*/}"
5974        if test "x$tool_basename" = "x$tool_specified"; then
5975          # A command without a complete path is provided, search $PATH.
5976          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5977$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5978          # Extract the first word of "$tool_basename", so it can be a program name with args.
5979set dummy $tool_basename; ac_word=$2
5980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5981$as_echo_n "checking for $ac_word... " >&6; }
5982if ${ac_cv_path_CHMOD+:} false; then :
5983  $as_echo_n "(cached) " >&6
5984else
5985  case $CHMOD in
5986  [\\/]* | ?:[\\/]*)
5987  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5988  ;;
5989  *)
5990  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5991for as_dir in $PATH
5992do
5993  IFS=$as_save_IFS
5994  test -z "$as_dir" && as_dir=.
5995    for ac_exec_ext in '' $ac_executable_extensions; do
5996  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5997    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5999    break 2
6000  fi
6001done
6002  done
6003IFS=$as_save_IFS
6004
6005  ;;
6006esac
6007fi
6008CHMOD=$ac_cv_path_CHMOD
6009if test -n "$CHMOD"; then
6010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
6011$as_echo "$CHMOD" >&6; }
6012else
6013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6014$as_echo "no" >&6; }
6015fi
6016
6017
6018          if test "x$CHMOD" = x; then
6019            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6020          fi
6021        else
6022          # Otherwise we believe it is a complete path. Use it as it is.
6023          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
6024$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
6025          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
6026$as_echo_n "checking for CHMOD... " >&6; }
6027          if test ! -x "$tool_specified"; then
6028            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6029$as_echo "not found" >&6; }
6030            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
6031          fi
6032          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6033$as_echo "$tool_specified" >&6; }
6034        fi
6035      fi
6036    fi
6037
6038  fi
6039
6040
6041
6042  if test "x$CHMOD" = x; then
6043    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
6044  fi
6045
6046
6047
6048
6049
6050  # Publish this variable in the help.
6051
6052
6053  if [ -z "${CMP+x}" ]; then
6054    # The variable is not set by user, try to locate tool using the code snippet
6055    for ac_prog in cmp
6056do
6057  # Extract the first word of "$ac_prog", so it can be a program name with args.
6058set dummy $ac_prog; ac_word=$2
6059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6060$as_echo_n "checking for $ac_word... " >&6; }
6061if ${ac_cv_path_CMP+:} false; then :
6062  $as_echo_n "(cached) " >&6
6063else
6064  case $CMP in
6065  [\\/]* | ?:[\\/]*)
6066  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6067  ;;
6068  *)
6069  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6070for as_dir in $PATH
6071do
6072  IFS=$as_save_IFS
6073  test -z "$as_dir" && as_dir=.
6074    for ac_exec_ext in '' $ac_executable_extensions; do
6075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6076    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6078    break 2
6079  fi
6080done
6081  done
6082IFS=$as_save_IFS
6083
6084  ;;
6085esac
6086fi
6087CMP=$ac_cv_path_CMP
6088if test -n "$CMP"; then
6089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6090$as_echo "$CMP" >&6; }
6091else
6092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6093$as_echo "no" >&6; }
6094fi
6095
6096
6097  test -n "$CMP" && break
6098done
6099
6100  else
6101    # The variable is set, but is it from the command line or the environment?
6102
6103    # Try to remove the string !CMP! from our list.
6104    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6105    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6106      # If it failed, the variable was not from the command line. Ignore it,
6107      # but warn the user (except for BASH, which is always set by the calling BASH).
6108      if test "xCMP" != xBASH; then
6109        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6110$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6111      fi
6112      # Try to locate tool using the code snippet
6113      for ac_prog in cmp
6114do
6115  # Extract the first word of "$ac_prog", so it can be a program name with args.
6116set dummy $ac_prog; ac_word=$2
6117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6118$as_echo_n "checking for $ac_word... " >&6; }
6119if ${ac_cv_path_CMP+:} false; then :
6120  $as_echo_n "(cached) " >&6
6121else
6122  case $CMP in
6123  [\\/]* | ?:[\\/]*)
6124  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6125  ;;
6126  *)
6127  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6128for as_dir in $PATH
6129do
6130  IFS=$as_save_IFS
6131  test -z "$as_dir" && as_dir=.
6132    for ac_exec_ext in '' $ac_executable_extensions; do
6133  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6134    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6136    break 2
6137  fi
6138done
6139  done
6140IFS=$as_save_IFS
6141
6142  ;;
6143esac
6144fi
6145CMP=$ac_cv_path_CMP
6146if test -n "$CMP"; then
6147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6148$as_echo "$CMP" >&6; }
6149else
6150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6151$as_echo "no" >&6; }
6152fi
6153
6154
6155  test -n "$CMP" && break
6156done
6157
6158    else
6159      # If it succeeded, then it was overridden by the user. We will use it
6160      # for the tool.
6161
6162      # First remove it from the list of overridden variables, so we can test
6163      # for unknown variables in the end.
6164      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6165
6166      # Check if we try to supply an empty value
6167      if test "x$CMP" = x; then
6168        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6169$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6170        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6171$as_echo_n "checking for CMP... " >&6; }
6172        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6173$as_echo "disabled" >&6; }
6174      else
6175        # Check if the provided tool contains a complete path.
6176        tool_specified="$CMP"
6177        tool_basename="${tool_specified##*/}"
6178        if test "x$tool_basename" = "x$tool_specified"; then
6179          # A command without a complete path is provided, search $PATH.
6180          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6181$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6182          # Extract the first word of "$tool_basename", so it can be a program name with args.
6183set dummy $tool_basename; ac_word=$2
6184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6185$as_echo_n "checking for $ac_word... " >&6; }
6186if ${ac_cv_path_CMP+:} false; then :
6187  $as_echo_n "(cached) " >&6
6188else
6189  case $CMP in
6190  [\\/]* | ?:[\\/]*)
6191  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6192  ;;
6193  *)
6194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6195for as_dir in $PATH
6196do
6197  IFS=$as_save_IFS
6198  test -z "$as_dir" && as_dir=.
6199    for ac_exec_ext in '' $ac_executable_extensions; do
6200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6201    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6203    break 2
6204  fi
6205done
6206  done
6207IFS=$as_save_IFS
6208
6209  ;;
6210esac
6211fi
6212CMP=$ac_cv_path_CMP
6213if test -n "$CMP"; then
6214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6215$as_echo "$CMP" >&6; }
6216else
6217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6218$as_echo "no" >&6; }
6219fi
6220
6221
6222          if test "x$CMP" = x; then
6223            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6224          fi
6225        else
6226          # Otherwise we believe it is a complete path. Use it as it is.
6227          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6228$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6229          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6230$as_echo_n "checking for CMP... " >&6; }
6231          if test ! -x "$tool_specified"; then
6232            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6233$as_echo "not found" >&6; }
6234            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6235          fi
6236          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6237$as_echo "$tool_specified" >&6; }
6238        fi
6239      fi
6240    fi
6241
6242  fi
6243
6244
6245
6246  if test "x$CMP" = x; then
6247    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6248  fi
6249
6250
6251
6252
6253
6254  # Publish this variable in the help.
6255
6256
6257  if [ -z "${COMM+x}" ]; then
6258    # The variable is not set by user, try to locate tool using the code snippet
6259    for ac_prog in comm
6260do
6261  # Extract the first word of "$ac_prog", so it can be a program name with args.
6262set dummy $ac_prog; ac_word=$2
6263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6264$as_echo_n "checking for $ac_word... " >&6; }
6265if ${ac_cv_path_COMM+:} false; then :
6266  $as_echo_n "(cached) " >&6
6267else
6268  case $COMM in
6269  [\\/]* | ?:[\\/]*)
6270  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6271  ;;
6272  *)
6273  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6274for as_dir in $PATH
6275do
6276  IFS=$as_save_IFS
6277  test -z "$as_dir" && as_dir=.
6278    for ac_exec_ext in '' $ac_executable_extensions; do
6279  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6280    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6282    break 2
6283  fi
6284done
6285  done
6286IFS=$as_save_IFS
6287
6288  ;;
6289esac
6290fi
6291COMM=$ac_cv_path_COMM
6292if test -n "$COMM"; then
6293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6294$as_echo "$COMM" >&6; }
6295else
6296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6297$as_echo "no" >&6; }
6298fi
6299
6300
6301  test -n "$COMM" && break
6302done
6303
6304  else
6305    # The variable is set, but is it from the command line or the environment?
6306
6307    # Try to remove the string !COMM! from our list.
6308    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6309    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6310      # If it failed, the variable was not from the command line. Ignore it,
6311      # but warn the user (except for BASH, which is always set by the calling BASH).
6312      if test "xCOMM" != xBASH; then
6313        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6314$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6315      fi
6316      # Try to locate tool using the code snippet
6317      for ac_prog in comm
6318do
6319  # Extract the first word of "$ac_prog", so it can be a program name with args.
6320set dummy $ac_prog; ac_word=$2
6321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6322$as_echo_n "checking for $ac_word... " >&6; }
6323if ${ac_cv_path_COMM+:} false; then :
6324  $as_echo_n "(cached) " >&6
6325else
6326  case $COMM in
6327  [\\/]* | ?:[\\/]*)
6328  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6329  ;;
6330  *)
6331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6332for as_dir in $PATH
6333do
6334  IFS=$as_save_IFS
6335  test -z "$as_dir" && as_dir=.
6336    for ac_exec_ext in '' $ac_executable_extensions; do
6337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6338    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6340    break 2
6341  fi
6342done
6343  done
6344IFS=$as_save_IFS
6345
6346  ;;
6347esac
6348fi
6349COMM=$ac_cv_path_COMM
6350if test -n "$COMM"; then
6351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6352$as_echo "$COMM" >&6; }
6353else
6354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6355$as_echo "no" >&6; }
6356fi
6357
6358
6359  test -n "$COMM" && break
6360done
6361
6362    else
6363      # If it succeeded, then it was overridden by the user. We will use it
6364      # for the tool.
6365
6366      # First remove it from the list of overridden variables, so we can test
6367      # for unknown variables in the end.
6368      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6369
6370      # Check if we try to supply an empty value
6371      if test "x$COMM" = x; then
6372        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6373$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6374        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6375$as_echo_n "checking for COMM... " >&6; }
6376        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6377$as_echo "disabled" >&6; }
6378      else
6379        # Check if the provided tool contains a complete path.
6380        tool_specified="$COMM"
6381        tool_basename="${tool_specified##*/}"
6382        if test "x$tool_basename" = "x$tool_specified"; then
6383          # A command without a complete path is provided, search $PATH.
6384          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6385$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6386          # Extract the first word of "$tool_basename", so it can be a program name with args.
6387set dummy $tool_basename; ac_word=$2
6388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6389$as_echo_n "checking for $ac_word... " >&6; }
6390if ${ac_cv_path_COMM+:} false; then :
6391  $as_echo_n "(cached) " >&6
6392else
6393  case $COMM in
6394  [\\/]* | ?:[\\/]*)
6395  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6396  ;;
6397  *)
6398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6399for as_dir in $PATH
6400do
6401  IFS=$as_save_IFS
6402  test -z "$as_dir" && as_dir=.
6403    for ac_exec_ext in '' $ac_executable_extensions; do
6404  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6405    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6407    break 2
6408  fi
6409done
6410  done
6411IFS=$as_save_IFS
6412
6413  ;;
6414esac
6415fi
6416COMM=$ac_cv_path_COMM
6417if test -n "$COMM"; then
6418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6419$as_echo "$COMM" >&6; }
6420else
6421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6422$as_echo "no" >&6; }
6423fi
6424
6425
6426          if test "x$COMM" = x; then
6427            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6428          fi
6429        else
6430          # Otherwise we believe it is a complete path. Use it as it is.
6431          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6432$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6433          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6434$as_echo_n "checking for COMM... " >&6; }
6435          if test ! -x "$tool_specified"; then
6436            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6437$as_echo "not found" >&6; }
6438            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6439          fi
6440          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6441$as_echo "$tool_specified" >&6; }
6442        fi
6443      fi
6444    fi
6445
6446  fi
6447
6448
6449
6450  if test "x$COMM" = x; then
6451    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6452  fi
6453
6454
6455
6456
6457
6458  # Publish this variable in the help.
6459
6460
6461  if [ -z "${CP+x}" ]; then
6462    # The variable is not set by user, try to locate tool using the code snippet
6463    for ac_prog in cp
6464do
6465  # Extract the first word of "$ac_prog", so it can be a program name with args.
6466set dummy $ac_prog; ac_word=$2
6467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6468$as_echo_n "checking for $ac_word... " >&6; }
6469if ${ac_cv_path_CP+:} false; then :
6470  $as_echo_n "(cached) " >&6
6471else
6472  case $CP in
6473  [\\/]* | ?:[\\/]*)
6474  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6475  ;;
6476  *)
6477  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6478for as_dir in $PATH
6479do
6480  IFS=$as_save_IFS
6481  test -z "$as_dir" && as_dir=.
6482    for ac_exec_ext in '' $ac_executable_extensions; do
6483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6484    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6486    break 2
6487  fi
6488done
6489  done
6490IFS=$as_save_IFS
6491
6492  ;;
6493esac
6494fi
6495CP=$ac_cv_path_CP
6496if test -n "$CP"; then
6497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6498$as_echo "$CP" >&6; }
6499else
6500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6501$as_echo "no" >&6; }
6502fi
6503
6504
6505  test -n "$CP" && break
6506done
6507
6508  else
6509    # The variable is set, but is it from the command line or the environment?
6510
6511    # Try to remove the string !CP! from our list.
6512    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6513    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6514      # If it failed, the variable was not from the command line. Ignore it,
6515      # but warn the user (except for BASH, which is always set by the calling BASH).
6516      if test "xCP" != xBASH; then
6517        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6518$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6519      fi
6520      # Try to locate tool using the code snippet
6521      for ac_prog in cp
6522do
6523  # Extract the first word of "$ac_prog", so it can be a program name with args.
6524set dummy $ac_prog; ac_word=$2
6525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6526$as_echo_n "checking for $ac_word... " >&6; }
6527if ${ac_cv_path_CP+:} false; then :
6528  $as_echo_n "(cached) " >&6
6529else
6530  case $CP in
6531  [\\/]* | ?:[\\/]*)
6532  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6533  ;;
6534  *)
6535  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6536for as_dir in $PATH
6537do
6538  IFS=$as_save_IFS
6539  test -z "$as_dir" && as_dir=.
6540    for ac_exec_ext in '' $ac_executable_extensions; do
6541  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6542    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6543    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6544    break 2
6545  fi
6546done
6547  done
6548IFS=$as_save_IFS
6549
6550  ;;
6551esac
6552fi
6553CP=$ac_cv_path_CP
6554if test -n "$CP"; then
6555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6556$as_echo "$CP" >&6; }
6557else
6558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6559$as_echo "no" >&6; }
6560fi
6561
6562
6563  test -n "$CP" && break
6564done
6565
6566    else
6567      # If it succeeded, then it was overridden by the user. We will use it
6568      # for the tool.
6569
6570      # First remove it from the list of overridden variables, so we can test
6571      # for unknown variables in the end.
6572      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6573
6574      # Check if we try to supply an empty value
6575      if test "x$CP" = x; then
6576        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6577$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6578        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6579$as_echo_n "checking for CP... " >&6; }
6580        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6581$as_echo "disabled" >&6; }
6582      else
6583        # Check if the provided tool contains a complete path.
6584        tool_specified="$CP"
6585        tool_basename="${tool_specified##*/}"
6586        if test "x$tool_basename" = "x$tool_specified"; then
6587          # A command without a complete path is provided, search $PATH.
6588          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6589$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6590          # Extract the first word of "$tool_basename", so it can be a program name with args.
6591set dummy $tool_basename; ac_word=$2
6592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6593$as_echo_n "checking for $ac_word... " >&6; }
6594if ${ac_cv_path_CP+:} false; then :
6595  $as_echo_n "(cached) " >&6
6596else
6597  case $CP in
6598  [\\/]* | ?:[\\/]*)
6599  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6600  ;;
6601  *)
6602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6603for as_dir in $PATH
6604do
6605  IFS=$as_save_IFS
6606  test -z "$as_dir" && as_dir=.
6607    for ac_exec_ext in '' $ac_executable_extensions; do
6608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6609    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6611    break 2
6612  fi
6613done
6614  done
6615IFS=$as_save_IFS
6616
6617  ;;
6618esac
6619fi
6620CP=$ac_cv_path_CP
6621if test -n "$CP"; then
6622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6623$as_echo "$CP" >&6; }
6624else
6625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6626$as_echo "no" >&6; }
6627fi
6628
6629
6630          if test "x$CP" = x; then
6631            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6632          fi
6633        else
6634          # Otherwise we believe it is a complete path. Use it as it is.
6635          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6636$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6637          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6638$as_echo_n "checking for CP... " >&6; }
6639          if test ! -x "$tool_specified"; then
6640            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6641$as_echo "not found" >&6; }
6642            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6643          fi
6644          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6645$as_echo "$tool_specified" >&6; }
6646        fi
6647      fi
6648    fi
6649
6650  fi
6651
6652
6653
6654  if test "x$CP" = x; then
6655    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6656  fi
6657
6658
6659
6660
6661
6662  # Publish this variable in the help.
6663
6664
6665  if [ -z "${CUT+x}" ]; then
6666    # The variable is not set by user, try to locate tool using the code snippet
6667    for ac_prog in cut
6668do
6669  # Extract the first word of "$ac_prog", so it can be a program name with args.
6670set dummy $ac_prog; ac_word=$2
6671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6672$as_echo_n "checking for $ac_word... " >&6; }
6673if ${ac_cv_path_CUT+:} false; then :
6674  $as_echo_n "(cached) " >&6
6675else
6676  case $CUT in
6677  [\\/]* | ?:[\\/]*)
6678  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6679  ;;
6680  *)
6681  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6682for as_dir in $PATH
6683do
6684  IFS=$as_save_IFS
6685  test -z "$as_dir" && as_dir=.
6686    for ac_exec_ext in '' $ac_executable_extensions; do
6687  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6688    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6690    break 2
6691  fi
6692done
6693  done
6694IFS=$as_save_IFS
6695
6696  ;;
6697esac
6698fi
6699CUT=$ac_cv_path_CUT
6700if test -n "$CUT"; then
6701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6702$as_echo "$CUT" >&6; }
6703else
6704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6705$as_echo "no" >&6; }
6706fi
6707
6708
6709  test -n "$CUT" && break
6710done
6711
6712  else
6713    # The variable is set, but is it from the command line or the environment?
6714
6715    # Try to remove the string !CUT! from our list.
6716    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6717    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6718      # If it failed, the variable was not from the command line. Ignore it,
6719      # but warn the user (except for BASH, which is always set by the calling BASH).
6720      if test "xCUT" != xBASH; then
6721        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6722$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6723      fi
6724      # Try to locate tool using the code snippet
6725      for ac_prog in cut
6726do
6727  # Extract the first word of "$ac_prog", so it can be a program name with args.
6728set dummy $ac_prog; ac_word=$2
6729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6730$as_echo_n "checking for $ac_word... " >&6; }
6731if ${ac_cv_path_CUT+:} false; then :
6732  $as_echo_n "(cached) " >&6
6733else
6734  case $CUT in
6735  [\\/]* | ?:[\\/]*)
6736  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6737  ;;
6738  *)
6739  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6740for as_dir in $PATH
6741do
6742  IFS=$as_save_IFS
6743  test -z "$as_dir" && as_dir=.
6744    for ac_exec_ext in '' $ac_executable_extensions; do
6745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6746    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6748    break 2
6749  fi
6750done
6751  done
6752IFS=$as_save_IFS
6753
6754  ;;
6755esac
6756fi
6757CUT=$ac_cv_path_CUT
6758if test -n "$CUT"; then
6759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6760$as_echo "$CUT" >&6; }
6761else
6762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6763$as_echo "no" >&6; }
6764fi
6765
6766
6767  test -n "$CUT" && break
6768done
6769
6770    else
6771      # If it succeeded, then it was overridden by the user. We will use it
6772      # for the tool.
6773
6774      # First remove it from the list of overridden variables, so we can test
6775      # for unknown variables in the end.
6776      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6777
6778      # Check if we try to supply an empty value
6779      if test "x$CUT" = x; then
6780        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6781$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6782        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6783$as_echo_n "checking for CUT... " >&6; }
6784        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6785$as_echo "disabled" >&6; }
6786      else
6787        # Check if the provided tool contains a complete path.
6788        tool_specified="$CUT"
6789        tool_basename="${tool_specified##*/}"
6790        if test "x$tool_basename" = "x$tool_specified"; then
6791          # A command without a complete path is provided, search $PATH.
6792          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6793$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6794          # Extract the first word of "$tool_basename", so it can be a program name with args.
6795set dummy $tool_basename; ac_word=$2
6796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6797$as_echo_n "checking for $ac_word... " >&6; }
6798if ${ac_cv_path_CUT+:} false; then :
6799  $as_echo_n "(cached) " >&6
6800else
6801  case $CUT in
6802  [\\/]* | ?:[\\/]*)
6803  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6804  ;;
6805  *)
6806  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6807for as_dir in $PATH
6808do
6809  IFS=$as_save_IFS
6810  test -z "$as_dir" && as_dir=.
6811    for ac_exec_ext in '' $ac_executable_extensions; do
6812  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6813    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6814    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6815    break 2
6816  fi
6817done
6818  done
6819IFS=$as_save_IFS
6820
6821  ;;
6822esac
6823fi
6824CUT=$ac_cv_path_CUT
6825if test -n "$CUT"; then
6826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6827$as_echo "$CUT" >&6; }
6828else
6829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6830$as_echo "no" >&6; }
6831fi
6832
6833
6834          if test "x$CUT" = x; then
6835            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6836          fi
6837        else
6838          # Otherwise we believe it is a complete path. Use it as it is.
6839          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6840$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6841          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6842$as_echo_n "checking for CUT... " >&6; }
6843          if test ! -x "$tool_specified"; then
6844            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6845$as_echo "not found" >&6; }
6846            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6847          fi
6848          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6849$as_echo "$tool_specified" >&6; }
6850        fi
6851      fi
6852    fi
6853
6854  fi
6855
6856
6857
6858  if test "x$CUT" = x; then
6859    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6860  fi
6861
6862
6863
6864
6865
6866  # Publish this variable in the help.
6867
6868
6869  if [ -z "${DATE+x}" ]; then
6870    # The variable is not set by user, try to locate tool using the code snippet
6871    for ac_prog in date
6872do
6873  # Extract the first word of "$ac_prog", so it can be a program name with args.
6874set dummy $ac_prog; ac_word=$2
6875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6876$as_echo_n "checking for $ac_word... " >&6; }
6877if ${ac_cv_path_DATE+:} false; then :
6878  $as_echo_n "(cached) " >&6
6879else
6880  case $DATE in
6881  [\\/]* | ?:[\\/]*)
6882  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6883  ;;
6884  *)
6885  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6886for as_dir in $PATH
6887do
6888  IFS=$as_save_IFS
6889  test -z "$as_dir" && as_dir=.
6890    for ac_exec_ext in '' $ac_executable_extensions; do
6891  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6892    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6893    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6894    break 2
6895  fi
6896done
6897  done
6898IFS=$as_save_IFS
6899
6900  ;;
6901esac
6902fi
6903DATE=$ac_cv_path_DATE
6904if test -n "$DATE"; then
6905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6906$as_echo "$DATE" >&6; }
6907else
6908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6909$as_echo "no" >&6; }
6910fi
6911
6912
6913  test -n "$DATE" && break
6914done
6915
6916  else
6917    # The variable is set, but is it from the command line or the environment?
6918
6919    # Try to remove the string !DATE! from our list.
6920    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6921    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6922      # If it failed, the variable was not from the command line. Ignore it,
6923      # but warn the user (except for BASH, which is always set by the calling BASH).
6924      if test "xDATE" != xBASH; then
6925        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6926$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6927      fi
6928      # Try to locate tool using the code snippet
6929      for ac_prog in date
6930do
6931  # Extract the first word of "$ac_prog", so it can be a program name with args.
6932set dummy $ac_prog; ac_word=$2
6933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6934$as_echo_n "checking for $ac_word... " >&6; }
6935if ${ac_cv_path_DATE+:} false; then :
6936  $as_echo_n "(cached) " >&6
6937else
6938  case $DATE in
6939  [\\/]* | ?:[\\/]*)
6940  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6941  ;;
6942  *)
6943  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6944for as_dir in $PATH
6945do
6946  IFS=$as_save_IFS
6947  test -z "$as_dir" && as_dir=.
6948    for ac_exec_ext in '' $ac_executable_extensions; do
6949  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6950    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6952    break 2
6953  fi
6954done
6955  done
6956IFS=$as_save_IFS
6957
6958  ;;
6959esac
6960fi
6961DATE=$ac_cv_path_DATE
6962if test -n "$DATE"; then
6963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6964$as_echo "$DATE" >&6; }
6965else
6966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6967$as_echo "no" >&6; }
6968fi
6969
6970
6971  test -n "$DATE" && break
6972done
6973
6974    else
6975      # If it succeeded, then it was overridden by the user. We will use it
6976      # for the tool.
6977
6978      # First remove it from the list of overridden variables, so we can test
6979      # for unknown variables in the end.
6980      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6981
6982      # Check if we try to supply an empty value
6983      if test "x$DATE" = x; then
6984        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6985$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6986        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6987$as_echo_n "checking for DATE... " >&6; }
6988        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6989$as_echo "disabled" >&6; }
6990      else
6991        # Check if the provided tool contains a complete path.
6992        tool_specified="$DATE"
6993        tool_basename="${tool_specified##*/}"
6994        if test "x$tool_basename" = "x$tool_specified"; then
6995          # A command without a complete path is provided, search $PATH.
6996          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6997$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6998          # Extract the first word of "$tool_basename", so it can be a program name with args.
6999set dummy $tool_basename; ac_word=$2
7000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7001$as_echo_n "checking for $ac_word... " >&6; }
7002if ${ac_cv_path_DATE+:} false; then :
7003  $as_echo_n "(cached) " >&6
7004else
7005  case $DATE in
7006  [\\/]* | ?:[\\/]*)
7007  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
7008  ;;
7009  *)
7010  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7011for as_dir in $PATH
7012do
7013  IFS=$as_save_IFS
7014  test -z "$as_dir" && as_dir=.
7015    for ac_exec_ext in '' $ac_executable_extensions; do
7016  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7017    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
7018    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7019    break 2
7020  fi
7021done
7022  done
7023IFS=$as_save_IFS
7024
7025  ;;
7026esac
7027fi
7028DATE=$ac_cv_path_DATE
7029if test -n "$DATE"; then
7030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
7031$as_echo "$DATE" >&6; }
7032else
7033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7034$as_echo "no" >&6; }
7035fi
7036
7037
7038          if test "x$DATE" = x; then
7039            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7040          fi
7041        else
7042          # Otherwise we believe it is a complete path. Use it as it is.
7043          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
7044$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
7045          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
7046$as_echo_n "checking for DATE... " >&6; }
7047          if test ! -x "$tool_specified"; then
7048            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7049$as_echo "not found" >&6; }
7050            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
7051          fi
7052          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7053$as_echo "$tool_specified" >&6; }
7054        fi
7055      fi
7056    fi
7057
7058  fi
7059
7060
7061
7062  if test "x$DATE" = x; then
7063    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
7064  fi
7065
7066
7067
7068
7069
7070  # Publish this variable in the help.
7071
7072
7073  if [ -z "${DIFF+x}" ]; then
7074    # The variable is not set by user, try to locate tool using the code snippet
7075    for ac_prog in gdiff diff
7076do
7077  # Extract the first word of "$ac_prog", so it can be a program name with args.
7078set dummy $ac_prog; ac_word=$2
7079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7080$as_echo_n "checking for $ac_word... " >&6; }
7081if ${ac_cv_path_DIFF+:} false; then :
7082  $as_echo_n "(cached) " >&6
7083else
7084  case $DIFF in
7085  [\\/]* | ?:[\\/]*)
7086  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7087  ;;
7088  *)
7089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7090for as_dir in $PATH
7091do
7092  IFS=$as_save_IFS
7093  test -z "$as_dir" && as_dir=.
7094    for ac_exec_ext in '' $ac_executable_extensions; do
7095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7096    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7098    break 2
7099  fi
7100done
7101  done
7102IFS=$as_save_IFS
7103
7104  ;;
7105esac
7106fi
7107DIFF=$ac_cv_path_DIFF
7108if test -n "$DIFF"; then
7109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7110$as_echo "$DIFF" >&6; }
7111else
7112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7113$as_echo "no" >&6; }
7114fi
7115
7116
7117  test -n "$DIFF" && break
7118done
7119
7120  else
7121    # The variable is set, but is it from the command line or the environment?
7122
7123    # Try to remove the string !DIFF! from our list.
7124    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7125    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7126      # If it failed, the variable was not from the command line. Ignore it,
7127      # but warn the user (except for BASH, which is always set by the calling BASH).
7128      if test "xDIFF" != xBASH; then
7129        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7130$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7131      fi
7132      # Try to locate tool using the code snippet
7133      for ac_prog in gdiff diff
7134do
7135  # Extract the first word of "$ac_prog", so it can be a program name with args.
7136set dummy $ac_prog; ac_word=$2
7137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7138$as_echo_n "checking for $ac_word... " >&6; }
7139if ${ac_cv_path_DIFF+:} false; then :
7140  $as_echo_n "(cached) " >&6
7141else
7142  case $DIFF in
7143  [\\/]* | ?:[\\/]*)
7144  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7145  ;;
7146  *)
7147  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7148for as_dir in $PATH
7149do
7150  IFS=$as_save_IFS
7151  test -z "$as_dir" && as_dir=.
7152    for ac_exec_ext in '' $ac_executable_extensions; do
7153  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7154    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7156    break 2
7157  fi
7158done
7159  done
7160IFS=$as_save_IFS
7161
7162  ;;
7163esac
7164fi
7165DIFF=$ac_cv_path_DIFF
7166if test -n "$DIFF"; then
7167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7168$as_echo "$DIFF" >&6; }
7169else
7170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7171$as_echo "no" >&6; }
7172fi
7173
7174
7175  test -n "$DIFF" && break
7176done
7177
7178    else
7179      # If it succeeded, then it was overridden by the user. We will use it
7180      # for the tool.
7181
7182      # First remove it from the list of overridden variables, so we can test
7183      # for unknown variables in the end.
7184      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7185
7186      # Check if we try to supply an empty value
7187      if test "x$DIFF" = x; then
7188        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7189$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7190        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7191$as_echo_n "checking for DIFF... " >&6; }
7192        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7193$as_echo "disabled" >&6; }
7194      else
7195        # Check if the provided tool contains a complete path.
7196        tool_specified="$DIFF"
7197        tool_basename="${tool_specified##*/}"
7198        if test "x$tool_basename" = "x$tool_specified"; then
7199          # A command without a complete path is provided, search $PATH.
7200          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7201$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7202          # Extract the first word of "$tool_basename", so it can be a program name with args.
7203set dummy $tool_basename; ac_word=$2
7204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7205$as_echo_n "checking for $ac_word... " >&6; }
7206if ${ac_cv_path_DIFF+:} false; then :
7207  $as_echo_n "(cached) " >&6
7208else
7209  case $DIFF in
7210  [\\/]* | ?:[\\/]*)
7211  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7212  ;;
7213  *)
7214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7215for as_dir in $PATH
7216do
7217  IFS=$as_save_IFS
7218  test -z "$as_dir" && as_dir=.
7219    for ac_exec_ext in '' $ac_executable_extensions; do
7220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7221    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7223    break 2
7224  fi
7225done
7226  done
7227IFS=$as_save_IFS
7228
7229  ;;
7230esac
7231fi
7232DIFF=$ac_cv_path_DIFF
7233if test -n "$DIFF"; then
7234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7235$as_echo "$DIFF" >&6; }
7236else
7237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7238$as_echo "no" >&6; }
7239fi
7240
7241
7242          if test "x$DIFF" = x; then
7243            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7244          fi
7245        else
7246          # Otherwise we believe it is a complete path. Use it as it is.
7247          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7248$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7249          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7250$as_echo_n "checking for DIFF... " >&6; }
7251          if test ! -x "$tool_specified"; then
7252            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7253$as_echo "not found" >&6; }
7254            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7255          fi
7256          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7257$as_echo "$tool_specified" >&6; }
7258        fi
7259      fi
7260    fi
7261
7262  fi
7263
7264
7265
7266  if test "x$DIFF" = x; then
7267    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7268  fi
7269
7270
7271
7272
7273
7274  # Publish this variable in the help.
7275
7276
7277  if [ -z "${DIRNAME+x}" ]; then
7278    # The variable is not set by user, try to locate tool using the code snippet
7279    for ac_prog in dirname
7280do
7281  # Extract the first word of "$ac_prog", so it can be a program name with args.
7282set dummy $ac_prog; ac_word=$2
7283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7284$as_echo_n "checking for $ac_word... " >&6; }
7285if ${ac_cv_path_DIRNAME+:} false; then :
7286  $as_echo_n "(cached) " >&6
7287else
7288  case $DIRNAME in
7289  [\\/]* | ?:[\\/]*)
7290  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7291  ;;
7292  *)
7293  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7294for as_dir in $PATH
7295do
7296  IFS=$as_save_IFS
7297  test -z "$as_dir" && as_dir=.
7298    for ac_exec_ext in '' $ac_executable_extensions; do
7299  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7300    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7301    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7302    break 2
7303  fi
7304done
7305  done
7306IFS=$as_save_IFS
7307
7308  ;;
7309esac
7310fi
7311DIRNAME=$ac_cv_path_DIRNAME
7312if test -n "$DIRNAME"; then
7313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7314$as_echo "$DIRNAME" >&6; }
7315else
7316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7317$as_echo "no" >&6; }
7318fi
7319
7320
7321  test -n "$DIRNAME" && break
7322done
7323
7324  else
7325    # The variable is set, but is it from the command line or the environment?
7326
7327    # Try to remove the string !DIRNAME! from our list.
7328    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7329    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7330      # If it failed, the variable was not from the command line. Ignore it,
7331      # but warn the user (except for BASH, which is always set by the calling BASH).
7332      if test "xDIRNAME" != xBASH; then
7333        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7334$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7335      fi
7336      # Try to locate tool using the code snippet
7337      for ac_prog in dirname
7338do
7339  # Extract the first word of "$ac_prog", so it can be a program name with args.
7340set dummy $ac_prog; ac_word=$2
7341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7342$as_echo_n "checking for $ac_word... " >&6; }
7343if ${ac_cv_path_DIRNAME+:} false; then :
7344  $as_echo_n "(cached) " >&6
7345else
7346  case $DIRNAME in
7347  [\\/]* | ?:[\\/]*)
7348  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7349  ;;
7350  *)
7351  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7352for as_dir in $PATH
7353do
7354  IFS=$as_save_IFS
7355  test -z "$as_dir" && as_dir=.
7356    for ac_exec_ext in '' $ac_executable_extensions; do
7357  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7358    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7359    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7360    break 2
7361  fi
7362done
7363  done
7364IFS=$as_save_IFS
7365
7366  ;;
7367esac
7368fi
7369DIRNAME=$ac_cv_path_DIRNAME
7370if test -n "$DIRNAME"; then
7371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7372$as_echo "$DIRNAME" >&6; }
7373else
7374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7375$as_echo "no" >&6; }
7376fi
7377
7378
7379  test -n "$DIRNAME" && break
7380done
7381
7382    else
7383      # If it succeeded, then it was overridden by the user. We will use it
7384      # for the tool.
7385
7386      # First remove it from the list of overridden variables, so we can test
7387      # for unknown variables in the end.
7388      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7389
7390      # Check if we try to supply an empty value
7391      if test "x$DIRNAME" = x; then
7392        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7393$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7394        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7395$as_echo_n "checking for DIRNAME... " >&6; }
7396        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7397$as_echo "disabled" >&6; }
7398      else
7399        # Check if the provided tool contains a complete path.
7400        tool_specified="$DIRNAME"
7401        tool_basename="${tool_specified##*/}"
7402        if test "x$tool_basename" = "x$tool_specified"; then
7403          # A command without a complete path is provided, search $PATH.
7404          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7405$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7406          # Extract the first word of "$tool_basename", so it can be a program name with args.
7407set dummy $tool_basename; ac_word=$2
7408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7409$as_echo_n "checking for $ac_word... " >&6; }
7410if ${ac_cv_path_DIRNAME+:} false; then :
7411  $as_echo_n "(cached) " >&6
7412else
7413  case $DIRNAME in
7414  [\\/]* | ?:[\\/]*)
7415  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7416  ;;
7417  *)
7418  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7419for as_dir in $PATH
7420do
7421  IFS=$as_save_IFS
7422  test -z "$as_dir" && as_dir=.
7423    for ac_exec_ext in '' $ac_executable_extensions; do
7424  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7425    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7426    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7427    break 2
7428  fi
7429done
7430  done
7431IFS=$as_save_IFS
7432
7433  ;;
7434esac
7435fi
7436DIRNAME=$ac_cv_path_DIRNAME
7437if test -n "$DIRNAME"; then
7438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7439$as_echo "$DIRNAME" >&6; }
7440else
7441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7442$as_echo "no" >&6; }
7443fi
7444
7445
7446          if test "x$DIRNAME" = x; then
7447            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7448          fi
7449        else
7450          # Otherwise we believe it is a complete path. Use it as it is.
7451          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7452$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7453          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7454$as_echo_n "checking for DIRNAME... " >&6; }
7455          if test ! -x "$tool_specified"; then
7456            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7457$as_echo "not found" >&6; }
7458            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7459          fi
7460          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7461$as_echo "$tool_specified" >&6; }
7462        fi
7463      fi
7464    fi
7465
7466  fi
7467
7468
7469
7470  if test "x$DIRNAME" = x; then
7471    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7472  fi
7473
7474
7475
7476
7477
7478  # Publish this variable in the help.
7479
7480
7481  if [ -z "${ECHO+x}" ]; then
7482    # The variable is not set by user, try to locate tool using the code snippet
7483    for ac_prog in echo
7484do
7485  # Extract the first word of "$ac_prog", so it can be a program name with args.
7486set dummy $ac_prog; ac_word=$2
7487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7488$as_echo_n "checking for $ac_word... " >&6; }
7489if ${ac_cv_path_ECHO+:} false; then :
7490  $as_echo_n "(cached) " >&6
7491else
7492  case $ECHO in
7493  [\\/]* | ?:[\\/]*)
7494  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7495  ;;
7496  *)
7497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7498for as_dir in $PATH
7499do
7500  IFS=$as_save_IFS
7501  test -z "$as_dir" && as_dir=.
7502    for ac_exec_ext in '' $ac_executable_extensions; do
7503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7504    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7506    break 2
7507  fi
7508done
7509  done
7510IFS=$as_save_IFS
7511
7512  ;;
7513esac
7514fi
7515ECHO=$ac_cv_path_ECHO
7516if test -n "$ECHO"; then
7517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7518$as_echo "$ECHO" >&6; }
7519else
7520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7521$as_echo "no" >&6; }
7522fi
7523
7524
7525  test -n "$ECHO" && break
7526done
7527
7528  else
7529    # The variable is set, but is it from the command line or the environment?
7530
7531    # Try to remove the string !ECHO! from our list.
7532    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7533    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7534      # If it failed, the variable was not from the command line. Ignore it,
7535      # but warn the user (except for BASH, which is always set by the calling BASH).
7536      if test "xECHO" != xBASH; then
7537        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7538$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7539      fi
7540      # Try to locate tool using the code snippet
7541      for ac_prog in echo
7542do
7543  # Extract the first word of "$ac_prog", so it can be a program name with args.
7544set dummy $ac_prog; ac_word=$2
7545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7546$as_echo_n "checking for $ac_word... " >&6; }
7547if ${ac_cv_path_ECHO+:} false; then :
7548  $as_echo_n "(cached) " >&6
7549else
7550  case $ECHO in
7551  [\\/]* | ?:[\\/]*)
7552  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7553  ;;
7554  *)
7555  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7556for as_dir in $PATH
7557do
7558  IFS=$as_save_IFS
7559  test -z "$as_dir" && as_dir=.
7560    for ac_exec_ext in '' $ac_executable_extensions; do
7561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7562    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7564    break 2
7565  fi
7566done
7567  done
7568IFS=$as_save_IFS
7569
7570  ;;
7571esac
7572fi
7573ECHO=$ac_cv_path_ECHO
7574if test -n "$ECHO"; then
7575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7576$as_echo "$ECHO" >&6; }
7577else
7578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7579$as_echo "no" >&6; }
7580fi
7581
7582
7583  test -n "$ECHO" && break
7584done
7585
7586    else
7587      # If it succeeded, then it was overridden by the user. We will use it
7588      # for the tool.
7589
7590      # First remove it from the list of overridden variables, so we can test
7591      # for unknown variables in the end.
7592      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7593
7594      # Check if we try to supply an empty value
7595      if test "x$ECHO" = x; then
7596        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7597$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7598        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7599$as_echo_n "checking for ECHO... " >&6; }
7600        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7601$as_echo "disabled" >&6; }
7602      else
7603        # Check if the provided tool contains a complete path.
7604        tool_specified="$ECHO"
7605        tool_basename="${tool_specified##*/}"
7606        if test "x$tool_basename" = "x$tool_specified"; then
7607          # A command without a complete path is provided, search $PATH.
7608          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7609$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7610          # Extract the first word of "$tool_basename", so it can be a program name with args.
7611set dummy $tool_basename; ac_word=$2
7612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7613$as_echo_n "checking for $ac_word... " >&6; }
7614if ${ac_cv_path_ECHO+:} false; then :
7615  $as_echo_n "(cached) " >&6
7616else
7617  case $ECHO in
7618  [\\/]* | ?:[\\/]*)
7619  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7620  ;;
7621  *)
7622  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7623for as_dir in $PATH
7624do
7625  IFS=$as_save_IFS
7626  test -z "$as_dir" && as_dir=.
7627    for ac_exec_ext in '' $ac_executable_extensions; do
7628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7629    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7631    break 2
7632  fi
7633done
7634  done
7635IFS=$as_save_IFS
7636
7637  ;;
7638esac
7639fi
7640ECHO=$ac_cv_path_ECHO
7641if test -n "$ECHO"; then
7642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7643$as_echo "$ECHO" >&6; }
7644else
7645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7646$as_echo "no" >&6; }
7647fi
7648
7649
7650          if test "x$ECHO" = x; then
7651            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7652          fi
7653        else
7654          # Otherwise we believe it is a complete path. Use it as it is.
7655          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7656$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7657          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7658$as_echo_n "checking for ECHO... " >&6; }
7659          if test ! -x "$tool_specified"; then
7660            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7661$as_echo "not found" >&6; }
7662            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7663          fi
7664          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7665$as_echo "$tool_specified" >&6; }
7666        fi
7667      fi
7668    fi
7669
7670  fi
7671
7672
7673
7674  if test "x$ECHO" = x; then
7675    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7676  fi
7677
7678
7679
7680
7681
7682  # Publish this variable in the help.
7683
7684
7685  if [ -z "${EXPR+x}" ]; then
7686    # The variable is not set by user, try to locate tool using the code snippet
7687    for ac_prog in expr
7688do
7689  # Extract the first word of "$ac_prog", so it can be a program name with args.
7690set dummy $ac_prog; ac_word=$2
7691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7692$as_echo_n "checking for $ac_word... " >&6; }
7693if ${ac_cv_path_EXPR+:} false; then :
7694  $as_echo_n "(cached) " >&6
7695else
7696  case $EXPR in
7697  [\\/]* | ?:[\\/]*)
7698  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7699  ;;
7700  *)
7701  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7702for as_dir in $PATH
7703do
7704  IFS=$as_save_IFS
7705  test -z "$as_dir" && as_dir=.
7706    for ac_exec_ext in '' $ac_executable_extensions; do
7707  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7708    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7710    break 2
7711  fi
7712done
7713  done
7714IFS=$as_save_IFS
7715
7716  ;;
7717esac
7718fi
7719EXPR=$ac_cv_path_EXPR
7720if test -n "$EXPR"; then
7721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7722$as_echo "$EXPR" >&6; }
7723else
7724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7725$as_echo "no" >&6; }
7726fi
7727
7728
7729  test -n "$EXPR" && break
7730done
7731
7732  else
7733    # The variable is set, but is it from the command line or the environment?
7734
7735    # Try to remove the string !EXPR! from our list.
7736    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7737    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7738      # If it failed, the variable was not from the command line. Ignore it,
7739      # but warn the user (except for BASH, which is always set by the calling BASH).
7740      if test "xEXPR" != xBASH; then
7741        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7742$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7743      fi
7744      # Try to locate tool using the code snippet
7745      for ac_prog in expr
7746do
7747  # Extract the first word of "$ac_prog", so it can be a program name with args.
7748set dummy $ac_prog; ac_word=$2
7749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7750$as_echo_n "checking for $ac_word... " >&6; }
7751if ${ac_cv_path_EXPR+:} false; then :
7752  $as_echo_n "(cached) " >&6
7753else
7754  case $EXPR in
7755  [\\/]* | ?:[\\/]*)
7756  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7757  ;;
7758  *)
7759  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7760for as_dir in $PATH
7761do
7762  IFS=$as_save_IFS
7763  test -z "$as_dir" && as_dir=.
7764    for ac_exec_ext in '' $ac_executable_extensions; do
7765  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7766    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7767    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7768    break 2
7769  fi
7770done
7771  done
7772IFS=$as_save_IFS
7773
7774  ;;
7775esac
7776fi
7777EXPR=$ac_cv_path_EXPR
7778if test -n "$EXPR"; then
7779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7780$as_echo "$EXPR" >&6; }
7781else
7782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7783$as_echo "no" >&6; }
7784fi
7785
7786
7787  test -n "$EXPR" && break
7788done
7789
7790    else
7791      # If it succeeded, then it was overridden by the user. We will use it
7792      # for the tool.
7793
7794      # First remove it from the list of overridden variables, so we can test
7795      # for unknown variables in the end.
7796      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7797
7798      # Check if we try to supply an empty value
7799      if test "x$EXPR" = x; then
7800        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7801$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7802        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7803$as_echo_n "checking for EXPR... " >&6; }
7804        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7805$as_echo "disabled" >&6; }
7806      else
7807        # Check if the provided tool contains a complete path.
7808        tool_specified="$EXPR"
7809        tool_basename="${tool_specified##*/}"
7810        if test "x$tool_basename" = "x$tool_specified"; then
7811          # A command without a complete path is provided, search $PATH.
7812          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7813$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7814          # Extract the first word of "$tool_basename", so it can be a program name with args.
7815set dummy $tool_basename; ac_word=$2
7816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7817$as_echo_n "checking for $ac_word... " >&6; }
7818if ${ac_cv_path_EXPR+:} false; then :
7819  $as_echo_n "(cached) " >&6
7820else
7821  case $EXPR in
7822  [\\/]* | ?:[\\/]*)
7823  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7824  ;;
7825  *)
7826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7827for as_dir in $PATH
7828do
7829  IFS=$as_save_IFS
7830  test -z "$as_dir" && as_dir=.
7831    for ac_exec_ext in '' $ac_executable_extensions; do
7832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7833    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7835    break 2
7836  fi
7837done
7838  done
7839IFS=$as_save_IFS
7840
7841  ;;
7842esac
7843fi
7844EXPR=$ac_cv_path_EXPR
7845if test -n "$EXPR"; then
7846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7847$as_echo "$EXPR" >&6; }
7848else
7849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7850$as_echo "no" >&6; }
7851fi
7852
7853
7854          if test "x$EXPR" = x; then
7855            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7856          fi
7857        else
7858          # Otherwise we believe it is a complete path. Use it as it is.
7859          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7860$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7861          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7862$as_echo_n "checking for EXPR... " >&6; }
7863          if test ! -x "$tool_specified"; then
7864            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7865$as_echo "not found" >&6; }
7866            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7867          fi
7868          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7869$as_echo "$tool_specified" >&6; }
7870        fi
7871      fi
7872    fi
7873
7874  fi
7875
7876
7877
7878  if test "x$EXPR" = x; then
7879    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7880  fi
7881
7882
7883
7884
7885
7886  # Publish this variable in the help.
7887
7888
7889  if [ -z "${FILE+x}" ]; then
7890    # The variable is not set by user, try to locate tool using the code snippet
7891    for ac_prog in file
7892do
7893  # Extract the first word of "$ac_prog", so it can be a program name with args.
7894set dummy $ac_prog; ac_word=$2
7895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7896$as_echo_n "checking for $ac_word... " >&6; }
7897if ${ac_cv_path_FILE+:} false; then :
7898  $as_echo_n "(cached) " >&6
7899else
7900  case $FILE in
7901  [\\/]* | ?:[\\/]*)
7902  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7903  ;;
7904  *)
7905  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7906for as_dir in $PATH
7907do
7908  IFS=$as_save_IFS
7909  test -z "$as_dir" && as_dir=.
7910    for ac_exec_ext in '' $ac_executable_extensions; do
7911  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7912    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7913    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7914    break 2
7915  fi
7916done
7917  done
7918IFS=$as_save_IFS
7919
7920  ;;
7921esac
7922fi
7923FILE=$ac_cv_path_FILE
7924if test -n "$FILE"; then
7925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7926$as_echo "$FILE" >&6; }
7927else
7928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7929$as_echo "no" >&6; }
7930fi
7931
7932
7933  test -n "$FILE" && break
7934done
7935
7936  else
7937    # The variable is set, but is it from the command line or the environment?
7938
7939    # Try to remove the string !FILE! from our list.
7940    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7941    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7942      # If it failed, the variable was not from the command line. Ignore it,
7943      # but warn the user (except for BASH, which is always set by the calling BASH).
7944      if test "xFILE" != xBASH; then
7945        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7946$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7947      fi
7948      # Try to locate tool using the code snippet
7949      for ac_prog in file
7950do
7951  # Extract the first word of "$ac_prog", so it can be a program name with args.
7952set dummy $ac_prog; ac_word=$2
7953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7954$as_echo_n "checking for $ac_word... " >&6; }
7955if ${ac_cv_path_FILE+:} false; then :
7956  $as_echo_n "(cached) " >&6
7957else
7958  case $FILE in
7959  [\\/]* | ?:[\\/]*)
7960  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7961  ;;
7962  *)
7963  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7964for as_dir in $PATH
7965do
7966  IFS=$as_save_IFS
7967  test -z "$as_dir" && as_dir=.
7968    for ac_exec_ext in '' $ac_executable_extensions; do
7969  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7970    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7971    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7972    break 2
7973  fi
7974done
7975  done
7976IFS=$as_save_IFS
7977
7978  ;;
7979esac
7980fi
7981FILE=$ac_cv_path_FILE
7982if test -n "$FILE"; then
7983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7984$as_echo "$FILE" >&6; }
7985else
7986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7987$as_echo "no" >&6; }
7988fi
7989
7990
7991  test -n "$FILE" && break
7992done
7993
7994    else
7995      # If it succeeded, then it was overridden by the user. We will use it
7996      # for the tool.
7997
7998      # First remove it from the list of overridden variables, so we can test
7999      # for unknown variables in the end.
8000      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8001
8002      # Check if we try to supply an empty value
8003      if test "x$FILE" = x; then
8004        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
8005$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
8006        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8007$as_echo_n "checking for FILE... " >&6; }
8008        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8009$as_echo "disabled" >&6; }
8010      else
8011        # Check if the provided tool contains a complete path.
8012        tool_specified="$FILE"
8013        tool_basename="${tool_specified##*/}"
8014        if test "x$tool_basename" = "x$tool_specified"; then
8015          # A command without a complete path is provided, search $PATH.
8016          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
8017$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
8018          # Extract the first word of "$tool_basename", so it can be a program name with args.
8019set dummy $tool_basename; ac_word=$2
8020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8021$as_echo_n "checking for $ac_word... " >&6; }
8022if ${ac_cv_path_FILE+:} false; then :
8023  $as_echo_n "(cached) " >&6
8024else
8025  case $FILE in
8026  [\\/]* | ?:[\\/]*)
8027  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
8028  ;;
8029  *)
8030  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8031for as_dir in $PATH
8032do
8033  IFS=$as_save_IFS
8034  test -z "$as_dir" && as_dir=.
8035    for ac_exec_ext in '' $ac_executable_extensions; do
8036  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8037    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
8038    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8039    break 2
8040  fi
8041done
8042  done
8043IFS=$as_save_IFS
8044
8045  ;;
8046esac
8047fi
8048FILE=$ac_cv_path_FILE
8049if test -n "$FILE"; then
8050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
8051$as_echo "$FILE" >&6; }
8052else
8053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8054$as_echo "no" >&6; }
8055fi
8056
8057
8058          if test "x$FILE" = x; then
8059            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8060          fi
8061        else
8062          # Otherwise we believe it is a complete path. Use it as it is.
8063          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
8064$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
8065          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8066$as_echo_n "checking for FILE... " >&6; }
8067          if test ! -x "$tool_specified"; then
8068            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8069$as_echo "not found" >&6; }
8070            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
8071          fi
8072          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8073$as_echo "$tool_specified" >&6; }
8074        fi
8075      fi
8076    fi
8077
8078  fi
8079
8080
8081
8082  if test "x$FILE" = x; then
8083    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8084  fi
8085
8086
8087
8088
8089
8090  # Publish this variable in the help.
8091
8092
8093  if [ -z "${FIND+x}" ]; then
8094    # The variable is not set by user, try to locate tool using the code snippet
8095    for ac_prog in find
8096do
8097  # Extract the first word of "$ac_prog", so it can be a program name with args.
8098set dummy $ac_prog; ac_word=$2
8099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8100$as_echo_n "checking for $ac_word... " >&6; }
8101if ${ac_cv_path_FIND+:} false; then :
8102  $as_echo_n "(cached) " >&6
8103else
8104  case $FIND in
8105  [\\/]* | ?:[\\/]*)
8106  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8107  ;;
8108  *)
8109  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8110for as_dir in $PATH
8111do
8112  IFS=$as_save_IFS
8113  test -z "$as_dir" && as_dir=.
8114    for ac_exec_ext in '' $ac_executable_extensions; do
8115  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8116    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8117    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8118    break 2
8119  fi
8120done
8121  done
8122IFS=$as_save_IFS
8123
8124  ;;
8125esac
8126fi
8127FIND=$ac_cv_path_FIND
8128if test -n "$FIND"; then
8129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8130$as_echo "$FIND" >&6; }
8131else
8132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8133$as_echo "no" >&6; }
8134fi
8135
8136
8137  test -n "$FIND" && break
8138done
8139
8140  else
8141    # The variable is set, but is it from the command line or the environment?
8142
8143    # Try to remove the string !FIND! from our list.
8144    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8145    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8146      # If it failed, the variable was not from the command line. Ignore it,
8147      # but warn the user (except for BASH, which is always set by the calling BASH).
8148      if test "xFIND" != xBASH; then
8149        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8150$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8151      fi
8152      # Try to locate tool using the code snippet
8153      for ac_prog in find
8154do
8155  # Extract the first word of "$ac_prog", so it can be a program name with args.
8156set dummy $ac_prog; ac_word=$2
8157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8158$as_echo_n "checking for $ac_word... " >&6; }
8159if ${ac_cv_path_FIND+:} false; then :
8160  $as_echo_n "(cached) " >&6
8161else
8162  case $FIND in
8163  [\\/]* | ?:[\\/]*)
8164  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8165  ;;
8166  *)
8167  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8168for as_dir in $PATH
8169do
8170  IFS=$as_save_IFS
8171  test -z "$as_dir" && as_dir=.
8172    for ac_exec_ext in '' $ac_executable_extensions; do
8173  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8174    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8175    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8176    break 2
8177  fi
8178done
8179  done
8180IFS=$as_save_IFS
8181
8182  ;;
8183esac
8184fi
8185FIND=$ac_cv_path_FIND
8186if test -n "$FIND"; then
8187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8188$as_echo "$FIND" >&6; }
8189else
8190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8191$as_echo "no" >&6; }
8192fi
8193
8194
8195  test -n "$FIND" && break
8196done
8197
8198    else
8199      # If it succeeded, then it was overridden by the user. We will use it
8200      # for the tool.
8201
8202      # First remove it from the list of overridden variables, so we can test
8203      # for unknown variables in the end.
8204      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8205
8206      # Check if we try to supply an empty value
8207      if test "x$FIND" = x; then
8208        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8209$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8210        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8211$as_echo_n "checking for FIND... " >&6; }
8212        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8213$as_echo "disabled" >&6; }
8214      else
8215        # Check if the provided tool contains a complete path.
8216        tool_specified="$FIND"
8217        tool_basename="${tool_specified##*/}"
8218        if test "x$tool_basename" = "x$tool_specified"; then
8219          # A command without a complete path is provided, search $PATH.
8220          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8221$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8222          # Extract the first word of "$tool_basename", so it can be a program name with args.
8223set dummy $tool_basename; ac_word=$2
8224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8225$as_echo_n "checking for $ac_word... " >&6; }
8226if ${ac_cv_path_FIND+:} false; then :
8227  $as_echo_n "(cached) " >&6
8228else
8229  case $FIND in
8230  [\\/]* | ?:[\\/]*)
8231  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8232  ;;
8233  *)
8234  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8235for as_dir in $PATH
8236do
8237  IFS=$as_save_IFS
8238  test -z "$as_dir" && as_dir=.
8239    for ac_exec_ext in '' $ac_executable_extensions; do
8240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8241    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8243    break 2
8244  fi
8245done
8246  done
8247IFS=$as_save_IFS
8248
8249  ;;
8250esac
8251fi
8252FIND=$ac_cv_path_FIND
8253if test -n "$FIND"; then
8254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8255$as_echo "$FIND" >&6; }
8256else
8257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8258$as_echo "no" >&6; }
8259fi
8260
8261
8262          if test "x$FIND" = x; then
8263            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8264          fi
8265        else
8266          # Otherwise we believe it is a complete path. Use it as it is.
8267          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8268$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8269          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8270$as_echo_n "checking for FIND... " >&6; }
8271          if test ! -x "$tool_specified"; then
8272            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8273$as_echo "not found" >&6; }
8274            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8275          fi
8276          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8277$as_echo "$tool_specified" >&6; }
8278        fi
8279      fi
8280    fi
8281
8282  fi
8283
8284
8285
8286  if test "x$FIND" = x; then
8287    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8288  fi
8289
8290
8291
8292
8293
8294  # Publish this variable in the help.
8295
8296
8297  if [ -z "${HEAD+x}" ]; then
8298    # The variable is not set by user, try to locate tool using the code snippet
8299    for ac_prog in head
8300do
8301  # Extract the first word of "$ac_prog", so it can be a program name with args.
8302set dummy $ac_prog; ac_word=$2
8303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8304$as_echo_n "checking for $ac_word... " >&6; }
8305if ${ac_cv_path_HEAD+:} false; then :
8306  $as_echo_n "(cached) " >&6
8307else
8308  case $HEAD in
8309  [\\/]* | ?:[\\/]*)
8310  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8311  ;;
8312  *)
8313  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8314for as_dir in $PATH
8315do
8316  IFS=$as_save_IFS
8317  test -z "$as_dir" && as_dir=.
8318    for ac_exec_ext in '' $ac_executable_extensions; do
8319  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8320    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8321    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8322    break 2
8323  fi
8324done
8325  done
8326IFS=$as_save_IFS
8327
8328  ;;
8329esac
8330fi
8331HEAD=$ac_cv_path_HEAD
8332if test -n "$HEAD"; then
8333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8334$as_echo "$HEAD" >&6; }
8335else
8336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8337$as_echo "no" >&6; }
8338fi
8339
8340
8341  test -n "$HEAD" && break
8342done
8343
8344  else
8345    # The variable is set, but is it from the command line or the environment?
8346
8347    # Try to remove the string !HEAD! from our list.
8348    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8349    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8350      # If it failed, the variable was not from the command line. Ignore it,
8351      # but warn the user (except for BASH, which is always set by the calling BASH).
8352      if test "xHEAD" != xBASH; then
8353        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8354$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8355      fi
8356      # Try to locate tool using the code snippet
8357      for ac_prog in head
8358do
8359  # Extract the first word of "$ac_prog", so it can be a program name with args.
8360set dummy $ac_prog; ac_word=$2
8361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8362$as_echo_n "checking for $ac_word... " >&6; }
8363if ${ac_cv_path_HEAD+:} false; then :
8364  $as_echo_n "(cached) " >&6
8365else
8366  case $HEAD in
8367  [\\/]* | ?:[\\/]*)
8368  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8369  ;;
8370  *)
8371  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8372for as_dir in $PATH
8373do
8374  IFS=$as_save_IFS
8375  test -z "$as_dir" && as_dir=.
8376    for ac_exec_ext in '' $ac_executable_extensions; do
8377  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8378    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8379    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8380    break 2
8381  fi
8382done
8383  done
8384IFS=$as_save_IFS
8385
8386  ;;
8387esac
8388fi
8389HEAD=$ac_cv_path_HEAD
8390if test -n "$HEAD"; then
8391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8392$as_echo "$HEAD" >&6; }
8393else
8394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8395$as_echo "no" >&6; }
8396fi
8397
8398
8399  test -n "$HEAD" && break
8400done
8401
8402    else
8403      # If it succeeded, then it was overridden by the user. We will use it
8404      # for the tool.
8405
8406      # First remove it from the list of overridden variables, so we can test
8407      # for unknown variables in the end.
8408      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8409
8410      # Check if we try to supply an empty value
8411      if test "x$HEAD" = x; then
8412        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8413$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8414        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8415$as_echo_n "checking for HEAD... " >&6; }
8416        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8417$as_echo "disabled" >&6; }
8418      else
8419        # Check if the provided tool contains a complete path.
8420        tool_specified="$HEAD"
8421        tool_basename="${tool_specified##*/}"
8422        if test "x$tool_basename" = "x$tool_specified"; then
8423          # A command without a complete path is provided, search $PATH.
8424          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8425$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8426          # Extract the first word of "$tool_basename", so it can be a program name with args.
8427set dummy $tool_basename; ac_word=$2
8428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8429$as_echo_n "checking for $ac_word... " >&6; }
8430if ${ac_cv_path_HEAD+:} false; then :
8431  $as_echo_n "(cached) " >&6
8432else
8433  case $HEAD in
8434  [\\/]* | ?:[\\/]*)
8435  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8436  ;;
8437  *)
8438  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8439for as_dir in $PATH
8440do
8441  IFS=$as_save_IFS
8442  test -z "$as_dir" && as_dir=.
8443    for ac_exec_ext in '' $ac_executable_extensions; do
8444  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8445    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8446    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8447    break 2
8448  fi
8449done
8450  done
8451IFS=$as_save_IFS
8452
8453  ;;
8454esac
8455fi
8456HEAD=$ac_cv_path_HEAD
8457if test -n "$HEAD"; then
8458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8459$as_echo "$HEAD" >&6; }
8460else
8461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8462$as_echo "no" >&6; }
8463fi
8464
8465
8466          if test "x$HEAD" = x; then
8467            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8468          fi
8469        else
8470          # Otherwise we believe it is a complete path. Use it as it is.
8471          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8472$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8473          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8474$as_echo_n "checking for HEAD... " >&6; }
8475          if test ! -x "$tool_specified"; then
8476            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8477$as_echo "not found" >&6; }
8478            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8479          fi
8480          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8481$as_echo "$tool_specified" >&6; }
8482        fi
8483      fi
8484    fi
8485
8486  fi
8487
8488
8489
8490  if test "x$HEAD" = x; then
8491    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8492  fi
8493
8494
8495
8496
8497
8498  # Publish this variable in the help.
8499
8500
8501  if [ -z "${GUNZIP+x}" ]; then
8502    # The variable is not set by user, try to locate tool using the code snippet
8503    for ac_prog in gunzip
8504do
8505  # Extract the first word of "$ac_prog", so it can be a program name with args.
8506set dummy $ac_prog; ac_word=$2
8507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8508$as_echo_n "checking for $ac_word... " >&6; }
8509if ${ac_cv_path_GUNZIP+:} false; then :
8510  $as_echo_n "(cached) " >&6
8511else
8512  case $GUNZIP in
8513  [\\/]* | ?:[\\/]*)
8514  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8515  ;;
8516  *)
8517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8518for as_dir in $PATH
8519do
8520  IFS=$as_save_IFS
8521  test -z "$as_dir" && as_dir=.
8522    for ac_exec_ext in '' $ac_executable_extensions; do
8523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8524    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8526    break 2
8527  fi
8528done
8529  done
8530IFS=$as_save_IFS
8531
8532  ;;
8533esac
8534fi
8535GUNZIP=$ac_cv_path_GUNZIP
8536if test -n "$GUNZIP"; then
8537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8538$as_echo "$GUNZIP" >&6; }
8539else
8540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8541$as_echo "no" >&6; }
8542fi
8543
8544
8545  test -n "$GUNZIP" && break
8546done
8547
8548  else
8549    # The variable is set, but is it from the command line or the environment?
8550
8551    # Try to remove the string !GUNZIP! from our list.
8552    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8553    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8554      # If it failed, the variable was not from the command line. Ignore it,
8555      # but warn the user (except for BASH, which is always set by the calling BASH).
8556      if test "xGUNZIP" != xBASH; then
8557        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8558$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8559      fi
8560      # Try to locate tool using the code snippet
8561      for ac_prog in gunzip
8562do
8563  # Extract the first word of "$ac_prog", so it can be a program name with args.
8564set dummy $ac_prog; ac_word=$2
8565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8566$as_echo_n "checking for $ac_word... " >&6; }
8567if ${ac_cv_path_GUNZIP+:} false; then :
8568  $as_echo_n "(cached) " >&6
8569else
8570  case $GUNZIP in
8571  [\\/]* | ?:[\\/]*)
8572  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8573  ;;
8574  *)
8575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8576for as_dir in $PATH
8577do
8578  IFS=$as_save_IFS
8579  test -z "$as_dir" && as_dir=.
8580    for ac_exec_ext in '' $ac_executable_extensions; do
8581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8582    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8584    break 2
8585  fi
8586done
8587  done
8588IFS=$as_save_IFS
8589
8590  ;;
8591esac
8592fi
8593GUNZIP=$ac_cv_path_GUNZIP
8594if test -n "$GUNZIP"; then
8595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8596$as_echo "$GUNZIP" >&6; }
8597else
8598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8599$as_echo "no" >&6; }
8600fi
8601
8602
8603  test -n "$GUNZIP" && break
8604done
8605
8606    else
8607      # If it succeeded, then it was overridden by the user. We will use it
8608      # for the tool.
8609
8610      # First remove it from the list of overridden variables, so we can test
8611      # for unknown variables in the end.
8612      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8613
8614      # Check if we try to supply an empty value
8615      if test "x$GUNZIP" = x; then
8616        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8617$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8618        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8619$as_echo_n "checking for GUNZIP... " >&6; }
8620        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8621$as_echo "disabled" >&6; }
8622      else
8623        # Check if the provided tool contains a complete path.
8624        tool_specified="$GUNZIP"
8625        tool_basename="${tool_specified##*/}"
8626        if test "x$tool_basename" = "x$tool_specified"; then
8627          # A command without a complete path is provided, search $PATH.
8628          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8629$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8630          # Extract the first word of "$tool_basename", so it can be a program name with args.
8631set dummy $tool_basename; ac_word=$2
8632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8633$as_echo_n "checking for $ac_word... " >&6; }
8634if ${ac_cv_path_GUNZIP+:} false; then :
8635  $as_echo_n "(cached) " >&6
8636else
8637  case $GUNZIP in
8638  [\\/]* | ?:[\\/]*)
8639  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8640  ;;
8641  *)
8642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8643for as_dir in $PATH
8644do
8645  IFS=$as_save_IFS
8646  test -z "$as_dir" && as_dir=.
8647    for ac_exec_ext in '' $ac_executable_extensions; do
8648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8649    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8651    break 2
8652  fi
8653done
8654  done
8655IFS=$as_save_IFS
8656
8657  ;;
8658esac
8659fi
8660GUNZIP=$ac_cv_path_GUNZIP
8661if test -n "$GUNZIP"; then
8662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8663$as_echo "$GUNZIP" >&6; }
8664else
8665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8666$as_echo "no" >&6; }
8667fi
8668
8669
8670          if test "x$GUNZIP" = x; then
8671            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8672          fi
8673        else
8674          # Otherwise we believe it is a complete path. Use it as it is.
8675          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8676$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8677          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8678$as_echo_n "checking for GUNZIP... " >&6; }
8679          if test ! -x "$tool_specified"; then
8680            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8681$as_echo "not found" >&6; }
8682            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8683          fi
8684          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8685$as_echo "$tool_specified" >&6; }
8686        fi
8687      fi
8688    fi
8689
8690  fi
8691
8692
8693
8694  if test "x$GUNZIP" = x; then
8695    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8696  fi
8697
8698
8699
8700
8701
8702  # Publish this variable in the help.
8703
8704
8705  if [ -z "${GZIP+x}" ]; then
8706    # The variable is not set by user, try to locate tool using the code snippet
8707    for ac_prog in pigz gzip
8708do
8709  # Extract the first word of "$ac_prog", so it can be a program name with args.
8710set dummy $ac_prog; ac_word=$2
8711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8712$as_echo_n "checking for $ac_word... " >&6; }
8713if ${ac_cv_path_GZIP+:} false; then :
8714  $as_echo_n "(cached) " >&6
8715else
8716  case $GZIP in
8717  [\\/]* | ?:[\\/]*)
8718  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8719  ;;
8720  *)
8721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8722for as_dir in $PATH
8723do
8724  IFS=$as_save_IFS
8725  test -z "$as_dir" && as_dir=.
8726    for ac_exec_ext in '' $ac_executable_extensions; do
8727  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8728    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8729    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8730    break 2
8731  fi
8732done
8733  done
8734IFS=$as_save_IFS
8735
8736  ;;
8737esac
8738fi
8739GZIP=$ac_cv_path_GZIP
8740if test -n "$GZIP"; then
8741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8742$as_echo "$GZIP" >&6; }
8743else
8744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8745$as_echo "no" >&6; }
8746fi
8747
8748
8749  test -n "$GZIP" && break
8750done
8751
8752  else
8753    # The variable is set, but is it from the command line or the environment?
8754
8755    # Try to remove the string !GZIP! from our list.
8756    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8757    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8758      # If it failed, the variable was not from the command line. Ignore it,
8759      # but warn the user (except for BASH, which is always set by the calling BASH).
8760      if test "xGZIP" != xBASH; then
8761        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8762$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8763      fi
8764      # Try to locate tool using the code snippet
8765      for ac_prog in pigz gzip
8766do
8767  # Extract the first word of "$ac_prog", so it can be a program name with args.
8768set dummy $ac_prog; ac_word=$2
8769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8770$as_echo_n "checking for $ac_word... " >&6; }
8771if ${ac_cv_path_GZIP+:} false; then :
8772  $as_echo_n "(cached) " >&6
8773else
8774  case $GZIP in
8775  [\\/]* | ?:[\\/]*)
8776  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8777  ;;
8778  *)
8779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8780for as_dir in $PATH
8781do
8782  IFS=$as_save_IFS
8783  test -z "$as_dir" && as_dir=.
8784    for ac_exec_ext in '' $ac_executable_extensions; do
8785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8786    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8788    break 2
8789  fi
8790done
8791  done
8792IFS=$as_save_IFS
8793
8794  ;;
8795esac
8796fi
8797GZIP=$ac_cv_path_GZIP
8798if test -n "$GZIP"; then
8799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8800$as_echo "$GZIP" >&6; }
8801else
8802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8803$as_echo "no" >&6; }
8804fi
8805
8806
8807  test -n "$GZIP" && break
8808done
8809
8810    else
8811      # If it succeeded, then it was overridden by the user. We will use it
8812      # for the tool.
8813
8814      # First remove it from the list of overridden variables, so we can test
8815      # for unknown variables in the end.
8816      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8817
8818      # Check if we try to supply an empty value
8819      if test "x$GZIP" = x; then
8820        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8821$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8822        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8823$as_echo_n "checking for GZIP... " >&6; }
8824        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8825$as_echo "disabled" >&6; }
8826      else
8827        # Check if the provided tool contains a complete path.
8828        tool_specified="$GZIP"
8829        tool_basename="${tool_specified##*/}"
8830        if test "x$tool_basename" = "x$tool_specified"; then
8831          # A command without a complete path is provided, search $PATH.
8832          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8833$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8834          # Extract the first word of "$tool_basename", so it can be a program name with args.
8835set dummy $tool_basename; ac_word=$2
8836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8837$as_echo_n "checking for $ac_word... " >&6; }
8838if ${ac_cv_path_GZIP+:} false; then :
8839  $as_echo_n "(cached) " >&6
8840else
8841  case $GZIP in
8842  [\\/]* | ?:[\\/]*)
8843  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8844  ;;
8845  *)
8846  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8847for as_dir in $PATH
8848do
8849  IFS=$as_save_IFS
8850  test -z "$as_dir" && as_dir=.
8851    for ac_exec_ext in '' $ac_executable_extensions; do
8852  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8853    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8855    break 2
8856  fi
8857done
8858  done
8859IFS=$as_save_IFS
8860
8861  ;;
8862esac
8863fi
8864GZIP=$ac_cv_path_GZIP
8865if test -n "$GZIP"; then
8866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8867$as_echo "$GZIP" >&6; }
8868else
8869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8870$as_echo "no" >&6; }
8871fi
8872
8873
8874          if test "x$GZIP" = x; then
8875            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8876          fi
8877        else
8878          # Otherwise we believe it is a complete path. Use it as it is.
8879          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8880$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8881          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8882$as_echo_n "checking for GZIP... " >&6; }
8883          if test ! -x "$tool_specified"; then
8884            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8885$as_echo "not found" >&6; }
8886            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8887          fi
8888          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8889$as_echo "$tool_specified" >&6; }
8890        fi
8891      fi
8892    fi
8893
8894  fi
8895
8896
8897
8898  if test "x$GZIP" = x; then
8899    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8900  fi
8901
8902
8903
8904
8905
8906  # Publish this variable in the help.
8907
8908
8909  if [ -z "${LN+x}" ]; then
8910    # The variable is not set by user, try to locate tool using the code snippet
8911    for ac_prog in ln
8912do
8913  # Extract the first word of "$ac_prog", so it can be a program name with args.
8914set dummy $ac_prog; ac_word=$2
8915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8916$as_echo_n "checking for $ac_word... " >&6; }
8917if ${ac_cv_path_LN+:} false; then :
8918  $as_echo_n "(cached) " >&6
8919else
8920  case $LN in
8921  [\\/]* | ?:[\\/]*)
8922  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8923  ;;
8924  *)
8925  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8926for as_dir in $PATH
8927do
8928  IFS=$as_save_IFS
8929  test -z "$as_dir" && as_dir=.
8930    for ac_exec_ext in '' $ac_executable_extensions; do
8931  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8932    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8933    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8934    break 2
8935  fi
8936done
8937  done
8938IFS=$as_save_IFS
8939
8940  ;;
8941esac
8942fi
8943LN=$ac_cv_path_LN
8944if test -n "$LN"; then
8945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8946$as_echo "$LN" >&6; }
8947else
8948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8949$as_echo "no" >&6; }
8950fi
8951
8952
8953  test -n "$LN" && break
8954done
8955
8956  else
8957    # The variable is set, but is it from the command line or the environment?
8958
8959    # Try to remove the string !LN! from our list.
8960    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8961    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8962      # If it failed, the variable was not from the command line. Ignore it,
8963      # but warn the user (except for BASH, which is always set by the calling BASH).
8964      if test "xLN" != xBASH; then
8965        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8966$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8967      fi
8968      # Try to locate tool using the code snippet
8969      for ac_prog in ln
8970do
8971  # Extract the first word of "$ac_prog", so it can be a program name with args.
8972set dummy $ac_prog; ac_word=$2
8973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8974$as_echo_n "checking for $ac_word... " >&6; }
8975if ${ac_cv_path_LN+:} false; then :
8976  $as_echo_n "(cached) " >&6
8977else
8978  case $LN in
8979  [\\/]* | ?:[\\/]*)
8980  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8981  ;;
8982  *)
8983  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8984for as_dir in $PATH
8985do
8986  IFS=$as_save_IFS
8987  test -z "$as_dir" && as_dir=.
8988    for ac_exec_ext in '' $ac_executable_extensions; do
8989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8990    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8992    break 2
8993  fi
8994done
8995  done
8996IFS=$as_save_IFS
8997
8998  ;;
8999esac
9000fi
9001LN=$ac_cv_path_LN
9002if test -n "$LN"; then
9003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9004$as_echo "$LN" >&6; }
9005else
9006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9007$as_echo "no" >&6; }
9008fi
9009
9010
9011  test -n "$LN" && break
9012done
9013
9014    else
9015      # If it succeeded, then it was overridden by the user. We will use it
9016      # for the tool.
9017
9018      # First remove it from the list of overridden variables, so we can test
9019      # for unknown variables in the end.
9020      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9021
9022      # Check if we try to supply an empty value
9023      if test "x$LN" = x; then
9024        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
9025$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
9026        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9027$as_echo_n "checking for LN... " >&6; }
9028        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9029$as_echo "disabled" >&6; }
9030      else
9031        # Check if the provided tool contains a complete path.
9032        tool_specified="$LN"
9033        tool_basename="${tool_specified##*/}"
9034        if test "x$tool_basename" = "x$tool_specified"; then
9035          # A command without a complete path is provided, search $PATH.
9036          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
9037$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
9038          # Extract the first word of "$tool_basename", so it can be a program name with args.
9039set dummy $tool_basename; ac_word=$2
9040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9041$as_echo_n "checking for $ac_word... " >&6; }
9042if ${ac_cv_path_LN+:} false; then :
9043  $as_echo_n "(cached) " >&6
9044else
9045  case $LN in
9046  [\\/]* | ?:[\\/]*)
9047  ac_cv_path_LN="$LN" # Let the user override the test with a path.
9048  ;;
9049  *)
9050  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9051for as_dir in $PATH
9052do
9053  IFS=$as_save_IFS
9054  test -z "$as_dir" && as_dir=.
9055    for ac_exec_ext in '' $ac_executable_extensions; do
9056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9057    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
9058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9059    break 2
9060  fi
9061done
9062  done
9063IFS=$as_save_IFS
9064
9065  ;;
9066esac
9067fi
9068LN=$ac_cv_path_LN
9069if test -n "$LN"; then
9070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9071$as_echo "$LN" >&6; }
9072else
9073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9074$as_echo "no" >&6; }
9075fi
9076
9077
9078          if test "x$LN" = x; then
9079            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9080          fi
9081        else
9082          # Otherwise we believe it is a complete path. Use it as it is.
9083          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9084$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9085          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9086$as_echo_n "checking for LN... " >&6; }
9087          if test ! -x "$tool_specified"; then
9088            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9089$as_echo "not found" >&6; }
9090            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9091          fi
9092          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9093$as_echo "$tool_specified" >&6; }
9094        fi
9095      fi
9096    fi
9097
9098  fi
9099
9100
9101
9102  if test "x$LN" = x; then
9103    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9104  fi
9105
9106
9107
9108
9109
9110  # Publish this variable in the help.
9111
9112
9113  if [ -z "${LS+x}" ]; then
9114    # The variable is not set by user, try to locate tool using the code snippet
9115    for ac_prog in ls
9116do
9117  # Extract the first word of "$ac_prog", so it can be a program name with args.
9118set dummy $ac_prog; ac_word=$2
9119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9120$as_echo_n "checking for $ac_word... " >&6; }
9121if ${ac_cv_path_LS+:} false; then :
9122  $as_echo_n "(cached) " >&6
9123else
9124  case $LS in
9125  [\\/]* | ?:[\\/]*)
9126  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9127  ;;
9128  *)
9129  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9130for as_dir in $PATH
9131do
9132  IFS=$as_save_IFS
9133  test -z "$as_dir" && as_dir=.
9134    for ac_exec_ext in '' $ac_executable_extensions; do
9135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9136    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9138    break 2
9139  fi
9140done
9141  done
9142IFS=$as_save_IFS
9143
9144  ;;
9145esac
9146fi
9147LS=$ac_cv_path_LS
9148if test -n "$LS"; then
9149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9150$as_echo "$LS" >&6; }
9151else
9152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9153$as_echo "no" >&6; }
9154fi
9155
9156
9157  test -n "$LS" && break
9158done
9159
9160  else
9161    # The variable is set, but is it from the command line or the environment?
9162
9163    # Try to remove the string !LS! from our list.
9164    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9165    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9166      # If it failed, the variable was not from the command line. Ignore it,
9167      # but warn the user (except for BASH, which is always set by the calling BASH).
9168      if test "xLS" != xBASH; then
9169        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9170$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9171      fi
9172      # Try to locate tool using the code snippet
9173      for ac_prog in ls
9174do
9175  # Extract the first word of "$ac_prog", so it can be a program name with args.
9176set dummy $ac_prog; ac_word=$2
9177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9178$as_echo_n "checking for $ac_word... " >&6; }
9179if ${ac_cv_path_LS+:} false; then :
9180  $as_echo_n "(cached) " >&6
9181else
9182  case $LS in
9183  [\\/]* | ?:[\\/]*)
9184  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9185  ;;
9186  *)
9187  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9188for as_dir in $PATH
9189do
9190  IFS=$as_save_IFS
9191  test -z "$as_dir" && as_dir=.
9192    for ac_exec_ext in '' $ac_executable_extensions; do
9193  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9194    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9195    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9196    break 2
9197  fi
9198done
9199  done
9200IFS=$as_save_IFS
9201
9202  ;;
9203esac
9204fi
9205LS=$ac_cv_path_LS
9206if test -n "$LS"; then
9207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9208$as_echo "$LS" >&6; }
9209else
9210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9211$as_echo "no" >&6; }
9212fi
9213
9214
9215  test -n "$LS" && break
9216done
9217
9218    else
9219      # If it succeeded, then it was overridden by the user. We will use it
9220      # for the tool.
9221
9222      # First remove it from the list of overridden variables, so we can test
9223      # for unknown variables in the end.
9224      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9225
9226      # Check if we try to supply an empty value
9227      if test "x$LS" = x; then
9228        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9229$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9230        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9231$as_echo_n "checking for LS... " >&6; }
9232        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9233$as_echo "disabled" >&6; }
9234      else
9235        # Check if the provided tool contains a complete path.
9236        tool_specified="$LS"
9237        tool_basename="${tool_specified##*/}"
9238        if test "x$tool_basename" = "x$tool_specified"; then
9239          # A command without a complete path is provided, search $PATH.
9240          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9241$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9242          # Extract the first word of "$tool_basename", so it can be a program name with args.
9243set dummy $tool_basename; ac_word=$2
9244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9245$as_echo_n "checking for $ac_word... " >&6; }
9246if ${ac_cv_path_LS+:} false; then :
9247  $as_echo_n "(cached) " >&6
9248else
9249  case $LS in
9250  [\\/]* | ?:[\\/]*)
9251  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9252  ;;
9253  *)
9254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9255for as_dir in $PATH
9256do
9257  IFS=$as_save_IFS
9258  test -z "$as_dir" && as_dir=.
9259    for ac_exec_ext in '' $ac_executable_extensions; do
9260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9261    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9263    break 2
9264  fi
9265done
9266  done
9267IFS=$as_save_IFS
9268
9269  ;;
9270esac
9271fi
9272LS=$ac_cv_path_LS
9273if test -n "$LS"; then
9274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9275$as_echo "$LS" >&6; }
9276else
9277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9278$as_echo "no" >&6; }
9279fi
9280
9281
9282          if test "x$LS" = x; then
9283            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9284          fi
9285        else
9286          # Otherwise we believe it is a complete path. Use it as it is.
9287          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9288$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9289          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9290$as_echo_n "checking for LS... " >&6; }
9291          if test ! -x "$tool_specified"; then
9292            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9293$as_echo "not found" >&6; }
9294            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9295          fi
9296          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9297$as_echo "$tool_specified" >&6; }
9298        fi
9299      fi
9300    fi
9301
9302  fi
9303
9304
9305
9306  if test "x$LS" = x; then
9307    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9308  fi
9309
9310
9311
9312
9313
9314  # Publish this variable in the help.
9315
9316
9317  if [ -z "${MKDIR+x}" ]; then
9318    # The variable is not set by user, try to locate tool using the code snippet
9319    for ac_prog in mkdir
9320do
9321  # Extract the first word of "$ac_prog", so it can be a program name with args.
9322set dummy $ac_prog; ac_word=$2
9323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9324$as_echo_n "checking for $ac_word... " >&6; }
9325if ${ac_cv_path_MKDIR+:} false; then :
9326  $as_echo_n "(cached) " >&6
9327else
9328  case $MKDIR in
9329  [\\/]* | ?:[\\/]*)
9330  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9331  ;;
9332  *)
9333  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9334for as_dir in $PATH
9335do
9336  IFS=$as_save_IFS
9337  test -z "$as_dir" && as_dir=.
9338    for ac_exec_ext in '' $ac_executable_extensions; do
9339  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9340    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9342    break 2
9343  fi
9344done
9345  done
9346IFS=$as_save_IFS
9347
9348  ;;
9349esac
9350fi
9351MKDIR=$ac_cv_path_MKDIR
9352if test -n "$MKDIR"; then
9353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9354$as_echo "$MKDIR" >&6; }
9355else
9356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9357$as_echo "no" >&6; }
9358fi
9359
9360
9361  test -n "$MKDIR" && break
9362done
9363
9364  else
9365    # The variable is set, but is it from the command line or the environment?
9366
9367    # Try to remove the string !MKDIR! from our list.
9368    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9369    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9370      # If it failed, the variable was not from the command line. Ignore it,
9371      # but warn the user (except for BASH, which is always set by the calling BASH).
9372      if test "xMKDIR" != xBASH; then
9373        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9374$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9375      fi
9376      # Try to locate tool using the code snippet
9377      for ac_prog in mkdir
9378do
9379  # Extract the first word of "$ac_prog", so it can be a program name with args.
9380set dummy $ac_prog; ac_word=$2
9381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9382$as_echo_n "checking for $ac_word... " >&6; }
9383if ${ac_cv_path_MKDIR+:} false; then :
9384  $as_echo_n "(cached) " >&6
9385else
9386  case $MKDIR in
9387  [\\/]* | ?:[\\/]*)
9388  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9389  ;;
9390  *)
9391  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9392for as_dir in $PATH
9393do
9394  IFS=$as_save_IFS
9395  test -z "$as_dir" && as_dir=.
9396    for ac_exec_ext in '' $ac_executable_extensions; do
9397  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9398    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9400    break 2
9401  fi
9402done
9403  done
9404IFS=$as_save_IFS
9405
9406  ;;
9407esac
9408fi
9409MKDIR=$ac_cv_path_MKDIR
9410if test -n "$MKDIR"; then
9411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9412$as_echo "$MKDIR" >&6; }
9413else
9414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9415$as_echo "no" >&6; }
9416fi
9417
9418
9419  test -n "$MKDIR" && break
9420done
9421
9422    else
9423      # If it succeeded, then it was overridden by the user. We will use it
9424      # for the tool.
9425
9426      # First remove it from the list of overridden variables, so we can test
9427      # for unknown variables in the end.
9428      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9429
9430      # Check if we try to supply an empty value
9431      if test "x$MKDIR" = x; then
9432        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9433$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9434        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9435$as_echo_n "checking for MKDIR... " >&6; }
9436        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9437$as_echo "disabled" >&6; }
9438      else
9439        # Check if the provided tool contains a complete path.
9440        tool_specified="$MKDIR"
9441        tool_basename="${tool_specified##*/}"
9442        if test "x$tool_basename" = "x$tool_specified"; then
9443          # A command without a complete path is provided, search $PATH.
9444          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9445$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9446          # Extract the first word of "$tool_basename", so it can be a program name with args.
9447set dummy $tool_basename; ac_word=$2
9448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9449$as_echo_n "checking for $ac_word... " >&6; }
9450if ${ac_cv_path_MKDIR+:} false; then :
9451  $as_echo_n "(cached) " >&6
9452else
9453  case $MKDIR in
9454  [\\/]* | ?:[\\/]*)
9455  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9456  ;;
9457  *)
9458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9459for as_dir in $PATH
9460do
9461  IFS=$as_save_IFS
9462  test -z "$as_dir" && as_dir=.
9463    for ac_exec_ext in '' $ac_executable_extensions; do
9464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9465    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9467    break 2
9468  fi
9469done
9470  done
9471IFS=$as_save_IFS
9472
9473  ;;
9474esac
9475fi
9476MKDIR=$ac_cv_path_MKDIR
9477if test -n "$MKDIR"; then
9478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9479$as_echo "$MKDIR" >&6; }
9480else
9481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9482$as_echo "no" >&6; }
9483fi
9484
9485
9486          if test "x$MKDIR" = x; then
9487            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9488          fi
9489        else
9490          # Otherwise we believe it is a complete path. Use it as it is.
9491          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9492$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9493          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9494$as_echo_n "checking for MKDIR... " >&6; }
9495          if test ! -x "$tool_specified"; then
9496            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9497$as_echo "not found" >&6; }
9498            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9499          fi
9500          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9501$as_echo "$tool_specified" >&6; }
9502        fi
9503      fi
9504    fi
9505
9506  fi
9507
9508
9509
9510  if test "x$MKDIR" = x; then
9511    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9512  fi
9513
9514
9515
9516
9517
9518  # Publish this variable in the help.
9519
9520
9521  if [ -z "${MKTEMP+x}" ]; then
9522    # The variable is not set by user, try to locate tool using the code snippet
9523    for ac_prog in mktemp
9524do
9525  # Extract the first word of "$ac_prog", so it can be a program name with args.
9526set dummy $ac_prog; ac_word=$2
9527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9528$as_echo_n "checking for $ac_word... " >&6; }
9529if ${ac_cv_path_MKTEMP+:} false; then :
9530  $as_echo_n "(cached) " >&6
9531else
9532  case $MKTEMP in
9533  [\\/]* | ?:[\\/]*)
9534  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9535  ;;
9536  *)
9537  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9538for as_dir in $PATH
9539do
9540  IFS=$as_save_IFS
9541  test -z "$as_dir" && as_dir=.
9542    for ac_exec_ext in '' $ac_executable_extensions; do
9543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9544    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9546    break 2
9547  fi
9548done
9549  done
9550IFS=$as_save_IFS
9551
9552  ;;
9553esac
9554fi
9555MKTEMP=$ac_cv_path_MKTEMP
9556if test -n "$MKTEMP"; then
9557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9558$as_echo "$MKTEMP" >&6; }
9559else
9560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9561$as_echo "no" >&6; }
9562fi
9563
9564
9565  test -n "$MKTEMP" && break
9566done
9567
9568  else
9569    # The variable is set, but is it from the command line or the environment?
9570
9571    # Try to remove the string !MKTEMP! from our list.
9572    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9573    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9574      # If it failed, the variable was not from the command line. Ignore it,
9575      # but warn the user (except for BASH, which is always set by the calling BASH).
9576      if test "xMKTEMP" != xBASH; then
9577        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9578$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9579      fi
9580      # Try to locate tool using the code snippet
9581      for ac_prog in mktemp
9582do
9583  # Extract the first word of "$ac_prog", so it can be a program name with args.
9584set dummy $ac_prog; ac_word=$2
9585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9586$as_echo_n "checking for $ac_word... " >&6; }
9587if ${ac_cv_path_MKTEMP+:} false; then :
9588  $as_echo_n "(cached) " >&6
9589else
9590  case $MKTEMP in
9591  [\\/]* | ?:[\\/]*)
9592  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9593  ;;
9594  *)
9595  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9596for as_dir in $PATH
9597do
9598  IFS=$as_save_IFS
9599  test -z "$as_dir" && as_dir=.
9600    for ac_exec_ext in '' $ac_executable_extensions; do
9601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9602    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9604    break 2
9605  fi
9606done
9607  done
9608IFS=$as_save_IFS
9609
9610  ;;
9611esac
9612fi
9613MKTEMP=$ac_cv_path_MKTEMP
9614if test -n "$MKTEMP"; then
9615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9616$as_echo "$MKTEMP" >&6; }
9617else
9618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9619$as_echo "no" >&6; }
9620fi
9621
9622
9623  test -n "$MKTEMP" && break
9624done
9625
9626    else
9627      # If it succeeded, then it was overridden by the user. We will use it
9628      # for the tool.
9629
9630      # First remove it from the list of overridden variables, so we can test
9631      # for unknown variables in the end.
9632      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9633
9634      # Check if we try to supply an empty value
9635      if test "x$MKTEMP" = x; then
9636        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9637$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9638        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9639$as_echo_n "checking for MKTEMP... " >&6; }
9640        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9641$as_echo "disabled" >&6; }
9642      else
9643        # Check if the provided tool contains a complete path.
9644        tool_specified="$MKTEMP"
9645        tool_basename="${tool_specified##*/}"
9646        if test "x$tool_basename" = "x$tool_specified"; then
9647          # A command without a complete path is provided, search $PATH.
9648          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9649$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9650          # Extract the first word of "$tool_basename", so it can be a program name with args.
9651set dummy $tool_basename; ac_word=$2
9652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9653$as_echo_n "checking for $ac_word... " >&6; }
9654if ${ac_cv_path_MKTEMP+:} false; then :
9655  $as_echo_n "(cached) " >&6
9656else
9657  case $MKTEMP in
9658  [\\/]* | ?:[\\/]*)
9659  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9660  ;;
9661  *)
9662  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9663for as_dir in $PATH
9664do
9665  IFS=$as_save_IFS
9666  test -z "$as_dir" && as_dir=.
9667    for ac_exec_ext in '' $ac_executable_extensions; do
9668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9669    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9671    break 2
9672  fi
9673done
9674  done
9675IFS=$as_save_IFS
9676
9677  ;;
9678esac
9679fi
9680MKTEMP=$ac_cv_path_MKTEMP
9681if test -n "$MKTEMP"; then
9682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9683$as_echo "$MKTEMP" >&6; }
9684else
9685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9686$as_echo "no" >&6; }
9687fi
9688
9689
9690          if test "x$MKTEMP" = x; then
9691            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9692          fi
9693        else
9694          # Otherwise we believe it is a complete path. Use it as it is.
9695          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9696$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9697          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9698$as_echo_n "checking for MKTEMP... " >&6; }
9699          if test ! -x "$tool_specified"; then
9700            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9701$as_echo "not found" >&6; }
9702            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9703          fi
9704          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9705$as_echo "$tool_specified" >&6; }
9706        fi
9707      fi
9708    fi
9709
9710  fi
9711
9712
9713
9714  if test "x$MKTEMP" = x; then
9715    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9716  fi
9717
9718
9719
9720
9721
9722  # Publish this variable in the help.
9723
9724
9725  if [ -z "${MV+x}" ]; then
9726    # The variable is not set by user, try to locate tool using the code snippet
9727    for ac_prog in mv
9728do
9729  # Extract the first word of "$ac_prog", so it can be a program name with args.
9730set dummy $ac_prog; ac_word=$2
9731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9732$as_echo_n "checking for $ac_word... " >&6; }
9733if ${ac_cv_path_MV+:} false; then :
9734  $as_echo_n "(cached) " >&6
9735else
9736  case $MV in
9737  [\\/]* | ?:[\\/]*)
9738  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9739  ;;
9740  *)
9741  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9742for as_dir in $PATH
9743do
9744  IFS=$as_save_IFS
9745  test -z "$as_dir" && as_dir=.
9746    for ac_exec_ext in '' $ac_executable_extensions; do
9747  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9748    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9750    break 2
9751  fi
9752done
9753  done
9754IFS=$as_save_IFS
9755
9756  ;;
9757esac
9758fi
9759MV=$ac_cv_path_MV
9760if test -n "$MV"; then
9761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9762$as_echo "$MV" >&6; }
9763else
9764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9765$as_echo "no" >&6; }
9766fi
9767
9768
9769  test -n "$MV" && break
9770done
9771
9772  else
9773    # The variable is set, but is it from the command line or the environment?
9774
9775    # Try to remove the string !MV! from our list.
9776    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9777    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9778      # If it failed, the variable was not from the command line. Ignore it,
9779      # but warn the user (except for BASH, which is always set by the calling BASH).
9780      if test "xMV" != xBASH; then
9781        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9782$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9783      fi
9784      # Try to locate tool using the code snippet
9785      for ac_prog in mv
9786do
9787  # Extract the first word of "$ac_prog", so it can be a program name with args.
9788set dummy $ac_prog; ac_word=$2
9789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9790$as_echo_n "checking for $ac_word... " >&6; }
9791if ${ac_cv_path_MV+:} false; then :
9792  $as_echo_n "(cached) " >&6
9793else
9794  case $MV in
9795  [\\/]* | ?:[\\/]*)
9796  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9797  ;;
9798  *)
9799  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9800for as_dir in $PATH
9801do
9802  IFS=$as_save_IFS
9803  test -z "$as_dir" && as_dir=.
9804    for ac_exec_ext in '' $ac_executable_extensions; do
9805  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9806    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9807    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9808    break 2
9809  fi
9810done
9811  done
9812IFS=$as_save_IFS
9813
9814  ;;
9815esac
9816fi
9817MV=$ac_cv_path_MV
9818if test -n "$MV"; then
9819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9820$as_echo "$MV" >&6; }
9821else
9822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9823$as_echo "no" >&6; }
9824fi
9825
9826
9827  test -n "$MV" && break
9828done
9829
9830    else
9831      # If it succeeded, then it was overridden by the user. We will use it
9832      # for the tool.
9833
9834      # First remove it from the list of overridden variables, so we can test
9835      # for unknown variables in the end.
9836      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9837
9838      # Check if we try to supply an empty value
9839      if test "x$MV" = x; then
9840        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9841$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9842        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9843$as_echo_n "checking for MV... " >&6; }
9844        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9845$as_echo "disabled" >&6; }
9846      else
9847        # Check if the provided tool contains a complete path.
9848        tool_specified="$MV"
9849        tool_basename="${tool_specified##*/}"
9850        if test "x$tool_basename" = "x$tool_specified"; then
9851          # A command without a complete path is provided, search $PATH.
9852          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9853$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9854          # Extract the first word of "$tool_basename", so it can be a program name with args.
9855set dummy $tool_basename; ac_word=$2
9856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9857$as_echo_n "checking for $ac_word... " >&6; }
9858if ${ac_cv_path_MV+:} false; then :
9859  $as_echo_n "(cached) " >&6
9860else
9861  case $MV in
9862  [\\/]* | ?:[\\/]*)
9863  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9864  ;;
9865  *)
9866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9867for as_dir in $PATH
9868do
9869  IFS=$as_save_IFS
9870  test -z "$as_dir" && as_dir=.
9871    for ac_exec_ext in '' $ac_executable_extensions; do
9872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9873    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9875    break 2
9876  fi
9877done
9878  done
9879IFS=$as_save_IFS
9880
9881  ;;
9882esac
9883fi
9884MV=$ac_cv_path_MV
9885if test -n "$MV"; then
9886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9887$as_echo "$MV" >&6; }
9888else
9889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9890$as_echo "no" >&6; }
9891fi
9892
9893
9894          if test "x$MV" = x; then
9895            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9896          fi
9897        else
9898          # Otherwise we believe it is a complete path. Use it as it is.
9899          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9900$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9901          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9902$as_echo_n "checking for MV... " >&6; }
9903          if test ! -x "$tool_specified"; then
9904            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9905$as_echo "not found" >&6; }
9906            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9907          fi
9908          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9909$as_echo "$tool_specified" >&6; }
9910        fi
9911      fi
9912    fi
9913
9914  fi
9915
9916
9917
9918  if test "x$MV" = x; then
9919    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9920  fi
9921
9922
9923
9924
9925
9926  # Publish this variable in the help.
9927
9928
9929  if [ -z "${NAWK+x}" ]; then
9930    # The variable is not set by user, try to locate tool using the code snippet
9931    for ac_prog in nawk gawk awk
9932do
9933  # Extract the first word of "$ac_prog", so it can be a program name with args.
9934set dummy $ac_prog; ac_word=$2
9935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9936$as_echo_n "checking for $ac_word... " >&6; }
9937if ${ac_cv_path_NAWK+:} false; then :
9938  $as_echo_n "(cached) " >&6
9939else
9940  case $NAWK in
9941  [\\/]* | ?:[\\/]*)
9942  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9943  ;;
9944  *)
9945  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9946for as_dir in $PATH
9947do
9948  IFS=$as_save_IFS
9949  test -z "$as_dir" && as_dir=.
9950    for ac_exec_ext in '' $ac_executable_extensions; do
9951  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9952    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9953    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9954    break 2
9955  fi
9956done
9957  done
9958IFS=$as_save_IFS
9959
9960  ;;
9961esac
9962fi
9963NAWK=$ac_cv_path_NAWK
9964if test -n "$NAWK"; then
9965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9966$as_echo "$NAWK" >&6; }
9967else
9968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9969$as_echo "no" >&6; }
9970fi
9971
9972
9973  test -n "$NAWK" && break
9974done
9975
9976  else
9977    # The variable is set, but is it from the command line or the environment?
9978
9979    # Try to remove the string !NAWK! from our list.
9980    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9981    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9982      # If it failed, the variable was not from the command line. Ignore it,
9983      # but warn the user (except for BASH, which is always set by the calling BASH).
9984      if test "xNAWK" != xBASH; then
9985        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9986$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9987      fi
9988      # Try to locate tool using the code snippet
9989      for ac_prog in nawk gawk awk
9990do
9991  # Extract the first word of "$ac_prog", so it can be a program name with args.
9992set dummy $ac_prog; ac_word=$2
9993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9994$as_echo_n "checking for $ac_word... " >&6; }
9995if ${ac_cv_path_NAWK+:} false; then :
9996  $as_echo_n "(cached) " >&6
9997else
9998  case $NAWK in
9999  [\\/]* | ?:[\\/]*)
10000  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10001  ;;
10002  *)
10003  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10004for as_dir in $PATH
10005do
10006  IFS=$as_save_IFS
10007  test -z "$as_dir" && as_dir=.
10008    for ac_exec_ext in '' $ac_executable_extensions; do
10009  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10010    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10012    break 2
10013  fi
10014done
10015  done
10016IFS=$as_save_IFS
10017
10018  ;;
10019esac
10020fi
10021NAWK=$ac_cv_path_NAWK
10022if test -n "$NAWK"; then
10023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10024$as_echo "$NAWK" >&6; }
10025else
10026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10027$as_echo "no" >&6; }
10028fi
10029
10030
10031  test -n "$NAWK" && break
10032done
10033
10034    else
10035      # If it succeeded, then it was overridden by the user. We will use it
10036      # for the tool.
10037
10038      # First remove it from the list of overridden variables, so we can test
10039      # for unknown variables in the end.
10040      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10041
10042      # Check if we try to supply an empty value
10043      if test "x$NAWK" = x; then
10044        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
10045$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
10046        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10047$as_echo_n "checking for NAWK... " >&6; }
10048        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10049$as_echo "disabled" >&6; }
10050      else
10051        # Check if the provided tool contains a complete path.
10052        tool_specified="$NAWK"
10053        tool_basename="${tool_specified##*/}"
10054        if test "x$tool_basename" = "x$tool_specified"; then
10055          # A command without a complete path is provided, search $PATH.
10056          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
10057$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
10058          # Extract the first word of "$tool_basename", so it can be a program name with args.
10059set dummy $tool_basename; ac_word=$2
10060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10061$as_echo_n "checking for $ac_word... " >&6; }
10062if ${ac_cv_path_NAWK+:} false; then :
10063  $as_echo_n "(cached) " >&6
10064else
10065  case $NAWK in
10066  [\\/]* | ?:[\\/]*)
10067  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10068  ;;
10069  *)
10070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10071for as_dir in $PATH
10072do
10073  IFS=$as_save_IFS
10074  test -z "$as_dir" && as_dir=.
10075    for ac_exec_ext in '' $ac_executable_extensions; do
10076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10077    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10079    break 2
10080  fi
10081done
10082  done
10083IFS=$as_save_IFS
10084
10085  ;;
10086esac
10087fi
10088NAWK=$ac_cv_path_NAWK
10089if test -n "$NAWK"; then
10090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10091$as_echo "$NAWK" >&6; }
10092else
10093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10094$as_echo "no" >&6; }
10095fi
10096
10097
10098          if test "x$NAWK" = x; then
10099            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10100          fi
10101        else
10102          # Otherwise we believe it is a complete path. Use it as it is.
10103          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10104$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10105          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10106$as_echo_n "checking for NAWK... " >&6; }
10107          if test ! -x "$tool_specified"; then
10108            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10109$as_echo "not found" >&6; }
10110            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10111          fi
10112          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10113$as_echo "$tool_specified" >&6; }
10114        fi
10115      fi
10116    fi
10117
10118  fi
10119
10120
10121
10122  if test "x$NAWK" = x; then
10123    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10124  fi
10125
10126
10127
10128
10129
10130  # Publish this variable in the help.
10131
10132
10133  if [ -z "${PRINTF+x}" ]; then
10134    # The variable is not set by user, try to locate tool using the code snippet
10135    for ac_prog in printf
10136do
10137  # Extract the first word of "$ac_prog", so it can be a program name with args.
10138set dummy $ac_prog; ac_word=$2
10139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10140$as_echo_n "checking for $ac_word... " >&6; }
10141if ${ac_cv_path_PRINTF+:} false; then :
10142  $as_echo_n "(cached) " >&6
10143else
10144  case $PRINTF in
10145  [\\/]* | ?:[\\/]*)
10146  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10147  ;;
10148  *)
10149  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10150for as_dir in $PATH
10151do
10152  IFS=$as_save_IFS
10153  test -z "$as_dir" && as_dir=.
10154    for ac_exec_ext in '' $ac_executable_extensions; do
10155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10156    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10158    break 2
10159  fi
10160done
10161  done
10162IFS=$as_save_IFS
10163
10164  ;;
10165esac
10166fi
10167PRINTF=$ac_cv_path_PRINTF
10168if test -n "$PRINTF"; then
10169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10170$as_echo "$PRINTF" >&6; }
10171else
10172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10173$as_echo "no" >&6; }
10174fi
10175
10176
10177  test -n "$PRINTF" && break
10178done
10179
10180  else
10181    # The variable is set, but is it from the command line or the environment?
10182
10183    # Try to remove the string !PRINTF! from our list.
10184    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10185    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10186      # If it failed, the variable was not from the command line. Ignore it,
10187      # but warn the user (except for BASH, which is always set by the calling BASH).
10188      if test "xPRINTF" != xBASH; then
10189        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10190$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10191      fi
10192      # Try to locate tool using the code snippet
10193      for ac_prog in printf
10194do
10195  # Extract the first word of "$ac_prog", so it can be a program name with args.
10196set dummy $ac_prog; ac_word=$2
10197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10198$as_echo_n "checking for $ac_word... " >&6; }
10199if ${ac_cv_path_PRINTF+:} false; then :
10200  $as_echo_n "(cached) " >&6
10201else
10202  case $PRINTF in
10203  [\\/]* | ?:[\\/]*)
10204  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10205  ;;
10206  *)
10207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10208for as_dir in $PATH
10209do
10210  IFS=$as_save_IFS
10211  test -z "$as_dir" && as_dir=.
10212    for ac_exec_ext in '' $ac_executable_extensions; do
10213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10214    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10216    break 2
10217  fi
10218done
10219  done
10220IFS=$as_save_IFS
10221
10222  ;;
10223esac
10224fi
10225PRINTF=$ac_cv_path_PRINTF
10226if test -n "$PRINTF"; then
10227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10228$as_echo "$PRINTF" >&6; }
10229else
10230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10231$as_echo "no" >&6; }
10232fi
10233
10234
10235  test -n "$PRINTF" && break
10236done
10237
10238    else
10239      # If it succeeded, then it was overridden by the user. We will use it
10240      # for the tool.
10241
10242      # First remove it from the list of overridden variables, so we can test
10243      # for unknown variables in the end.
10244      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10245
10246      # Check if we try to supply an empty value
10247      if test "x$PRINTF" = x; then
10248        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10249$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10250        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10251$as_echo_n "checking for PRINTF... " >&6; }
10252        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10253$as_echo "disabled" >&6; }
10254      else
10255        # Check if the provided tool contains a complete path.
10256        tool_specified="$PRINTF"
10257        tool_basename="${tool_specified##*/}"
10258        if test "x$tool_basename" = "x$tool_specified"; then
10259          # A command without a complete path is provided, search $PATH.
10260          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10261$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10262          # Extract the first word of "$tool_basename", so it can be a program name with args.
10263set dummy $tool_basename; ac_word=$2
10264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10265$as_echo_n "checking for $ac_word... " >&6; }
10266if ${ac_cv_path_PRINTF+:} false; then :
10267  $as_echo_n "(cached) " >&6
10268else
10269  case $PRINTF in
10270  [\\/]* | ?:[\\/]*)
10271  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10272  ;;
10273  *)
10274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10275for as_dir in $PATH
10276do
10277  IFS=$as_save_IFS
10278  test -z "$as_dir" && as_dir=.
10279    for ac_exec_ext in '' $ac_executable_extensions; do
10280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10281    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10283    break 2
10284  fi
10285done
10286  done
10287IFS=$as_save_IFS
10288
10289  ;;
10290esac
10291fi
10292PRINTF=$ac_cv_path_PRINTF
10293if test -n "$PRINTF"; then
10294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10295$as_echo "$PRINTF" >&6; }
10296else
10297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10298$as_echo "no" >&6; }
10299fi
10300
10301
10302          if test "x$PRINTF" = x; then
10303            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10304          fi
10305        else
10306          # Otherwise we believe it is a complete path. Use it as it is.
10307          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10308$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10309          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10310$as_echo_n "checking for PRINTF... " >&6; }
10311          if test ! -x "$tool_specified"; then
10312            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10313$as_echo "not found" >&6; }
10314            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10315          fi
10316          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10317$as_echo "$tool_specified" >&6; }
10318        fi
10319      fi
10320    fi
10321
10322  fi
10323
10324
10325
10326  if test "x$PRINTF" = x; then
10327    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10328  fi
10329
10330
10331
10332
10333
10334  # Publish this variable in the help.
10335
10336
10337  if [ -z "${RM+x}" ]; then
10338    # The variable is not set by user, try to locate tool using the code snippet
10339    for ac_prog in rm
10340do
10341  # Extract the first word of "$ac_prog", so it can be a program name with args.
10342set dummy $ac_prog; ac_word=$2
10343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10344$as_echo_n "checking for $ac_word... " >&6; }
10345if ${ac_cv_path_RM+:} false; then :
10346  $as_echo_n "(cached) " >&6
10347else
10348  case $RM in
10349  [\\/]* | ?:[\\/]*)
10350  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10351  ;;
10352  *)
10353  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10354for as_dir in $PATH
10355do
10356  IFS=$as_save_IFS
10357  test -z "$as_dir" && as_dir=.
10358    for ac_exec_ext in '' $ac_executable_extensions; do
10359  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10360    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10361    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10362    break 2
10363  fi
10364done
10365  done
10366IFS=$as_save_IFS
10367
10368  ;;
10369esac
10370fi
10371RM=$ac_cv_path_RM
10372if test -n "$RM"; then
10373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10374$as_echo "$RM" >&6; }
10375else
10376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10377$as_echo "no" >&6; }
10378fi
10379
10380
10381  test -n "$RM" && break
10382done
10383
10384  else
10385    # The variable is set, but is it from the command line or the environment?
10386
10387    # Try to remove the string !RM! from our list.
10388    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10389    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10390      # If it failed, the variable was not from the command line. Ignore it,
10391      # but warn the user (except for BASH, which is always set by the calling BASH).
10392      if test "xRM" != xBASH; then
10393        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10394$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10395      fi
10396      # Try to locate tool using the code snippet
10397      for ac_prog in rm
10398do
10399  # Extract the first word of "$ac_prog", so it can be a program name with args.
10400set dummy $ac_prog; ac_word=$2
10401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10402$as_echo_n "checking for $ac_word... " >&6; }
10403if ${ac_cv_path_RM+:} false; then :
10404  $as_echo_n "(cached) " >&6
10405else
10406  case $RM in
10407  [\\/]* | ?:[\\/]*)
10408  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10409  ;;
10410  *)
10411  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10412for as_dir in $PATH
10413do
10414  IFS=$as_save_IFS
10415  test -z "$as_dir" && as_dir=.
10416    for ac_exec_ext in '' $ac_executable_extensions; do
10417  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10418    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10419    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10420    break 2
10421  fi
10422done
10423  done
10424IFS=$as_save_IFS
10425
10426  ;;
10427esac
10428fi
10429RM=$ac_cv_path_RM
10430if test -n "$RM"; then
10431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10432$as_echo "$RM" >&6; }
10433else
10434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10435$as_echo "no" >&6; }
10436fi
10437
10438
10439  test -n "$RM" && break
10440done
10441
10442    else
10443      # If it succeeded, then it was overridden by the user. We will use it
10444      # for the tool.
10445
10446      # First remove it from the list of overridden variables, so we can test
10447      # for unknown variables in the end.
10448      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10449
10450      # Check if we try to supply an empty value
10451      if test "x$RM" = x; then
10452        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10453$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10454        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10455$as_echo_n "checking for RM... " >&6; }
10456        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10457$as_echo "disabled" >&6; }
10458      else
10459        # Check if the provided tool contains a complete path.
10460        tool_specified="$RM"
10461        tool_basename="${tool_specified##*/}"
10462        if test "x$tool_basename" = "x$tool_specified"; then
10463          # A command without a complete path is provided, search $PATH.
10464          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10465$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10466          # Extract the first word of "$tool_basename", so it can be a program name with args.
10467set dummy $tool_basename; ac_word=$2
10468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10469$as_echo_n "checking for $ac_word... " >&6; }
10470if ${ac_cv_path_RM+:} false; then :
10471  $as_echo_n "(cached) " >&6
10472else
10473  case $RM in
10474  [\\/]* | ?:[\\/]*)
10475  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10476  ;;
10477  *)
10478  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10479for as_dir in $PATH
10480do
10481  IFS=$as_save_IFS
10482  test -z "$as_dir" && as_dir=.
10483    for ac_exec_ext in '' $ac_executable_extensions; do
10484  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10485    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10486    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10487    break 2
10488  fi
10489done
10490  done
10491IFS=$as_save_IFS
10492
10493  ;;
10494esac
10495fi
10496RM=$ac_cv_path_RM
10497if test -n "$RM"; then
10498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10499$as_echo "$RM" >&6; }
10500else
10501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10502$as_echo "no" >&6; }
10503fi
10504
10505
10506          if test "x$RM" = x; then
10507            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10508          fi
10509        else
10510          # Otherwise we believe it is a complete path. Use it as it is.
10511          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10512$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10513          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10514$as_echo_n "checking for RM... " >&6; }
10515          if test ! -x "$tool_specified"; then
10516            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10517$as_echo "not found" >&6; }
10518            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10519          fi
10520          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10521$as_echo "$tool_specified" >&6; }
10522        fi
10523      fi
10524    fi
10525
10526  fi
10527
10528
10529
10530  if test "x$RM" = x; then
10531    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10532  fi
10533
10534
10535
10536
10537
10538  # Publish this variable in the help.
10539
10540
10541  if [ -z "${RMDIR+x}" ]; then
10542    # The variable is not set by user, try to locate tool using the code snippet
10543    for ac_prog in rmdir
10544do
10545  # Extract the first word of "$ac_prog", so it can be a program name with args.
10546set dummy $ac_prog; ac_word=$2
10547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10548$as_echo_n "checking for $ac_word... " >&6; }
10549if ${ac_cv_path_RMDIR+:} false; then :
10550  $as_echo_n "(cached) " >&6
10551else
10552  case $RMDIR in
10553  [\\/]* | ?:[\\/]*)
10554  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10555  ;;
10556  *)
10557  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10558for as_dir in $PATH
10559do
10560  IFS=$as_save_IFS
10561  test -z "$as_dir" && as_dir=.
10562    for ac_exec_ext in '' $ac_executable_extensions; do
10563  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10564    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10566    break 2
10567  fi
10568done
10569  done
10570IFS=$as_save_IFS
10571
10572  ;;
10573esac
10574fi
10575RMDIR=$ac_cv_path_RMDIR
10576if test -n "$RMDIR"; then
10577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10578$as_echo "$RMDIR" >&6; }
10579else
10580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10581$as_echo "no" >&6; }
10582fi
10583
10584
10585  test -n "$RMDIR" && break
10586done
10587
10588  else
10589    # The variable is set, but is it from the command line or the environment?
10590
10591    # Try to remove the string !RMDIR! from our list.
10592    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10593    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10594      # If it failed, the variable was not from the command line. Ignore it,
10595      # but warn the user (except for BASH, which is always set by the calling BASH).
10596      if test "xRMDIR" != xBASH; then
10597        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10598$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10599      fi
10600      # Try to locate tool using the code snippet
10601      for ac_prog in rmdir
10602do
10603  # Extract the first word of "$ac_prog", so it can be a program name with args.
10604set dummy $ac_prog; ac_word=$2
10605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10606$as_echo_n "checking for $ac_word... " >&6; }
10607if ${ac_cv_path_RMDIR+:} false; then :
10608  $as_echo_n "(cached) " >&6
10609else
10610  case $RMDIR in
10611  [\\/]* | ?:[\\/]*)
10612  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10613  ;;
10614  *)
10615  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10616for as_dir in $PATH
10617do
10618  IFS=$as_save_IFS
10619  test -z "$as_dir" && as_dir=.
10620    for ac_exec_ext in '' $ac_executable_extensions; do
10621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10622    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10624    break 2
10625  fi
10626done
10627  done
10628IFS=$as_save_IFS
10629
10630  ;;
10631esac
10632fi
10633RMDIR=$ac_cv_path_RMDIR
10634if test -n "$RMDIR"; then
10635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10636$as_echo "$RMDIR" >&6; }
10637else
10638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10639$as_echo "no" >&6; }
10640fi
10641
10642
10643  test -n "$RMDIR" && break
10644done
10645
10646    else
10647      # If it succeeded, then it was overridden by the user. We will use it
10648      # for the tool.
10649
10650      # First remove it from the list of overridden variables, so we can test
10651      # for unknown variables in the end.
10652      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10653
10654      # Check if we try to supply an empty value
10655      if test "x$RMDIR" = x; then
10656        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10657$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10658        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10659$as_echo_n "checking for RMDIR... " >&6; }
10660        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10661$as_echo "disabled" >&6; }
10662      else
10663        # Check if the provided tool contains a complete path.
10664        tool_specified="$RMDIR"
10665        tool_basename="${tool_specified##*/}"
10666        if test "x$tool_basename" = "x$tool_specified"; then
10667          # A command without a complete path is provided, search $PATH.
10668          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10669$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10670          # Extract the first word of "$tool_basename", so it can be a program name with args.
10671set dummy $tool_basename; ac_word=$2
10672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10673$as_echo_n "checking for $ac_word... " >&6; }
10674if ${ac_cv_path_RMDIR+:} false; then :
10675  $as_echo_n "(cached) " >&6
10676else
10677  case $RMDIR in
10678  [\\/]* | ?:[\\/]*)
10679  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10680  ;;
10681  *)
10682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10683for as_dir in $PATH
10684do
10685  IFS=$as_save_IFS
10686  test -z "$as_dir" && as_dir=.
10687    for ac_exec_ext in '' $ac_executable_extensions; do
10688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10689    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10691    break 2
10692  fi
10693done
10694  done
10695IFS=$as_save_IFS
10696
10697  ;;
10698esac
10699fi
10700RMDIR=$ac_cv_path_RMDIR
10701if test -n "$RMDIR"; then
10702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10703$as_echo "$RMDIR" >&6; }
10704else
10705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10706$as_echo "no" >&6; }
10707fi
10708
10709
10710          if test "x$RMDIR" = x; then
10711            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10712          fi
10713        else
10714          # Otherwise we believe it is a complete path. Use it as it is.
10715          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10716$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10717          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10718$as_echo_n "checking for RMDIR... " >&6; }
10719          if test ! -x "$tool_specified"; then
10720            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10721$as_echo "not found" >&6; }
10722            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10723          fi
10724          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10725$as_echo "$tool_specified" >&6; }
10726        fi
10727      fi
10728    fi
10729
10730  fi
10731
10732
10733
10734  if test "x$RMDIR" = x; then
10735    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10736  fi
10737
10738
10739
10740
10741
10742  # Publish this variable in the help.
10743
10744
10745  if [ -z "${SH+x}" ]; then
10746    # The variable is not set by user, try to locate tool using the code snippet
10747    for ac_prog in sh
10748do
10749  # Extract the first word of "$ac_prog", so it can be a program name with args.
10750set dummy $ac_prog; ac_word=$2
10751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10752$as_echo_n "checking for $ac_word... " >&6; }
10753if ${ac_cv_path_SH+:} false; then :
10754  $as_echo_n "(cached) " >&6
10755else
10756  case $SH in
10757  [\\/]* | ?:[\\/]*)
10758  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10759  ;;
10760  *)
10761  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10762for as_dir in $PATH
10763do
10764  IFS=$as_save_IFS
10765  test -z "$as_dir" && as_dir=.
10766    for ac_exec_ext in '' $ac_executable_extensions; do
10767  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10768    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10770    break 2
10771  fi
10772done
10773  done
10774IFS=$as_save_IFS
10775
10776  ;;
10777esac
10778fi
10779SH=$ac_cv_path_SH
10780if test -n "$SH"; then
10781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10782$as_echo "$SH" >&6; }
10783else
10784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10785$as_echo "no" >&6; }
10786fi
10787
10788
10789  test -n "$SH" && break
10790done
10791
10792  else
10793    # The variable is set, but is it from the command line or the environment?
10794
10795    # Try to remove the string !SH! from our list.
10796    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10797    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10798      # If it failed, the variable was not from the command line. Ignore it,
10799      # but warn the user (except for BASH, which is always set by the calling BASH).
10800      if test "xSH" != xBASH; then
10801        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10802$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10803      fi
10804      # Try to locate tool using the code snippet
10805      for ac_prog in sh
10806do
10807  # Extract the first word of "$ac_prog", so it can be a program name with args.
10808set dummy $ac_prog; ac_word=$2
10809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10810$as_echo_n "checking for $ac_word... " >&6; }
10811if ${ac_cv_path_SH+:} false; then :
10812  $as_echo_n "(cached) " >&6
10813else
10814  case $SH in
10815  [\\/]* | ?:[\\/]*)
10816  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10817  ;;
10818  *)
10819  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10820for as_dir in $PATH
10821do
10822  IFS=$as_save_IFS
10823  test -z "$as_dir" && as_dir=.
10824    for ac_exec_ext in '' $ac_executable_extensions; do
10825  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10826    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10828    break 2
10829  fi
10830done
10831  done
10832IFS=$as_save_IFS
10833
10834  ;;
10835esac
10836fi
10837SH=$ac_cv_path_SH
10838if test -n "$SH"; then
10839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10840$as_echo "$SH" >&6; }
10841else
10842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10843$as_echo "no" >&6; }
10844fi
10845
10846
10847  test -n "$SH" && break
10848done
10849
10850    else
10851      # If it succeeded, then it was overridden by the user. We will use it
10852      # for the tool.
10853
10854      # First remove it from the list of overridden variables, so we can test
10855      # for unknown variables in the end.
10856      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10857
10858      # Check if we try to supply an empty value
10859      if test "x$SH" = x; then
10860        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10861$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10862        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10863$as_echo_n "checking for SH... " >&6; }
10864        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10865$as_echo "disabled" >&6; }
10866      else
10867        # Check if the provided tool contains a complete path.
10868        tool_specified="$SH"
10869        tool_basename="${tool_specified##*/}"
10870        if test "x$tool_basename" = "x$tool_specified"; then
10871          # A command without a complete path is provided, search $PATH.
10872          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10873$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10874          # Extract the first word of "$tool_basename", so it can be a program name with args.
10875set dummy $tool_basename; ac_word=$2
10876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10877$as_echo_n "checking for $ac_word... " >&6; }
10878if ${ac_cv_path_SH+:} false; then :
10879  $as_echo_n "(cached) " >&6
10880else
10881  case $SH in
10882  [\\/]* | ?:[\\/]*)
10883  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10884  ;;
10885  *)
10886  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10887for as_dir in $PATH
10888do
10889  IFS=$as_save_IFS
10890  test -z "$as_dir" && as_dir=.
10891    for ac_exec_ext in '' $ac_executable_extensions; do
10892  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10893    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10894    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10895    break 2
10896  fi
10897done
10898  done
10899IFS=$as_save_IFS
10900
10901  ;;
10902esac
10903fi
10904SH=$ac_cv_path_SH
10905if test -n "$SH"; then
10906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10907$as_echo "$SH" >&6; }
10908else
10909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10910$as_echo "no" >&6; }
10911fi
10912
10913
10914          if test "x$SH" = x; then
10915            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10916          fi
10917        else
10918          # Otherwise we believe it is a complete path. Use it as it is.
10919          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10920$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10921          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10922$as_echo_n "checking for SH... " >&6; }
10923          if test ! -x "$tool_specified"; then
10924            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10925$as_echo "not found" >&6; }
10926            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10927          fi
10928          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10929$as_echo "$tool_specified" >&6; }
10930        fi
10931      fi
10932    fi
10933
10934  fi
10935
10936
10937
10938  if test "x$SH" = x; then
10939    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10940  fi
10941
10942
10943
10944
10945
10946  # Publish this variable in the help.
10947
10948
10949  if [ -z "${SORT+x}" ]; then
10950    # The variable is not set by user, try to locate tool using the code snippet
10951    for ac_prog in sort
10952do
10953  # Extract the first word of "$ac_prog", so it can be a program name with args.
10954set dummy $ac_prog; ac_word=$2
10955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10956$as_echo_n "checking for $ac_word... " >&6; }
10957if ${ac_cv_path_SORT+:} false; then :
10958  $as_echo_n "(cached) " >&6
10959else
10960  case $SORT in
10961  [\\/]* | ?:[\\/]*)
10962  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10963  ;;
10964  *)
10965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10966for as_dir in $PATH
10967do
10968  IFS=$as_save_IFS
10969  test -z "$as_dir" && as_dir=.
10970    for ac_exec_ext in '' $ac_executable_extensions; do
10971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10972    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10974    break 2
10975  fi
10976done
10977  done
10978IFS=$as_save_IFS
10979
10980  ;;
10981esac
10982fi
10983SORT=$ac_cv_path_SORT
10984if test -n "$SORT"; then
10985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10986$as_echo "$SORT" >&6; }
10987else
10988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10989$as_echo "no" >&6; }
10990fi
10991
10992
10993  test -n "$SORT" && break
10994done
10995
10996  else
10997    # The variable is set, but is it from the command line or the environment?
10998
10999    # Try to remove the string !SORT! from our list.
11000    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
11001    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11002      # If it failed, the variable was not from the command line. Ignore it,
11003      # but warn the user (except for BASH, which is always set by the calling BASH).
11004      if test "xSORT" != xBASH; then
11005        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
11006$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
11007      fi
11008      # Try to locate tool using the code snippet
11009      for ac_prog in sort
11010do
11011  # Extract the first word of "$ac_prog", so it can be a program name with args.
11012set dummy $ac_prog; ac_word=$2
11013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11014$as_echo_n "checking for $ac_word... " >&6; }
11015if ${ac_cv_path_SORT+:} false; then :
11016  $as_echo_n "(cached) " >&6
11017else
11018  case $SORT in
11019  [\\/]* | ?:[\\/]*)
11020  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11021  ;;
11022  *)
11023  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11024for as_dir in $PATH
11025do
11026  IFS=$as_save_IFS
11027  test -z "$as_dir" && as_dir=.
11028    for ac_exec_ext in '' $ac_executable_extensions; do
11029  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11030    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11032    break 2
11033  fi
11034done
11035  done
11036IFS=$as_save_IFS
11037
11038  ;;
11039esac
11040fi
11041SORT=$ac_cv_path_SORT
11042if test -n "$SORT"; then
11043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11044$as_echo "$SORT" >&6; }
11045else
11046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11047$as_echo "no" >&6; }
11048fi
11049
11050
11051  test -n "$SORT" && break
11052done
11053
11054    else
11055      # If it succeeded, then it was overridden by the user. We will use it
11056      # for the tool.
11057
11058      # First remove it from the list of overridden variables, so we can test
11059      # for unknown variables in the end.
11060      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11061
11062      # Check if we try to supply an empty value
11063      if test "x$SORT" = x; then
11064        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
11065$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
11066        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11067$as_echo_n "checking for SORT... " >&6; }
11068        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11069$as_echo "disabled" >&6; }
11070      else
11071        # Check if the provided tool contains a complete path.
11072        tool_specified="$SORT"
11073        tool_basename="${tool_specified##*/}"
11074        if test "x$tool_basename" = "x$tool_specified"; then
11075          # A command without a complete path is provided, search $PATH.
11076          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11077$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11078          # Extract the first word of "$tool_basename", so it can be a program name with args.
11079set dummy $tool_basename; ac_word=$2
11080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11081$as_echo_n "checking for $ac_word... " >&6; }
11082if ${ac_cv_path_SORT+:} false; then :
11083  $as_echo_n "(cached) " >&6
11084else
11085  case $SORT in
11086  [\\/]* | ?:[\\/]*)
11087  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11088  ;;
11089  *)
11090  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11091for as_dir in $PATH
11092do
11093  IFS=$as_save_IFS
11094  test -z "$as_dir" && as_dir=.
11095    for ac_exec_ext in '' $ac_executable_extensions; do
11096  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11097    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11099    break 2
11100  fi
11101done
11102  done
11103IFS=$as_save_IFS
11104
11105  ;;
11106esac
11107fi
11108SORT=$ac_cv_path_SORT
11109if test -n "$SORT"; then
11110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11111$as_echo "$SORT" >&6; }
11112else
11113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11114$as_echo "no" >&6; }
11115fi
11116
11117
11118          if test "x$SORT" = x; then
11119            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11120          fi
11121        else
11122          # Otherwise we believe it is a complete path. Use it as it is.
11123          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11124$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11125          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11126$as_echo_n "checking for SORT... " >&6; }
11127          if test ! -x "$tool_specified"; then
11128            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11129$as_echo "not found" >&6; }
11130            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11131          fi
11132          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11133$as_echo "$tool_specified" >&6; }
11134        fi
11135      fi
11136    fi
11137
11138  fi
11139
11140
11141
11142  if test "x$SORT" = x; then
11143    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11144  fi
11145
11146
11147
11148
11149
11150  # Publish this variable in the help.
11151
11152
11153  if [ -z "${TAIL+x}" ]; then
11154    # The variable is not set by user, try to locate tool using the code snippet
11155    for ac_prog in tail
11156do
11157  # Extract the first word of "$ac_prog", so it can be a program name with args.
11158set dummy $ac_prog; ac_word=$2
11159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11160$as_echo_n "checking for $ac_word... " >&6; }
11161if ${ac_cv_path_TAIL+:} false; then :
11162  $as_echo_n "(cached) " >&6
11163else
11164  case $TAIL in
11165  [\\/]* | ?:[\\/]*)
11166  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11167  ;;
11168  *)
11169  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11170for as_dir in $PATH
11171do
11172  IFS=$as_save_IFS
11173  test -z "$as_dir" && as_dir=.
11174    for ac_exec_ext in '' $ac_executable_extensions; do
11175  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11176    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11178    break 2
11179  fi
11180done
11181  done
11182IFS=$as_save_IFS
11183
11184  ;;
11185esac
11186fi
11187TAIL=$ac_cv_path_TAIL
11188if test -n "$TAIL"; then
11189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11190$as_echo "$TAIL" >&6; }
11191else
11192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11193$as_echo "no" >&6; }
11194fi
11195
11196
11197  test -n "$TAIL" && break
11198done
11199
11200  else
11201    # The variable is set, but is it from the command line or the environment?
11202
11203    # Try to remove the string !TAIL! from our list.
11204    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11205    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11206      # If it failed, the variable was not from the command line. Ignore it,
11207      # but warn the user (except for BASH, which is always set by the calling BASH).
11208      if test "xTAIL" != xBASH; then
11209        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11210$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11211      fi
11212      # Try to locate tool using the code snippet
11213      for ac_prog in tail
11214do
11215  # Extract the first word of "$ac_prog", so it can be a program name with args.
11216set dummy $ac_prog; ac_word=$2
11217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11218$as_echo_n "checking for $ac_word... " >&6; }
11219if ${ac_cv_path_TAIL+:} false; then :
11220  $as_echo_n "(cached) " >&6
11221else
11222  case $TAIL in
11223  [\\/]* | ?:[\\/]*)
11224  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11225  ;;
11226  *)
11227  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11228for as_dir in $PATH
11229do
11230  IFS=$as_save_IFS
11231  test -z "$as_dir" && as_dir=.
11232    for ac_exec_ext in '' $ac_executable_extensions; do
11233  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11234    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11236    break 2
11237  fi
11238done
11239  done
11240IFS=$as_save_IFS
11241
11242  ;;
11243esac
11244fi
11245TAIL=$ac_cv_path_TAIL
11246if test -n "$TAIL"; then
11247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11248$as_echo "$TAIL" >&6; }
11249else
11250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11251$as_echo "no" >&6; }
11252fi
11253
11254
11255  test -n "$TAIL" && break
11256done
11257
11258    else
11259      # If it succeeded, then it was overridden by the user. We will use it
11260      # for the tool.
11261
11262      # First remove it from the list of overridden variables, so we can test
11263      # for unknown variables in the end.
11264      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11265
11266      # Check if we try to supply an empty value
11267      if test "x$TAIL" = x; then
11268        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11269$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11270        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11271$as_echo_n "checking for TAIL... " >&6; }
11272        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11273$as_echo "disabled" >&6; }
11274      else
11275        # Check if the provided tool contains a complete path.
11276        tool_specified="$TAIL"
11277        tool_basename="${tool_specified##*/}"
11278        if test "x$tool_basename" = "x$tool_specified"; then
11279          # A command without a complete path is provided, search $PATH.
11280          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11281$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11282          # Extract the first word of "$tool_basename", so it can be a program name with args.
11283set dummy $tool_basename; ac_word=$2
11284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11285$as_echo_n "checking for $ac_word... " >&6; }
11286if ${ac_cv_path_TAIL+:} false; then :
11287  $as_echo_n "(cached) " >&6
11288else
11289  case $TAIL in
11290  [\\/]* | ?:[\\/]*)
11291  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11292  ;;
11293  *)
11294  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11295for as_dir in $PATH
11296do
11297  IFS=$as_save_IFS
11298  test -z "$as_dir" && as_dir=.
11299    for ac_exec_ext in '' $ac_executable_extensions; do
11300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11301    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11303    break 2
11304  fi
11305done
11306  done
11307IFS=$as_save_IFS
11308
11309  ;;
11310esac
11311fi
11312TAIL=$ac_cv_path_TAIL
11313if test -n "$TAIL"; then
11314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11315$as_echo "$TAIL" >&6; }
11316else
11317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11318$as_echo "no" >&6; }
11319fi
11320
11321
11322          if test "x$TAIL" = x; then
11323            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11324          fi
11325        else
11326          # Otherwise we believe it is a complete path. Use it as it is.
11327          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11328$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11329          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11330$as_echo_n "checking for TAIL... " >&6; }
11331          if test ! -x "$tool_specified"; then
11332            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11333$as_echo "not found" >&6; }
11334            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11335          fi
11336          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11337$as_echo "$tool_specified" >&6; }
11338        fi
11339      fi
11340    fi
11341
11342  fi
11343
11344
11345
11346  if test "x$TAIL" = x; then
11347    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11348  fi
11349
11350
11351
11352
11353
11354  # Publish this variable in the help.
11355
11356
11357  if [ -z "${TAR+x}" ]; then
11358    # The variable is not set by user, try to locate tool using the code snippet
11359    for ac_prog in gtar tar
11360do
11361  # Extract the first word of "$ac_prog", so it can be a program name with args.
11362set dummy $ac_prog; ac_word=$2
11363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11364$as_echo_n "checking for $ac_word... " >&6; }
11365if ${ac_cv_path_TAR+:} false; then :
11366  $as_echo_n "(cached) " >&6
11367else
11368  case $TAR in
11369  [\\/]* | ?:[\\/]*)
11370  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11371  ;;
11372  *)
11373  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11374for as_dir in $PATH
11375do
11376  IFS=$as_save_IFS
11377  test -z "$as_dir" && as_dir=.
11378    for ac_exec_ext in '' $ac_executable_extensions; do
11379  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11380    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11382    break 2
11383  fi
11384done
11385  done
11386IFS=$as_save_IFS
11387
11388  ;;
11389esac
11390fi
11391TAR=$ac_cv_path_TAR
11392if test -n "$TAR"; then
11393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11394$as_echo "$TAR" >&6; }
11395else
11396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11397$as_echo "no" >&6; }
11398fi
11399
11400
11401  test -n "$TAR" && break
11402done
11403
11404  else
11405    # The variable is set, but is it from the command line or the environment?
11406
11407    # Try to remove the string !TAR! from our list.
11408    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11409    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11410      # If it failed, the variable was not from the command line. Ignore it,
11411      # but warn the user (except for BASH, which is always set by the calling BASH).
11412      if test "xTAR" != xBASH; then
11413        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11414$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11415      fi
11416      # Try to locate tool using the code snippet
11417      for ac_prog in gtar tar
11418do
11419  # Extract the first word of "$ac_prog", so it can be a program name with args.
11420set dummy $ac_prog; ac_word=$2
11421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11422$as_echo_n "checking for $ac_word... " >&6; }
11423if ${ac_cv_path_TAR+:} false; then :
11424  $as_echo_n "(cached) " >&6
11425else
11426  case $TAR in
11427  [\\/]* | ?:[\\/]*)
11428  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11429  ;;
11430  *)
11431  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11432for as_dir in $PATH
11433do
11434  IFS=$as_save_IFS
11435  test -z "$as_dir" && as_dir=.
11436    for ac_exec_ext in '' $ac_executable_extensions; do
11437  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11438    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11439    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11440    break 2
11441  fi
11442done
11443  done
11444IFS=$as_save_IFS
11445
11446  ;;
11447esac
11448fi
11449TAR=$ac_cv_path_TAR
11450if test -n "$TAR"; then
11451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11452$as_echo "$TAR" >&6; }
11453else
11454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11455$as_echo "no" >&6; }
11456fi
11457
11458
11459  test -n "$TAR" && break
11460done
11461
11462    else
11463      # If it succeeded, then it was overridden by the user. We will use it
11464      # for the tool.
11465
11466      # First remove it from the list of overridden variables, so we can test
11467      # for unknown variables in the end.
11468      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11469
11470      # Check if we try to supply an empty value
11471      if test "x$TAR" = x; then
11472        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11473$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11474        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11475$as_echo_n "checking for TAR... " >&6; }
11476        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11477$as_echo "disabled" >&6; }
11478      else
11479        # Check if the provided tool contains a complete path.
11480        tool_specified="$TAR"
11481        tool_basename="${tool_specified##*/}"
11482        if test "x$tool_basename" = "x$tool_specified"; then
11483          # A command without a complete path is provided, search $PATH.
11484          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11485$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11486          # Extract the first word of "$tool_basename", so it can be a program name with args.
11487set dummy $tool_basename; ac_word=$2
11488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11489$as_echo_n "checking for $ac_word... " >&6; }
11490if ${ac_cv_path_TAR+:} false; then :
11491  $as_echo_n "(cached) " >&6
11492else
11493  case $TAR in
11494  [\\/]* | ?:[\\/]*)
11495  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11496  ;;
11497  *)
11498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11499for as_dir in $PATH
11500do
11501  IFS=$as_save_IFS
11502  test -z "$as_dir" && as_dir=.
11503    for ac_exec_ext in '' $ac_executable_extensions; do
11504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11505    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11507    break 2
11508  fi
11509done
11510  done
11511IFS=$as_save_IFS
11512
11513  ;;
11514esac
11515fi
11516TAR=$ac_cv_path_TAR
11517if test -n "$TAR"; then
11518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11519$as_echo "$TAR" >&6; }
11520else
11521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11522$as_echo "no" >&6; }
11523fi
11524
11525
11526          if test "x$TAR" = x; then
11527            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11528          fi
11529        else
11530          # Otherwise we believe it is a complete path. Use it as it is.
11531          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11532$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11533          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11534$as_echo_n "checking for TAR... " >&6; }
11535          if test ! -x "$tool_specified"; then
11536            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11537$as_echo "not found" >&6; }
11538            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11539          fi
11540          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11541$as_echo "$tool_specified" >&6; }
11542        fi
11543      fi
11544    fi
11545
11546  fi
11547
11548
11549
11550  if test "x$TAR" = x; then
11551    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11552  fi
11553
11554
11555
11556
11557
11558  # Publish this variable in the help.
11559
11560
11561  if [ -z "${TEE+x}" ]; then
11562    # The variable is not set by user, try to locate tool using the code snippet
11563    for ac_prog in tee
11564do
11565  # Extract the first word of "$ac_prog", so it can be a program name with args.
11566set dummy $ac_prog; ac_word=$2
11567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11568$as_echo_n "checking for $ac_word... " >&6; }
11569if ${ac_cv_path_TEE+:} false; then :
11570  $as_echo_n "(cached) " >&6
11571else
11572  case $TEE in
11573  [\\/]* | ?:[\\/]*)
11574  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11575  ;;
11576  *)
11577  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11578for as_dir in $PATH
11579do
11580  IFS=$as_save_IFS
11581  test -z "$as_dir" && as_dir=.
11582    for ac_exec_ext in '' $ac_executable_extensions; do
11583  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11584    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11586    break 2
11587  fi
11588done
11589  done
11590IFS=$as_save_IFS
11591
11592  ;;
11593esac
11594fi
11595TEE=$ac_cv_path_TEE
11596if test -n "$TEE"; then
11597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11598$as_echo "$TEE" >&6; }
11599else
11600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11601$as_echo "no" >&6; }
11602fi
11603
11604
11605  test -n "$TEE" && break
11606done
11607
11608  else
11609    # The variable is set, but is it from the command line or the environment?
11610
11611    # Try to remove the string !TEE! from our list.
11612    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11613    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11614      # If it failed, the variable was not from the command line. Ignore it,
11615      # but warn the user (except for BASH, which is always set by the calling BASH).
11616      if test "xTEE" != xBASH; then
11617        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11618$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11619      fi
11620      # Try to locate tool using the code snippet
11621      for ac_prog in tee
11622do
11623  # Extract the first word of "$ac_prog", so it can be a program name with args.
11624set dummy $ac_prog; ac_word=$2
11625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11626$as_echo_n "checking for $ac_word... " >&6; }
11627if ${ac_cv_path_TEE+:} false; then :
11628  $as_echo_n "(cached) " >&6
11629else
11630  case $TEE in
11631  [\\/]* | ?:[\\/]*)
11632  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11633  ;;
11634  *)
11635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11636for as_dir in $PATH
11637do
11638  IFS=$as_save_IFS
11639  test -z "$as_dir" && as_dir=.
11640    for ac_exec_ext in '' $ac_executable_extensions; do
11641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11642    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11644    break 2
11645  fi
11646done
11647  done
11648IFS=$as_save_IFS
11649
11650  ;;
11651esac
11652fi
11653TEE=$ac_cv_path_TEE
11654if test -n "$TEE"; then
11655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11656$as_echo "$TEE" >&6; }
11657else
11658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11659$as_echo "no" >&6; }
11660fi
11661
11662
11663  test -n "$TEE" && break
11664done
11665
11666    else
11667      # If it succeeded, then it was overridden by the user. We will use it
11668      # for the tool.
11669
11670      # First remove it from the list of overridden variables, so we can test
11671      # for unknown variables in the end.
11672      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11673
11674      # Check if we try to supply an empty value
11675      if test "x$TEE" = x; then
11676        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11677$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11678        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11679$as_echo_n "checking for TEE... " >&6; }
11680        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11681$as_echo "disabled" >&6; }
11682      else
11683        # Check if the provided tool contains a complete path.
11684        tool_specified="$TEE"
11685        tool_basename="${tool_specified##*/}"
11686        if test "x$tool_basename" = "x$tool_specified"; then
11687          # A command without a complete path is provided, search $PATH.
11688          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11689$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11690          # Extract the first word of "$tool_basename", so it can be a program name with args.
11691set dummy $tool_basename; ac_word=$2
11692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11693$as_echo_n "checking for $ac_word... " >&6; }
11694if ${ac_cv_path_TEE+:} false; then :
11695  $as_echo_n "(cached) " >&6
11696else
11697  case $TEE in
11698  [\\/]* | ?:[\\/]*)
11699  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11700  ;;
11701  *)
11702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11703for as_dir in $PATH
11704do
11705  IFS=$as_save_IFS
11706  test -z "$as_dir" && as_dir=.
11707    for ac_exec_ext in '' $ac_executable_extensions; do
11708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11709    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11711    break 2
11712  fi
11713done
11714  done
11715IFS=$as_save_IFS
11716
11717  ;;
11718esac
11719fi
11720TEE=$ac_cv_path_TEE
11721if test -n "$TEE"; then
11722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11723$as_echo "$TEE" >&6; }
11724else
11725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11726$as_echo "no" >&6; }
11727fi
11728
11729
11730          if test "x$TEE" = x; then
11731            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11732          fi
11733        else
11734          # Otherwise we believe it is a complete path. Use it as it is.
11735          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11736$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11737          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11738$as_echo_n "checking for TEE... " >&6; }
11739          if test ! -x "$tool_specified"; then
11740            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11741$as_echo "not found" >&6; }
11742            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11743          fi
11744          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11745$as_echo "$tool_specified" >&6; }
11746        fi
11747      fi
11748    fi
11749
11750  fi
11751
11752
11753
11754  if test "x$TEE" = x; then
11755    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11756  fi
11757
11758
11759
11760
11761
11762  # Publish this variable in the help.
11763
11764
11765  if [ -z "${TOUCH+x}" ]; then
11766    # The variable is not set by user, try to locate tool using the code snippet
11767    for ac_prog in touch
11768do
11769  # Extract the first word of "$ac_prog", so it can be a program name with args.
11770set dummy $ac_prog; ac_word=$2
11771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11772$as_echo_n "checking for $ac_word... " >&6; }
11773if ${ac_cv_path_TOUCH+:} false; then :
11774  $as_echo_n "(cached) " >&6
11775else
11776  case $TOUCH in
11777  [\\/]* | ?:[\\/]*)
11778  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11779  ;;
11780  *)
11781  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11782for as_dir in $PATH
11783do
11784  IFS=$as_save_IFS
11785  test -z "$as_dir" && as_dir=.
11786    for ac_exec_ext in '' $ac_executable_extensions; do
11787  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11788    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11790    break 2
11791  fi
11792done
11793  done
11794IFS=$as_save_IFS
11795
11796  ;;
11797esac
11798fi
11799TOUCH=$ac_cv_path_TOUCH
11800if test -n "$TOUCH"; then
11801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11802$as_echo "$TOUCH" >&6; }
11803else
11804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11805$as_echo "no" >&6; }
11806fi
11807
11808
11809  test -n "$TOUCH" && break
11810done
11811
11812  else
11813    # The variable is set, but is it from the command line or the environment?
11814
11815    # Try to remove the string !TOUCH! from our list.
11816    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11817    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11818      # If it failed, the variable was not from the command line. Ignore it,
11819      # but warn the user (except for BASH, which is always set by the calling BASH).
11820      if test "xTOUCH" != xBASH; then
11821        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11822$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11823      fi
11824      # Try to locate tool using the code snippet
11825      for ac_prog in touch
11826do
11827  # Extract the first word of "$ac_prog", so it can be a program name with args.
11828set dummy $ac_prog; ac_word=$2
11829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11830$as_echo_n "checking for $ac_word... " >&6; }
11831if ${ac_cv_path_TOUCH+:} false; then :
11832  $as_echo_n "(cached) " >&6
11833else
11834  case $TOUCH in
11835  [\\/]* | ?:[\\/]*)
11836  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11837  ;;
11838  *)
11839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11840for as_dir in $PATH
11841do
11842  IFS=$as_save_IFS
11843  test -z "$as_dir" && as_dir=.
11844    for ac_exec_ext in '' $ac_executable_extensions; do
11845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11846    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11848    break 2
11849  fi
11850done
11851  done
11852IFS=$as_save_IFS
11853
11854  ;;
11855esac
11856fi
11857TOUCH=$ac_cv_path_TOUCH
11858if test -n "$TOUCH"; then
11859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11860$as_echo "$TOUCH" >&6; }
11861else
11862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11863$as_echo "no" >&6; }
11864fi
11865
11866
11867  test -n "$TOUCH" && break
11868done
11869
11870    else
11871      # If it succeeded, then it was overridden by the user. We will use it
11872      # for the tool.
11873
11874      # First remove it from the list of overridden variables, so we can test
11875      # for unknown variables in the end.
11876      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11877
11878      # Check if we try to supply an empty value
11879      if test "x$TOUCH" = x; then
11880        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11881$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11882        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11883$as_echo_n "checking for TOUCH... " >&6; }
11884        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11885$as_echo "disabled" >&6; }
11886      else
11887        # Check if the provided tool contains a complete path.
11888        tool_specified="$TOUCH"
11889        tool_basename="${tool_specified##*/}"
11890        if test "x$tool_basename" = "x$tool_specified"; then
11891          # A command without a complete path is provided, search $PATH.
11892          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11893$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11894          # Extract the first word of "$tool_basename", so it can be a program name with args.
11895set dummy $tool_basename; ac_word=$2
11896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11897$as_echo_n "checking for $ac_word... " >&6; }
11898if ${ac_cv_path_TOUCH+:} false; then :
11899  $as_echo_n "(cached) " >&6
11900else
11901  case $TOUCH in
11902  [\\/]* | ?:[\\/]*)
11903  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11904  ;;
11905  *)
11906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11907for as_dir in $PATH
11908do
11909  IFS=$as_save_IFS
11910  test -z "$as_dir" && as_dir=.
11911    for ac_exec_ext in '' $ac_executable_extensions; do
11912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11913    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11915    break 2
11916  fi
11917done
11918  done
11919IFS=$as_save_IFS
11920
11921  ;;
11922esac
11923fi
11924TOUCH=$ac_cv_path_TOUCH
11925if test -n "$TOUCH"; then
11926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11927$as_echo "$TOUCH" >&6; }
11928else
11929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11930$as_echo "no" >&6; }
11931fi
11932
11933
11934          if test "x$TOUCH" = x; then
11935            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11936          fi
11937        else
11938          # Otherwise we believe it is a complete path. Use it as it is.
11939          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11940$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11941          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11942$as_echo_n "checking for TOUCH... " >&6; }
11943          if test ! -x "$tool_specified"; then
11944            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11945$as_echo "not found" >&6; }
11946            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11947          fi
11948          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11949$as_echo "$tool_specified" >&6; }
11950        fi
11951      fi
11952    fi
11953
11954  fi
11955
11956
11957
11958  if test "x$TOUCH" = x; then
11959    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11960  fi
11961
11962
11963
11964
11965
11966  # Publish this variable in the help.
11967
11968
11969  if [ -z "${TR+x}" ]; then
11970    # The variable is not set by user, try to locate tool using the code snippet
11971    for ac_prog in tr
11972do
11973  # Extract the first word of "$ac_prog", so it can be a program name with args.
11974set dummy $ac_prog; ac_word=$2
11975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11976$as_echo_n "checking for $ac_word... " >&6; }
11977if ${ac_cv_path_TR+:} false; then :
11978  $as_echo_n "(cached) " >&6
11979else
11980  case $TR in
11981  [\\/]* | ?:[\\/]*)
11982  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11983  ;;
11984  *)
11985  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11986for as_dir in $PATH
11987do
11988  IFS=$as_save_IFS
11989  test -z "$as_dir" && as_dir=.
11990    for ac_exec_ext in '' $ac_executable_extensions; do
11991  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11992    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11993    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11994    break 2
11995  fi
11996done
11997  done
11998IFS=$as_save_IFS
11999
12000  ;;
12001esac
12002fi
12003TR=$ac_cv_path_TR
12004if test -n "$TR"; then
12005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12006$as_echo "$TR" >&6; }
12007else
12008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12009$as_echo "no" >&6; }
12010fi
12011
12012
12013  test -n "$TR" && break
12014done
12015
12016  else
12017    # The variable is set, but is it from the command line or the environment?
12018
12019    # Try to remove the string !TR! from our list.
12020    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
12021    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12022      # If it failed, the variable was not from the command line. Ignore it,
12023      # but warn the user (except for BASH, which is always set by the calling BASH).
12024      if test "xTR" != xBASH; then
12025        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
12026$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
12027      fi
12028      # Try to locate tool using the code snippet
12029      for ac_prog in tr
12030do
12031  # Extract the first word of "$ac_prog", so it can be a program name with args.
12032set dummy $ac_prog; ac_word=$2
12033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12034$as_echo_n "checking for $ac_word... " >&6; }
12035if ${ac_cv_path_TR+:} false; then :
12036  $as_echo_n "(cached) " >&6
12037else
12038  case $TR in
12039  [\\/]* | ?:[\\/]*)
12040  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12041  ;;
12042  *)
12043  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12044for as_dir in $PATH
12045do
12046  IFS=$as_save_IFS
12047  test -z "$as_dir" && as_dir=.
12048    for ac_exec_ext in '' $ac_executable_extensions; do
12049  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12050    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12051    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12052    break 2
12053  fi
12054done
12055  done
12056IFS=$as_save_IFS
12057
12058  ;;
12059esac
12060fi
12061TR=$ac_cv_path_TR
12062if test -n "$TR"; then
12063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12064$as_echo "$TR" >&6; }
12065else
12066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12067$as_echo "no" >&6; }
12068fi
12069
12070
12071  test -n "$TR" && break
12072done
12073
12074    else
12075      # If it succeeded, then it was overridden by the user. We will use it
12076      # for the tool.
12077
12078      # First remove it from the list of overridden variables, so we can test
12079      # for unknown variables in the end.
12080      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12081
12082      # Check if we try to supply an empty value
12083      if test "x$TR" = x; then
12084        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12085$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12086        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12087$as_echo_n "checking for TR... " >&6; }
12088        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12089$as_echo "disabled" >&6; }
12090      else
12091        # Check if the provided tool contains a complete path.
12092        tool_specified="$TR"
12093        tool_basename="${tool_specified##*/}"
12094        if test "x$tool_basename" = "x$tool_specified"; then
12095          # A command without a complete path is provided, search $PATH.
12096          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12097$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12098          # Extract the first word of "$tool_basename", so it can be a program name with args.
12099set dummy $tool_basename; ac_word=$2
12100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12101$as_echo_n "checking for $ac_word... " >&6; }
12102if ${ac_cv_path_TR+:} false; then :
12103  $as_echo_n "(cached) " >&6
12104else
12105  case $TR in
12106  [\\/]* | ?:[\\/]*)
12107  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12108  ;;
12109  *)
12110  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12111for as_dir in $PATH
12112do
12113  IFS=$as_save_IFS
12114  test -z "$as_dir" && as_dir=.
12115    for ac_exec_ext in '' $ac_executable_extensions; do
12116  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12117    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12119    break 2
12120  fi
12121done
12122  done
12123IFS=$as_save_IFS
12124
12125  ;;
12126esac
12127fi
12128TR=$ac_cv_path_TR
12129if test -n "$TR"; then
12130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12131$as_echo "$TR" >&6; }
12132else
12133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12134$as_echo "no" >&6; }
12135fi
12136
12137
12138          if test "x$TR" = x; then
12139            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12140          fi
12141        else
12142          # Otherwise we believe it is a complete path. Use it as it is.
12143          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12144$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12145          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12146$as_echo_n "checking for TR... " >&6; }
12147          if test ! -x "$tool_specified"; then
12148            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12149$as_echo "not found" >&6; }
12150            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12151          fi
12152          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12153$as_echo "$tool_specified" >&6; }
12154        fi
12155      fi
12156    fi
12157
12158  fi
12159
12160
12161
12162  if test "x$TR" = x; then
12163    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12164  fi
12165
12166
12167
12168
12169
12170  # Publish this variable in the help.
12171
12172
12173  if [ -z "${UNAME+x}" ]; then
12174    # The variable is not set by user, try to locate tool using the code snippet
12175    for ac_prog in uname
12176do
12177  # Extract the first word of "$ac_prog", so it can be a program name with args.
12178set dummy $ac_prog; ac_word=$2
12179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12180$as_echo_n "checking for $ac_word... " >&6; }
12181if ${ac_cv_path_UNAME+:} false; then :
12182  $as_echo_n "(cached) " >&6
12183else
12184  case $UNAME in
12185  [\\/]* | ?:[\\/]*)
12186  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12187  ;;
12188  *)
12189  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12190for as_dir in $PATH
12191do
12192  IFS=$as_save_IFS
12193  test -z "$as_dir" && as_dir=.
12194    for ac_exec_ext in '' $ac_executable_extensions; do
12195  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12196    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12198    break 2
12199  fi
12200done
12201  done
12202IFS=$as_save_IFS
12203
12204  ;;
12205esac
12206fi
12207UNAME=$ac_cv_path_UNAME
12208if test -n "$UNAME"; then
12209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12210$as_echo "$UNAME" >&6; }
12211else
12212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12213$as_echo "no" >&6; }
12214fi
12215
12216
12217  test -n "$UNAME" && break
12218done
12219
12220  else
12221    # The variable is set, but is it from the command line or the environment?
12222
12223    # Try to remove the string !UNAME! from our list.
12224    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12225    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12226      # If it failed, the variable was not from the command line. Ignore it,
12227      # but warn the user (except for BASH, which is always set by the calling BASH).
12228      if test "xUNAME" != xBASH; then
12229        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12230$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12231      fi
12232      # Try to locate tool using the code snippet
12233      for ac_prog in uname
12234do
12235  # Extract the first word of "$ac_prog", so it can be a program name with args.
12236set dummy $ac_prog; ac_word=$2
12237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12238$as_echo_n "checking for $ac_word... " >&6; }
12239if ${ac_cv_path_UNAME+:} false; then :
12240  $as_echo_n "(cached) " >&6
12241else
12242  case $UNAME in
12243  [\\/]* | ?:[\\/]*)
12244  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12245  ;;
12246  *)
12247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12248for as_dir in $PATH
12249do
12250  IFS=$as_save_IFS
12251  test -z "$as_dir" && as_dir=.
12252    for ac_exec_ext in '' $ac_executable_extensions; do
12253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12254    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12256    break 2
12257  fi
12258done
12259  done
12260IFS=$as_save_IFS
12261
12262  ;;
12263esac
12264fi
12265UNAME=$ac_cv_path_UNAME
12266if test -n "$UNAME"; then
12267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12268$as_echo "$UNAME" >&6; }
12269else
12270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12271$as_echo "no" >&6; }
12272fi
12273
12274
12275  test -n "$UNAME" && break
12276done
12277
12278    else
12279      # If it succeeded, then it was overridden by the user. We will use it
12280      # for the tool.
12281
12282      # First remove it from the list of overridden variables, so we can test
12283      # for unknown variables in the end.
12284      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12285
12286      # Check if we try to supply an empty value
12287      if test "x$UNAME" = x; then
12288        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12289$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12290        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12291$as_echo_n "checking for UNAME... " >&6; }
12292        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12293$as_echo "disabled" >&6; }
12294      else
12295        # Check if the provided tool contains a complete path.
12296        tool_specified="$UNAME"
12297        tool_basename="${tool_specified##*/}"
12298        if test "x$tool_basename" = "x$tool_specified"; then
12299          # A command without a complete path is provided, search $PATH.
12300          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12301$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12302          # Extract the first word of "$tool_basename", so it can be a program name with args.
12303set dummy $tool_basename; ac_word=$2
12304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12305$as_echo_n "checking for $ac_word... " >&6; }
12306if ${ac_cv_path_UNAME+:} false; then :
12307  $as_echo_n "(cached) " >&6
12308else
12309  case $UNAME in
12310  [\\/]* | ?:[\\/]*)
12311  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12312  ;;
12313  *)
12314  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12315for as_dir in $PATH
12316do
12317  IFS=$as_save_IFS
12318  test -z "$as_dir" && as_dir=.
12319    for ac_exec_ext in '' $ac_executable_extensions; do
12320  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12321    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12323    break 2
12324  fi
12325done
12326  done
12327IFS=$as_save_IFS
12328
12329  ;;
12330esac
12331fi
12332UNAME=$ac_cv_path_UNAME
12333if test -n "$UNAME"; then
12334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12335$as_echo "$UNAME" >&6; }
12336else
12337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12338$as_echo "no" >&6; }
12339fi
12340
12341
12342          if test "x$UNAME" = x; then
12343            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12344          fi
12345        else
12346          # Otherwise we believe it is a complete path. Use it as it is.
12347          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12348$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12349          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12350$as_echo_n "checking for UNAME... " >&6; }
12351          if test ! -x "$tool_specified"; then
12352            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12353$as_echo "not found" >&6; }
12354            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12355          fi
12356          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12357$as_echo "$tool_specified" >&6; }
12358        fi
12359      fi
12360    fi
12361
12362  fi
12363
12364
12365
12366  if test "x$UNAME" = x; then
12367    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12368  fi
12369
12370
12371
12372
12373
12374  # Publish this variable in the help.
12375
12376
12377  if [ -z "${UNIQ+x}" ]; then
12378    # The variable is not set by user, try to locate tool using the code snippet
12379    for ac_prog in uniq
12380do
12381  # Extract the first word of "$ac_prog", so it can be a program name with args.
12382set dummy $ac_prog; ac_word=$2
12383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12384$as_echo_n "checking for $ac_word... " >&6; }
12385if ${ac_cv_path_UNIQ+:} false; then :
12386  $as_echo_n "(cached) " >&6
12387else
12388  case $UNIQ in
12389  [\\/]* | ?:[\\/]*)
12390  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12391  ;;
12392  *)
12393  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12394for as_dir in $PATH
12395do
12396  IFS=$as_save_IFS
12397  test -z "$as_dir" && as_dir=.
12398    for ac_exec_ext in '' $ac_executable_extensions; do
12399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12400    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12402    break 2
12403  fi
12404done
12405  done
12406IFS=$as_save_IFS
12407
12408  ;;
12409esac
12410fi
12411UNIQ=$ac_cv_path_UNIQ
12412if test -n "$UNIQ"; then
12413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12414$as_echo "$UNIQ" >&6; }
12415else
12416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12417$as_echo "no" >&6; }
12418fi
12419
12420
12421  test -n "$UNIQ" && break
12422done
12423
12424  else
12425    # The variable is set, but is it from the command line or the environment?
12426
12427    # Try to remove the string !UNIQ! from our list.
12428    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12429    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12430      # If it failed, the variable was not from the command line. Ignore it,
12431      # but warn the user (except for BASH, which is always set by the calling BASH).
12432      if test "xUNIQ" != xBASH; then
12433        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12434$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12435      fi
12436      # Try to locate tool using the code snippet
12437      for ac_prog in uniq
12438do
12439  # Extract the first word of "$ac_prog", so it can be a program name with args.
12440set dummy $ac_prog; ac_word=$2
12441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12442$as_echo_n "checking for $ac_word... " >&6; }
12443if ${ac_cv_path_UNIQ+:} false; then :
12444  $as_echo_n "(cached) " >&6
12445else
12446  case $UNIQ in
12447  [\\/]* | ?:[\\/]*)
12448  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12449  ;;
12450  *)
12451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12452for as_dir in $PATH
12453do
12454  IFS=$as_save_IFS
12455  test -z "$as_dir" && as_dir=.
12456    for ac_exec_ext in '' $ac_executable_extensions; do
12457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12458    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12460    break 2
12461  fi
12462done
12463  done
12464IFS=$as_save_IFS
12465
12466  ;;
12467esac
12468fi
12469UNIQ=$ac_cv_path_UNIQ
12470if test -n "$UNIQ"; then
12471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12472$as_echo "$UNIQ" >&6; }
12473else
12474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12475$as_echo "no" >&6; }
12476fi
12477
12478
12479  test -n "$UNIQ" && break
12480done
12481
12482    else
12483      # If it succeeded, then it was overridden by the user. We will use it
12484      # for the tool.
12485
12486      # First remove it from the list of overridden variables, so we can test
12487      # for unknown variables in the end.
12488      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12489
12490      # Check if we try to supply an empty value
12491      if test "x$UNIQ" = x; then
12492        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12493$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12494        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12495$as_echo_n "checking for UNIQ... " >&6; }
12496        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12497$as_echo "disabled" >&6; }
12498      else
12499        # Check if the provided tool contains a complete path.
12500        tool_specified="$UNIQ"
12501        tool_basename="${tool_specified##*/}"
12502        if test "x$tool_basename" = "x$tool_specified"; then
12503          # A command without a complete path is provided, search $PATH.
12504          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12505$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12506          # Extract the first word of "$tool_basename", so it can be a program name with args.
12507set dummy $tool_basename; ac_word=$2
12508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12509$as_echo_n "checking for $ac_word... " >&6; }
12510if ${ac_cv_path_UNIQ+:} false; then :
12511  $as_echo_n "(cached) " >&6
12512else
12513  case $UNIQ in
12514  [\\/]* | ?:[\\/]*)
12515  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12516  ;;
12517  *)
12518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12519for as_dir in $PATH
12520do
12521  IFS=$as_save_IFS
12522  test -z "$as_dir" && as_dir=.
12523    for ac_exec_ext in '' $ac_executable_extensions; do
12524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12525    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12527    break 2
12528  fi
12529done
12530  done
12531IFS=$as_save_IFS
12532
12533  ;;
12534esac
12535fi
12536UNIQ=$ac_cv_path_UNIQ
12537if test -n "$UNIQ"; then
12538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12539$as_echo "$UNIQ" >&6; }
12540else
12541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12542$as_echo "no" >&6; }
12543fi
12544
12545
12546          if test "x$UNIQ" = x; then
12547            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12548          fi
12549        else
12550          # Otherwise we believe it is a complete path. Use it as it is.
12551          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12552$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12553          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12554$as_echo_n "checking for UNIQ... " >&6; }
12555          if test ! -x "$tool_specified"; then
12556            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12557$as_echo "not found" >&6; }
12558            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12559          fi
12560          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12561$as_echo "$tool_specified" >&6; }
12562        fi
12563      fi
12564    fi
12565
12566  fi
12567
12568
12569
12570  if test "x$UNIQ" = x; then
12571    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12572  fi
12573
12574
12575
12576
12577
12578  # Publish this variable in the help.
12579
12580
12581  if [ -z "${WC+x}" ]; then
12582    # The variable is not set by user, try to locate tool using the code snippet
12583    for ac_prog in wc
12584do
12585  # Extract the first word of "$ac_prog", so it can be a program name with args.
12586set dummy $ac_prog; ac_word=$2
12587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12588$as_echo_n "checking for $ac_word... " >&6; }
12589if ${ac_cv_path_WC+:} false; then :
12590  $as_echo_n "(cached) " >&6
12591else
12592  case $WC in
12593  [\\/]* | ?:[\\/]*)
12594  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12595  ;;
12596  *)
12597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12598for as_dir in $PATH
12599do
12600  IFS=$as_save_IFS
12601  test -z "$as_dir" && as_dir=.
12602    for ac_exec_ext in '' $ac_executable_extensions; do
12603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12604    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12606    break 2
12607  fi
12608done
12609  done
12610IFS=$as_save_IFS
12611
12612  ;;
12613esac
12614fi
12615WC=$ac_cv_path_WC
12616if test -n "$WC"; then
12617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12618$as_echo "$WC" >&6; }
12619else
12620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12621$as_echo "no" >&6; }
12622fi
12623
12624
12625  test -n "$WC" && break
12626done
12627
12628  else
12629    # The variable is set, but is it from the command line or the environment?
12630
12631    # Try to remove the string !WC! from our list.
12632    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12633    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12634      # If it failed, the variable was not from the command line. Ignore it,
12635      # but warn the user (except for BASH, which is always set by the calling BASH).
12636      if test "xWC" != xBASH; then
12637        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12638$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12639      fi
12640      # Try to locate tool using the code snippet
12641      for ac_prog in wc
12642do
12643  # Extract the first word of "$ac_prog", so it can be a program name with args.
12644set dummy $ac_prog; ac_word=$2
12645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12646$as_echo_n "checking for $ac_word... " >&6; }
12647if ${ac_cv_path_WC+:} false; then :
12648  $as_echo_n "(cached) " >&6
12649else
12650  case $WC in
12651  [\\/]* | ?:[\\/]*)
12652  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12653  ;;
12654  *)
12655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12656for as_dir in $PATH
12657do
12658  IFS=$as_save_IFS
12659  test -z "$as_dir" && as_dir=.
12660    for ac_exec_ext in '' $ac_executable_extensions; do
12661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12662    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12664    break 2
12665  fi
12666done
12667  done
12668IFS=$as_save_IFS
12669
12670  ;;
12671esac
12672fi
12673WC=$ac_cv_path_WC
12674if test -n "$WC"; then
12675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12676$as_echo "$WC" >&6; }
12677else
12678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12679$as_echo "no" >&6; }
12680fi
12681
12682
12683  test -n "$WC" && break
12684done
12685
12686    else
12687      # If it succeeded, then it was overridden by the user. We will use it
12688      # for the tool.
12689
12690      # First remove it from the list of overridden variables, so we can test
12691      # for unknown variables in the end.
12692      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12693
12694      # Check if we try to supply an empty value
12695      if test "x$WC" = x; then
12696        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12697$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12698        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12699$as_echo_n "checking for WC... " >&6; }
12700        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12701$as_echo "disabled" >&6; }
12702      else
12703        # Check if the provided tool contains a complete path.
12704        tool_specified="$WC"
12705        tool_basename="${tool_specified##*/}"
12706        if test "x$tool_basename" = "x$tool_specified"; then
12707          # A command without a complete path is provided, search $PATH.
12708          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12709$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12710          # Extract the first word of "$tool_basename", so it can be a program name with args.
12711set dummy $tool_basename; ac_word=$2
12712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12713$as_echo_n "checking for $ac_word... " >&6; }
12714if ${ac_cv_path_WC+:} false; then :
12715  $as_echo_n "(cached) " >&6
12716else
12717  case $WC in
12718  [\\/]* | ?:[\\/]*)
12719  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12720  ;;
12721  *)
12722  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12723for as_dir in $PATH
12724do
12725  IFS=$as_save_IFS
12726  test -z "$as_dir" && as_dir=.
12727    for ac_exec_ext in '' $ac_executable_extensions; do
12728  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12729    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12730    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12731    break 2
12732  fi
12733done
12734  done
12735IFS=$as_save_IFS
12736
12737  ;;
12738esac
12739fi
12740WC=$ac_cv_path_WC
12741if test -n "$WC"; then
12742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12743$as_echo "$WC" >&6; }
12744else
12745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12746$as_echo "no" >&6; }
12747fi
12748
12749
12750          if test "x$WC" = x; then
12751            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12752          fi
12753        else
12754          # Otherwise we believe it is a complete path. Use it as it is.
12755          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12756$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12757          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12758$as_echo_n "checking for WC... " >&6; }
12759          if test ! -x "$tool_specified"; then
12760            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12761$as_echo "not found" >&6; }
12762            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12763          fi
12764          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12765$as_echo "$tool_specified" >&6; }
12766        fi
12767      fi
12768    fi
12769
12770  fi
12771
12772
12773
12774  if test "x$WC" = x; then
12775    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12776  fi
12777
12778
12779
12780
12781
12782  # Publish this variable in the help.
12783
12784
12785  if [ -z "${WHICH+x}" ]; then
12786    # The variable is not set by user, try to locate tool using the code snippet
12787    for ac_prog in which
12788do
12789  # Extract the first word of "$ac_prog", so it can be a program name with args.
12790set dummy $ac_prog; ac_word=$2
12791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12792$as_echo_n "checking for $ac_word... " >&6; }
12793if ${ac_cv_path_WHICH+:} false; then :
12794  $as_echo_n "(cached) " >&6
12795else
12796  case $WHICH in
12797  [\\/]* | ?:[\\/]*)
12798  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12799  ;;
12800  *)
12801  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12802for as_dir in $PATH
12803do
12804  IFS=$as_save_IFS
12805  test -z "$as_dir" && as_dir=.
12806    for ac_exec_ext in '' $ac_executable_extensions; do
12807  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12808    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12809    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12810    break 2
12811  fi
12812done
12813  done
12814IFS=$as_save_IFS
12815
12816  ;;
12817esac
12818fi
12819WHICH=$ac_cv_path_WHICH
12820if test -n "$WHICH"; then
12821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12822$as_echo "$WHICH" >&6; }
12823else
12824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12825$as_echo "no" >&6; }
12826fi
12827
12828
12829  test -n "$WHICH" && break
12830done
12831
12832  else
12833    # The variable is set, but is it from the command line or the environment?
12834
12835    # Try to remove the string !WHICH! from our list.
12836    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12837    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12838      # If it failed, the variable was not from the command line. Ignore it,
12839      # but warn the user (except for BASH, which is always set by the calling BASH).
12840      if test "xWHICH" != xBASH; then
12841        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12842$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12843      fi
12844      # Try to locate tool using the code snippet
12845      for ac_prog in which
12846do
12847  # Extract the first word of "$ac_prog", so it can be a program name with args.
12848set dummy $ac_prog; ac_word=$2
12849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12850$as_echo_n "checking for $ac_word... " >&6; }
12851if ${ac_cv_path_WHICH+:} false; then :
12852  $as_echo_n "(cached) " >&6
12853else
12854  case $WHICH in
12855  [\\/]* | ?:[\\/]*)
12856  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12857  ;;
12858  *)
12859  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12860for as_dir in $PATH
12861do
12862  IFS=$as_save_IFS
12863  test -z "$as_dir" && as_dir=.
12864    for ac_exec_ext in '' $ac_executable_extensions; do
12865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12866    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12868    break 2
12869  fi
12870done
12871  done
12872IFS=$as_save_IFS
12873
12874  ;;
12875esac
12876fi
12877WHICH=$ac_cv_path_WHICH
12878if test -n "$WHICH"; then
12879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12880$as_echo "$WHICH" >&6; }
12881else
12882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12883$as_echo "no" >&6; }
12884fi
12885
12886
12887  test -n "$WHICH" && break
12888done
12889
12890    else
12891      # If it succeeded, then it was overridden by the user. We will use it
12892      # for the tool.
12893
12894      # First remove it from the list of overridden variables, so we can test
12895      # for unknown variables in the end.
12896      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12897
12898      # Check if we try to supply an empty value
12899      if test "x$WHICH" = x; then
12900        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12901$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12902        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12903$as_echo_n "checking for WHICH... " >&6; }
12904        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12905$as_echo "disabled" >&6; }
12906      else
12907        # Check if the provided tool contains a complete path.
12908        tool_specified="$WHICH"
12909        tool_basename="${tool_specified##*/}"
12910        if test "x$tool_basename" = "x$tool_specified"; then
12911          # A command without a complete path is provided, search $PATH.
12912          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12913$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12914          # Extract the first word of "$tool_basename", so it can be a program name with args.
12915set dummy $tool_basename; ac_word=$2
12916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12917$as_echo_n "checking for $ac_word... " >&6; }
12918if ${ac_cv_path_WHICH+:} false; then :
12919  $as_echo_n "(cached) " >&6
12920else
12921  case $WHICH in
12922  [\\/]* | ?:[\\/]*)
12923  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12924  ;;
12925  *)
12926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12927for as_dir in $PATH
12928do
12929  IFS=$as_save_IFS
12930  test -z "$as_dir" && as_dir=.
12931    for ac_exec_ext in '' $ac_executable_extensions; do
12932  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12933    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12935    break 2
12936  fi
12937done
12938  done
12939IFS=$as_save_IFS
12940
12941  ;;
12942esac
12943fi
12944WHICH=$ac_cv_path_WHICH
12945if test -n "$WHICH"; then
12946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12947$as_echo "$WHICH" >&6; }
12948else
12949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12950$as_echo "no" >&6; }
12951fi
12952
12953
12954          if test "x$WHICH" = x; then
12955            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12956          fi
12957        else
12958          # Otherwise we believe it is a complete path. Use it as it is.
12959          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12960$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12961          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12962$as_echo_n "checking for WHICH... " >&6; }
12963          if test ! -x "$tool_specified"; then
12964            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12965$as_echo "not found" >&6; }
12966            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12967          fi
12968          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12969$as_echo "$tool_specified" >&6; }
12970        fi
12971      fi
12972    fi
12973
12974  fi
12975
12976
12977
12978  if test "x$WHICH" = x; then
12979    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12980  fi
12981
12982
12983
12984
12985
12986  # Publish this variable in the help.
12987
12988
12989  if [ -z "${XARGS+x}" ]; then
12990    # The variable is not set by user, try to locate tool using the code snippet
12991    for ac_prog in xargs
12992do
12993  # Extract the first word of "$ac_prog", so it can be a program name with args.
12994set dummy $ac_prog; ac_word=$2
12995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12996$as_echo_n "checking for $ac_word... " >&6; }
12997if ${ac_cv_path_XARGS+:} false; then :
12998  $as_echo_n "(cached) " >&6
12999else
13000  case $XARGS in
13001  [\\/]* | ?:[\\/]*)
13002  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13003  ;;
13004  *)
13005  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13006for as_dir in $PATH
13007do
13008  IFS=$as_save_IFS
13009  test -z "$as_dir" && as_dir=.
13010    for ac_exec_ext in '' $ac_executable_extensions; do
13011  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13012    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13013    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13014    break 2
13015  fi
13016done
13017  done
13018IFS=$as_save_IFS
13019
13020  ;;
13021esac
13022fi
13023XARGS=$ac_cv_path_XARGS
13024if test -n "$XARGS"; then
13025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13026$as_echo "$XARGS" >&6; }
13027else
13028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13029$as_echo "no" >&6; }
13030fi
13031
13032
13033  test -n "$XARGS" && break
13034done
13035
13036  else
13037    # The variable is set, but is it from the command line or the environment?
13038
13039    # Try to remove the string !XARGS! from our list.
13040    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
13041    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13042      # If it failed, the variable was not from the command line. Ignore it,
13043      # but warn the user (except for BASH, which is always set by the calling BASH).
13044      if test "xXARGS" != xBASH; then
13045        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
13046$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
13047      fi
13048      # Try to locate tool using the code snippet
13049      for ac_prog in xargs
13050do
13051  # Extract the first word of "$ac_prog", so it can be a program name with args.
13052set dummy $ac_prog; ac_word=$2
13053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13054$as_echo_n "checking for $ac_word... " >&6; }
13055if ${ac_cv_path_XARGS+:} false; then :
13056  $as_echo_n "(cached) " >&6
13057else
13058  case $XARGS in
13059  [\\/]* | ?:[\\/]*)
13060  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13061  ;;
13062  *)
13063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13064for as_dir in $PATH
13065do
13066  IFS=$as_save_IFS
13067  test -z "$as_dir" && as_dir=.
13068    for ac_exec_ext in '' $ac_executable_extensions; do
13069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13070    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13072    break 2
13073  fi
13074done
13075  done
13076IFS=$as_save_IFS
13077
13078  ;;
13079esac
13080fi
13081XARGS=$ac_cv_path_XARGS
13082if test -n "$XARGS"; then
13083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13084$as_echo "$XARGS" >&6; }
13085else
13086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13087$as_echo "no" >&6; }
13088fi
13089
13090
13091  test -n "$XARGS" && break
13092done
13093
13094    else
13095      # If it succeeded, then it was overridden by the user. We will use it
13096      # for the tool.
13097
13098      # First remove it from the list of overridden variables, so we can test
13099      # for unknown variables in the end.
13100      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13101
13102      # Check if we try to supply an empty value
13103      if test "x$XARGS" = x; then
13104        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13105$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13106        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13107$as_echo_n "checking for XARGS... " >&6; }
13108        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13109$as_echo "disabled" >&6; }
13110      else
13111        # Check if the provided tool contains a complete path.
13112        tool_specified="$XARGS"
13113        tool_basename="${tool_specified##*/}"
13114        if test "x$tool_basename" = "x$tool_specified"; then
13115          # A command without a complete path is provided, search $PATH.
13116          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13117$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13118          # Extract the first word of "$tool_basename", so it can be a program name with args.
13119set dummy $tool_basename; ac_word=$2
13120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13121$as_echo_n "checking for $ac_word... " >&6; }
13122if ${ac_cv_path_XARGS+:} false; then :
13123  $as_echo_n "(cached) " >&6
13124else
13125  case $XARGS in
13126  [\\/]* | ?:[\\/]*)
13127  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13128  ;;
13129  *)
13130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13131for as_dir in $PATH
13132do
13133  IFS=$as_save_IFS
13134  test -z "$as_dir" && as_dir=.
13135    for ac_exec_ext in '' $ac_executable_extensions; do
13136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13137    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13139    break 2
13140  fi
13141done
13142  done
13143IFS=$as_save_IFS
13144
13145  ;;
13146esac
13147fi
13148XARGS=$ac_cv_path_XARGS
13149if test -n "$XARGS"; then
13150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13151$as_echo "$XARGS" >&6; }
13152else
13153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13154$as_echo "no" >&6; }
13155fi
13156
13157
13158          if test "x$XARGS" = x; then
13159            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13160          fi
13161        else
13162          # Otherwise we believe it is a complete path. Use it as it is.
13163          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13164$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13165          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13166$as_echo_n "checking for XARGS... " >&6; }
13167          if test ! -x "$tool_specified"; then
13168            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13169$as_echo "not found" >&6; }
13170            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13171          fi
13172          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13173$as_echo "$tool_specified" >&6; }
13174        fi
13175      fi
13176    fi
13177
13178  fi
13179
13180
13181
13182  if test "x$XARGS" = x; then
13183    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13184  fi
13185
13186
13187
13188  # Then required tools that require some special treatment.
13189
13190
13191  # Publish this variable in the help.
13192
13193
13194  if [ -z "${AWK+x}" ]; then
13195    # The variable is not set by user, try to locate tool using the code snippet
13196    for ac_prog in gawk mawk nawk awk
13197do
13198  # Extract the first word of "$ac_prog", so it can be a program name with args.
13199set dummy $ac_prog; ac_word=$2
13200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13201$as_echo_n "checking for $ac_word... " >&6; }
13202if ${ac_cv_prog_AWK+:} false; then :
13203  $as_echo_n "(cached) " >&6
13204else
13205  if test -n "$AWK"; then
13206  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13207else
13208as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13209for as_dir in $PATH
13210do
13211  IFS=$as_save_IFS
13212  test -z "$as_dir" && as_dir=.
13213    for ac_exec_ext in '' $ac_executable_extensions; do
13214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13215    ac_cv_prog_AWK="$ac_prog"
13216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13217    break 2
13218  fi
13219done
13220  done
13221IFS=$as_save_IFS
13222
13223fi
13224fi
13225AWK=$ac_cv_prog_AWK
13226if test -n "$AWK"; then
13227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13228$as_echo "$AWK" >&6; }
13229else
13230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13231$as_echo "no" >&6; }
13232fi
13233
13234
13235  test -n "$AWK" && break
13236done
13237
13238  else
13239    # The variable is set, but is it from the command line or the environment?
13240
13241    # Try to remove the string !AWK! from our list.
13242    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13243    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13244      # If it failed, the variable was not from the command line. Ignore it,
13245      # but warn the user (except for BASH, which is always set by the calling BASH).
13246      if test "xAWK" != xBASH; then
13247        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13248$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13249      fi
13250      # Try to locate tool using the code snippet
13251      for ac_prog in gawk mawk nawk awk
13252do
13253  # Extract the first word of "$ac_prog", so it can be a program name with args.
13254set dummy $ac_prog; ac_word=$2
13255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13256$as_echo_n "checking for $ac_word... " >&6; }
13257if ${ac_cv_prog_AWK+:} false; then :
13258  $as_echo_n "(cached) " >&6
13259else
13260  if test -n "$AWK"; then
13261  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13262else
13263as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13264for as_dir in $PATH
13265do
13266  IFS=$as_save_IFS
13267  test -z "$as_dir" && as_dir=.
13268    for ac_exec_ext in '' $ac_executable_extensions; do
13269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13270    ac_cv_prog_AWK="$ac_prog"
13271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13272    break 2
13273  fi
13274done
13275  done
13276IFS=$as_save_IFS
13277
13278fi
13279fi
13280AWK=$ac_cv_prog_AWK
13281if test -n "$AWK"; then
13282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13283$as_echo "$AWK" >&6; }
13284else
13285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13286$as_echo "no" >&6; }
13287fi
13288
13289
13290  test -n "$AWK" && break
13291done
13292
13293    else
13294      # If it succeeded, then it was overridden by the user. We will use it
13295      # for the tool.
13296
13297      # First remove it from the list of overridden variables, so we can test
13298      # for unknown variables in the end.
13299      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13300
13301      # Check if we try to supply an empty value
13302      if test "x$AWK" = x; then
13303        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13304$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13305        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13306$as_echo_n "checking for AWK... " >&6; }
13307        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13308$as_echo "disabled" >&6; }
13309      else
13310        # Check if the provided tool contains a complete path.
13311        tool_specified="$AWK"
13312        tool_basename="${tool_specified##*/}"
13313        if test "x$tool_basename" = "x$tool_specified"; then
13314          # A command without a complete path is provided, search $PATH.
13315          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13316$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13317          # Extract the first word of "$tool_basename", so it can be a program name with args.
13318set dummy $tool_basename; ac_word=$2
13319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13320$as_echo_n "checking for $ac_word... " >&6; }
13321if ${ac_cv_path_AWK+:} false; then :
13322  $as_echo_n "(cached) " >&6
13323else
13324  case $AWK in
13325  [\\/]* | ?:[\\/]*)
13326  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13327  ;;
13328  *)
13329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13330for as_dir in $PATH
13331do
13332  IFS=$as_save_IFS
13333  test -z "$as_dir" && as_dir=.
13334    for ac_exec_ext in '' $ac_executable_extensions; do
13335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13336    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13338    break 2
13339  fi
13340done
13341  done
13342IFS=$as_save_IFS
13343
13344  ;;
13345esac
13346fi
13347AWK=$ac_cv_path_AWK
13348if test -n "$AWK"; then
13349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13350$as_echo "$AWK" >&6; }
13351else
13352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13353$as_echo "no" >&6; }
13354fi
13355
13356
13357          if test "x$AWK" = x; then
13358            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13359          fi
13360        else
13361          # Otherwise we believe it is a complete path. Use it as it is.
13362          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13363$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13364          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13365$as_echo_n "checking for AWK... " >&6; }
13366          if test ! -x "$tool_specified"; then
13367            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13368$as_echo "not found" >&6; }
13369            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13370          fi
13371          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13372$as_echo "$tool_specified" >&6; }
13373        fi
13374      fi
13375    fi
13376
13377  fi
13378
13379
13380  if test "x$AWK" = x; then
13381    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13382  fi
13383
13384
13385
13386
13387  # Publish this variable in the help.
13388
13389
13390  if [ -z "${GREP+x}" ]; then
13391    # The variable is not set by user, try to locate tool using the code snippet
13392    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13393$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13394if ${ac_cv_path_GREP+:} false; then :
13395  $as_echo_n "(cached) " >&6
13396else
13397  if test -z "$GREP"; then
13398  ac_path_GREP_found=false
13399  # Loop through the user's path and test for each of PROGNAME-LIST
13400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13401for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13402do
13403  IFS=$as_save_IFS
13404  test -z "$as_dir" && as_dir=.
13405    for ac_prog in grep ggrep; do
13406    for ac_exec_ext in '' $ac_executable_extensions; do
13407      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13408      as_fn_executable_p "$ac_path_GREP" || continue
13409# Check for GNU ac_path_GREP and select it if it is found.
13410  # Check for GNU $ac_path_GREP
13411case `"$ac_path_GREP" --version 2>&1` in
13412*GNU*)
13413  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13414*)
13415  ac_count=0
13416  $as_echo_n 0123456789 >"conftest.in"
13417  while :
13418  do
13419    cat "conftest.in" "conftest.in" >"conftest.tmp"
13420    mv "conftest.tmp" "conftest.in"
13421    cp "conftest.in" "conftest.nl"
13422    $as_echo 'GREP' >> "conftest.nl"
13423    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13424    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13425    as_fn_arith $ac_count + 1 && ac_count=$as_val
13426    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13427      # Best one so far, save it but keep looking for a better one
13428      ac_cv_path_GREP="$ac_path_GREP"
13429      ac_path_GREP_max=$ac_count
13430    fi
13431    # 10*(2^10) chars as input seems more than enough
13432    test $ac_count -gt 10 && break
13433  done
13434  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13435esac
13436
13437      $ac_path_GREP_found && break 3
13438    done
13439  done
13440  done
13441IFS=$as_save_IFS
13442  if test -z "$ac_cv_path_GREP"; then
13443    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13444  fi
13445else
13446  ac_cv_path_GREP=$GREP
13447fi
13448
13449fi
13450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13451$as_echo "$ac_cv_path_GREP" >&6; }
13452 GREP="$ac_cv_path_GREP"
13453
13454
13455  else
13456    # The variable is set, but is it from the command line or the environment?
13457
13458    # Try to remove the string !GREP! from our list.
13459    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13460    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13461      # If it failed, the variable was not from the command line. Ignore it,
13462      # but warn the user (except for BASH, which is always set by the calling BASH).
13463      if test "xGREP" != xBASH; then
13464        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13465$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13466      fi
13467      # Try to locate tool using the code snippet
13468      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13469$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13470if ${ac_cv_path_GREP+:} false; then :
13471  $as_echo_n "(cached) " >&6
13472else
13473  if test -z "$GREP"; then
13474  ac_path_GREP_found=false
13475  # Loop through the user's path and test for each of PROGNAME-LIST
13476  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13477for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13478do
13479  IFS=$as_save_IFS
13480  test -z "$as_dir" && as_dir=.
13481    for ac_prog in grep ggrep; do
13482    for ac_exec_ext in '' $ac_executable_extensions; do
13483      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13484      as_fn_executable_p "$ac_path_GREP" || continue
13485# Check for GNU ac_path_GREP and select it if it is found.
13486  # Check for GNU $ac_path_GREP
13487case `"$ac_path_GREP" --version 2>&1` in
13488*GNU*)
13489  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13490*)
13491  ac_count=0
13492  $as_echo_n 0123456789 >"conftest.in"
13493  while :
13494  do
13495    cat "conftest.in" "conftest.in" >"conftest.tmp"
13496    mv "conftest.tmp" "conftest.in"
13497    cp "conftest.in" "conftest.nl"
13498    $as_echo 'GREP' >> "conftest.nl"
13499    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13500    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13501    as_fn_arith $ac_count + 1 && ac_count=$as_val
13502    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13503      # Best one so far, save it but keep looking for a better one
13504      ac_cv_path_GREP="$ac_path_GREP"
13505      ac_path_GREP_max=$ac_count
13506    fi
13507    # 10*(2^10) chars as input seems more than enough
13508    test $ac_count -gt 10 && break
13509  done
13510  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13511esac
13512
13513      $ac_path_GREP_found && break 3
13514    done
13515  done
13516  done
13517IFS=$as_save_IFS
13518  if test -z "$ac_cv_path_GREP"; then
13519    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13520  fi
13521else
13522  ac_cv_path_GREP=$GREP
13523fi
13524
13525fi
13526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13527$as_echo "$ac_cv_path_GREP" >&6; }
13528 GREP="$ac_cv_path_GREP"
13529
13530
13531    else
13532      # If it succeeded, then it was overridden by the user. We will use it
13533      # for the tool.
13534
13535      # First remove it from the list of overridden variables, so we can test
13536      # for unknown variables in the end.
13537      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13538
13539      # Check if we try to supply an empty value
13540      if test "x$GREP" = x; then
13541        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13542$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13543        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13544$as_echo_n "checking for GREP... " >&6; }
13545        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13546$as_echo "disabled" >&6; }
13547      else
13548        # Check if the provided tool contains a complete path.
13549        tool_specified="$GREP"
13550        tool_basename="${tool_specified##*/}"
13551        if test "x$tool_basename" = "x$tool_specified"; then
13552          # A command without a complete path is provided, search $PATH.
13553          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13554$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13555          # Extract the first word of "$tool_basename", so it can be a program name with args.
13556set dummy $tool_basename; ac_word=$2
13557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13558$as_echo_n "checking for $ac_word... " >&6; }
13559if ${ac_cv_path_GREP+:} false; then :
13560  $as_echo_n "(cached) " >&6
13561else
13562  case $GREP in
13563  [\\/]* | ?:[\\/]*)
13564  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13565  ;;
13566  *)
13567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13568for as_dir in $PATH
13569do
13570  IFS=$as_save_IFS
13571  test -z "$as_dir" && as_dir=.
13572    for ac_exec_ext in '' $ac_executable_extensions; do
13573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13574    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13576    break 2
13577  fi
13578done
13579  done
13580IFS=$as_save_IFS
13581
13582  ;;
13583esac
13584fi
13585GREP=$ac_cv_path_GREP
13586if test -n "$GREP"; then
13587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13588$as_echo "$GREP" >&6; }
13589else
13590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13591$as_echo "no" >&6; }
13592fi
13593
13594
13595          if test "x$GREP" = x; then
13596            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13597          fi
13598        else
13599          # Otherwise we believe it is a complete path. Use it as it is.
13600          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13601$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13602          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13603$as_echo_n "checking for GREP... " >&6; }
13604          if test ! -x "$tool_specified"; then
13605            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13606$as_echo "not found" >&6; }
13607            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13608          fi
13609          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13610$as_echo "$tool_specified" >&6; }
13611        fi
13612      fi
13613    fi
13614
13615  fi
13616
13617
13618  if test "x$GREP" = x; then
13619    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13620  fi
13621
13622
13623
13624
13625  # Publish this variable in the help.
13626
13627
13628  if [ -z "${EGREP+x}" ]; then
13629    # The variable is not set by user, try to locate tool using the code snippet
13630    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13631$as_echo_n "checking for egrep... " >&6; }
13632if ${ac_cv_path_EGREP+:} false; then :
13633  $as_echo_n "(cached) " >&6
13634else
13635  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13636   then ac_cv_path_EGREP="$GREP -E"
13637   else
13638     if test -z "$EGREP"; then
13639  ac_path_EGREP_found=false
13640  # Loop through the user's path and test for each of PROGNAME-LIST
13641  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13642for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13643do
13644  IFS=$as_save_IFS
13645  test -z "$as_dir" && as_dir=.
13646    for ac_prog in egrep; do
13647    for ac_exec_ext in '' $ac_executable_extensions; do
13648      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13649      as_fn_executable_p "$ac_path_EGREP" || continue
13650# Check for GNU ac_path_EGREP and select it if it is found.
13651  # Check for GNU $ac_path_EGREP
13652case `"$ac_path_EGREP" --version 2>&1` in
13653*GNU*)
13654  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13655*)
13656  ac_count=0
13657  $as_echo_n 0123456789 >"conftest.in"
13658  while :
13659  do
13660    cat "conftest.in" "conftest.in" >"conftest.tmp"
13661    mv "conftest.tmp" "conftest.in"
13662    cp "conftest.in" "conftest.nl"
13663    $as_echo 'EGREP' >> "conftest.nl"
13664    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13665    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13666    as_fn_arith $ac_count + 1 && ac_count=$as_val
13667    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13668      # Best one so far, save it but keep looking for a better one
13669      ac_cv_path_EGREP="$ac_path_EGREP"
13670      ac_path_EGREP_max=$ac_count
13671    fi
13672    # 10*(2^10) chars as input seems more than enough
13673    test $ac_count -gt 10 && break
13674  done
13675  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13676esac
13677
13678      $ac_path_EGREP_found && break 3
13679    done
13680  done
13681  done
13682IFS=$as_save_IFS
13683  if test -z "$ac_cv_path_EGREP"; then
13684    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13685  fi
13686else
13687  ac_cv_path_EGREP=$EGREP
13688fi
13689
13690   fi
13691fi
13692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13693$as_echo "$ac_cv_path_EGREP" >&6; }
13694 EGREP="$ac_cv_path_EGREP"
13695
13696
13697  else
13698    # The variable is set, but is it from the command line or the environment?
13699
13700    # Try to remove the string !EGREP! from our list.
13701    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13702    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13703      # If it failed, the variable was not from the command line. Ignore it,
13704      # but warn the user (except for BASH, which is always set by the calling BASH).
13705      if test "xEGREP" != xBASH; then
13706        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13707$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13708      fi
13709      # Try to locate tool using the code snippet
13710      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13711$as_echo_n "checking for egrep... " >&6; }
13712if ${ac_cv_path_EGREP+:} false; then :
13713  $as_echo_n "(cached) " >&6
13714else
13715  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13716   then ac_cv_path_EGREP="$GREP -E"
13717   else
13718     if test -z "$EGREP"; then
13719  ac_path_EGREP_found=false
13720  # Loop through the user's path and test for each of PROGNAME-LIST
13721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13722for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13723do
13724  IFS=$as_save_IFS
13725  test -z "$as_dir" && as_dir=.
13726    for ac_prog in egrep; do
13727    for ac_exec_ext in '' $ac_executable_extensions; do
13728      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13729      as_fn_executable_p "$ac_path_EGREP" || continue
13730# Check for GNU ac_path_EGREP and select it if it is found.
13731  # Check for GNU $ac_path_EGREP
13732case `"$ac_path_EGREP" --version 2>&1` in
13733*GNU*)
13734  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13735*)
13736  ac_count=0
13737  $as_echo_n 0123456789 >"conftest.in"
13738  while :
13739  do
13740    cat "conftest.in" "conftest.in" >"conftest.tmp"
13741    mv "conftest.tmp" "conftest.in"
13742    cp "conftest.in" "conftest.nl"
13743    $as_echo 'EGREP' >> "conftest.nl"
13744    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13745    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13746    as_fn_arith $ac_count + 1 && ac_count=$as_val
13747    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13748      # Best one so far, save it but keep looking for a better one
13749      ac_cv_path_EGREP="$ac_path_EGREP"
13750      ac_path_EGREP_max=$ac_count
13751    fi
13752    # 10*(2^10) chars as input seems more than enough
13753    test $ac_count -gt 10 && break
13754  done
13755  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13756esac
13757
13758      $ac_path_EGREP_found && break 3
13759    done
13760  done
13761  done
13762IFS=$as_save_IFS
13763  if test -z "$ac_cv_path_EGREP"; then
13764    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13765  fi
13766else
13767  ac_cv_path_EGREP=$EGREP
13768fi
13769
13770   fi
13771fi
13772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13773$as_echo "$ac_cv_path_EGREP" >&6; }
13774 EGREP="$ac_cv_path_EGREP"
13775
13776
13777    else
13778      # If it succeeded, then it was overridden by the user. We will use it
13779      # for the tool.
13780
13781      # First remove it from the list of overridden variables, so we can test
13782      # for unknown variables in the end.
13783      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13784
13785      # Check if we try to supply an empty value
13786      if test "x$EGREP" = x; then
13787        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13788$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13789        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13790$as_echo_n "checking for EGREP... " >&6; }
13791        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13792$as_echo "disabled" >&6; }
13793      else
13794        # Check if the provided tool contains a complete path.
13795        tool_specified="$EGREP"
13796        tool_basename="${tool_specified##*/}"
13797        if test "x$tool_basename" = "x$tool_specified"; then
13798          # A command without a complete path is provided, search $PATH.
13799          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13800$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13801          # Extract the first word of "$tool_basename", so it can be a program name with args.
13802set dummy $tool_basename; ac_word=$2
13803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13804$as_echo_n "checking for $ac_word... " >&6; }
13805if ${ac_cv_path_EGREP+:} false; then :
13806  $as_echo_n "(cached) " >&6
13807else
13808  case $EGREP in
13809  [\\/]* | ?:[\\/]*)
13810  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13811  ;;
13812  *)
13813  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13814for as_dir in $PATH
13815do
13816  IFS=$as_save_IFS
13817  test -z "$as_dir" && as_dir=.
13818    for ac_exec_ext in '' $ac_executable_extensions; do
13819  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13820    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13821    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13822    break 2
13823  fi
13824done
13825  done
13826IFS=$as_save_IFS
13827
13828  ;;
13829esac
13830fi
13831EGREP=$ac_cv_path_EGREP
13832if test -n "$EGREP"; then
13833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13834$as_echo "$EGREP" >&6; }
13835else
13836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13837$as_echo "no" >&6; }
13838fi
13839
13840
13841          if test "x$EGREP" = x; then
13842            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13843          fi
13844        else
13845          # Otherwise we believe it is a complete path. Use it as it is.
13846          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13847$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13848          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13849$as_echo_n "checking for EGREP... " >&6; }
13850          if test ! -x "$tool_specified"; then
13851            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13852$as_echo "not found" >&6; }
13853            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13854          fi
13855          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13856$as_echo "$tool_specified" >&6; }
13857        fi
13858      fi
13859    fi
13860
13861  fi
13862
13863
13864  if test "x$EGREP" = x; then
13865    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13866  fi
13867
13868
13869
13870
13871  # Publish this variable in the help.
13872
13873
13874  if [ -z "${FGREP+x}" ]; then
13875    # The variable is not set by user, try to locate tool using the code snippet
13876    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13877$as_echo_n "checking for fgrep... " >&6; }
13878if ${ac_cv_path_FGREP+:} false; then :
13879  $as_echo_n "(cached) " >&6
13880else
13881  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13882   then ac_cv_path_FGREP="$GREP -F"
13883   else
13884     if test -z "$FGREP"; then
13885  ac_path_FGREP_found=false
13886  # Loop through the user's path and test for each of PROGNAME-LIST
13887  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13888for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13889do
13890  IFS=$as_save_IFS
13891  test -z "$as_dir" && as_dir=.
13892    for ac_prog in fgrep; do
13893    for ac_exec_ext in '' $ac_executable_extensions; do
13894      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13895      as_fn_executable_p "$ac_path_FGREP" || continue
13896# Check for GNU ac_path_FGREP and select it if it is found.
13897  # Check for GNU $ac_path_FGREP
13898case `"$ac_path_FGREP" --version 2>&1` in
13899*GNU*)
13900  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13901*)
13902  ac_count=0
13903  $as_echo_n 0123456789 >"conftest.in"
13904  while :
13905  do
13906    cat "conftest.in" "conftest.in" >"conftest.tmp"
13907    mv "conftest.tmp" "conftest.in"
13908    cp "conftest.in" "conftest.nl"
13909    $as_echo 'FGREP' >> "conftest.nl"
13910    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13911    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13912    as_fn_arith $ac_count + 1 && ac_count=$as_val
13913    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13914      # Best one so far, save it but keep looking for a better one
13915      ac_cv_path_FGREP="$ac_path_FGREP"
13916      ac_path_FGREP_max=$ac_count
13917    fi
13918    # 10*(2^10) chars as input seems more than enough
13919    test $ac_count -gt 10 && break
13920  done
13921  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13922esac
13923
13924      $ac_path_FGREP_found && break 3
13925    done
13926  done
13927  done
13928IFS=$as_save_IFS
13929  if test -z "$ac_cv_path_FGREP"; then
13930    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13931  fi
13932else
13933  ac_cv_path_FGREP=$FGREP
13934fi
13935
13936   fi
13937fi
13938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13939$as_echo "$ac_cv_path_FGREP" >&6; }
13940 FGREP="$ac_cv_path_FGREP"
13941
13942
13943  else
13944    # The variable is set, but is it from the command line or the environment?
13945
13946    # Try to remove the string !FGREP! from our list.
13947    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13948    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13949      # If it failed, the variable was not from the command line. Ignore it,
13950      # but warn the user (except for BASH, which is always set by the calling BASH).
13951      if test "xFGREP" != xBASH; then
13952        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13953$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13954      fi
13955      # Try to locate tool using the code snippet
13956      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13957$as_echo_n "checking for fgrep... " >&6; }
13958if ${ac_cv_path_FGREP+:} false; then :
13959  $as_echo_n "(cached) " >&6
13960else
13961  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13962   then ac_cv_path_FGREP="$GREP -F"
13963   else
13964     if test -z "$FGREP"; then
13965  ac_path_FGREP_found=false
13966  # Loop through the user's path and test for each of PROGNAME-LIST
13967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13968for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13969do
13970  IFS=$as_save_IFS
13971  test -z "$as_dir" && as_dir=.
13972    for ac_prog in fgrep; do
13973    for ac_exec_ext in '' $ac_executable_extensions; do
13974      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13975      as_fn_executable_p "$ac_path_FGREP" || continue
13976# Check for GNU ac_path_FGREP and select it if it is found.
13977  # Check for GNU $ac_path_FGREP
13978case `"$ac_path_FGREP" --version 2>&1` in
13979*GNU*)
13980  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13981*)
13982  ac_count=0
13983  $as_echo_n 0123456789 >"conftest.in"
13984  while :
13985  do
13986    cat "conftest.in" "conftest.in" >"conftest.tmp"
13987    mv "conftest.tmp" "conftest.in"
13988    cp "conftest.in" "conftest.nl"
13989    $as_echo 'FGREP' >> "conftest.nl"
13990    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13991    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13992    as_fn_arith $ac_count + 1 && ac_count=$as_val
13993    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13994      # Best one so far, save it but keep looking for a better one
13995      ac_cv_path_FGREP="$ac_path_FGREP"
13996      ac_path_FGREP_max=$ac_count
13997    fi
13998    # 10*(2^10) chars as input seems more than enough
13999    test $ac_count -gt 10 && break
14000  done
14001  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14002esac
14003
14004      $ac_path_FGREP_found && break 3
14005    done
14006  done
14007  done
14008IFS=$as_save_IFS
14009  if test -z "$ac_cv_path_FGREP"; then
14010    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
14011  fi
14012else
14013  ac_cv_path_FGREP=$FGREP
14014fi
14015
14016   fi
14017fi
14018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
14019$as_echo "$ac_cv_path_FGREP" >&6; }
14020 FGREP="$ac_cv_path_FGREP"
14021
14022
14023    else
14024      # If it succeeded, then it was overridden by the user. We will use it
14025      # for the tool.
14026
14027      # First remove it from the list of overridden variables, so we can test
14028      # for unknown variables in the end.
14029      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14030
14031      # Check if we try to supply an empty value
14032      if test "x$FGREP" = x; then
14033        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
14034$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
14035        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14036$as_echo_n "checking for FGREP... " >&6; }
14037        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14038$as_echo "disabled" >&6; }
14039      else
14040        # Check if the provided tool contains a complete path.
14041        tool_specified="$FGREP"
14042        tool_basename="${tool_specified##*/}"
14043        if test "x$tool_basename" = "x$tool_specified"; then
14044          # A command without a complete path is provided, search $PATH.
14045          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
14046$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
14047          # Extract the first word of "$tool_basename", so it can be a program name with args.
14048set dummy $tool_basename; ac_word=$2
14049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14050$as_echo_n "checking for $ac_word... " >&6; }
14051if ${ac_cv_path_FGREP+:} false; then :
14052  $as_echo_n "(cached) " >&6
14053else
14054  case $FGREP in
14055  [\\/]* | ?:[\\/]*)
14056  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
14057  ;;
14058  *)
14059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14060for as_dir in $PATH
14061do
14062  IFS=$as_save_IFS
14063  test -z "$as_dir" && as_dir=.
14064    for ac_exec_ext in '' $ac_executable_extensions; do
14065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14066    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
14067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14068    break 2
14069  fi
14070done
14071  done
14072IFS=$as_save_IFS
14073
14074  ;;
14075esac
14076fi
14077FGREP=$ac_cv_path_FGREP
14078if test -n "$FGREP"; then
14079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14080$as_echo "$FGREP" >&6; }
14081else
14082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14083$as_echo "no" >&6; }
14084fi
14085
14086
14087          if test "x$FGREP" = x; then
14088            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14089          fi
14090        else
14091          # Otherwise we believe it is a complete path. Use it as it is.
14092          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14093$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14094          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14095$as_echo_n "checking for FGREP... " >&6; }
14096          if test ! -x "$tool_specified"; then
14097            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14098$as_echo "not found" >&6; }
14099            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14100          fi
14101          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14102$as_echo "$tool_specified" >&6; }
14103        fi
14104      fi
14105    fi
14106
14107  fi
14108
14109
14110  if test "x$FGREP" = x; then
14111    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14112  fi
14113
14114
14115
14116
14117  # Publish this variable in the help.
14118
14119
14120  if [ -z "${SED+x}" ]; then
14121    # The variable is not set by user, try to locate tool using the code snippet
14122    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14123$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14124if ${ac_cv_path_SED+:} false; then :
14125  $as_echo_n "(cached) " >&6
14126else
14127            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14128     for ac_i in 1 2 3 4 5 6 7; do
14129       ac_script="$ac_script$as_nl$ac_script"
14130     done
14131     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14132     { ac_script=; unset ac_script;}
14133     if test -z "$SED"; then
14134  ac_path_SED_found=false
14135  # Loop through the user's path and test for each of PROGNAME-LIST
14136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14137for as_dir in $PATH
14138do
14139  IFS=$as_save_IFS
14140  test -z "$as_dir" && as_dir=.
14141    for ac_prog in sed gsed; do
14142    for ac_exec_ext in '' $ac_executable_extensions; do
14143      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14144      as_fn_executable_p "$ac_path_SED" || continue
14145# Check for GNU ac_path_SED and select it if it is found.
14146  # Check for GNU $ac_path_SED
14147case `"$ac_path_SED" --version 2>&1` in
14148*GNU*)
14149  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14150*)
14151  ac_count=0
14152  $as_echo_n 0123456789 >"conftest.in"
14153  while :
14154  do
14155    cat "conftest.in" "conftest.in" >"conftest.tmp"
14156    mv "conftest.tmp" "conftest.in"
14157    cp "conftest.in" "conftest.nl"
14158    $as_echo '' >> "conftest.nl"
14159    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14160    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14161    as_fn_arith $ac_count + 1 && ac_count=$as_val
14162    if test $ac_count -gt ${ac_path_SED_max-0}; then
14163      # Best one so far, save it but keep looking for a better one
14164      ac_cv_path_SED="$ac_path_SED"
14165      ac_path_SED_max=$ac_count
14166    fi
14167    # 10*(2^10) chars as input seems more than enough
14168    test $ac_count -gt 10 && break
14169  done
14170  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14171esac
14172
14173      $ac_path_SED_found && break 3
14174    done
14175  done
14176  done
14177IFS=$as_save_IFS
14178  if test -z "$ac_cv_path_SED"; then
14179    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14180  fi
14181else
14182  ac_cv_path_SED=$SED
14183fi
14184
14185fi
14186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14187$as_echo "$ac_cv_path_SED" >&6; }
14188 SED="$ac_cv_path_SED"
14189  rm -f conftest.sed
14190
14191  else
14192    # The variable is set, but is it from the command line or the environment?
14193
14194    # Try to remove the string !SED! from our list.
14195    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14196    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14197      # If it failed, the variable was not from the command line. Ignore it,
14198      # but warn the user (except for BASH, which is always set by the calling BASH).
14199      if test "xSED" != xBASH; then
14200        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14201$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14202      fi
14203      # Try to locate tool using the code snippet
14204      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14205$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14206if ${ac_cv_path_SED+:} false; then :
14207  $as_echo_n "(cached) " >&6
14208else
14209            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14210     for ac_i in 1 2 3 4 5 6 7; do
14211       ac_script="$ac_script$as_nl$ac_script"
14212     done
14213     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14214     { ac_script=; unset ac_script;}
14215     if test -z "$SED"; then
14216  ac_path_SED_found=false
14217  # Loop through the user's path and test for each of PROGNAME-LIST
14218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14219for as_dir in $PATH
14220do
14221  IFS=$as_save_IFS
14222  test -z "$as_dir" && as_dir=.
14223    for ac_prog in sed gsed; do
14224    for ac_exec_ext in '' $ac_executable_extensions; do
14225      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14226      as_fn_executable_p "$ac_path_SED" || continue
14227# Check for GNU ac_path_SED and select it if it is found.
14228  # Check for GNU $ac_path_SED
14229case `"$ac_path_SED" --version 2>&1` in
14230*GNU*)
14231  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14232*)
14233  ac_count=0
14234  $as_echo_n 0123456789 >"conftest.in"
14235  while :
14236  do
14237    cat "conftest.in" "conftest.in" >"conftest.tmp"
14238    mv "conftest.tmp" "conftest.in"
14239    cp "conftest.in" "conftest.nl"
14240    $as_echo '' >> "conftest.nl"
14241    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14242    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14243    as_fn_arith $ac_count + 1 && ac_count=$as_val
14244    if test $ac_count -gt ${ac_path_SED_max-0}; then
14245      # Best one so far, save it but keep looking for a better one
14246      ac_cv_path_SED="$ac_path_SED"
14247      ac_path_SED_max=$ac_count
14248    fi
14249    # 10*(2^10) chars as input seems more than enough
14250    test $ac_count -gt 10 && break
14251  done
14252  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14253esac
14254
14255      $ac_path_SED_found && break 3
14256    done
14257  done
14258  done
14259IFS=$as_save_IFS
14260  if test -z "$ac_cv_path_SED"; then
14261    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14262  fi
14263else
14264  ac_cv_path_SED=$SED
14265fi
14266
14267fi
14268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14269$as_echo "$ac_cv_path_SED" >&6; }
14270 SED="$ac_cv_path_SED"
14271  rm -f conftest.sed
14272
14273    else
14274      # If it succeeded, then it was overridden by the user. We will use it
14275      # for the tool.
14276
14277      # First remove it from the list of overridden variables, so we can test
14278      # for unknown variables in the end.
14279      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14280
14281      # Check if we try to supply an empty value
14282      if test "x$SED" = x; then
14283        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14284$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14285        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14286$as_echo_n "checking for SED... " >&6; }
14287        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14288$as_echo "disabled" >&6; }
14289      else
14290        # Check if the provided tool contains a complete path.
14291        tool_specified="$SED"
14292        tool_basename="${tool_specified##*/}"
14293        if test "x$tool_basename" = "x$tool_specified"; then
14294          # A command without a complete path is provided, search $PATH.
14295          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14296$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14297          # Extract the first word of "$tool_basename", so it can be a program name with args.
14298set dummy $tool_basename; ac_word=$2
14299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14300$as_echo_n "checking for $ac_word... " >&6; }
14301if ${ac_cv_path_SED+:} false; then :
14302  $as_echo_n "(cached) " >&6
14303else
14304  case $SED in
14305  [\\/]* | ?:[\\/]*)
14306  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14307  ;;
14308  *)
14309  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14310for as_dir in $PATH
14311do
14312  IFS=$as_save_IFS
14313  test -z "$as_dir" && as_dir=.
14314    for ac_exec_ext in '' $ac_executable_extensions; do
14315  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14316    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14317    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14318    break 2
14319  fi
14320done
14321  done
14322IFS=$as_save_IFS
14323
14324  ;;
14325esac
14326fi
14327SED=$ac_cv_path_SED
14328if test -n "$SED"; then
14329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14330$as_echo "$SED" >&6; }
14331else
14332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14333$as_echo "no" >&6; }
14334fi
14335
14336
14337          if test "x$SED" = x; then
14338            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14339          fi
14340        else
14341          # Otherwise we believe it is a complete path. Use it as it is.
14342          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14343$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14344          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14345$as_echo_n "checking for SED... " >&6; }
14346          if test ! -x "$tool_specified"; then
14347            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14348$as_echo "not found" >&6; }
14349            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14350          fi
14351          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14352$as_echo "$tool_specified" >&6; }
14353        fi
14354      fi
14355    fi
14356
14357  fi
14358
14359
14360  if test "x$SED" = x; then
14361    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14362  fi
14363
14364
14365
14366  # Always force rm.
14367  RM="$RM -f"
14368
14369  # pwd behaves differently on various platforms and some don't support the -L flag.
14370  # Always use the bash builtin pwd to get uniform behavior.
14371  THEPWDCMD=pwd
14372
14373  # These are not required on all platforms
14374
14375
14376  # Publish this variable in the help.
14377
14378
14379  if [ -z "${CYGPATH+x}" ]; then
14380    # The variable is not set by user, try to locate tool using the code snippet
14381    for ac_prog in cygpath
14382do
14383  # Extract the first word of "$ac_prog", so it can be a program name with args.
14384set dummy $ac_prog; ac_word=$2
14385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14386$as_echo_n "checking for $ac_word... " >&6; }
14387if ${ac_cv_path_CYGPATH+:} false; then :
14388  $as_echo_n "(cached) " >&6
14389else
14390  case $CYGPATH in
14391  [\\/]* | ?:[\\/]*)
14392  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14393  ;;
14394  *)
14395  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14396for as_dir in $PATH
14397do
14398  IFS=$as_save_IFS
14399  test -z "$as_dir" && as_dir=.
14400    for ac_exec_ext in '' $ac_executable_extensions; do
14401  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14402    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14404    break 2
14405  fi
14406done
14407  done
14408IFS=$as_save_IFS
14409
14410  ;;
14411esac
14412fi
14413CYGPATH=$ac_cv_path_CYGPATH
14414if test -n "$CYGPATH"; then
14415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14416$as_echo "$CYGPATH" >&6; }
14417else
14418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14419$as_echo "no" >&6; }
14420fi
14421
14422
14423  test -n "$CYGPATH" && break
14424done
14425
14426  else
14427    # The variable is set, but is it from the command line or the environment?
14428
14429    # Try to remove the string !CYGPATH! from our list.
14430    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14431    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14432      # If it failed, the variable was not from the command line. Ignore it,
14433      # but warn the user (except for BASH, which is always set by the calling BASH).
14434      if test "xCYGPATH" != xBASH; then
14435        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14436$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14437      fi
14438      # Try to locate tool using the code snippet
14439      for ac_prog in cygpath
14440do
14441  # Extract the first word of "$ac_prog", so it can be a program name with args.
14442set dummy $ac_prog; ac_word=$2
14443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14444$as_echo_n "checking for $ac_word... " >&6; }
14445if ${ac_cv_path_CYGPATH+:} false; then :
14446  $as_echo_n "(cached) " >&6
14447else
14448  case $CYGPATH in
14449  [\\/]* | ?:[\\/]*)
14450  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14451  ;;
14452  *)
14453  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14454for as_dir in $PATH
14455do
14456  IFS=$as_save_IFS
14457  test -z "$as_dir" && as_dir=.
14458    for ac_exec_ext in '' $ac_executable_extensions; do
14459  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14460    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14462    break 2
14463  fi
14464done
14465  done
14466IFS=$as_save_IFS
14467
14468  ;;
14469esac
14470fi
14471CYGPATH=$ac_cv_path_CYGPATH
14472if test -n "$CYGPATH"; then
14473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14474$as_echo "$CYGPATH" >&6; }
14475else
14476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14477$as_echo "no" >&6; }
14478fi
14479
14480
14481  test -n "$CYGPATH" && break
14482done
14483
14484    else
14485      # If it succeeded, then it was overridden by the user. We will use it
14486      # for the tool.
14487
14488      # First remove it from the list of overridden variables, so we can test
14489      # for unknown variables in the end.
14490      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14491
14492      # Check if we try to supply an empty value
14493      if test "x$CYGPATH" = x; then
14494        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14495$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14496        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14497$as_echo_n "checking for CYGPATH... " >&6; }
14498        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14499$as_echo "disabled" >&6; }
14500      else
14501        # Check if the provided tool contains a complete path.
14502        tool_specified="$CYGPATH"
14503        tool_basename="${tool_specified##*/}"
14504        if test "x$tool_basename" = "x$tool_specified"; then
14505          # A command without a complete path is provided, search $PATH.
14506          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14507$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14508          # Extract the first word of "$tool_basename", so it can be a program name with args.
14509set dummy $tool_basename; ac_word=$2
14510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14511$as_echo_n "checking for $ac_word... " >&6; }
14512if ${ac_cv_path_CYGPATH+:} false; then :
14513  $as_echo_n "(cached) " >&6
14514else
14515  case $CYGPATH in
14516  [\\/]* | ?:[\\/]*)
14517  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14518  ;;
14519  *)
14520  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14521for as_dir in $PATH
14522do
14523  IFS=$as_save_IFS
14524  test -z "$as_dir" && as_dir=.
14525    for ac_exec_ext in '' $ac_executable_extensions; do
14526  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14527    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14528    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14529    break 2
14530  fi
14531done
14532  done
14533IFS=$as_save_IFS
14534
14535  ;;
14536esac
14537fi
14538CYGPATH=$ac_cv_path_CYGPATH
14539if test -n "$CYGPATH"; then
14540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14541$as_echo "$CYGPATH" >&6; }
14542else
14543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14544$as_echo "no" >&6; }
14545fi
14546
14547
14548          if test "x$CYGPATH" = x; then
14549            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14550          fi
14551        else
14552          # Otherwise we believe it is a complete path. Use it as it is.
14553          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14554$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14555          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14556$as_echo_n "checking for CYGPATH... " >&6; }
14557          if test ! -x "$tool_specified"; then
14558            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14559$as_echo "not found" >&6; }
14560            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14561          fi
14562          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14563$as_echo "$tool_specified" >&6; }
14564        fi
14565      fi
14566    fi
14567
14568  fi
14569
14570
14571
14572
14573  # Publish this variable in the help.
14574
14575
14576  if [ -z "${READLINK+x}" ]; then
14577    # The variable is not set by user, try to locate tool using the code snippet
14578    for ac_prog in greadlink readlink
14579do
14580  # Extract the first word of "$ac_prog", so it can be a program name with args.
14581set dummy $ac_prog; ac_word=$2
14582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14583$as_echo_n "checking for $ac_word... " >&6; }
14584if ${ac_cv_path_READLINK+:} false; then :
14585  $as_echo_n "(cached) " >&6
14586else
14587  case $READLINK in
14588  [\\/]* | ?:[\\/]*)
14589  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14590  ;;
14591  *)
14592  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14593for as_dir in $PATH
14594do
14595  IFS=$as_save_IFS
14596  test -z "$as_dir" && as_dir=.
14597    for ac_exec_ext in '' $ac_executable_extensions; do
14598  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14599    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14600    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14601    break 2
14602  fi
14603done
14604  done
14605IFS=$as_save_IFS
14606
14607  ;;
14608esac
14609fi
14610READLINK=$ac_cv_path_READLINK
14611if test -n "$READLINK"; then
14612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14613$as_echo "$READLINK" >&6; }
14614else
14615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14616$as_echo "no" >&6; }
14617fi
14618
14619
14620  test -n "$READLINK" && break
14621done
14622
14623  else
14624    # The variable is set, but is it from the command line or the environment?
14625
14626    # Try to remove the string !READLINK! from our list.
14627    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14628    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14629      # If it failed, the variable was not from the command line. Ignore it,
14630      # but warn the user (except for BASH, which is always set by the calling BASH).
14631      if test "xREADLINK" != xBASH; then
14632        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14633$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14634      fi
14635      # Try to locate tool using the code snippet
14636      for ac_prog in greadlink readlink
14637do
14638  # Extract the first word of "$ac_prog", so it can be a program name with args.
14639set dummy $ac_prog; ac_word=$2
14640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14641$as_echo_n "checking for $ac_word... " >&6; }
14642if ${ac_cv_path_READLINK+:} false; then :
14643  $as_echo_n "(cached) " >&6
14644else
14645  case $READLINK in
14646  [\\/]* | ?:[\\/]*)
14647  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14648  ;;
14649  *)
14650  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14651for as_dir in $PATH
14652do
14653  IFS=$as_save_IFS
14654  test -z "$as_dir" && as_dir=.
14655    for ac_exec_ext in '' $ac_executable_extensions; do
14656  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14657    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14658    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14659    break 2
14660  fi
14661done
14662  done
14663IFS=$as_save_IFS
14664
14665  ;;
14666esac
14667fi
14668READLINK=$ac_cv_path_READLINK
14669if test -n "$READLINK"; then
14670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14671$as_echo "$READLINK" >&6; }
14672else
14673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14674$as_echo "no" >&6; }
14675fi
14676
14677
14678  test -n "$READLINK" && break
14679done
14680
14681    else
14682      # If it succeeded, then it was overridden by the user. We will use it
14683      # for the tool.
14684
14685      # First remove it from the list of overridden variables, so we can test
14686      # for unknown variables in the end.
14687      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14688
14689      # Check if we try to supply an empty value
14690      if test "x$READLINK" = x; then
14691        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14692$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14693        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14694$as_echo_n "checking for READLINK... " >&6; }
14695        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14696$as_echo "disabled" >&6; }
14697      else
14698        # Check if the provided tool contains a complete path.
14699        tool_specified="$READLINK"
14700        tool_basename="${tool_specified##*/}"
14701        if test "x$tool_basename" = "x$tool_specified"; then
14702          # A command without a complete path is provided, search $PATH.
14703          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14704$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14705          # Extract the first word of "$tool_basename", so it can be a program name with args.
14706set dummy $tool_basename; ac_word=$2
14707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14708$as_echo_n "checking for $ac_word... " >&6; }
14709if ${ac_cv_path_READLINK+:} false; then :
14710  $as_echo_n "(cached) " >&6
14711else
14712  case $READLINK in
14713  [\\/]* | ?:[\\/]*)
14714  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14715  ;;
14716  *)
14717  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14718for as_dir in $PATH
14719do
14720  IFS=$as_save_IFS
14721  test -z "$as_dir" && as_dir=.
14722    for ac_exec_ext in '' $ac_executable_extensions; do
14723  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14724    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14726    break 2
14727  fi
14728done
14729  done
14730IFS=$as_save_IFS
14731
14732  ;;
14733esac
14734fi
14735READLINK=$ac_cv_path_READLINK
14736if test -n "$READLINK"; then
14737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14738$as_echo "$READLINK" >&6; }
14739else
14740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14741$as_echo "no" >&6; }
14742fi
14743
14744
14745          if test "x$READLINK" = x; then
14746            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14747          fi
14748        else
14749          # Otherwise we believe it is a complete path. Use it as it is.
14750          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14751$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14752          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14753$as_echo_n "checking for READLINK... " >&6; }
14754          if test ! -x "$tool_specified"; then
14755            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14756$as_echo "not found" >&6; }
14757            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14758          fi
14759          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14760$as_echo "$tool_specified" >&6; }
14761        fi
14762      fi
14763    fi
14764
14765  fi
14766
14767
14768
14769
14770  # Publish this variable in the help.
14771
14772
14773  if [ -z "${DF+x}" ]; then
14774    # The variable is not set by user, try to locate tool using the code snippet
14775    for ac_prog in df
14776do
14777  # Extract the first word of "$ac_prog", so it can be a program name with args.
14778set dummy $ac_prog; ac_word=$2
14779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14780$as_echo_n "checking for $ac_word... " >&6; }
14781if ${ac_cv_path_DF+:} false; then :
14782  $as_echo_n "(cached) " >&6
14783else
14784  case $DF in
14785  [\\/]* | ?:[\\/]*)
14786  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14787  ;;
14788  *)
14789  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14790for as_dir in $PATH
14791do
14792  IFS=$as_save_IFS
14793  test -z "$as_dir" && as_dir=.
14794    for ac_exec_ext in '' $ac_executable_extensions; do
14795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14796    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14798    break 2
14799  fi
14800done
14801  done
14802IFS=$as_save_IFS
14803
14804  ;;
14805esac
14806fi
14807DF=$ac_cv_path_DF
14808if test -n "$DF"; then
14809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14810$as_echo "$DF" >&6; }
14811else
14812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14813$as_echo "no" >&6; }
14814fi
14815
14816
14817  test -n "$DF" && break
14818done
14819
14820  else
14821    # The variable is set, but is it from the command line or the environment?
14822
14823    # Try to remove the string !DF! from our list.
14824    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14825    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14826      # If it failed, the variable was not from the command line. Ignore it,
14827      # but warn the user (except for BASH, which is always set by the calling BASH).
14828      if test "xDF" != xBASH; then
14829        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14830$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14831      fi
14832      # Try to locate tool using the code snippet
14833      for ac_prog in df
14834do
14835  # Extract the first word of "$ac_prog", so it can be a program name with args.
14836set dummy $ac_prog; ac_word=$2
14837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14838$as_echo_n "checking for $ac_word... " >&6; }
14839if ${ac_cv_path_DF+:} false; then :
14840  $as_echo_n "(cached) " >&6
14841else
14842  case $DF in
14843  [\\/]* | ?:[\\/]*)
14844  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14845  ;;
14846  *)
14847  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14848for as_dir in $PATH
14849do
14850  IFS=$as_save_IFS
14851  test -z "$as_dir" && as_dir=.
14852    for ac_exec_ext in '' $ac_executable_extensions; do
14853  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14854    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14856    break 2
14857  fi
14858done
14859  done
14860IFS=$as_save_IFS
14861
14862  ;;
14863esac
14864fi
14865DF=$ac_cv_path_DF
14866if test -n "$DF"; then
14867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14868$as_echo "$DF" >&6; }
14869else
14870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14871$as_echo "no" >&6; }
14872fi
14873
14874
14875  test -n "$DF" && break
14876done
14877
14878    else
14879      # If it succeeded, then it was overridden by the user. We will use it
14880      # for the tool.
14881
14882      # First remove it from the list of overridden variables, so we can test
14883      # for unknown variables in the end.
14884      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14885
14886      # Check if we try to supply an empty value
14887      if test "x$DF" = x; then
14888        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14889$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14890        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14891$as_echo_n "checking for DF... " >&6; }
14892        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14893$as_echo "disabled" >&6; }
14894      else
14895        # Check if the provided tool contains a complete path.
14896        tool_specified="$DF"
14897        tool_basename="${tool_specified##*/}"
14898        if test "x$tool_basename" = "x$tool_specified"; then
14899          # A command without a complete path is provided, search $PATH.
14900          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14901$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14902          # Extract the first word of "$tool_basename", so it can be a program name with args.
14903set dummy $tool_basename; ac_word=$2
14904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14905$as_echo_n "checking for $ac_word... " >&6; }
14906if ${ac_cv_path_DF+:} false; then :
14907  $as_echo_n "(cached) " >&6
14908else
14909  case $DF in
14910  [\\/]* | ?:[\\/]*)
14911  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14912  ;;
14913  *)
14914  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14915for as_dir in $PATH
14916do
14917  IFS=$as_save_IFS
14918  test -z "$as_dir" && as_dir=.
14919    for ac_exec_ext in '' $ac_executable_extensions; do
14920  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14921    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14923    break 2
14924  fi
14925done
14926  done
14927IFS=$as_save_IFS
14928
14929  ;;
14930esac
14931fi
14932DF=$ac_cv_path_DF
14933if test -n "$DF"; then
14934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14935$as_echo "$DF" >&6; }
14936else
14937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14938$as_echo "no" >&6; }
14939fi
14940
14941
14942          if test "x$DF" = x; then
14943            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14944          fi
14945        else
14946          # Otherwise we believe it is a complete path. Use it as it is.
14947          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14948$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14949          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14950$as_echo_n "checking for DF... " >&6; }
14951          if test ! -x "$tool_specified"; then
14952            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14953$as_echo "not found" >&6; }
14954            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14955          fi
14956          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14957$as_echo "$tool_specified" >&6; }
14958        fi
14959      fi
14960    fi
14961
14962  fi
14963
14964
14965
14966
14967  # Publish this variable in the help.
14968
14969
14970  if [ -z "${CPIO+x}" ]; then
14971    # The variable is not set by user, try to locate tool using the code snippet
14972    for ac_prog in cpio bsdcpio
14973do
14974  # Extract the first word of "$ac_prog", so it can be a program name with args.
14975set dummy $ac_prog; ac_word=$2
14976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14977$as_echo_n "checking for $ac_word... " >&6; }
14978if ${ac_cv_path_CPIO+:} false; then :
14979  $as_echo_n "(cached) " >&6
14980else
14981  case $CPIO in
14982  [\\/]* | ?:[\\/]*)
14983  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14984  ;;
14985  *)
14986  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14987for as_dir in $PATH
14988do
14989  IFS=$as_save_IFS
14990  test -z "$as_dir" && as_dir=.
14991    for ac_exec_ext in '' $ac_executable_extensions; do
14992  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14993    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14995    break 2
14996  fi
14997done
14998  done
14999IFS=$as_save_IFS
15000
15001  ;;
15002esac
15003fi
15004CPIO=$ac_cv_path_CPIO
15005if test -n "$CPIO"; then
15006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15007$as_echo "$CPIO" >&6; }
15008else
15009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15010$as_echo "no" >&6; }
15011fi
15012
15013
15014  test -n "$CPIO" && break
15015done
15016
15017  else
15018    # The variable is set, but is it from the command line or the environment?
15019
15020    # Try to remove the string !CPIO! from our list.
15021    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
15022    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15023      # If it failed, the variable was not from the command line. Ignore it,
15024      # but warn the user (except for BASH, which is always set by the calling BASH).
15025      if test "xCPIO" != xBASH; then
15026        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
15027$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
15028      fi
15029      # Try to locate tool using the code snippet
15030      for ac_prog in cpio bsdcpio
15031do
15032  # Extract the first word of "$ac_prog", so it can be a program name with args.
15033set dummy $ac_prog; ac_word=$2
15034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15035$as_echo_n "checking for $ac_word... " >&6; }
15036if ${ac_cv_path_CPIO+:} false; then :
15037  $as_echo_n "(cached) " >&6
15038else
15039  case $CPIO in
15040  [\\/]* | ?:[\\/]*)
15041  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15042  ;;
15043  *)
15044  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15045for as_dir in $PATH
15046do
15047  IFS=$as_save_IFS
15048  test -z "$as_dir" && as_dir=.
15049    for ac_exec_ext in '' $ac_executable_extensions; do
15050  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15051    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15053    break 2
15054  fi
15055done
15056  done
15057IFS=$as_save_IFS
15058
15059  ;;
15060esac
15061fi
15062CPIO=$ac_cv_path_CPIO
15063if test -n "$CPIO"; then
15064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15065$as_echo "$CPIO" >&6; }
15066else
15067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15068$as_echo "no" >&6; }
15069fi
15070
15071
15072  test -n "$CPIO" && break
15073done
15074
15075    else
15076      # If it succeeded, then it was overridden by the user. We will use it
15077      # for the tool.
15078
15079      # First remove it from the list of overridden variables, so we can test
15080      # for unknown variables in the end.
15081      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15082
15083      # Check if we try to supply an empty value
15084      if test "x$CPIO" = x; then
15085        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15086$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15087        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15088$as_echo_n "checking for CPIO... " >&6; }
15089        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15090$as_echo "disabled" >&6; }
15091      else
15092        # Check if the provided tool contains a complete path.
15093        tool_specified="$CPIO"
15094        tool_basename="${tool_specified##*/}"
15095        if test "x$tool_basename" = "x$tool_specified"; then
15096          # A command without a complete path is provided, search $PATH.
15097          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15098$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15099          # Extract the first word of "$tool_basename", so it can be a program name with args.
15100set dummy $tool_basename; ac_word=$2
15101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15102$as_echo_n "checking for $ac_word... " >&6; }
15103if ${ac_cv_path_CPIO+:} false; then :
15104  $as_echo_n "(cached) " >&6
15105else
15106  case $CPIO in
15107  [\\/]* | ?:[\\/]*)
15108  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15109  ;;
15110  *)
15111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15112for as_dir in $PATH
15113do
15114  IFS=$as_save_IFS
15115  test -z "$as_dir" && as_dir=.
15116    for ac_exec_ext in '' $ac_executable_extensions; do
15117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15118    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15120    break 2
15121  fi
15122done
15123  done
15124IFS=$as_save_IFS
15125
15126  ;;
15127esac
15128fi
15129CPIO=$ac_cv_path_CPIO
15130if test -n "$CPIO"; then
15131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15132$as_echo "$CPIO" >&6; }
15133else
15134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15135$as_echo "no" >&6; }
15136fi
15137
15138
15139          if test "x$CPIO" = x; then
15140            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15141          fi
15142        else
15143          # Otherwise we believe it is a complete path. Use it as it is.
15144          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15145$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15146          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15147$as_echo_n "checking for CPIO... " >&6; }
15148          if test ! -x "$tool_specified"; then
15149            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15150$as_echo "not found" >&6; }
15151            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15152          fi
15153          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15154$as_echo "$tool_specified" >&6; }
15155        fi
15156      fi
15157    fi
15158
15159  fi
15160
15161
15162
15163
15164  # Publish this variable in the help.
15165
15166
15167  if [ -z "${NICE+x}" ]; then
15168    # The variable is not set by user, try to locate tool using the code snippet
15169    for ac_prog in nice
15170do
15171  # Extract the first word of "$ac_prog", so it can be a program name with args.
15172set dummy $ac_prog; ac_word=$2
15173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15174$as_echo_n "checking for $ac_word... " >&6; }
15175if ${ac_cv_path_NICE+:} false; then :
15176  $as_echo_n "(cached) " >&6
15177else
15178  case $NICE in
15179  [\\/]* | ?:[\\/]*)
15180  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15181  ;;
15182  *)
15183  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15184for as_dir in $PATH
15185do
15186  IFS=$as_save_IFS
15187  test -z "$as_dir" && as_dir=.
15188    for ac_exec_ext in '' $ac_executable_extensions; do
15189  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15190    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15192    break 2
15193  fi
15194done
15195  done
15196IFS=$as_save_IFS
15197
15198  ;;
15199esac
15200fi
15201NICE=$ac_cv_path_NICE
15202if test -n "$NICE"; then
15203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15204$as_echo "$NICE" >&6; }
15205else
15206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15207$as_echo "no" >&6; }
15208fi
15209
15210
15211  test -n "$NICE" && break
15212done
15213
15214  else
15215    # The variable is set, but is it from the command line or the environment?
15216
15217    # Try to remove the string !NICE! from our list.
15218    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15219    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15220      # If it failed, the variable was not from the command line. Ignore it,
15221      # but warn the user (except for BASH, which is always set by the calling BASH).
15222      if test "xNICE" != xBASH; then
15223        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15224$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15225      fi
15226      # Try to locate tool using the code snippet
15227      for ac_prog in nice
15228do
15229  # Extract the first word of "$ac_prog", so it can be a program name with args.
15230set dummy $ac_prog; ac_word=$2
15231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15232$as_echo_n "checking for $ac_word... " >&6; }
15233if ${ac_cv_path_NICE+:} false; then :
15234  $as_echo_n "(cached) " >&6
15235else
15236  case $NICE in
15237  [\\/]* | ?:[\\/]*)
15238  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15239  ;;
15240  *)
15241  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15242for as_dir in $PATH
15243do
15244  IFS=$as_save_IFS
15245  test -z "$as_dir" && as_dir=.
15246    for ac_exec_ext in '' $ac_executable_extensions; do
15247  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15248    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15249    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15250    break 2
15251  fi
15252done
15253  done
15254IFS=$as_save_IFS
15255
15256  ;;
15257esac
15258fi
15259NICE=$ac_cv_path_NICE
15260if test -n "$NICE"; then
15261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15262$as_echo "$NICE" >&6; }
15263else
15264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15265$as_echo "no" >&6; }
15266fi
15267
15268
15269  test -n "$NICE" && break
15270done
15271
15272    else
15273      # If it succeeded, then it was overridden by the user. We will use it
15274      # for the tool.
15275
15276      # First remove it from the list of overridden variables, so we can test
15277      # for unknown variables in the end.
15278      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15279
15280      # Check if we try to supply an empty value
15281      if test "x$NICE" = x; then
15282        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15283$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15284        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15285$as_echo_n "checking for NICE... " >&6; }
15286        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15287$as_echo "disabled" >&6; }
15288      else
15289        # Check if the provided tool contains a complete path.
15290        tool_specified="$NICE"
15291        tool_basename="${tool_specified##*/}"
15292        if test "x$tool_basename" = "x$tool_specified"; then
15293          # A command without a complete path is provided, search $PATH.
15294          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15295$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15296          # Extract the first word of "$tool_basename", so it can be a program name with args.
15297set dummy $tool_basename; ac_word=$2
15298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15299$as_echo_n "checking for $ac_word... " >&6; }
15300if ${ac_cv_path_NICE+:} false; then :
15301  $as_echo_n "(cached) " >&6
15302else
15303  case $NICE in
15304  [\\/]* | ?:[\\/]*)
15305  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15306  ;;
15307  *)
15308  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15309for as_dir in $PATH
15310do
15311  IFS=$as_save_IFS
15312  test -z "$as_dir" && as_dir=.
15313    for ac_exec_ext in '' $ac_executable_extensions; do
15314  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15315    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15316    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15317    break 2
15318  fi
15319done
15320  done
15321IFS=$as_save_IFS
15322
15323  ;;
15324esac
15325fi
15326NICE=$ac_cv_path_NICE
15327if test -n "$NICE"; then
15328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15329$as_echo "$NICE" >&6; }
15330else
15331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15332$as_echo "no" >&6; }
15333fi
15334
15335
15336          if test "x$NICE" = x; then
15337            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15338          fi
15339        else
15340          # Otherwise we believe it is a complete path. Use it as it is.
15341          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15342$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15343          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15344$as_echo_n "checking for NICE... " >&6; }
15345          if test ! -x "$tool_specified"; then
15346            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15347$as_echo "not found" >&6; }
15348            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15349          fi
15350          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15351$as_echo "$tool_specified" >&6; }
15352        fi
15353      fi
15354    fi
15355
15356  fi
15357
15358
15359
15360
15361# Now we can determine OpenJDK build and target platforms. This is required to
15362# have early on.
15363# Make sure we can run config.sub.
15364$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15365  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15366
15367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15368$as_echo_n "checking build system type... " >&6; }
15369if ${ac_cv_build+:} false; then :
15370  $as_echo_n "(cached) " >&6
15371else
15372  ac_build_alias=$build_alias
15373test "x$ac_build_alias" = x &&
15374  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15375test "x$ac_build_alias" = x &&
15376  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15377ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15378  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15379
15380fi
15381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15382$as_echo "$ac_cv_build" >&6; }
15383case $ac_cv_build in
15384*-*-*) ;;
15385*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15386esac
15387build=$ac_cv_build
15388ac_save_IFS=$IFS; IFS='-'
15389set x $ac_cv_build
15390shift
15391build_cpu=$1
15392build_vendor=$2
15393shift; shift
15394# Remember, the first character of IFS is used to create $*,
15395# except with old shells:
15396build_os=$*
15397IFS=$ac_save_IFS
15398case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15399
15400
15401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15402$as_echo_n "checking host system type... " >&6; }
15403if ${ac_cv_host+:} false; then :
15404  $as_echo_n "(cached) " >&6
15405else
15406  if test "x$host_alias" = x; then
15407  ac_cv_host=$ac_cv_build
15408else
15409  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15410    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15411fi
15412
15413fi
15414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15415$as_echo "$ac_cv_host" >&6; }
15416case $ac_cv_host in
15417*-*-*) ;;
15418*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15419esac
15420host=$ac_cv_host
15421ac_save_IFS=$IFS; IFS='-'
15422set x $ac_cv_host
15423shift
15424host_cpu=$1
15425host_vendor=$2
15426shift; shift
15427# Remember, the first character of IFS is used to create $*,
15428# except with old shells:
15429host_os=$*
15430IFS=$ac_save_IFS
15431case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15432
15433
15434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15435$as_echo_n "checking target system type... " >&6; }
15436if ${ac_cv_target+:} false; then :
15437  $as_echo_n "(cached) " >&6
15438else
15439  if test "x$target_alias" = x; then
15440  ac_cv_target=$ac_cv_host
15441else
15442  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15443    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15444fi
15445
15446fi
15447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15448$as_echo "$ac_cv_target" >&6; }
15449case $ac_cv_target in
15450*-*-*) ;;
15451*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15452esac
15453target=$ac_cv_target
15454ac_save_IFS=$IFS; IFS='-'
15455set x $ac_cv_target
15456shift
15457target_cpu=$1
15458target_vendor=$2
15459shift; shift
15460# Remember, the first character of IFS is used to create $*,
15461# except with old shells:
15462target_os=$*
15463IFS=$ac_save_IFS
15464case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15465
15466
15467# The aliases save the names the user supplied, while $host etc.
15468# will get canonicalized.
15469test -n "$target_alias" &&
15470  test "$program_prefix$program_suffix$program_transform_name" = \
15471    NONENONEs,x,x, &&
15472  program_prefix=${target_alias}-
15473
15474  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15475  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15476  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15477  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15478  # to use the configure naming style.
15479
15480
15481
15482
15483
15484  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15485  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15486  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15487  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15488  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15489  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15490
15491
15492
15493  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15494
15495  case "$build_os" in
15496    *linux*)
15497      VAR_OS=linux
15498      VAR_OS_TYPE=unix
15499      ;;
15500    *solaris*)
15501      VAR_OS=solaris
15502      VAR_OS_TYPE=unix
15503      ;;
15504    *darwin*)
15505      VAR_OS=macosx
15506      VAR_OS_TYPE=unix
15507      ;;
15508    *bsd*)
15509      VAR_OS=bsd
15510      VAR_OS_TYPE=unix
15511      ;;
15512    *cygwin*)
15513      VAR_OS=windows
15514      VAR_OS_ENV=windows.cygwin
15515      ;;
15516    *mingw*)
15517      VAR_OS=windows
15518      VAR_OS_ENV=windows.msys
15519      ;;
15520    *aix*)
15521      VAR_OS=aix
15522      VAR_OS_TYPE=unix
15523      ;;
15524    *)
15525      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15526      ;;
15527  esac
15528
15529
15530  # First argument is the cpu name from the trip/quad
15531  case "$build_cpu" in
15532    x86_64)
15533      VAR_CPU=x86_64
15534      VAR_CPU_ARCH=x86
15535      VAR_CPU_BITS=64
15536      VAR_CPU_ENDIAN=little
15537      ;;
15538    i?86)
15539      VAR_CPU=x86
15540      VAR_CPU_ARCH=x86
15541      VAR_CPU_BITS=32
15542      VAR_CPU_ENDIAN=little
15543      ;;
15544    arm*)
15545      VAR_CPU=arm
15546      VAR_CPU_ARCH=arm
15547      VAR_CPU_BITS=32
15548      VAR_CPU_ENDIAN=little
15549      ;;
15550    aarch64)
15551      VAR_CPU=aarch64
15552      VAR_CPU_ARCH=aarch64
15553      VAR_CPU_BITS=64
15554      VAR_CPU_ENDIAN=little
15555      ;;
15556    powerpc)
15557      VAR_CPU=ppc
15558      VAR_CPU_ARCH=ppc
15559      VAR_CPU_BITS=32
15560      VAR_CPU_ENDIAN=big
15561      ;;
15562    powerpc64)
15563      VAR_CPU=ppc64
15564      VAR_CPU_ARCH=ppc
15565      VAR_CPU_BITS=64
15566      VAR_CPU_ENDIAN=big
15567      ;;
15568    powerpc64le)
15569      VAR_CPU=ppc64le
15570      VAR_CPU_ARCH=ppc
15571      VAR_CPU_BITS=64
15572      VAR_CPU_ENDIAN=little
15573      ;;
15574    s390)
15575      VAR_CPU=s390
15576      VAR_CPU_ARCH=s390
15577      VAR_CPU_BITS=32
15578      VAR_CPU_ENDIAN=big
15579      ;;
15580    s390x)
15581      VAR_CPU=s390x
15582      VAR_CPU_ARCH=s390
15583      VAR_CPU_BITS=64
15584      VAR_CPU_ENDIAN=big
15585      ;;
15586    sparc)
15587      VAR_CPU=sparc
15588      VAR_CPU_ARCH=sparc
15589      VAR_CPU_BITS=32
15590      VAR_CPU_ENDIAN=big
15591      ;;
15592    sparcv9|sparc64)
15593      VAR_CPU=sparcv9
15594      VAR_CPU_ARCH=sparc
15595      VAR_CPU_BITS=64
15596      VAR_CPU_ENDIAN=big
15597      ;;
15598    *)
15599      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15600      ;;
15601  esac
15602
15603  # ..and setup our own variables. (Do this explicitly to facilitate searching)
15604  OPENJDK_BUILD_OS="$VAR_OS"
15605  if test "x$VAR_OS_TYPE" != x; then
15606    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15607  else
15608    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15609  fi
15610  if test "x$VAR_OS_ENV" != x; then
15611    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15612  else
15613    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15614  fi
15615  OPENJDK_BUILD_CPU="$VAR_CPU"
15616  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15617  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15618  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15619
15620
15621
15622
15623
15624
15625
15626
15627  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15628$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15630$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15631
15632  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15633
15634  case "$host_os" in
15635    *linux*)
15636      VAR_OS=linux
15637      VAR_OS_TYPE=unix
15638      ;;
15639    *solaris*)
15640      VAR_OS=solaris
15641      VAR_OS_TYPE=unix
15642      ;;
15643    *darwin*)
15644      VAR_OS=macosx
15645      VAR_OS_TYPE=unix
15646      ;;
15647    *bsd*)
15648      VAR_OS=bsd
15649      VAR_OS_TYPE=unix
15650      ;;
15651    *cygwin*)
15652      VAR_OS=windows
15653      VAR_OS_ENV=windows.cygwin
15654      ;;
15655    *mingw*)
15656      VAR_OS=windows
15657      VAR_OS_ENV=windows.msys
15658      ;;
15659    *aix*)
15660      VAR_OS=aix
15661      VAR_OS_TYPE=unix
15662      ;;
15663    *)
15664      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15665      ;;
15666  esac
15667
15668
15669  # First argument is the cpu name from the trip/quad
15670  case "$host_cpu" in
15671    x86_64)
15672      VAR_CPU=x86_64
15673      VAR_CPU_ARCH=x86
15674      VAR_CPU_BITS=64
15675      VAR_CPU_ENDIAN=little
15676      ;;
15677    i?86)
15678      VAR_CPU=x86
15679      VAR_CPU_ARCH=x86
15680      VAR_CPU_BITS=32
15681      VAR_CPU_ENDIAN=little
15682      ;;
15683    arm*)
15684      VAR_CPU=arm
15685      VAR_CPU_ARCH=arm
15686      VAR_CPU_BITS=32
15687      VAR_CPU_ENDIAN=little
15688      ;;
15689    aarch64)
15690      VAR_CPU=aarch64
15691      VAR_CPU_ARCH=aarch64
15692      VAR_CPU_BITS=64
15693      VAR_CPU_ENDIAN=little
15694      ;;
15695    powerpc)
15696      VAR_CPU=ppc
15697      VAR_CPU_ARCH=ppc
15698      VAR_CPU_BITS=32
15699      VAR_CPU_ENDIAN=big
15700      ;;
15701    powerpc64)
15702      VAR_CPU=ppc64
15703      VAR_CPU_ARCH=ppc
15704      VAR_CPU_BITS=64
15705      VAR_CPU_ENDIAN=big
15706      ;;
15707    powerpc64le)
15708      VAR_CPU=ppc64le
15709      VAR_CPU_ARCH=ppc
15710      VAR_CPU_BITS=64
15711      VAR_CPU_ENDIAN=little
15712      ;;
15713    s390)
15714      VAR_CPU=s390
15715      VAR_CPU_ARCH=s390
15716      VAR_CPU_BITS=32
15717      VAR_CPU_ENDIAN=big
15718      ;;
15719    s390x)
15720      VAR_CPU=s390x
15721      VAR_CPU_ARCH=s390
15722      VAR_CPU_BITS=64
15723      VAR_CPU_ENDIAN=big
15724      ;;
15725    sparc)
15726      VAR_CPU=sparc
15727      VAR_CPU_ARCH=sparc
15728      VAR_CPU_BITS=32
15729      VAR_CPU_ENDIAN=big
15730      ;;
15731    sparcv9|sparc64)
15732      VAR_CPU=sparcv9
15733      VAR_CPU_ARCH=sparc
15734      VAR_CPU_BITS=64
15735      VAR_CPU_ENDIAN=big
15736      ;;
15737    *)
15738      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15739      ;;
15740  esac
15741
15742  # ... and setup our own variables. (Do this explicitly to facilitate searching)
15743  OPENJDK_TARGET_OS="$VAR_OS"
15744  if test "x$VAR_OS_TYPE" != x; then
15745    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15746  else
15747    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15748  fi
15749  if test "x$VAR_OS_ENV" != x; then
15750    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15751  else
15752    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15753  fi
15754  OPENJDK_TARGET_CPU="$VAR_CPU"
15755  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15756  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15757  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15758
15759
15760
15761
15762
15763
15764
15765
15766  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15767$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15769$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15770
15771
15772
15773# Check whether --with-target-bits was given.
15774if test "${with_target_bits+set}" = set; then :
15775  withval=$with_target_bits;
15776fi
15777
15778
15779  # We have three types of compiles:
15780  # native  == normal compilation, target system == build system
15781  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15782  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15783  #
15784  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15785    # We're doing a proper cross-compilation
15786    COMPILE_TYPE="cross"
15787  else
15788    COMPILE_TYPE="native"
15789  fi
15790
15791  if test "x$with_target_bits" != x; then
15792    if test "x$COMPILE_TYPE" = "xcross"; then
15793      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15794    fi
15795
15796    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15797      # A reduced build is requested
15798      COMPILE_TYPE="reduced"
15799      OPENJDK_TARGET_CPU_BITS=32
15800      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15801        OPENJDK_TARGET_CPU=x86
15802      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15803        OPENJDK_TARGET_CPU=sparc
15804      else
15805        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15806      fi
15807    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15808      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
15809    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15810      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15811$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15812    else
15813      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15814    fi
15815  fi
15816
15817
15818  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15819$as_echo_n "checking compilation type... " >&6; }
15820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15821$as_echo "$COMPILE_TYPE" >&6; }
15822
15823
15824  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15825    REQUIRED_OS_NAME=SunOS
15826    REQUIRED_OS_VERSION=5.10
15827  fi
15828  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15829    REQUIRED_OS_NAME=Linux
15830    REQUIRED_OS_VERSION=2.6
15831  fi
15832  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15833    REQUIRED_OS_NAME=Windows
15834    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15835      REQUIRED_OS_VERSION=5.2
15836    else
15837      REQUIRED_OS_VERSION=5.1
15838    fi
15839  fi
15840  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15841    REQUIRED_OS_NAME=Darwin
15842    REQUIRED_OS_VERSION=11.2
15843  fi
15844  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15845    REQUIRED_OS_NAME=AIX
15846    REQUIRED_OS_VERSION=7.1
15847  fi
15848
15849
15850
15851
15852
15853
15854  # Also store the legacy naming of the cpu.
15855  # Ie i586 and amd64 instead of x86 and x86_64
15856  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15857  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15858    OPENJDK_TARGET_CPU_LEGACY="i586"
15859  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15860    # On all platforms except MacOSX replace x86_64 with amd64.
15861    OPENJDK_TARGET_CPU_LEGACY="amd64"
15862  fi
15863
15864
15865  # And the second legacy naming of the cpu.
15866  # Ie i386 and amd64 instead of x86 and x86_64.
15867  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15868  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15869    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15870  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15871    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15872  fi
15873
15874
15875  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15876  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15877  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15878  OPENJDK_TARGET_CPU_ISADIR=""
15879  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15880    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15881      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15882    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15883      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15884    fi
15885  fi
15886
15887
15888  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15889  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15890  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15891    # On linux only, we replace x86 with i386.
15892    OPENJDK_TARGET_CPU_OSARCH="i386"
15893  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15894    # On all platforms except macosx, we replace x86_64 with amd64.
15895    OPENJDK_TARGET_CPU_OSARCH="amd64"
15896  fi
15897
15898
15899  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15900  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15901    OPENJDK_TARGET_CPU_JLI="i386"
15902  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15903    # On all platforms except macosx, we replace x86_64 with amd64.
15904    OPENJDK_TARGET_CPU_JLI="amd64"
15905  fi
15906
15907  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15908      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15909  else
15910      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15911  fi
15912
15913
15914  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
15915  # Macosx is osx and x86_64 is x64
15916  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15917    OPENJDK_TARGET_OS_BUNDLE="osx"
15918  else
15919    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
15920  fi
15921  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15922    OPENJDK_TARGET_CPU_BUNDLE="x64"
15923  else
15924    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
15925  fi
15926  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
15927
15928
15929  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15930    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15931    # unpack200.exe. This variable is used in
15932    # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
15933    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15934      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15935    fi
15936  fi
15937
15938  if test "x$COMPILE_TYPE" = "xcross"; then
15939    # FIXME: ... or should this include reduced builds..?
15940    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15941  else
15942    DEFINE_CROSS_COMPILE_ARCH=""
15943  fi
15944
15945
15946  # Convert openjdk platform names to hotspot names
15947
15948  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15949  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15950    HOTSPOT_TARGET_OS=bsd
15951  fi
15952
15953
15954  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15955  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15956    HOTSPOT_TARGET_OS_TYPE=posix
15957  fi
15958
15959
15960  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15961  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15962    HOTSPOT_TARGET_CPU=x86_32
15963  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15964    HOTSPOT_TARGET_CPU=sparc
15965  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15966    HOTSPOT_TARGET_CPU=ppc_64
15967  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15968    HOTSPOT_TARGET_CPU=ppc_64
15969  fi
15970
15971
15972  # This is identical with OPENJDK_*, but define anyway for consistency.
15973  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15974
15975
15976  # Setup HOTSPOT_TARGET_CPU_DEFINE
15977  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15978    HOTSPOT_TARGET_CPU_DEFINE=IA32
15979  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15980    HOTSPOT_TARGET_CPU_DEFINE=AMD64
15981  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15982    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15983  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15984    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15985  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15986    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15987  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15988    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15989
15990  # The cpu defines below are for zero, we don't support them directly.
15991  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
15992    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15993  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
15994    HOTSPOT_TARGET_CPU_DEFINE=PPC32
15995  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
15996    HOTSPOT_TARGET_CPU_DEFINE=S390
15997  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
15998    HOTSPOT_TARGET_CPU_DEFINE=S390
15999  elif test "x$OPENJDK_TARGET_CPU" != x; then
16000    HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
16001  fi
16002
16003
16004
16005
16006  # Also store the legacy naming of the cpu.
16007  # Ie i586 and amd64 instead of x86 and x86_64
16008  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
16009  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16010    OPENJDK_BUILD_CPU_LEGACY="i586"
16011  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16012    # On all platforms except MacOSX replace x86_64 with amd64.
16013    OPENJDK_BUILD_CPU_LEGACY="amd64"
16014  fi
16015
16016
16017  # And the second legacy naming of the cpu.
16018  # Ie i386 and amd64 instead of x86 and x86_64.
16019  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
16020  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16021    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
16022  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16023    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
16024  fi
16025
16026
16027  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16028  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16029  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
16030  OPENJDK_BUILD_CPU_ISADIR=""
16031  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16032    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16033      OPENJDK_BUILD_CPU_ISADIR="/amd64"
16034    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16035      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
16036    fi
16037  fi
16038
16039
16040  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
16041  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
16042  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
16043    # On linux only, we replace x86 with i386.
16044    OPENJDK_BUILD_CPU_OSARCH="i386"
16045  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16046    # On all platforms except macosx, we replace x86_64 with amd64.
16047    OPENJDK_BUILD_CPU_OSARCH="amd64"
16048  fi
16049
16050
16051  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16052  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16053    OPENJDK_BUILD_CPU_JLI="i386"
16054  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16055    # On all platforms except macosx, we replace x86_64 with amd64.
16056    OPENJDK_BUILD_CPU_JLI="amd64"
16057  fi
16058
16059  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16060      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16061  else
16062      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16063  fi
16064
16065
16066  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16067  # Macosx is osx and x86_64 is x64
16068  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16069    OPENJDK_BUILD_OS_BUNDLE="osx"
16070  else
16071    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16072  fi
16073  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16074    OPENJDK_BUILD_CPU_BUNDLE="x64"
16075  else
16076    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16077  fi
16078  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16079
16080
16081  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16082    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16083    # unpack200.exe. This variable is used in
16084    # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16085    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16086      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16087    fi
16088  fi
16089
16090  if test "x$COMPILE_TYPE" = "xcross"; then
16091    # FIXME: ... or should this include reduced builds..?
16092    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16093  else
16094    DEFINE_CROSS_COMPILE_ARCH=""
16095  fi
16096
16097
16098  # Convert openjdk platform names to hotspot names
16099
16100  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16101  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16102    HOTSPOT_BUILD_OS=bsd
16103  fi
16104
16105
16106  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16107  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16108    HOTSPOT_BUILD_OS_TYPE=posix
16109  fi
16110
16111
16112  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16113  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16114    HOTSPOT_BUILD_CPU=x86_32
16115  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16116    HOTSPOT_BUILD_CPU=sparc
16117  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16118    HOTSPOT_BUILD_CPU=ppc_64
16119  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16120    HOTSPOT_BUILD_CPU=ppc_64
16121  fi
16122
16123
16124  # This is identical with OPENJDK_*, but define anyway for consistency.
16125  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16126
16127
16128  # Setup HOTSPOT_BUILD_CPU_DEFINE
16129  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16130    HOTSPOT_BUILD_CPU_DEFINE=IA32
16131  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16132    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16133  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16134    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16135  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16136    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16137  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16138    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16139  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16140    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16141
16142  # The cpu defines below are for zero, we don't support them directly.
16143  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16144    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16145  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16146    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16147  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16148    HOTSPOT_BUILD_CPU_DEFINE=S390
16149  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16150    HOTSPOT_BUILD_CPU_DEFINE=S390
16151  elif test "x$OPENJDK_BUILD_CPU" != x; then
16152    HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16153  fi
16154
16155
16156
16157
16158
16159
16160# Continue setting up basic stuff. Most remaining code require fundamental tools.
16161
16162  # Save the current directory this script was started from
16163  CURDIR="$PWD"
16164
16165  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16166  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16167  # was not available at that time.
16168  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16169  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16170    ORIGINAL_PATH="$REWRITTEN_PATH"
16171    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16172$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16173  fi
16174
16175  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16176    PATH_SEP=";"
16177
16178  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16179  if test $SRC_ROOT_LENGTH -gt 100; then
16180    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16181  fi
16182
16183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16184    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16185$as_echo_n "checking cygwin release... " >&6; }
16186    CYGWIN_VERSION=`$UNAME -r`
16187    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16188$as_echo "$CYGWIN_VERSION" >&6; }
16189    WINDOWS_ENV_VENDOR='cygwin'
16190    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16191
16192    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16193    if test "x$CYGWIN_VERSION_OLD" != x; then
16194      { $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
16195$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;}
16196      as_fn_error $? "Cannot continue" "$LINENO" 5
16197    fi
16198    if test "x$CYGPATH" = x; then
16199      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16200    fi
16201    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16202$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16203    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16204    cygwin_winpath_root=`cd / ; cmd /c cd | $GREP ".*"`
16205    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16206    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16207    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16208$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16209    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16210    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16211    if test "x$test_cygdrive_prefix" = x; then
16212      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16213    fi
16214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16215    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16216$as_echo_n "checking msys release... " >&6; }
16217    MSYS_VERSION=`$UNAME -r`
16218    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16219$as_echo "$MSYS_VERSION" >&6; }
16220
16221    WINDOWS_ENV_VENDOR='msys'
16222    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16223
16224    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16225$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16226    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16227    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16228
16229  windows_path="$MSYS_ROOT_PATH"
16230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16231    unix_path=`$CYGPATH -u "$windows_path"`
16232    MSYS_ROOT_PATH="$unix_path"
16233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16234    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16235    MSYS_ROOT_PATH="$unix_path"
16236  fi
16237
16238    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16239$as_echo "$MSYS_ROOT_PATH" >&6; }
16240    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16241  else
16242    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16243  fi
16244
16245  # Test if windows or unix (cygwin/msys) find is first in path.
16246  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16247$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16248  FIND_BINARY_OUTPUT=`find --version 2>&1`
16249  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16250    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16251$as_echo "unix style" >&6; }
16252  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16253    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16254$as_echo "Windows" >&6; }
16255    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16256$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16257    { $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
16258$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16259    as_fn_error $? "Cannot continue" "$LINENO" 5
16260  else
16261    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16262$as_echo "unknown" >&6; }
16263    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16264$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16265  fi
16266
16267  else
16268    PATH_SEP=":"
16269  fi
16270
16271
16272  # We get the top-level directory from the supporting wrappers.
16273  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16274$as_echo_n "checking for top-level directory... " >&6; }
16275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16276$as_echo "$TOPDIR" >&6; }
16277
16278
16279  # Save the original version of TOPDIR for string comparisons
16280  ORIGINAL_TOPDIR="$TOPDIR"
16281
16282
16283  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16284
16285  # Only process if variable expands to non-empty
16286
16287  if test "x$CURDIR" != x; then
16288    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16289
16290  # Input might be given as Windows format, start by converting to
16291  # unix format.
16292  path="$CURDIR"
16293  new_path=`$CYGPATH -u "$path"`
16294
16295  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16296  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16297  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16298  # "foo.exe" is OK but "foo" is an error.
16299  #
16300  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16301  # It is also a way to make sure we got the proper file name for the real test later on.
16302  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16303  if test "x$test_shortpath" = x; then
16304    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16305$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16306    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16307  fi
16308
16309  # Call helper function which possibly converts this using DOS-style short mode.
16310  # If so, the updated path is stored in $new_path.
16311
16312  input_path="$new_path"
16313  # Check if we need to convert this using DOS-style short mode. If the path
16314  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16315  # take no chances and rewrite it.
16316  # Note: m4 eats our [], so we need to use [ and ] instead.
16317  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16318  if test "x$has_forbidden_chars" != x; then
16319    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16320    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16321    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16322    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16323      # Going to short mode and back again did indeed matter. Since short mode is
16324      # case insensitive, let's make it lowercase to improve readability.
16325      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16326      # Now convert it back to Unix-style (cygpath)
16327      input_path=`$CYGPATH -u "$shortmode_path"`
16328      new_path="$input_path"
16329    fi
16330  fi
16331
16332  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16333  if test "x$test_cygdrive_prefix" = x; then
16334    # As a simple fix, exclude /usr/bin since it's not a real path.
16335    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16336      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16337      # a path prefixed by /cygdrive for fixpath to work.
16338      new_path="$CYGWIN_ROOT_PATH$input_path"
16339    fi
16340  fi
16341
16342
16343  if test "x$path" != "x$new_path"; then
16344    CURDIR="$new_path"
16345    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16346$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16347  fi
16348
16349    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16350
16351  path="$CURDIR"
16352  has_colon=`$ECHO $path | $GREP ^.:`
16353  new_path="$path"
16354  if test "x$has_colon" = x; then
16355    # Not in mixed or Windows style, start by that.
16356    new_path=`cmd //c echo $path`
16357  fi
16358
16359
16360  input_path="$new_path"
16361  # Check if we need to convert this using DOS-style short mode. If the path
16362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16363  # take no chances and rewrite it.
16364  # Note: m4 eats our [], so we need to use [ and ] instead.
16365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16366  if test "x$has_forbidden_chars" != x; then
16367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16368    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16369  fi
16370
16371
16372  windows_path="$new_path"
16373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16374    unix_path=`$CYGPATH -u "$windows_path"`
16375    new_path="$unix_path"
16376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16378    new_path="$unix_path"
16379  fi
16380
16381  if test "x$path" != "x$new_path"; then
16382    CURDIR="$new_path"
16383    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16384$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16385  fi
16386
16387  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16388  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16389
16390    else
16391      # We're on a unix platform. Hooray! :)
16392      path="$CURDIR"
16393      has_space=`$ECHO "$path" | $GREP " "`
16394      if test "x$has_space" != x; then
16395        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16396$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16397        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16398      fi
16399
16400      # Use eval to expand a potential ~
16401      eval path="$path"
16402      if test ! -f "$path" && test ! -d "$path"; then
16403        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16404      fi
16405
16406      if test -d "$path"; then
16407        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16408      else
16409        dir="`$DIRNAME "$path"`"
16410        base="`$BASENAME "$path"`"
16411        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16412      fi
16413    fi
16414  fi
16415
16416
16417  # Only process if variable expands to non-empty
16418
16419  if test "x$TOPDIR" != x; then
16420    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16421
16422  # Input might be given as Windows format, start by converting to
16423  # unix format.
16424  path="$TOPDIR"
16425  new_path=`$CYGPATH -u "$path"`
16426
16427  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16428  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16429  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16430  # "foo.exe" is OK but "foo" is an error.
16431  #
16432  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16433  # It is also a way to make sure we got the proper file name for the real test later on.
16434  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16435  if test "x$test_shortpath" = x; then
16436    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16437$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16438    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16439  fi
16440
16441  # Call helper function which possibly converts this using DOS-style short mode.
16442  # If so, the updated path is stored in $new_path.
16443
16444  input_path="$new_path"
16445  # Check if we need to convert this using DOS-style short mode. If the path
16446  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16447  # take no chances and rewrite it.
16448  # Note: m4 eats our [], so we need to use [ and ] instead.
16449  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16450  if test "x$has_forbidden_chars" != x; then
16451    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16452    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16453    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16454    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16455      # Going to short mode and back again did indeed matter. Since short mode is
16456      # case insensitive, let's make it lowercase to improve readability.
16457      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16458      # Now convert it back to Unix-style (cygpath)
16459      input_path=`$CYGPATH -u "$shortmode_path"`
16460      new_path="$input_path"
16461    fi
16462  fi
16463
16464  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16465  if test "x$test_cygdrive_prefix" = x; then
16466    # As a simple fix, exclude /usr/bin since it's not a real path.
16467    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16468      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16469      # a path prefixed by /cygdrive for fixpath to work.
16470      new_path="$CYGWIN_ROOT_PATH$input_path"
16471    fi
16472  fi
16473
16474
16475  if test "x$path" != "x$new_path"; then
16476    TOPDIR="$new_path"
16477    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16478$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16479  fi
16480
16481    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16482
16483  path="$TOPDIR"
16484  has_colon=`$ECHO $path | $GREP ^.:`
16485  new_path="$path"
16486  if test "x$has_colon" = x; then
16487    # Not in mixed or Windows style, start by that.
16488    new_path=`cmd //c echo $path`
16489  fi
16490
16491
16492  input_path="$new_path"
16493  # Check if we need to convert this using DOS-style short mode. If the path
16494  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16495  # take no chances and rewrite it.
16496  # Note: m4 eats our [], so we need to use [ and ] instead.
16497  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16498  if test "x$has_forbidden_chars" != x; then
16499    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16500    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16501  fi
16502
16503
16504  windows_path="$new_path"
16505  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16506    unix_path=`$CYGPATH -u "$windows_path"`
16507    new_path="$unix_path"
16508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16509    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16510    new_path="$unix_path"
16511  fi
16512
16513  if test "x$path" != "x$new_path"; then
16514    TOPDIR="$new_path"
16515    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16516$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16517  fi
16518
16519  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16520  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16521
16522    else
16523      # We're on a unix platform. Hooray! :)
16524      path="$TOPDIR"
16525      has_space=`$ECHO "$path" | $GREP " "`
16526      if test "x$has_space" != x; then
16527        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16528$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16529        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16530      fi
16531
16532      # Use eval to expand a potential ~
16533      eval path="$path"
16534      if test ! -f "$path" && test ! -d "$path"; then
16535        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16536      fi
16537
16538      if test -d "$path"; then
16539        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16540      else
16541        dir="`$DIRNAME "$path"`"
16542        base="`$BASENAME "$path"`"
16543        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16544      fi
16545    fi
16546  fi
16547
16548  # SRC_ROOT is a traditional alias for TOPDIR.
16549  SRC_ROOT=$TOPDIR
16550
16551  # Calculate a canonical version of TOPDIR for string comparisons
16552  CANONICAL_TOPDIR=$TOPDIR
16553
16554  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16555    # Follow a chain of symbolic links. Use readlink
16556    # where it exists, else fall back to horribly
16557    # complicated shell code.
16558    if test "x$READLINK_TESTED" != yes; then
16559      # On MacOSX there is a readlink tool with a different
16560      # purpose than the GNU readlink tool. Check the found readlink.
16561      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16562      if test "x$ISGNU" = x; then
16563        # A readlink that we do not know how to use.
16564        # Are there other non-GNU readlinks out there?
16565        READLINK_TESTED=yes
16566        READLINK=
16567      fi
16568    fi
16569
16570    if test "x$READLINK" != x; then
16571      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16572    else
16573      # Save the current directory for restoring afterwards
16574      STARTDIR=$PWD
16575      COUNTER=0
16576      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16577      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16578      cd $sym_link_dir
16579      # Use -P flag to resolve symlinks in directories.
16580      cd `$THEPWDCMD -P`
16581      sym_link_dir=`$THEPWDCMD -P`
16582      # Resolve file symlinks
16583      while test $COUNTER -lt 20; do
16584        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16585        if test "x$ISLINK" == x; then
16586          # This is not a symbolic link! We are done!
16587          break
16588        fi
16589        # Again resolve directory symlinks since the target of the just found
16590        # link could be in a different directory
16591        cd `$DIRNAME $ISLINK`
16592        sym_link_dir=`$THEPWDCMD -P`
16593        sym_link_file=`$BASENAME $ISLINK`
16594        let COUNTER=COUNTER+1
16595      done
16596      cd $STARTDIR
16597      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16598    fi
16599  fi
16600
16601
16602
16603  # Locate the directory of this script.
16604  AUTOCONF_DIR=$TOPDIR/common/autoconf
16605
16606  # Setup username (for use in adhoc version strings etc)
16607  # Outer [ ] to quote m4.
16608   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16609
16610
16611
16612# Check if it's a pure open build or if custom sources are to be used.
16613
16614  # Check whether --enable-openjdk-only was given.
16615if test "${enable_openjdk_only+set}" = set; then :
16616  enableval=$enable_openjdk_only;
16617else
16618  enable_openjdk_only="no"
16619fi
16620
16621
16622  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16623$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16625$as_echo "$enable_openjdk_only" >&6; }
16626  if test "x$enable_openjdk_only" = "xyes"; then
16627    SUPPRESS_CUSTOM_EXTENSIONS="true"
16628  elif test "x$enable_openjdk_only" = "xno"; then
16629    SUPPRESS_CUSTOM_EXTENSIONS="false"
16630  else
16631    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16632  fi
16633
16634  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16635  # the IncludeCustomExtension macro.
16636
16637
16638# Check whether --with-custom-make-dir was given.
16639if test "${with_custom_make_dir+set}" = set; then :
16640  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
16641$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16642fi
16643
16644
16645
16646
16647# These are needed to be able to create a configuration name (and thus the output directory)
16648
16649  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16650$as_echo_n "checking which variant of the JDK to build... " >&6; }
16651
16652# Check whether --with-jdk-variant was given.
16653if test "${with_jdk_variant+set}" = set; then :
16654  withval=$with_jdk_variant;
16655fi
16656
16657
16658  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16659    JDK_VARIANT="normal"
16660  else
16661    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16662  fi
16663
16664
16665
16666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16667$as_echo "$JDK_VARIANT" >&6; }
16668
16669
16670  DEBUG_LEVEL="release"
16671  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16672$as_echo_n "checking which debug level to use... " >&6; }
16673  # Check whether --enable-debug was given.
16674if test "${enable_debug+set}" = set; then :
16675  enableval=$enable_debug;
16676        ENABLE_DEBUG="${enableval}"
16677        DEBUG_LEVEL="fastdebug"
16678
16679else
16680  ENABLE_DEBUG="no"
16681fi
16682
16683
16684
16685# Check whether --with-debug-level was given.
16686if test "${with_debug_level+set}" = set; then :
16687  withval=$with_debug_level;
16688        DEBUG_LEVEL="${withval}"
16689        if test "x$ENABLE_DEBUG" = xyes; then
16690          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16691        fi
16692
16693fi
16694
16695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16696$as_echo "$DEBUG_LEVEL" >&6; }
16697
16698  if test "x$DEBUG_LEVEL" != xrelease && \
16699      test "x$DEBUG_LEVEL" != xoptimized && \
16700      test "x$DEBUG_LEVEL" != xfastdebug && \
16701      test "x$DEBUG_LEVEL" != xslowdebug; then
16702    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16703  fi
16704
16705  # Translate DEBUG_LEVEL to debug level used by Hotspot
16706  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16707  if test "x$DEBUG_LEVEL" = xrelease; then
16708    HOTSPOT_DEBUG_LEVEL="product"
16709  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16710    HOTSPOT_DEBUG_LEVEL="debug"
16711  fi
16712
16713  if test "x$DEBUG_LEVEL" = xoptimized; then
16714    # The debug level 'optimized' is a little special because it is currently only
16715    # applicable to the HotSpot build where it means to build a completely
16716    # optimized version of the VM without any debugging code (like for the
16717    # 'release' debug level which is called 'product' in the HotSpot build) but
16718    # with the exception that it can contain additional code which is otherwise
16719    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16720    # test new and/or experimental features which are not intended for customer
16721    # shipment. Because these new features need to be tested and benchmarked in
16722    # real world scenarios, we want to build the containing JDK at the 'release'
16723    # debug level.
16724    DEBUG_LEVEL="release"
16725  fi
16726
16727
16728
16729
16730
16731
16732# Check whether --with-jvm-variants was given.
16733if test "${with_jvm_variants+set}" = set; then :
16734  withval=$with_jvm_variants;
16735fi
16736
16737
16738
16739
16740# Check whether --with-cpu-port was given.
16741if test "${with_cpu_port+set}" = set; then :
16742  withval=$with_cpu_port;
16743fi
16744
16745
16746  if test "x$with_cpu_port" != x; then
16747    if test "x$OPENJDK_TARGET_CPU" != xaarch64; then
16748      as_fn_error $? "--with-cpu-port only available on aarch64" "$LINENO" 5
16749    fi
16750    if test "x$with_cpu_port" != xarm64 && \
16751        test "x$with_cpu_port" != xaarch64; then
16752      as_fn_error $? "--with-cpu-port must specify arm64 or aarch64" "$LINENO" 5
16753    fi
16754    HOTSPOT_TARGET_CPU_PORT="$with_cpu_port"
16755  fi
16756
16757
16758  if test "x$with_jvm_variants" = x; then
16759    with_jvm_variants="server"
16760  fi
16761  JVM_VARIANTS_OPT="$with_jvm_variants"
16762
16763  # Has the user listed more than one variant?
16764  # Additional [] needed to keep m4 from mangling shell constructs.
16765  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16766    BUILDING_MULTIPLE_JVM_VARIANTS=true
16767  else
16768    BUILDING_MULTIPLE_JVM_VARIANTS=false
16769  fi
16770  # Replace the commas with AND for use in the build directory name.
16771  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16772
16773  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16774$as_echo_n "checking which variants of the JVM to build... " >&6; }
16775  # JVM_VARIANTS is a space-separated list.
16776  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16777  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16779$as_echo "$JVM_VARIANTS" >&6; }
16780
16781  # Check that the selected variants are valid
16782
16783  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16784  # Notice that the original variant failes on SLES 10 and 11
16785  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16786  STACK=${JVM_VARIANTS// /$'\n'}
16787  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16788  if test "x$INVALID_VARIANTS" != x; then
16789    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16790$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16791    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16792  fi
16793
16794  # All "special" variants share the same output directory ("server")
16795  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16796  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16797  STACK=${JVM_VARIANTS// /$'\n'}
16798  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16799  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16800    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16801  fi
16802
16803  # The "main" variant is the one used by other libs to link against during the
16804  # build.
16805  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
16806    MAIN_VARIANT_PRIO_ORDER="server client minimal"
16807    for variant in $MAIN_VARIANT_PRIO_ORDER; do
16808      if   [[ " $JVM_VARIANTS " =~ " $variant " ]]  ; then
16809        JVM_VARIANT_MAIN="$variant"
16810        break
16811      fi
16812    done
16813  else
16814    JVM_VARIANT_MAIN="$JVM_VARIANTS"
16815  fi
16816
16817
16818
16819
16820
16821  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16822    # zero behaves as a platform and rewrites these values. This is really weird. :(
16823    # We are guaranteed that we do not build any other variants when building zero.
16824    HOTSPOT_TARGET_CPU=zero
16825    HOTSPOT_TARGET_CPU_ARCH=zero
16826  fi
16827
16828
16829# With basic setup done, call the custom early hook.
16830
16831
16832# Check if we have devkits, extra paths or sysroot set.
16833
16834
16835# Check whether --with-devkit was given.
16836if test "${with_devkit+set}" = set; then :
16837  withval=$with_devkit;
16838
16839  # Only process if variable expands to non-empty
16840
16841  if test "x$with_devkit" != x; then
16842    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16843
16844  # Input might be given as Windows format, start by converting to
16845  # unix format.
16846  path="$with_devkit"
16847  new_path=`$CYGPATH -u "$path"`
16848
16849  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16850  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16851  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16852  # "foo.exe" is OK but "foo" is an error.
16853  #
16854  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16855  # It is also a way to make sure we got the proper file name for the real test later on.
16856  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16857  if test "x$test_shortpath" = x; then
16858    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16859$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16860    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16861  fi
16862
16863  # Call helper function which possibly converts this using DOS-style short mode.
16864  # If so, the updated path is stored in $new_path.
16865
16866  input_path="$new_path"
16867  # Check if we need to convert this using DOS-style short mode. If the path
16868  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16869  # take no chances and rewrite it.
16870  # Note: m4 eats our [], so we need to use [ and ] instead.
16871  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16872  if test "x$has_forbidden_chars" != x; then
16873    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16874    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16875    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16876    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16877      # Going to short mode and back again did indeed matter. Since short mode is
16878      # case insensitive, let's make it lowercase to improve readability.
16879      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16880      # Now convert it back to Unix-style (cygpath)
16881      input_path=`$CYGPATH -u "$shortmode_path"`
16882      new_path="$input_path"
16883    fi
16884  fi
16885
16886  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16887  if test "x$test_cygdrive_prefix" = x; then
16888    # As a simple fix, exclude /usr/bin since it's not a real path.
16889    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16890      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16891      # a path prefixed by /cygdrive for fixpath to work.
16892      new_path="$CYGWIN_ROOT_PATH$input_path"
16893    fi
16894  fi
16895
16896
16897  if test "x$path" != "x$new_path"; then
16898    with_devkit="$new_path"
16899    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16900$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16901  fi
16902
16903    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16904
16905  path="$with_devkit"
16906  has_colon=`$ECHO $path | $GREP ^.:`
16907  new_path="$path"
16908  if test "x$has_colon" = x; then
16909    # Not in mixed or Windows style, start by that.
16910    new_path=`cmd //c echo $path`
16911  fi
16912
16913
16914  input_path="$new_path"
16915  # Check if we need to convert this using DOS-style short mode. If the path
16916  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16917  # take no chances and rewrite it.
16918  # Note: m4 eats our [], so we need to use [ and ] instead.
16919  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16920  if test "x$has_forbidden_chars" != x; then
16921    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16922    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16923  fi
16924
16925
16926  windows_path="$new_path"
16927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16928    unix_path=`$CYGPATH -u "$windows_path"`
16929    new_path="$unix_path"
16930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16932    new_path="$unix_path"
16933  fi
16934
16935  if test "x$path" != "x$new_path"; then
16936    with_devkit="$new_path"
16937    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16938$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16939  fi
16940
16941  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16942  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16943
16944    else
16945      # We're on a unix platform. Hooray! :)
16946      path="$with_devkit"
16947      has_space=`$ECHO "$path" | $GREP " "`
16948      if test "x$has_space" != x; then
16949        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16950$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16951        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16952      fi
16953
16954      # Use eval to expand a potential ~
16955      eval path="$path"
16956      if test ! -f "$path" && test ! -d "$path"; then
16957        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16958      fi
16959
16960      if test -d "$path"; then
16961        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16962      else
16963        dir="`$DIRNAME "$path"`"
16964        base="`$BASENAME "$path"`"
16965        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16966      fi
16967    fi
16968  fi
16969
16970        DEVKIT_ROOT="$with_devkit"
16971        # Check for a meta data info file in the root of the devkit
16972        if test -f "$DEVKIT_ROOT/devkit.info"; then
16973          . $DEVKIT_ROOT/devkit.info
16974          # This potentially sets the following:
16975          # A descriptive name of the devkit
16976
16977  if test "x$DEVKIT_NAME" = x; then
16978    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16979  fi
16980
16981          # Corresponds to --with-extra-path
16982
16983  if test "x$DEVKIT_EXTRA_PATH" = x; then
16984    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16985  fi
16986
16987          # Corresponds to --with-toolchain-path
16988
16989  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16990    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16991  fi
16992
16993          # Corresponds to --with-sysroot
16994
16995  if test "x$DEVKIT_SYSROOT" = x; then
16996    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16997  fi
16998
16999
17000          # Identifies the Visual Studio version in the devkit
17001
17002  if test "x$DEVKIT_VS_VERSION" = x; then
17003    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
17004  fi
17005
17006          # The Visual Studio include environment variable
17007
17008  if test "x$DEVKIT_VS_INCLUDE" = x; then
17009    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
17010  fi
17011
17012          # The Visual Studio lib environment variable
17013
17014  if test "x$DEVKIT_VS_LIB" = x; then
17015    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
17016  fi
17017
17018          # Corresponds to --with-msvcr-dll
17019
17020  if test "x$DEVKIT_MSVCR_DLL" = x; then
17021    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
17022  fi
17023
17024          # Corresponds to --with-msvcp-dll
17025
17026  if test "x$DEVKIT_MSVCP_DLL" = x; then
17027    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
17028  fi
17029
17030        fi
17031
17032        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
17033$as_echo_n "checking for devkit... " >&6; }
17034        if test "x$DEVKIT_NAME" != x; then
17035          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
17036$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
17037        else
17038          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
17039$as_echo "$DEVKIT_ROOT" >&6; }
17040        fi
17041
17042
17043  if test "x$DEVKIT_EXTRA_PATH" != x; then
17044    if test "x$EXTRA_PATH" = x; then
17045      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
17046    else
17047      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
17048    fi
17049  fi
17050
17051
17052        # Fallback default of just /bin if DEVKIT_PATH is not defined
17053        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17054          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
17055        fi
17056
17057  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17058    if test "x$TOOLCHAIN_PATH" = x; then
17059      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17060    else
17061      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17062    fi
17063  fi
17064
17065
17066        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17067        # places for backwards compatiblity.
17068        if test "x$DEVKIT_SYSROOT" != x; then
17069          SYSROOT="$DEVKIT_SYSROOT"
17070        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17071          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17072        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17073          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17074        fi
17075
17076
17077fi
17078
17079
17080  # You can force the sysroot if the sysroot encoded into the compiler tools
17081  # is not correct.
17082
17083# Check whether --with-sys-root was given.
17084if test "${with_sys_root+set}" = set; then :
17085  withval=$with_sys_root; SYSROOT=$with_sys_root
17086
17087fi
17088
17089
17090
17091# Check whether --with-sysroot was given.
17092if test "${with_sysroot+set}" = set; then :
17093  withval=$with_sysroot; SYSROOT=$with_sysroot
17094
17095fi
17096
17097
17098
17099# Check whether --with-tools-dir was given.
17100if test "${with_tools_dir+set}" = set; then :
17101  withval=$with_tools_dir;
17102  if test "x$with_tools_dir" != x; then
17103    if test "x$TOOLCHAIN_PATH" = x; then
17104      TOOLCHAIN_PATH="$with_tools_dir"
17105    else
17106      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17107    fi
17108  fi
17109
17110
17111fi
17112
17113
17114
17115# Check whether --with-toolchain-path was given.
17116if test "${with_toolchain_path+set}" = set; then :
17117  withval=$with_toolchain_path;
17118  if test "x$with_toolchain_path" != x; then
17119    if test "x$TOOLCHAIN_PATH" = x; then
17120      TOOLCHAIN_PATH="$with_toolchain_path"
17121    else
17122      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17123    fi
17124  fi
17125
17126
17127fi
17128
17129
17130
17131# Check whether --with-extra-path was given.
17132if test "${with_extra_path+set}" = set; then :
17133  withval=$with_extra_path;
17134  if test "x$with_extra_path" != x; then
17135    if test "x$EXTRA_PATH" = x; then
17136      EXTRA_PATH="$with_extra_path"
17137    else
17138      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17139    fi
17140  fi
17141
17142
17143fi
17144
17145
17146  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17147    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17148    # If not, detect if Xcode is installed by running xcodebuild -version
17149    # if no Xcode installed, xcodebuild exits with 1
17150    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17151    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17152      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17153      # fall back on the stub binary in /usr/bin/xcodebuild
17154      # Extract the first word of "xcodebuild", so it can be a program name with args.
17155set dummy xcodebuild; ac_word=$2
17156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17157$as_echo_n "checking for $ac_word... " >&6; }
17158if ${ac_cv_path_XCODEBUILD+:} false; then :
17159  $as_echo_n "(cached) " >&6
17160else
17161  case $XCODEBUILD in
17162  [\\/]* | ?:[\\/]*)
17163  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17164  ;;
17165  *)
17166  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17167for as_dir in $TOOLCHAIN_PATH
17168do
17169  IFS=$as_save_IFS
17170  test -z "$as_dir" && as_dir=.
17171    for ac_exec_ext in '' $ac_executable_extensions; do
17172  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17173    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17174    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17175    break 2
17176  fi
17177done
17178  done
17179IFS=$as_save_IFS
17180
17181  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17182  ;;
17183esac
17184fi
17185XCODEBUILD=$ac_cv_path_XCODEBUILD
17186if test -n "$XCODEBUILD"; then
17187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17188$as_echo "$XCODEBUILD" >&6; }
17189else
17190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17191$as_echo "no" >&6; }
17192fi
17193
17194
17195    else
17196      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17197      # when only the command line tools are installed there are no SDKs, so headers
17198      # are copied into the system frameworks
17199      XCODEBUILD=
17200
17201    fi
17202
17203    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17204$as_echo_n "checking for sdk name... " >&6; }
17205
17206# Check whether --with-sdk-name was given.
17207if test "${with_sdk_name+set}" = set; then :
17208  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17209
17210fi
17211
17212    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17213$as_echo "$SDKNAME" >&6; }
17214
17215    # if toolchain path is specified then don't rely on system headers, they may not compile
17216    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17217    test -z "$TOOLCHAIN_PATH" && \
17218      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17219
17220    if test -z "$SYSROOT"; then
17221      if test -n "$XCODEBUILD"; then
17222        # if we don't have system headers, use default SDK name (last resort)
17223        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17224          SDKNAME=${SDKNAME:-macosx}
17225        fi
17226
17227        if test -n "$SDKNAME"; then
17228          # Call xcodebuild to determine SYSROOT
17229          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17230        fi
17231      else
17232        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17233          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
17234        fi
17235      fi
17236    else
17237      # warn user if --with-sdk-name was also set
17238      if test -n "$with_sdk_name"; then
17239        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17240$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17241      fi
17242    fi
17243
17244    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17245      # If no system framework headers, then SYSROOT must be set, or we won't build
17246      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
17247    fi
17248
17249    # Perform a basic sanity test
17250    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17251      if test -z "$SYSROOT"; then
17252        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
17253      else
17254        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17255      fi
17256    fi
17257
17258    # set SDKROOT too, Xcode tools will pick it up
17259    SDKROOT="$SYSROOT"
17260
17261  fi
17262
17263  # Prepend the extra path to the global path
17264
17265  if test "x$EXTRA_PATH" != x; then
17266    if test "x$PATH" = x; then
17267      PATH="$EXTRA_PATH"
17268    else
17269      PATH="$EXTRA_PATH:$PATH"
17270    fi
17271  fi
17272
17273
17274  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17275$as_echo_n "checking for sysroot... " >&6; }
17276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17277$as_echo "$SYSROOT" >&6; }
17278  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17279$as_echo_n "checking for toolchain path... " >&6; }
17280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17281$as_echo "$TOOLCHAIN_PATH" >&6; }
17282  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17283$as_echo_n "checking for extra path... " >&6; }
17284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17285$as_echo "$EXTRA_PATH" >&6; }
17286
17287
17288# To properly create a configuration name, we need to have the OpenJDK target
17289# and options (variants and debug level) parsed.
17290
17291
17292
17293# Check whether --with-conf-name was given.
17294if test "${with_conf_name+set}" = set; then :
17295  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17296fi
17297
17298
17299  # Test from where we are running configure, in or outside of src root.
17300  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17301$as_echo_n "checking where to store configuration... " >&6; }
17302  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17303      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17304      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17305    # We are running configure from the src root.
17306    # Create a default ./build/target-variant-debuglevel output root.
17307    if test "x${CONF_NAME}" = x; then
17308      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17309$as_echo "in default location" >&6; }
17310      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17311    else
17312      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17313$as_echo "in build directory with custom name" >&6; }
17314    fi
17315    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17316    $MKDIR -p "$OUTPUT_ROOT"
17317    if test ! -d "$OUTPUT_ROOT"; then
17318      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17319    fi
17320  else
17321    # We are running configure from outside of the src dir.
17322    # Then use the current directory as output dir!
17323    # If configuration is situated in normal build directory, just use the build
17324    # directory name as configuration name, otherwise use the complete path.
17325    if test "x${CONF_NAME}" = x; then
17326      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17327    fi
17328    OUTPUT_ROOT="$CURDIR"
17329    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17330$as_echo "in current directory" >&6; }
17331
17332    # WARNING: This might be a bad thing to do. You need to be sure you want to
17333    # have a configuration in this directory. Do some sanity checks!
17334
17335    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17336      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17337      # other files
17338      files_present=`$LS $OUTPUT_ROOT`
17339      # Configure has already touched config.log and confdefs.h in the current dir when this check
17340      # is performed.
17341      filtered_files=`$ECHO "$files_present" \
17342          | $SED -e 's/config.log//g' \
17343              -e 's/configure.log//g' \
17344              -e 's/confdefs.h//g' \
17345              -e 's/ //g' \
17346          | $TR -d '\n'`
17347      if test "x$filtered_files" != x; then
17348        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17349$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17350        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17351$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17352        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17353$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17354        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17355$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17356        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17357$as_echo "$as_me: seriously mess up just about everything." >&6;}
17358        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17359$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17360        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17361$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17362        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17363      fi
17364    fi
17365  fi
17366  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17367$as_echo_n "checking what configuration name to use... " >&6; }
17368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17369$as_echo "$CONF_NAME" >&6; }
17370
17371
17372  # Only process if variable expands to non-empty
17373
17374  if test "x$OUTPUT_ROOT" != x; then
17375    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17376
17377  # Input might be given as Windows format, start by converting to
17378  # unix format.
17379  path="$OUTPUT_ROOT"
17380  new_path=`$CYGPATH -u "$path"`
17381
17382  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17383  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17384  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17385  # "foo.exe" is OK but "foo" is an error.
17386  #
17387  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17388  # It is also a way to make sure we got the proper file name for the real test later on.
17389  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17390  if test "x$test_shortpath" = x; then
17391    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17392$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17393    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17394  fi
17395
17396  # Call helper function which possibly converts this using DOS-style short mode.
17397  # If so, the updated path is stored in $new_path.
17398
17399  input_path="$new_path"
17400  # Check if we need to convert this using DOS-style short mode. If the path
17401  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17402  # take no chances and rewrite it.
17403  # Note: m4 eats our [], so we need to use [ and ] instead.
17404  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17405  if test "x$has_forbidden_chars" != x; then
17406    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17407    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17408    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17409    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17410      # Going to short mode and back again did indeed matter. Since short mode is
17411      # case insensitive, let's make it lowercase to improve readability.
17412      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17413      # Now convert it back to Unix-style (cygpath)
17414      input_path=`$CYGPATH -u "$shortmode_path"`
17415      new_path="$input_path"
17416    fi
17417  fi
17418
17419  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17420  if test "x$test_cygdrive_prefix" = x; then
17421    # As a simple fix, exclude /usr/bin since it's not a real path.
17422    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17423      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17424      # a path prefixed by /cygdrive for fixpath to work.
17425      new_path="$CYGWIN_ROOT_PATH$input_path"
17426    fi
17427  fi
17428
17429
17430  if test "x$path" != "x$new_path"; then
17431    OUTPUT_ROOT="$new_path"
17432    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17433$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17434  fi
17435
17436    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17437
17438  path="$OUTPUT_ROOT"
17439  has_colon=`$ECHO $path | $GREP ^.:`
17440  new_path="$path"
17441  if test "x$has_colon" = x; then
17442    # Not in mixed or Windows style, start by that.
17443    new_path=`cmd //c echo $path`
17444  fi
17445
17446
17447  input_path="$new_path"
17448  # Check if we need to convert this using DOS-style short mode. If the path
17449  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17450  # take no chances and rewrite it.
17451  # Note: m4 eats our [], so we need to use [ and ] instead.
17452  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17453  if test "x$has_forbidden_chars" != x; then
17454    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17455    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17456  fi
17457
17458
17459  windows_path="$new_path"
17460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17461    unix_path=`$CYGPATH -u "$windows_path"`
17462    new_path="$unix_path"
17463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17465    new_path="$unix_path"
17466  fi
17467
17468  if test "x$path" != "x$new_path"; then
17469    OUTPUT_ROOT="$new_path"
17470    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17471$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17472  fi
17473
17474  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17475  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17476
17477    else
17478      # We're on a unix platform. Hooray! :)
17479      path="$OUTPUT_ROOT"
17480      has_space=`$ECHO "$path" | $GREP " "`
17481      if test "x$has_space" != x; then
17482        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17483$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17484        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17485      fi
17486
17487      # Use eval to expand a potential ~
17488      eval path="$path"
17489      if test ! -f "$path" && test ! -d "$path"; then
17490        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17491      fi
17492
17493      if test -d "$path"; then
17494        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17495      else
17496        dir="`$DIRNAME "$path"`"
17497        base="`$BASENAME "$path"`"
17498        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17499      fi
17500    fi
17501  fi
17502
17503
17504  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17505  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17506
17507  SPEC="$OUTPUT_ROOT/spec.gmk"
17508
17509
17510
17511
17512
17513  # The spec.gmk file contains all variables for the make system.
17514  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17515
17516  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17517  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17518
17519  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17520  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17521
17522  # The compare.sh is used to compare the build output to other builds.
17523  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17524
17525  # The generated Makefile knows where the spec.gmk is and where the source is.
17526  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17527  # which will look for generated configurations
17528  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17529
17530
17531
17532# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17533
17534  for ac_prog in apt-get yum brew port pkgutil pkgadd
17535do
17536  # Extract the first word of "$ac_prog", so it can be a program name with args.
17537set dummy $ac_prog; ac_word=$2
17538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17539$as_echo_n "checking for $ac_word... " >&6; }
17540if ${ac_cv_prog_PKGHANDLER+:} false; then :
17541  $as_echo_n "(cached) " >&6
17542else
17543  if test -n "$PKGHANDLER"; then
17544  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17545else
17546as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17547for as_dir in $PATH
17548do
17549  IFS=$as_save_IFS
17550  test -z "$as_dir" && as_dir=.
17551    for ac_exec_ext in '' $ac_executable_extensions; do
17552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17553    ac_cv_prog_PKGHANDLER="$ac_prog"
17554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17555    break 2
17556  fi
17557done
17558  done
17559IFS=$as_save_IFS
17560
17561fi
17562fi
17563PKGHANDLER=$ac_cv_prog_PKGHANDLER
17564if test -n "$PKGHANDLER"; then
17565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17566$as_echo "$PKGHANDLER" >&6; }
17567else
17568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17569$as_echo "no" >&6; }
17570fi
17571
17572
17573  test -n "$PKGHANDLER" && break
17574done
17575
17576
17577
17578# Setup tools that requires more complex handling, or that is not needed by the configure script.
17579
17580
17581
17582  # Publish this variable in the help.
17583
17584
17585  if [ -z "${MAKE+x}" ]; then
17586    # The variable is not set by user, try to locate tool using the code snippet
17587
17588    # Try our hardest to locate a correct version of GNU make
17589    for ac_prog in gmake
17590do
17591  # Extract the first word of "$ac_prog", so it can be a program name with args.
17592set dummy $ac_prog; ac_word=$2
17593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17594$as_echo_n "checking for $ac_word... " >&6; }
17595if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17596  $as_echo_n "(cached) " >&6
17597else
17598  case $CHECK_GMAKE in
17599  [\\/]* | ?:[\\/]*)
17600  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17601  ;;
17602  *)
17603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17604for as_dir in $PATH
17605do
17606  IFS=$as_save_IFS
17607  test -z "$as_dir" && as_dir=.
17608    for ac_exec_ext in '' $ac_executable_extensions; do
17609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17610    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17612    break 2
17613  fi
17614done
17615  done
17616IFS=$as_save_IFS
17617
17618  ;;
17619esac
17620fi
17621CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17622if test -n "$CHECK_GMAKE"; then
17623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17624$as_echo "$CHECK_GMAKE" >&6; }
17625else
17626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17627$as_echo "no" >&6; }
17628fi
17629
17630
17631  test -n "$CHECK_GMAKE" && break
17632done
17633
17634
17635  MAKE_CANDIDATE=""$CHECK_GMAKE""
17636  DESCRIPTION="gmake in PATH"
17637
17638  # On Cygwin, we require a newer version of make than on other platforms
17639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17640    MAKE_VERSION_EXPR="-e 4\."
17641    MAKE_REQUIRED_VERSION="4.0"
17642   else
17643    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17644    MAKE_REQUIRED_VERSION="3.81"
17645  fi
17646
17647  if test "x$MAKE_CANDIDATE" != x; then
17648    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17649$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17650    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17651    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17652    if test "x$IS_GNU_MAKE" = x; then
17653      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17654$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17655    else
17656      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17657      if test "x$IS_MODERN_MAKE" = x; then
17658        { $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
17659$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;}
17660      else
17661        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17662          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17663            MAKE_EXPECTED_ENV='cygwin'
17664          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17665            MAKE_EXPECTED_ENV='msys'
17666          else
17667            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17668          fi
17669          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17670          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17671        else
17672          # Not relevant for non-Windows
17673          IS_MAKE_CORRECT_ENV=true
17674        fi
17675        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17676          { $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
17677$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;}
17678        else
17679          FOUND_MAKE=$MAKE_CANDIDATE
17680
17681  # Only process if variable expands to non-empty
17682
17683  if test "x$FOUND_MAKE" != x; then
17684    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17685
17686  # First separate the path from the arguments. This will split at the first
17687  # space.
17688  complete="$FOUND_MAKE"
17689  path="${complete%% *}"
17690  tmp="$complete EOL"
17691  arguments="${tmp#* }"
17692
17693  # Input might be given as Windows format, start by converting to
17694  # unix format.
17695  new_path=`$CYGPATH -u "$path"`
17696
17697  # Now try to locate executable using which
17698  new_path=`$WHICH "$new_path" 2> /dev/null`
17699  # bat and cmd files are not always considered executable in cygwin causing which
17700  # to not find them
17701  if test "x$new_path" = x \
17702      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17703      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17704    new_path=`$CYGPATH -u "$path"`
17705  fi
17706  if test "x$new_path" = x; then
17707    # Oops. Which didn't find the executable.
17708    # The splitting of arguments from the executable at a space might have been incorrect,
17709    # since paths with space are more likely in Windows. Give it another try with the whole
17710    # argument.
17711    path="$complete"
17712    arguments="EOL"
17713    new_path=`$CYGPATH -u "$path"`
17714    new_path=`$WHICH "$new_path" 2> /dev/null`
17715    # bat and cmd files are not always considered executable in cygwin causing which
17716    # to not find them
17717    if test "x$new_path" = x \
17718        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17719        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17720      new_path=`$CYGPATH -u "$path"`
17721    fi
17722    if test "x$new_path" = x; then
17723      # It's still not found. Now this is an unrecoverable error.
17724      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17725$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17726      has_space=`$ECHO "$complete" | $GREP " "`
17727      if test "x$has_space" != x; then
17728        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17729$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17730      fi
17731      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17732    fi
17733  fi
17734
17735  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17736  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17737  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17738  # "foo.exe" is OK but "foo" is an error.
17739  #
17740  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17741  # It is also a way to make sure we got the proper file name for the real test later on.
17742  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17743  if test "x$test_shortpath" = x; then
17744    # Short path failed, file does not exist as specified.
17745    # Try adding .exe or .cmd
17746    if test -f "${new_path}.exe"; then
17747      input_to_shortpath="${new_path}.exe"
17748    elif test -f "${new_path}.cmd"; then
17749      input_to_shortpath="${new_path}.cmd"
17750    else
17751      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17752$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17753      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17754$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17755      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17756    fi
17757  else
17758    input_to_shortpath="$new_path"
17759  fi
17760
17761  # Call helper function which possibly converts this using DOS-style short mode.
17762  # If so, the updated path is stored in $new_path.
17763  new_path="$input_to_shortpath"
17764
17765  input_path="$input_to_shortpath"
17766  # Check if we need to convert this using DOS-style short mode. If the path
17767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17768  # take no chances and rewrite it.
17769  # Note: m4 eats our [], so we need to use [ and ] instead.
17770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17771  if test "x$has_forbidden_chars" != x; then
17772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17773    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17774    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17775    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17776      # Going to short mode and back again did indeed matter. Since short mode is
17777      # case insensitive, let's make it lowercase to improve readability.
17778      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17779      # Now convert it back to Unix-style (cygpath)
17780      input_path=`$CYGPATH -u "$shortmode_path"`
17781      new_path="$input_path"
17782    fi
17783  fi
17784
17785  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17786  if test "x$test_cygdrive_prefix" = x; then
17787    # As a simple fix, exclude /usr/bin since it's not a real path.
17788    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17789      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17790      # a path prefixed by /cygdrive for fixpath to work.
17791      new_path="$CYGWIN_ROOT_PATH$input_path"
17792    fi
17793  fi
17794
17795  # remove trailing .exe if any
17796  new_path="${new_path/%.exe/}"
17797
17798    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17799
17800  # First separate the path from the arguments. This will split at the first
17801  # space.
17802  complete="$FOUND_MAKE"
17803  path="${complete%% *}"
17804  tmp="$complete EOL"
17805  arguments="${tmp#* }"
17806
17807  # Input might be given as Windows format, start by converting to
17808  # unix format.
17809  new_path="$path"
17810
17811  windows_path="$new_path"
17812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17813    unix_path=`$CYGPATH -u "$windows_path"`
17814    new_path="$unix_path"
17815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17816    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17817    new_path="$unix_path"
17818  fi
17819
17820
17821  # Now try to locate executable using which
17822  new_path=`$WHICH "$new_path" 2> /dev/null`
17823
17824  if test "x$new_path" = x; then
17825    # Oops. Which didn't find the executable.
17826    # The splitting of arguments from the executable at a space might have been incorrect,
17827    # since paths with space are more likely in Windows. Give it another try with the whole
17828    # argument.
17829    path="$complete"
17830    arguments="EOL"
17831    new_path="$path"
17832
17833  windows_path="$new_path"
17834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17835    unix_path=`$CYGPATH -u "$windows_path"`
17836    new_path="$unix_path"
17837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17839    new_path="$unix_path"
17840  fi
17841
17842
17843    new_path=`$WHICH "$new_path" 2> /dev/null`
17844    # bat and cmd files are not always considered executable in MSYS causing which
17845    # to not find them
17846    if test "x$new_path" = x \
17847        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17848        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17849      new_path="$path"
17850
17851  windows_path="$new_path"
17852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17853    unix_path=`$CYGPATH -u "$windows_path"`
17854    new_path="$unix_path"
17855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17856    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17857    new_path="$unix_path"
17858  fi
17859
17860    fi
17861
17862    if test "x$new_path" = x; then
17863      # It's still not found. Now this is an unrecoverable error.
17864      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17865$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17866      has_space=`$ECHO "$complete" | $GREP " "`
17867      if test "x$has_space" != x; then
17868        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17869$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17870      fi
17871      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17872    fi
17873  fi
17874
17875  # Now new_path has a complete unix path to the binary
17876  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17877    # Keep paths in /bin as-is, but remove trailing .exe if any
17878    new_path="${new_path/%.exe/}"
17879    # Do not save /bin paths to all_fixpath_prefixes!
17880  else
17881    # Not in mixed or Windows style, start by that.
17882    new_path=`cmd //c echo $new_path`
17883
17884  input_path="$new_path"
17885  # Check if we need to convert this using DOS-style short mode. If the path
17886  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17887  # take no chances and rewrite it.
17888  # Note: m4 eats our [], so we need to use [ and ] instead.
17889  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17890  if test "x$has_forbidden_chars" != x; then
17891    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17892    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17893  fi
17894
17895    # Output is in $new_path
17896
17897  windows_path="$new_path"
17898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17899    unix_path=`$CYGPATH -u "$windows_path"`
17900    new_path="$unix_path"
17901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17902    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17903    new_path="$unix_path"
17904  fi
17905
17906    # remove trailing .exe if any
17907    new_path="${new_path/%.exe/}"
17908
17909    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17910    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17911  fi
17912
17913    else
17914      # We're on a unix platform. Hooray! :)
17915      # First separate the path from the arguments. This will split at the first
17916      # space.
17917      complete="$FOUND_MAKE"
17918      path="${complete%% *}"
17919      tmp="$complete EOL"
17920      arguments="${tmp#* }"
17921
17922      # Cannot rely on the command "which" here since it doesn't always work.
17923      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17924      if test -z "$is_absolute_path"; then
17925        # Path to executable is not absolute. Find it.
17926        IFS_save="$IFS"
17927        IFS=:
17928        for p in $PATH; do
17929          if test -f "$p/$path" && test -x "$p/$path"; then
17930            new_path="$p/$path"
17931            break
17932          fi
17933        done
17934        IFS="$IFS_save"
17935      else
17936        # This is an absolute path, we can use it without further modifications.
17937        new_path="$path"
17938      fi
17939
17940      if test "x$new_path" = x; then
17941        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17942$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17943        has_space=`$ECHO "$complete" | $GREP " "`
17944        if test "x$has_space" != x; then
17945          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17946$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17947        fi
17948        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17949      fi
17950    fi
17951
17952    # Now join together the path and the arguments once again
17953    if test "x$arguments" != xEOL; then
17954      new_complete="$new_path ${arguments% *}"
17955    else
17956      new_complete="$new_path"
17957    fi
17958
17959    if test "x$complete" != "x$new_complete"; then
17960      FOUND_MAKE="$new_complete"
17961      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17962$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17963    fi
17964  fi
17965
17966        fi
17967      fi
17968    fi
17969  fi
17970
17971
17972    if test "x$FOUND_MAKE" = x; then
17973      for ac_prog in make
17974do
17975  # Extract the first word of "$ac_prog", so it can be a program name with args.
17976set dummy $ac_prog; ac_word=$2
17977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17978$as_echo_n "checking for $ac_word... " >&6; }
17979if ${ac_cv_path_CHECK_MAKE+:} false; then :
17980  $as_echo_n "(cached) " >&6
17981else
17982  case $CHECK_MAKE in
17983  [\\/]* | ?:[\\/]*)
17984  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17985  ;;
17986  *)
17987  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17988for as_dir in $PATH
17989do
17990  IFS=$as_save_IFS
17991  test -z "$as_dir" && as_dir=.
17992    for ac_exec_ext in '' $ac_executable_extensions; do
17993  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17994    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17995    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17996    break 2
17997  fi
17998done
17999  done
18000IFS=$as_save_IFS
18001
18002  ;;
18003esac
18004fi
18005CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18006if test -n "$CHECK_MAKE"; then
18007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18008$as_echo "$CHECK_MAKE" >&6; }
18009else
18010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18011$as_echo "no" >&6; }
18012fi
18013
18014
18015  test -n "$CHECK_MAKE" && break
18016done
18017
18018
18019  MAKE_CANDIDATE=""$CHECK_MAKE""
18020  DESCRIPTION="make in PATH"
18021
18022  # On Cygwin, we require a newer version of make than on other platforms
18023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18024    MAKE_VERSION_EXPR="-e 4\."
18025    MAKE_REQUIRED_VERSION="4.0"
18026   else
18027    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18028    MAKE_REQUIRED_VERSION="3.81"
18029  fi
18030
18031  if test "x$MAKE_CANDIDATE" != x; then
18032    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18033$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18034    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18035    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18036    if test "x$IS_GNU_MAKE" = x; then
18037      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18038$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18039    else
18040      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18041      if test "x$IS_MODERN_MAKE" = x; then
18042        { $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
18043$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;}
18044      else
18045        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18046          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18047            MAKE_EXPECTED_ENV='cygwin'
18048          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18049            MAKE_EXPECTED_ENV='msys'
18050          else
18051            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18052          fi
18053          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18054          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18055        else
18056          # Not relevant for non-Windows
18057          IS_MAKE_CORRECT_ENV=true
18058        fi
18059        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18060          { $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
18061$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;}
18062        else
18063          FOUND_MAKE=$MAKE_CANDIDATE
18064
18065  # Only process if variable expands to non-empty
18066
18067  if test "x$FOUND_MAKE" != x; then
18068    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18069
18070  # First separate the path from the arguments. This will split at the first
18071  # space.
18072  complete="$FOUND_MAKE"
18073  path="${complete%% *}"
18074  tmp="$complete EOL"
18075  arguments="${tmp#* }"
18076
18077  # Input might be given as Windows format, start by converting to
18078  # unix format.
18079  new_path=`$CYGPATH -u "$path"`
18080
18081  # Now try to locate executable using which
18082  new_path=`$WHICH "$new_path" 2> /dev/null`
18083  # bat and cmd files are not always considered executable in cygwin causing which
18084  # to not find them
18085  if test "x$new_path" = x \
18086      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18087      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18088    new_path=`$CYGPATH -u "$path"`
18089  fi
18090  if test "x$new_path" = x; then
18091    # Oops. Which didn't find the executable.
18092    # The splitting of arguments from the executable at a space might have been incorrect,
18093    # since paths with space are more likely in Windows. Give it another try with the whole
18094    # argument.
18095    path="$complete"
18096    arguments="EOL"
18097    new_path=`$CYGPATH -u "$path"`
18098    new_path=`$WHICH "$new_path" 2> /dev/null`
18099    # bat and cmd files are not always considered executable in cygwin causing which
18100    # to not find them
18101    if test "x$new_path" = x \
18102        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18103        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18104      new_path=`$CYGPATH -u "$path"`
18105    fi
18106    if test "x$new_path" = x; then
18107      # It's still not found. Now this is an unrecoverable error.
18108      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18109$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18110      has_space=`$ECHO "$complete" | $GREP " "`
18111      if test "x$has_space" != x; then
18112        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18113$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18114      fi
18115      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18116    fi
18117  fi
18118
18119  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18120  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18121  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18122  # "foo.exe" is OK but "foo" is an error.
18123  #
18124  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18125  # It is also a way to make sure we got the proper file name for the real test later on.
18126  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18127  if test "x$test_shortpath" = x; then
18128    # Short path failed, file does not exist as specified.
18129    # Try adding .exe or .cmd
18130    if test -f "${new_path}.exe"; then
18131      input_to_shortpath="${new_path}.exe"
18132    elif test -f "${new_path}.cmd"; then
18133      input_to_shortpath="${new_path}.cmd"
18134    else
18135      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18136$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18137      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18138$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18139      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18140    fi
18141  else
18142    input_to_shortpath="$new_path"
18143  fi
18144
18145  # Call helper function which possibly converts this using DOS-style short mode.
18146  # If so, the updated path is stored in $new_path.
18147  new_path="$input_to_shortpath"
18148
18149  input_path="$input_to_shortpath"
18150  # Check if we need to convert this using DOS-style short mode. If the path
18151  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18152  # take no chances and rewrite it.
18153  # Note: m4 eats our [], so we need to use [ and ] instead.
18154  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18155  if test "x$has_forbidden_chars" != x; then
18156    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18157    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18158    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18159    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18160      # Going to short mode and back again did indeed matter. Since short mode is
18161      # case insensitive, let's make it lowercase to improve readability.
18162      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18163      # Now convert it back to Unix-style (cygpath)
18164      input_path=`$CYGPATH -u "$shortmode_path"`
18165      new_path="$input_path"
18166    fi
18167  fi
18168
18169  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18170  if test "x$test_cygdrive_prefix" = x; then
18171    # As a simple fix, exclude /usr/bin since it's not a real path.
18172    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18173      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18174      # a path prefixed by /cygdrive for fixpath to work.
18175      new_path="$CYGWIN_ROOT_PATH$input_path"
18176    fi
18177  fi
18178
18179  # remove trailing .exe if any
18180  new_path="${new_path/%.exe/}"
18181
18182    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18183
18184  # First separate the path from the arguments. This will split at the first
18185  # space.
18186  complete="$FOUND_MAKE"
18187  path="${complete%% *}"
18188  tmp="$complete EOL"
18189  arguments="${tmp#* }"
18190
18191  # Input might be given as Windows format, start by converting to
18192  # unix format.
18193  new_path="$path"
18194
18195  windows_path="$new_path"
18196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18197    unix_path=`$CYGPATH -u "$windows_path"`
18198    new_path="$unix_path"
18199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18201    new_path="$unix_path"
18202  fi
18203
18204
18205  # Now try to locate executable using which
18206  new_path=`$WHICH "$new_path" 2> /dev/null`
18207
18208  if test "x$new_path" = x; then
18209    # Oops. Which didn't find the executable.
18210    # The splitting of arguments from the executable at a space might have been incorrect,
18211    # since paths with space are more likely in Windows. Give it another try with the whole
18212    # argument.
18213    path="$complete"
18214    arguments="EOL"
18215    new_path="$path"
18216
18217  windows_path="$new_path"
18218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18219    unix_path=`$CYGPATH -u "$windows_path"`
18220    new_path="$unix_path"
18221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18222    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18223    new_path="$unix_path"
18224  fi
18225
18226
18227    new_path=`$WHICH "$new_path" 2> /dev/null`
18228    # bat and cmd files are not always considered executable in MSYS causing which
18229    # to not find them
18230    if test "x$new_path" = x \
18231        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18232        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18233      new_path="$path"
18234
18235  windows_path="$new_path"
18236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18237    unix_path=`$CYGPATH -u "$windows_path"`
18238    new_path="$unix_path"
18239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18241    new_path="$unix_path"
18242  fi
18243
18244    fi
18245
18246    if test "x$new_path" = x; then
18247      # It's still not found. Now this is an unrecoverable error.
18248      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18249$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18250      has_space=`$ECHO "$complete" | $GREP " "`
18251      if test "x$has_space" != x; then
18252        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18253$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18254      fi
18255      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18256    fi
18257  fi
18258
18259  # Now new_path has a complete unix path to the binary
18260  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18261    # Keep paths in /bin as-is, but remove trailing .exe if any
18262    new_path="${new_path/%.exe/}"
18263    # Do not save /bin paths to all_fixpath_prefixes!
18264  else
18265    # Not in mixed or Windows style, start by that.
18266    new_path=`cmd //c echo $new_path`
18267
18268  input_path="$new_path"
18269  # Check if we need to convert this using DOS-style short mode. If the path
18270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18271  # take no chances and rewrite it.
18272  # Note: m4 eats our [], so we need to use [ and ] instead.
18273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18274  if test "x$has_forbidden_chars" != x; then
18275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18276    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18277  fi
18278
18279    # Output is in $new_path
18280
18281  windows_path="$new_path"
18282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18283    unix_path=`$CYGPATH -u "$windows_path"`
18284    new_path="$unix_path"
18285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18286    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18287    new_path="$unix_path"
18288  fi
18289
18290    # remove trailing .exe if any
18291    new_path="${new_path/%.exe/}"
18292
18293    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18294    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18295  fi
18296
18297    else
18298      # We're on a unix platform. Hooray! :)
18299      # First separate the path from the arguments. This will split at the first
18300      # space.
18301      complete="$FOUND_MAKE"
18302      path="${complete%% *}"
18303      tmp="$complete EOL"
18304      arguments="${tmp#* }"
18305
18306      # Cannot rely on the command "which" here since it doesn't always work.
18307      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18308      if test -z "$is_absolute_path"; then
18309        # Path to executable is not absolute. Find it.
18310        IFS_save="$IFS"
18311        IFS=:
18312        for p in $PATH; do
18313          if test -f "$p/$path" && test -x "$p/$path"; then
18314            new_path="$p/$path"
18315            break
18316          fi
18317        done
18318        IFS="$IFS_save"
18319      else
18320        # This is an absolute path, we can use it without further modifications.
18321        new_path="$path"
18322      fi
18323
18324      if test "x$new_path" = x; then
18325        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18326$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18327        has_space=`$ECHO "$complete" | $GREP " "`
18328        if test "x$has_space" != x; then
18329          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18330$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18331        fi
18332        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18333      fi
18334    fi
18335
18336    # Now join together the path and the arguments once again
18337    if test "x$arguments" != xEOL; then
18338      new_complete="$new_path ${arguments% *}"
18339    else
18340      new_complete="$new_path"
18341    fi
18342
18343    if test "x$complete" != "x$new_complete"; then
18344      FOUND_MAKE="$new_complete"
18345      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18346$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18347    fi
18348  fi
18349
18350        fi
18351      fi
18352    fi
18353  fi
18354
18355    fi
18356
18357    if test "x$FOUND_MAKE" = x; then
18358      if test "x$TOOLCHAIN_PATH" != x; then
18359        # We have a toolchain path, check that as well before giving up.
18360        OLD_PATH=$PATH
18361        PATH=$TOOLCHAIN_PATH:$PATH
18362        for ac_prog in gmake
18363do
18364  # Extract the first word of "$ac_prog", so it can be a program name with args.
18365set dummy $ac_prog; ac_word=$2
18366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18367$as_echo_n "checking for $ac_word... " >&6; }
18368if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18369  $as_echo_n "(cached) " >&6
18370else
18371  case $CHECK_TOOLSDIR_GMAKE in
18372  [\\/]* | ?:[\\/]*)
18373  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18374  ;;
18375  *)
18376  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18377for as_dir in $PATH
18378do
18379  IFS=$as_save_IFS
18380  test -z "$as_dir" && as_dir=.
18381    for ac_exec_ext in '' $ac_executable_extensions; do
18382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18383    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18385    break 2
18386  fi
18387done
18388  done
18389IFS=$as_save_IFS
18390
18391  ;;
18392esac
18393fi
18394CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18395if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18397$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18398else
18399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18400$as_echo "no" >&6; }
18401fi
18402
18403
18404  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18405done
18406
18407
18408  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18409  DESCRIPTION="gmake in tools-dir"
18410
18411  # On Cygwin, we require a newer version of make than on other platforms
18412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18413    MAKE_VERSION_EXPR="-e 4\."
18414    MAKE_REQUIRED_VERSION="4.0"
18415   else
18416    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18417    MAKE_REQUIRED_VERSION="3.81"
18418  fi
18419
18420  if test "x$MAKE_CANDIDATE" != x; then
18421    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18422$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18423    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18424    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18425    if test "x$IS_GNU_MAKE" = x; then
18426      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18427$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18428    else
18429      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18430      if test "x$IS_MODERN_MAKE" = x; then
18431        { $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
18432$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;}
18433      else
18434        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18435          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18436            MAKE_EXPECTED_ENV='cygwin'
18437          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18438            MAKE_EXPECTED_ENV='msys'
18439          else
18440            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18441          fi
18442          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18443          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18444        else
18445          # Not relevant for non-Windows
18446          IS_MAKE_CORRECT_ENV=true
18447        fi
18448        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18449          { $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
18450$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;}
18451        else
18452          FOUND_MAKE=$MAKE_CANDIDATE
18453
18454  # Only process if variable expands to non-empty
18455
18456  if test "x$FOUND_MAKE" != x; then
18457    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18458
18459  # First separate the path from the arguments. This will split at the first
18460  # space.
18461  complete="$FOUND_MAKE"
18462  path="${complete%% *}"
18463  tmp="$complete EOL"
18464  arguments="${tmp#* }"
18465
18466  # Input might be given as Windows format, start by converting to
18467  # unix format.
18468  new_path=`$CYGPATH -u "$path"`
18469
18470  # Now try to locate executable using which
18471  new_path=`$WHICH "$new_path" 2> /dev/null`
18472  # bat and cmd files are not always considered executable in cygwin causing which
18473  # to not find them
18474  if test "x$new_path" = x \
18475      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18476      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18477    new_path=`$CYGPATH -u "$path"`
18478  fi
18479  if test "x$new_path" = x; then
18480    # Oops. Which didn't find the executable.
18481    # The splitting of arguments from the executable at a space might have been incorrect,
18482    # since paths with space are more likely in Windows. Give it another try with the whole
18483    # argument.
18484    path="$complete"
18485    arguments="EOL"
18486    new_path=`$CYGPATH -u "$path"`
18487    new_path=`$WHICH "$new_path" 2> /dev/null`
18488    # bat and cmd files are not always considered executable in cygwin causing which
18489    # to not find them
18490    if test "x$new_path" = x \
18491        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18492        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18493      new_path=`$CYGPATH -u "$path"`
18494    fi
18495    if test "x$new_path" = x; then
18496      # It's still not found. Now this is an unrecoverable error.
18497      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18498$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18499      has_space=`$ECHO "$complete" | $GREP " "`
18500      if test "x$has_space" != x; then
18501        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18502$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18503      fi
18504      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18505    fi
18506  fi
18507
18508  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18509  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18510  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18511  # "foo.exe" is OK but "foo" is an error.
18512  #
18513  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18514  # It is also a way to make sure we got the proper file name for the real test later on.
18515  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18516  if test "x$test_shortpath" = x; then
18517    # Short path failed, file does not exist as specified.
18518    # Try adding .exe or .cmd
18519    if test -f "${new_path}.exe"; then
18520      input_to_shortpath="${new_path}.exe"
18521    elif test -f "${new_path}.cmd"; then
18522      input_to_shortpath="${new_path}.cmd"
18523    else
18524      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18525$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18526      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18527$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18528      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18529    fi
18530  else
18531    input_to_shortpath="$new_path"
18532  fi
18533
18534  # Call helper function which possibly converts this using DOS-style short mode.
18535  # If so, the updated path is stored in $new_path.
18536  new_path="$input_to_shortpath"
18537
18538  input_path="$input_to_shortpath"
18539  # Check if we need to convert this using DOS-style short mode. If the path
18540  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18541  # take no chances and rewrite it.
18542  # Note: m4 eats our [], so we need to use [ and ] instead.
18543  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18544  if test "x$has_forbidden_chars" != x; then
18545    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18546    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18547    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18548    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18549      # Going to short mode and back again did indeed matter. Since short mode is
18550      # case insensitive, let's make it lowercase to improve readability.
18551      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18552      # Now convert it back to Unix-style (cygpath)
18553      input_path=`$CYGPATH -u "$shortmode_path"`
18554      new_path="$input_path"
18555    fi
18556  fi
18557
18558  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18559  if test "x$test_cygdrive_prefix" = x; then
18560    # As a simple fix, exclude /usr/bin since it's not a real path.
18561    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18562      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18563      # a path prefixed by /cygdrive for fixpath to work.
18564      new_path="$CYGWIN_ROOT_PATH$input_path"
18565    fi
18566  fi
18567
18568  # remove trailing .exe if any
18569  new_path="${new_path/%.exe/}"
18570
18571    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18572
18573  # First separate the path from the arguments. This will split at the first
18574  # space.
18575  complete="$FOUND_MAKE"
18576  path="${complete%% *}"
18577  tmp="$complete EOL"
18578  arguments="${tmp#* }"
18579
18580  # Input might be given as Windows format, start by converting to
18581  # unix format.
18582  new_path="$path"
18583
18584  windows_path="$new_path"
18585  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18586    unix_path=`$CYGPATH -u "$windows_path"`
18587    new_path="$unix_path"
18588  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18589    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18590    new_path="$unix_path"
18591  fi
18592
18593
18594  # Now try to locate executable using which
18595  new_path=`$WHICH "$new_path" 2> /dev/null`
18596
18597  if test "x$new_path" = x; then
18598    # Oops. Which didn't find the executable.
18599    # The splitting of arguments from the executable at a space might have been incorrect,
18600    # since paths with space are more likely in Windows. Give it another try with the whole
18601    # argument.
18602    path="$complete"
18603    arguments="EOL"
18604    new_path="$path"
18605
18606  windows_path="$new_path"
18607  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18608    unix_path=`$CYGPATH -u "$windows_path"`
18609    new_path="$unix_path"
18610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18611    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18612    new_path="$unix_path"
18613  fi
18614
18615
18616    new_path=`$WHICH "$new_path" 2> /dev/null`
18617    # bat and cmd files are not always considered executable in MSYS causing which
18618    # to not find them
18619    if test "x$new_path" = x \
18620        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18621        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18622      new_path="$path"
18623
18624  windows_path="$new_path"
18625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18626    unix_path=`$CYGPATH -u "$windows_path"`
18627    new_path="$unix_path"
18628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18629    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18630    new_path="$unix_path"
18631  fi
18632
18633    fi
18634
18635    if test "x$new_path" = x; then
18636      # It's still not found. Now this is an unrecoverable error.
18637      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18638$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18639      has_space=`$ECHO "$complete" | $GREP " "`
18640      if test "x$has_space" != x; then
18641        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18642$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18643      fi
18644      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18645    fi
18646  fi
18647
18648  # Now new_path has a complete unix path to the binary
18649  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18650    # Keep paths in /bin as-is, but remove trailing .exe if any
18651    new_path="${new_path/%.exe/}"
18652    # Do not save /bin paths to all_fixpath_prefixes!
18653  else
18654    # Not in mixed or Windows style, start by that.
18655    new_path=`cmd //c echo $new_path`
18656
18657  input_path="$new_path"
18658  # Check if we need to convert this using DOS-style short mode. If the path
18659  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18660  # take no chances and rewrite it.
18661  # Note: m4 eats our [], so we need to use [ and ] instead.
18662  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18663  if test "x$has_forbidden_chars" != x; then
18664    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18665    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18666  fi
18667
18668    # Output is in $new_path
18669
18670  windows_path="$new_path"
18671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18672    unix_path=`$CYGPATH -u "$windows_path"`
18673    new_path="$unix_path"
18674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18675    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18676    new_path="$unix_path"
18677  fi
18678
18679    # remove trailing .exe if any
18680    new_path="${new_path/%.exe/}"
18681
18682    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18683    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18684  fi
18685
18686    else
18687      # We're on a unix platform. Hooray! :)
18688      # First separate the path from the arguments. This will split at the first
18689      # space.
18690      complete="$FOUND_MAKE"
18691      path="${complete%% *}"
18692      tmp="$complete EOL"
18693      arguments="${tmp#* }"
18694
18695      # Cannot rely on the command "which" here since it doesn't always work.
18696      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18697      if test -z "$is_absolute_path"; then
18698        # Path to executable is not absolute. Find it.
18699        IFS_save="$IFS"
18700        IFS=:
18701        for p in $PATH; do
18702          if test -f "$p/$path" && test -x "$p/$path"; then
18703            new_path="$p/$path"
18704            break
18705          fi
18706        done
18707        IFS="$IFS_save"
18708      else
18709        # This is an absolute path, we can use it without further modifications.
18710        new_path="$path"
18711      fi
18712
18713      if test "x$new_path" = x; then
18714        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18715$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18716        has_space=`$ECHO "$complete" | $GREP " "`
18717        if test "x$has_space" != x; then
18718          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18719$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18720        fi
18721        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18722      fi
18723    fi
18724
18725    # Now join together the path and the arguments once again
18726    if test "x$arguments" != xEOL; then
18727      new_complete="$new_path ${arguments% *}"
18728    else
18729      new_complete="$new_path"
18730    fi
18731
18732    if test "x$complete" != "x$new_complete"; then
18733      FOUND_MAKE="$new_complete"
18734      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18735$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18736    fi
18737  fi
18738
18739        fi
18740      fi
18741    fi
18742  fi
18743
18744        if test "x$FOUND_MAKE" = x; then
18745          for ac_prog in make
18746do
18747  # Extract the first word of "$ac_prog", so it can be a program name with args.
18748set dummy $ac_prog; ac_word=$2
18749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18750$as_echo_n "checking for $ac_word... " >&6; }
18751if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18752  $as_echo_n "(cached) " >&6
18753else
18754  case $CHECK_TOOLSDIR_MAKE in
18755  [\\/]* | ?:[\\/]*)
18756  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18757  ;;
18758  *)
18759  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18760for as_dir in $PATH
18761do
18762  IFS=$as_save_IFS
18763  test -z "$as_dir" && as_dir=.
18764    for ac_exec_ext in '' $ac_executable_extensions; do
18765  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18766    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18767    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18768    break 2
18769  fi
18770done
18771  done
18772IFS=$as_save_IFS
18773
18774  ;;
18775esac
18776fi
18777CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18778if test -n "$CHECK_TOOLSDIR_MAKE"; then
18779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18780$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18781else
18782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18783$as_echo "no" >&6; }
18784fi
18785
18786
18787  test -n "$CHECK_TOOLSDIR_MAKE" && break
18788done
18789
18790
18791  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18792  DESCRIPTION="make in tools-dir"
18793
18794  # On Cygwin, we require a newer version of make than on other platforms
18795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18796    MAKE_VERSION_EXPR="-e 4\."
18797    MAKE_REQUIRED_VERSION="4.0"
18798   else
18799    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18800    MAKE_REQUIRED_VERSION="3.81"
18801  fi
18802
18803  if test "x$MAKE_CANDIDATE" != x; then
18804    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18805$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18806    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18807    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18808    if test "x$IS_GNU_MAKE" = x; then
18809      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18810$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18811    else
18812      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18813      if test "x$IS_MODERN_MAKE" = x; then
18814        { $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
18815$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;}
18816      else
18817        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18818          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18819            MAKE_EXPECTED_ENV='cygwin'
18820          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18821            MAKE_EXPECTED_ENV='msys'
18822          else
18823            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18824          fi
18825          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18826          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18827        else
18828          # Not relevant for non-Windows
18829          IS_MAKE_CORRECT_ENV=true
18830        fi
18831        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18832          { $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
18833$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;}
18834        else
18835          FOUND_MAKE=$MAKE_CANDIDATE
18836
18837  # Only process if variable expands to non-empty
18838
18839  if test "x$FOUND_MAKE" != x; then
18840    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18841
18842  # First separate the path from the arguments. This will split at the first
18843  # space.
18844  complete="$FOUND_MAKE"
18845  path="${complete%% *}"
18846  tmp="$complete EOL"
18847  arguments="${tmp#* }"
18848
18849  # Input might be given as Windows format, start by converting to
18850  # unix format.
18851  new_path=`$CYGPATH -u "$path"`
18852
18853  # Now try to locate executable using which
18854  new_path=`$WHICH "$new_path" 2> /dev/null`
18855  # bat and cmd files are not always considered executable in cygwin causing which
18856  # to not find them
18857  if test "x$new_path" = x \
18858      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18859      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18860    new_path=`$CYGPATH -u "$path"`
18861  fi
18862  if test "x$new_path" = x; then
18863    # Oops. Which didn't find the executable.
18864    # The splitting of arguments from the executable at a space might have been incorrect,
18865    # since paths with space are more likely in Windows. Give it another try with the whole
18866    # argument.
18867    path="$complete"
18868    arguments="EOL"
18869    new_path=`$CYGPATH -u "$path"`
18870    new_path=`$WHICH "$new_path" 2> /dev/null`
18871    # bat and cmd files are not always considered executable in cygwin causing which
18872    # to not find them
18873    if test "x$new_path" = x \
18874        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18875        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18876      new_path=`$CYGPATH -u "$path"`
18877    fi
18878    if test "x$new_path" = x; then
18879      # It's still not found. Now this is an unrecoverable error.
18880      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18881$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18882      has_space=`$ECHO "$complete" | $GREP " "`
18883      if test "x$has_space" != x; then
18884        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18885$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18886      fi
18887      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18888    fi
18889  fi
18890
18891  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18892  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18893  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18894  # "foo.exe" is OK but "foo" is an error.
18895  #
18896  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18897  # It is also a way to make sure we got the proper file name for the real test later on.
18898  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18899  if test "x$test_shortpath" = x; then
18900    # Short path failed, file does not exist as specified.
18901    # Try adding .exe or .cmd
18902    if test -f "${new_path}.exe"; then
18903      input_to_shortpath="${new_path}.exe"
18904    elif test -f "${new_path}.cmd"; then
18905      input_to_shortpath="${new_path}.cmd"
18906    else
18907      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18908$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18909      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18910$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18911      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18912    fi
18913  else
18914    input_to_shortpath="$new_path"
18915  fi
18916
18917  # Call helper function which possibly converts this using DOS-style short mode.
18918  # If so, the updated path is stored in $new_path.
18919  new_path="$input_to_shortpath"
18920
18921  input_path="$input_to_shortpath"
18922  # Check if we need to convert this using DOS-style short mode. If the path
18923  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18924  # take no chances and rewrite it.
18925  # Note: m4 eats our [], so we need to use [ and ] instead.
18926  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18927  if test "x$has_forbidden_chars" != x; then
18928    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18929    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18930    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18931    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18932      # Going to short mode and back again did indeed matter. Since short mode is
18933      # case insensitive, let's make it lowercase to improve readability.
18934      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18935      # Now convert it back to Unix-style (cygpath)
18936      input_path=`$CYGPATH -u "$shortmode_path"`
18937      new_path="$input_path"
18938    fi
18939  fi
18940
18941  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18942  if test "x$test_cygdrive_prefix" = x; then
18943    # As a simple fix, exclude /usr/bin since it's not a real path.
18944    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18945      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18946      # a path prefixed by /cygdrive for fixpath to work.
18947      new_path="$CYGWIN_ROOT_PATH$input_path"
18948    fi
18949  fi
18950
18951  # remove trailing .exe if any
18952  new_path="${new_path/%.exe/}"
18953
18954    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18955
18956  # First separate the path from the arguments. This will split at the first
18957  # space.
18958  complete="$FOUND_MAKE"
18959  path="${complete%% *}"
18960  tmp="$complete EOL"
18961  arguments="${tmp#* }"
18962
18963  # Input might be given as Windows format, start by converting to
18964  # unix format.
18965  new_path="$path"
18966
18967  windows_path="$new_path"
18968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18969    unix_path=`$CYGPATH -u "$windows_path"`
18970    new_path="$unix_path"
18971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18973    new_path="$unix_path"
18974  fi
18975
18976
18977  # Now try to locate executable using which
18978  new_path=`$WHICH "$new_path" 2> /dev/null`
18979
18980  if test "x$new_path" = x; then
18981    # Oops. Which didn't find the executable.
18982    # The splitting of arguments from the executable at a space might have been incorrect,
18983    # since paths with space are more likely in Windows. Give it another try with the whole
18984    # argument.
18985    path="$complete"
18986    arguments="EOL"
18987    new_path="$path"
18988
18989  windows_path="$new_path"
18990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18991    unix_path=`$CYGPATH -u "$windows_path"`
18992    new_path="$unix_path"
18993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18995    new_path="$unix_path"
18996  fi
18997
18998
18999    new_path=`$WHICH "$new_path" 2> /dev/null`
19000    # bat and cmd files are not always considered executable in MSYS causing which
19001    # to not find them
19002    if test "x$new_path" = x \
19003        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19004        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19005      new_path="$path"
19006
19007  windows_path="$new_path"
19008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19009    unix_path=`$CYGPATH -u "$windows_path"`
19010    new_path="$unix_path"
19011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19013    new_path="$unix_path"
19014  fi
19015
19016    fi
19017
19018    if test "x$new_path" = x; then
19019      # It's still not found. Now this is an unrecoverable error.
19020      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19021$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19022      has_space=`$ECHO "$complete" | $GREP " "`
19023      if test "x$has_space" != x; then
19024        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19025$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19026      fi
19027      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19028    fi
19029  fi
19030
19031  # Now new_path has a complete unix path to the binary
19032  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19033    # Keep paths in /bin as-is, but remove trailing .exe if any
19034    new_path="${new_path/%.exe/}"
19035    # Do not save /bin paths to all_fixpath_prefixes!
19036  else
19037    # Not in mixed or Windows style, start by that.
19038    new_path=`cmd //c echo $new_path`
19039
19040  input_path="$new_path"
19041  # Check if we need to convert this using DOS-style short mode. If the path
19042  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19043  # take no chances and rewrite it.
19044  # Note: m4 eats our [], so we need to use [ and ] instead.
19045  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19046  if test "x$has_forbidden_chars" != x; then
19047    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19048    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19049  fi
19050
19051    # Output is in $new_path
19052
19053  windows_path="$new_path"
19054  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19055    unix_path=`$CYGPATH -u "$windows_path"`
19056    new_path="$unix_path"
19057  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19058    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19059    new_path="$unix_path"
19060  fi
19061
19062    # remove trailing .exe if any
19063    new_path="${new_path/%.exe/}"
19064
19065    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19066    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19067  fi
19068
19069    else
19070      # We're on a unix platform. Hooray! :)
19071      # First separate the path from the arguments. This will split at the first
19072      # space.
19073      complete="$FOUND_MAKE"
19074      path="${complete%% *}"
19075      tmp="$complete EOL"
19076      arguments="${tmp#* }"
19077
19078      # Cannot rely on the command "which" here since it doesn't always work.
19079      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19080      if test -z "$is_absolute_path"; then
19081        # Path to executable is not absolute. Find it.
19082        IFS_save="$IFS"
19083        IFS=:
19084        for p in $PATH; do
19085          if test -f "$p/$path" && test -x "$p/$path"; then
19086            new_path="$p/$path"
19087            break
19088          fi
19089        done
19090        IFS="$IFS_save"
19091      else
19092        # This is an absolute path, we can use it without further modifications.
19093        new_path="$path"
19094      fi
19095
19096      if test "x$new_path" = x; then
19097        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19098$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19099        has_space=`$ECHO "$complete" | $GREP " "`
19100        if test "x$has_space" != x; then
19101          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19102$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19103        fi
19104        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19105      fi
19106    fi
19107
19108    # Now join together the path and the arguments once again
19109    if test "x$arguments" != xEOL; then
19110      new_complete="$new_path ${arguments% *}"
19111    else
19112      new_complete="$new_path"
19113    fi
19114
19115    if test "x$complete" != "x$new_complete"; then
19116      FOUND_MAKE="$new_complete"
19117      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19118$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19119    fi
19120  fi
19121
19122        fi
19123      fi
19124    fi
19125  fi
19126
19127        fi
19128        PATH=$OLD_PATH
19129      fi
19130    fi
19131
19132    if test "x$FOUND_MAKE" = x; then
19133      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
19134    fi
19135
19136  else
19137    # The variable is set, but is it from the command line or the environment?
19138
19139    # Try to remove the string !MAKE! from our list.
19140    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19141    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19142      # If it failed, the variable was not from the command line. Ignore it,
19143      # but warn the user (except for BASH, which is always set by the calling BASH).
19144      if test "xMAKE" != xBASH; then
19145        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19146$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19147      fi
19148      # Try to locate tool using the code snippet
19149
19150    # Try our hardest to locate a correct version of GNU make
19151    for ac_prog in gmake
19152do
19153  # Extract the first word of "$ac_prog", so it can be a program name with args.
19154set dummy $ac_prog; ac_word=$2
19155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19156$as_echo_n "checking for $ac_word... " >&6; }
19157if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19158  $as_echo_n "(cached) " >&6
19159else
19160  case $CHECK_GMAKE in
19161  [\\/]* | ?:[\\/]*)
19162  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19163  ;;
19164  *)
19165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19166for as_dir in $PATH
19167do
19168  IFS=$as_save_IFS
19169  test -z "$as_dir" && as_dir=.
19170    for ac_exec_ext in '' $ac_executable_extensions; do
19171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19172    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19174    break 2
19175  fi
19176done
19177  done
19178IFS=$as_save_IFS
19179
19180  ;;
19181esac
19182fi
19183CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19184if test -n "$CHECK_GMAKE"; then
19185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19186$as_echo "$CHECK_GMAKE" >&6; }
19187else
19188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19189$as_echo "no" >&6; }
19190fi
19191
19192
19193  test -n "$CHECK_GMAKE" && break
19194done
19195
19196
19197  MAKE_CANDIDATE=""$CHECK_GMAKE""
19198  DESCRIPTION="gmake in PATH"
19199
19200  # On Cygwin, we require a newer version of make than on other platforms
19201  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19202    MAKE_VERSION_EXPR="-e 4\."
19203    MAKE_REQUIRED_VERSION="4.0"
19204   else
19205    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19206    MAKE_REQUIRED_VERSION="3.81"
19207  fi
19208
19209  if test "x$MAKE_CANDIDATE" != x; then
19210    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19211$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19212    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19213    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19214    if test "x$IS_GNU_MAKE" = x; then
19215      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19216$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19217    else
19218      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19219      if test "x$IS_MODERN_MAKE" = x; then
19220        { $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
19221$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;}
19222      else
19223        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19224          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19225            MAKE_EXPECTED_ENV='cygwin'
19226          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19227            MAKE_EXPECTED_ENV='msys'
19228          else
19229            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19230          fi
19231          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19232          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19233        else
19234          # Not relevant for non-Windows
19235          IS_MAKE_CORRECT_ENV=true
19236        fi
19237        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19238          { $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
19239$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;}
19240        else
19241          FOUND_MAKE=$MAKE_CANDIDATE
19242
19243  # Only process if variable expands to non-empty
19244
19245  if test "x$FOUND_MAKE" != x; then
19246    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19247
19248  # First separate the path from the arguments. This will split at the first
19249  # space.
19250  complete="$FOUND_MAKE"
19251  path="${complete%% *}"
19252  tmp="$complete EOL"
19253  arguments="${tmp#* }"
19254
19255  # Input might be given as Windows format, start by converting to
19256  # unix format.
19257  new_path=`$CYGPATH -u "$path"`
19258
19259  # Now try to locate executable using which
19260  new_path=`$WHICH "$new_path" 2> /dev/null`
19261  # bat and cmd files are not always considered executable in cygwin causing which
19262  # to not find them
19263  if test "x$new_path" = x \
19264      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19265      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19266    new_path=`$CYGPATH -u "$path"`
19267  fi
19268  if test "x$new_path" = x; then
19269    # Oops. Which didn't find the executable.
19270    # The splitting of arguments from the executable at a space might have been incorrect,
19271    # since paths with space are more likely in Windows. Give it another try with the whole
19272    # argument.
19273    path="$complete"
19274    arguments="EOL"
19275    new_path=`$CYGPATH -u "$path"`
19276    new_path=`$WHICH "$new_path" 2> /dev/null`
19277    # bat and cmd files are not always considered executable in cygwin causing which
19278    # to not find them
19279    if test "x$new_path" = x \
19280        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19281        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19282      new_path=`$CYGPATH -u "$path"`
19283    fi
19284    if test "x$new_path" = x; then
19285      # It's still not found. Now this is an unrecoverable error.
19286      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19287$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19288      has_space=`$ECHO "$complete" | $GREP " "`
19289      if test "x$has_space" != x; then
19290        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19291$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19292      fi
19293      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19294    fi
19295  fi
19296
19297  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19298  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19299  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19300  # "foo.exe" is OK but "foo" is an error.
19301  #
19302  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19303  # It is also a way to make sure we got the proper file name for the real test later on.
19304  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19305  if test "x$test_shortpath" = x; then
19306    # Short path failed, file does not exist as specified.
19307    # Try adding .exe or .cmd
19308    if test -f "${new_path}.exe"; then
19309      input_to_shortpath="${new_path}.exe"
19310    elif test -f "${new_path}.cmd"; then
19311      input_to_shortpath="${new_path}.cmd"
19312    else
19313      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19314$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19315      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19316$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19317      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19318    fi
19319  else
19320    input_to_shortpath="$new_path"
19321  fi
19322
19323  # Call helper function which possibly converts this using DOS-style short mode.
19324  # If so, the updated path is stored in $new_path.
19325  new_path="$input_to_shortpath"
19326
19327  input_path="$input_to_shortpath"
19328  # Check if we need to convert this using DOS-style short mode. If the path
19329  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19330  # take no chances and rewrite it.
19331  # Note: m4 eats our [], so we need to use [ and ] instead.
19332  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19333  if test "x$has_forbidden_chars" != x; then
19334    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19335    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19336    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19337    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19338      # Going to short mode and back again did indeed matter. Since short mode is
19339      # case insensitive, let's make it lowercase to improve readability.
19340      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19341      # Now convert it back to Unix-style (cygpath)
19342      input_path=`$CYGPATH -u "$shortmode_path"`
19343      new_path="$input_path"
19344    fi
19345  fi
19346
19347  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19348  if test "x$test_cygdrive_prefix" = x; then
19349    # As a simple fix, exclude /usr/bin since it's not a real path.
19350    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19351      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19352      # a path prefixed by /cygdrive for fixpath to work.
19353      new_path="$CYGWIN_ROOT_PATH$input_path"
19354    fi
19355  fi
19356
19357  # remove trailing .exe if any
19358  new_path="${new_path/%.exe/}"
19359
19360    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19361
19362  # First separate the path from the arguments. This will split at the first
19363  # space.
19364  complete="$FOUND_MAKE"
19365  path="${complete%% *}"
19366  tmp="$complete EOL"
19367  arguments="${tmp#* }"
19368
19369  # Input might be given as Windows format, start by converting to
19370  # unix format.
19371  new_path="$path"
19372
19373  windows_path="$new_path"
19374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19375    unix_path=`$CYGPATH -u "$windows_path"`
19376    new_path="$unix_path"
19377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19379    new_path="$unix_path"
19380  fi
19381
19382
19383  # Now try to locate executable using which
19384  new_path=`$WHICH "$new_path" 2> /dev/null`
19385
19386  if test "x$new_path" = x; then
19387    # Oops. Which didn't find the executable.
19388    # The splitting of arguments from the executable at a space might have been incorrect,
19389    # since paths with space are more likely in Windows. Give it another try with the whole
19390    # argument.
19391    path="$complete"
19392    arguments="EOL"
19393    new_path="$path"
19394
19395  windows_path="$new_path"
19396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19397    unix_path=`$CYGPATH -u "$windows_path"`
19398    new_path="$unix_path"
19399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19401    new_path="$unix_path"
19402  fi
19403
19404
19405    new_path=`$WHICH "$new_path" 2> /dev/null`
19406    # bat and cmd files are not always considered executable in MSYS causing which
19407    # to not find them
19408    if test "x$new_path" = x \
19409        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19410        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19411      new_path="$path"
19412
19413  windows_path="$new_path"
19414  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19415    unix_path=`$CYGPATH -u "$windows_path"`
19416    new_path="$unix_path"
19417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19418    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19419    new_path="$unix_path"
19420  fi
19421
19422    fi
19423
19424    if test "x$new_path" = x; then
19425      # It's still not found. Now this is an unrecoverable error.
19426      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19427$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19428      has_space=`$ECHO "$complete" | $GREP " "`
19429      if test "x$has_space" != x; then
19430        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19431$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19432      fi
19433      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19434    fi
19435  fi
19436
19437  # Now new_path has a complete unix path to the binary
19438  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19439    # Keep paths in /bin as-is, but remove trailing .exe if any
19440    new_path="${new_path/%.exe/}"
19441    # Do not save /bin paths to all_fixpath_prefixes!
19442  else
19443    # Not in mixed or Windows style, start by that.
19444    new_path=`cmd //c echo $new_path`
19445
19446  input_path="$new_path"
19447  # Check if we need to convert this using DOS-style short mode. If the path
19448  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19449  # take no chances and rewrite it.
19450  # Note: m4 eats our [], so we need to use [ and ] instead.
19451  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19452  if test "x$has_forbidden_chars" != x; then
19453    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19454    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19455  fi
19456
19457    # Output is in $new_path
19458
19459  windows_path="$new_path"
19460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19461    unix_path=`$CYGPATH -u "$windows_path"`
19462    new_path="$unix_path"
19463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19465    new_path="$unix_path"
19466  fi
19467
19468    # remove trailing .exe if any
19469    new_path="${new_path/%.exe/}"
19470
19471    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19472    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19473  fi
19474
19475    else
19476      # We're on a unix platform. Hooray! :)
19477      # First separate the path from the arguments. This will split at the first
19478      # space.
19479      complete="$FOUND_MAKE"
19480      path="${complete%% *}"
19481      tmp="$complete EOL"
19482      arguments="${tmp#* }"
19483
19484      # Cannot rely on the command "which" here since it doesn't always work.
19485      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19486      if test -z "$is_absolute_path"; then
19487        # Path to executable is not absolute. Find it.
19488        IFS_save="$IFS"
19489        IFS=:
19490        for p in $PATH; do
19491          if test -f "$p/$path" && test -x "$p/$path"; then
19492            new_path="$p/$path"
19493            break
19494          fi
19495        done
19496        IFS="$IFS_save"
19497      else
19498        # This is an absolute path, we can use it without further modifications.
19499        new_path="$path"
19500      fi
19501
19502      if test "x$new_path" = x; then
19503        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19504$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19505        has_space=`$ECHO "$complete" | $GREP " "`
19506        if test "x$has_space" != x; then
19507          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19508$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19509        fi
19510        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19511      fi
19512    fi
19513
19514    # Now join together the path and the arguments once again
19515    if test "x$arguments" != xEOL; then
19516      new_complete="$new_path ${arguments% *}"
19517    else
19518      new_complete="$new_path"
19519    fi
19520
19521    if test "x$complete" != "x$new_complete"; then
19522      FOUND_MAKE="$new_complete"
19523      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19524$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19525    fi
19526  fi
19527
19528        fi
19529      fi
19530    fi
19531  fi
19532
19533
19534    if test "x$FOUND_MAKE" = x; then
19535      for ac_prog in make
19536do
19537  # Extract the first word of "$ac_prog", so it can be a program name with args.
19538set dummy $ac_prog; ac_word=$2
19539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19540$as_echo_n "checking for $ac_word... " >&6; }
19541if ${ac_cv_path_CHECK_MAKE+:} false; then :
19542  $as_echo_n "(cached) " >&6
19543else
19544  case $CHECK_MAKE in
19545  [\\/]* | ?:[\\/]*)
19546  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19547  ;;
19548  *)
19549  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19550for as_dir in $PATH
19551do
19552  IFS=$as_save_IFS
19553  test -z "$as_dir" && as_dir=.
19554    for ac_exec_ext in '' $ac_executable_extensions; do
19555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19556    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19558    break 2
19559  fi
19560done
19561  done
19562IFS=$as_save_IFS
19563
19564  ;;
19565esac
19566fi
19567CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19568if test -n "$CHECK_MAKE"; then
19569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19570$as_echo "$CHECK_MAKE" >&6; }
19571else
19572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19573$as_echo "no" >&6; }
19574fi
19575
19576
19577  test -n "$CHECK_MAKE" && break
19578done
19579
19580
19581  MAKE_CANDIDATE=""$CHECK_MAKE""
19582  DESCRIPTION="make in PATH"
19583
19584  # On Cygwin, we require a newer version of make than on other platforms
19585  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19586    MAKE_VERSION_EXPR="-e 4\."
19587    MAKE_REQUIRED_VERSION="4.0"
19588   else
19589    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19590    MAKE_REQUIRED_VERSION="3.81"
19591  fi
19592
19593  if test "x$MAKE_CANDIDATE" != x; then
19594    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19595$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19596    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19597    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19598    if test "x$IS_GNU_MAKE" = x; then
19599      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19600$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19601    else
19602      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19603      if test "x$IS_MODERN_MAKE" = x; then
19604        { $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
19605$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;}
19606      else
19607        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19608          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19609            MAKE_EXPECTED_ENV='cygwin'
19610          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19611            MAKE_EXPECTED_ENV='msys'
19612          else
19613            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19614          fi
19615          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19616          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19617        else
19618          # Not relevant for non-Windows
19619          IS_MAKE_CORRECT_ENV=true
19620        fi
19621        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19622          { $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
19623$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;}
19624        else
19625          FOUND_MAKE=$MAKE_CANDIDATE
19626
19627  # Only process if variable expands to non-empty
19628
19629  if test "x$FOUND_MAKE" != x; then
19630    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19631
19632  # First separate the path from the arguments. This will split at the first
19633  # space.
19634  complete="$FOUND_MAKE"
19635  path="${complete%% *}"
19636  tmp="$complete EOL"
19637  arguments="${tmp#* }"
19638
19639  # Input might be given as Windows format, start by converting to
19640  # unix format.
19641  new_path=`$CYGPATH -u "$path"`
19642
19643  # Now try to locate executable using which
19644  new_path=`$WHICH "$new_path" 2> /dev/null`
19645  # bat and cmd files are not always considered executable in cygwin causing which
19646  # to not find them
19647  if test "x$new_path" = x \
19648      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19649      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19650    new_path=`$CYGPATH -u "$path"`
19651  fi
19652  if test "x$new_path" = x; then
19653    # Oops. Which didn't find the executable.
19654    # The splitting of arguments from the executable at a space might have been incorrect,
19655    # since paths with space are more likely in Windows. Give it another try with the whole
19656    # argument.
19657    path="$complete"
19658    arguments="EOL"
19659    new_path=`$CYGPATH -u "$path"`
19660    new_path=`$WHICH "$new_path" 2> /dev/null`
19661    # bat and cmd files are not always considered executable in cygwin causing which
19662    # to not find them
19663    if test "x$new_path" = x \
19664        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19665        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19666      new_path=`$CYGPATH -u "$path"`
19667    fi
19668    if test "x$new_path" = x; then
19669      # It's still not found. Now this is an unrecoverable error.
19670      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19671$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19672      has_space=`$ECHO "$complete" | $GREP " "`
19673      if test "x$has_space" != x; then
19674        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19675$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19676      fi
19677      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19678    fi
19679  fi
19680
19681  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19682  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19683  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19684  # "foo.exe" is OK but "foo" is an error.
19685  #
19686  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19687  # It is also a way to make sure we got the proper file name for the real test later on.
19688  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19689  if test "x$test_shortpath" = x; then
19690    # Short path failed, file does not exist as specified.
19691    # Try adding .exe or .cmd
19692    if test -f "${new_path}.exe"; then
19693      input_to_shortpath="${new_path}.exe"
19694    elif test -f "${new_path}.cmd"; then
19695      input_to_shortpath="${new_path}.cmd"
19696    else
19697      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19698$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19699      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19700$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19701      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19702    fi
19703  else
19704    input_to_shortpath="$new_path"
19705  fi
19706
19707  # Call helper function which possibly converts this using DOS-style short mode.
19708  # If so, the updated path is stored in $new_path.
19709  new_path="$input_to_shortpath"
19710
19711  input_path="$input_to_shortpath"
19712  # Check if we need to convert this using DOS-style short mode. If the path
19713  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19714  # take no chances and rewrite it.
19715  # Note: m4 eats our [], so we need to use [ and ] instead.
19716  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19717  if test "x$has_forbidden_chars" != x; then
19718    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19719    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19720    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19721    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19722      # Going to short mode and back again did indeed matter. Since short mode is
19723      # case insensitive, let's make it lowercase to improve readability.
19724      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19725      # Now convert it back to Unix-style (cygpath)
19726      input_path=`$CYGPATH -u "$shortmode_path"`
19727      new_path="$input_path"
19728    fi
19729  fi
19730
19731  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19732  if test "x$test_cygdrive_prefix" = x; then
19733    # As a simple fix, exclude /usr/bin since it's not a real path.
19734    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19735      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19736      # a path prefixed by /cygdrive for fixpath to work.
19737      new_path="$CYGWIN_ROOT_PATH$input_path"
19738    fi
19739  fi
19740
19741  # remove trailing .exe if any
19742  new_path="${new_path/%.exe/}"
19743
19744    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19745
19746  # First separate the path from the arguments. This will split at the first
19747  # space.
19748  complete="$FOUND_MAKE"
19749  path="${complete%% *}"
19750  tmp="$complete EOL"
19751  arguments="${tmp#* }"
19752
19753  # Input might be given as Windows format, start by converting to
19754  # unix format.
19755  new_path="$path"
19756
19757  windows_path="$new_path"
19758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19759    unix_path=`$CYGPATH -u "$windows_path"`
19760    new_path="$unix_path"
19761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19762    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19763    new_path="$unix_path"
19764  fi
19765
19766
19767  # Now try to locate executable using which
19768  new_path=`$WHICH "$new_path" 2> /dev/null`
19769
19770  if test "x$new_path" = x; then
19771    # Oops. Which didn't find the executable.
19772    # The splitting of arguments from the executable at a space might have been incorrect,
19773    # since paths with space are more likely in Windows. Give it another try with the whole
19774    # argument.
19775    path="$complete"
19776    arguments="EOL"
19777    new_path="$path"
19778
19779  windows_path="$new_path"
19780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19781    unix_path=`$CYGPATH -u "$windows_path"`
19782    new_path="$unix_path"
19783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19784    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19785    new_path="$unix_path"
19786  fi
19787
19788
19789    new_path=`$WHICH "$new_path" 2> /dev/null`
19790    # bat and cmd files are not always considered executable in MSYS causing which
19791    # to not find them
19792    if test "x$new_path" = x \
19793        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19794        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19795      new_path="$path"
19796
19797  windows_path="$new_path"
19798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19799    unix_path=`$CYGPATH -u "$windows_path"`
19800    new_path="$unix_path"
19801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19803    new_path="$unix_path"
19804  fi
19805
19806    fi
19807
19808    if test "x$new_path" = x; then
19809      # It's still not found. Now this is an unrecoverable error.
19810      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19811$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19812      has_space=`$ECHO "$complete" | $GREP " "`
19813      if test "x$has_space" != x; then
19814        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19815$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19816      fi
19817      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19818    fi
19819  fi
19820
19821  # Now new_path has a complete unix path to the binary
19822  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19823    # Keep paths in /bin as-is, but remove trailing .exe if any
19824    new_path="${new_path/%.exe/}"
19825    # Do not save /bin paths to all_fixpath_prefixes!
19826  else
19827    # Not in mixed or Windows style, start by that.
19828    new_path=`cmd //c echo $new_path`
19829
19830  input_path="$new_path"
19831  # Check if we need to convert this using DOS-style short mode. If the path
19832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19833  # take no chances and rewrite it.
19834  # Note: m4 eats our [], so we need to use [ and ] instead.
19835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19836  if test "x$has_forbidden_chars" != x; then
19837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19838    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19839  fi
19840
19841    # Output is in $new_path
19842
19843  windows_path="$new_path"
19844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19845    unix_path=`$CYGPATH -u "$windows_path"`
19846    new_path="$unix_path"
19847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19848    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19849    new_path="$unix_path"
19850  fi
19851
19852    # remove trailing .exe if any
19853    new_path="${new_path/%.exe/}"
19854
19855    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19856    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19857  fi
19858
19859    else
19860      # We're on a unix platform. Hooray! :)
19861      # First separate the path from the arguments. This will split at the first
19862      # space.
19863      complete="$FOUND_MAKE"
19864      path="${complete%% *}"
19865      tmp="$complete EOL"
19866      arguments="${tmp#* }"
19867
19868      # Cannot rely on the command "which" here since it doesn't always work.
19869      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19870      if test -z "$is_absolute_path"; then
19871        # Path to executable is not absolute. Find it.
19872        IFS_save="$IFS"
19873        IFS=:
19874        for p in $PATH; do
19875          if test -f "$p/$path" && test -x "$p/$path"; then
19876            new_path="$p/$path"
19877            break
19878          fi
19879        done
19880        IFS="$IFS_save"
19881      else
19882        # This is an absolute path, we can use it without further modifications.
19883        new_path="$path"
19884      fi
19885
19886      if test "x$new_path" = x; then
19887        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19888$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19889        has_space=`$ECHO "$complete" | $GREP " "`
19890        if test "x$has_space" != x; then
19891          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19892$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19893        fi
19894        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19895      fi
19896    fi
19897
19898    # Now join together the path and the arguments once again
19899    if test "x$arguments" != xEOL; then
19900      new_complete="$new_path ${arguments% *}"
19901    else
19902      new_complete="$new_path"
19903    fi
19904
19905    if test "x$complete" != "x$new_complete"; then
19906      FOUND_MAKE="$new_complete"
19907      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19908$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19909    fi
19910  fi
19911
19912        fi
19913      fi
19914    fi
19915  fi
19916
19917    fi
19918
19919    if test "x$FOUND_MAKE" = x; then
19920      if test "x$TOOLCHAIN_PATH" != x; then
19921        # We have a toolchain path, check that as well before giving up.
19922        OLD_PATH=$PATH
19923        PATH=$TOOLCHAIN_PATH:$PATH
19924        for ac_prog in gmake
19925do
19926  # Extract the first word of "$ac_prog", so it can be a program name with args.
19927set dummy $ac_prog; ac_word=$2
19928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19929$as_echo_n "checking for $ac_word... " >&6; }
19930if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19931  $as_echo_n "(cached) " >&6
19932else
19933  case $CHECK_TOOLSDIR_GMAKE in
19934  [\\/]* | ?:[\\/]*)
19935  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19936  ;;
19937  *)
19938  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19939for as_dir in $PATH
19940do
19941  IFS=$as_save_IFS
19942  test -z "$as_dir" && as_dir=.
19943    for ac_exec_ext in '' $ac_executable_extensions; do
19944  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19945    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19946    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19947    break 2
19948  fi
19949done
19950  done
19951IFS=$as_save_IFS
19952
19953  ;;
19954esac
19955fi
19956CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19957if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19959$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19960else
19961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19962$as_echo "no" >&6; }
19963fi
19964
19965
19966  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19967done
19968
19969
19970  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19971  DESCRIPTION="gmake in tools-dir"
19972
19973  # On Cygwin, we require a newer version of make than on other platforms
19974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19975    MAKE_VERSION_EXPR="-e 4\."
19976    MAKE_REQUIRED_VERSION="4.0"
19977   else
19978    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19979    MAKE_REQUIRED_VERSION="3.81"
19980  fi
19981
19982  if test "x$MAKE_CANDIDATE" != x; then
19983    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19984$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19985    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19986    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19987    if test "x$IS_GNU_MAKE" = x; then
19988      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19989$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19990    else
19991      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19992      if test "x$IS_MODERN_MAKE" = x; then
19993        { $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
19994$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;}
19995      else
19996        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19997          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19998            MAKE_EXPECTED_ENV='cygwin'
19999          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20000            MAKE_EXPECTED_ENV='msys'
20001          else
20002            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20003          fi
20004          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20005          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20006        else
20007          # Not relevant for non-Windows
20008          IS_MAKE_CORRECT_ENV=true
20009        fi
20010        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20011          { $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
20012$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;}
20013        else
20014          FOUND_MAKE=$MAKE_CANDIDATE
20015
20016  # Only process if variable expands to non-empty
20017
20018  if test "x$FOUND_MAKE" != x; then
20019    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20020
20021  # First separate the path from the arguments. This will split at the first
20022  # space.
20023  complete="$FOUND_MAKE"
20024  path="${complete%% *}"
20025  tmp="$complete EOL"
20026  arguments="${tmp#* }"
20027
20028  # Input might be given as Windows format, start by converting to
20029  # unix format.
20030  new_path=`$CYGPATH -u "$path"`
20031
20032  # Now try to locate executable using which
20033  new_path=`$WHICH "$new_path" 2> /dev/null`
20034  # bat and cmd files are not always considered executable in cygwin causing which
20035  # to not find them
20036  if test "x$new_path" = x \
20037      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20038      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20039    new_path=`$CYGPATH -u "$path"`
20040  fi
20041  if test "x$new_path" = x; then
20042    # Oops. Which didn't find the executable.
20043    # The splitting of arguments from the executable at a space might have been incorrect,
20044    # since paths with space are more likely in Windows. Give it another try with the whole
20045    # argument.
20046    path="$complete"
20047    arguments="EOL"
20048    new_path=`$CYGPATH -u "$path"`
20049    new_path=`$WHICH "$new_path" 2> /dev/null`
20050    # bat and cmd files are not always considered executable in cygwin causing which
20051    # to not find them
20052    if test "x$new_path" = x \
20053        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20054        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20055      new_path=`$CYGPATH -u "$path"`
20056    fi
20057    if test "x$new_path" = x; then
20058      # It's still not found. Now this is an unrecoverable error.
20059      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20060$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20061      has_space=`$ECHO "$complete" | $GREP " "`
20062      if test "x$has_space" != x; then
20063        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20064$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20065      fi
20066      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20067    fi
20068  fi
20069
20070  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20071  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20072  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20073  # "foo.exe" is OK but "foo" is an error.
20074  #
20075  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20076  # It is also a way to make sure we got the proper file name for the real test later on.
20077  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20078  if test "x$test_shortpath" = x; then
20079    # Short path failed, file does not exist as specified.
20080    # Try adding .exe or .cmd
20081    if test -f "${new_path}.exe"; then
20082      input_to_shortpath="${new_path}.exe"
20083    elif test -f "${new_path}.cmd"; then
20084      input_to_shortpath="${new_path}.cmd"
20085    else
20086      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20087$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20088      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20089$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20090      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20091    fi
20092  else
20093    input_to_shortpath="$new_path"
20094  fi
20095
20096  # Call helper function which possibly converts this using DOS-style short mode.
20097  # If so, the updated path is stored in $new_path.
20098  new_path="$input_to_shortpath"
20099
20100  input_path="$input_to_shortpath"
20101  # Check if we need to convert this using DOS-style short mode. If the path
20102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20103  # take no chances and rewrite it.
20104  # Note: m4 eats our [], so we need to use [ and ] instead.
20105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20106  if test "x$has_forbidden_chars" != x; then
20107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20108    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20109    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20110    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20111      # Going to short mode and back again did indeed matter. Since short mode is
20112      # case insensitive, let's make it lowercase to improve readability.
20113      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20114      # Now convert it back to Unix-style (cygpath)
20115      input_path=`$CYGPATH -u "$shortmode_path"`
20116      new_path="$input_path"
20117    fi
20118  fi
20119
20120  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20121  if test "x$test_cygdrive_prefix" = x; then
20122    # As a simple fix, exclude /usr/bin since it's not a real path.
20123    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20124      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20125      # a path prefixed by /cygdrive for fixpath to work.
20126      new_path="$CYGWIN_ROOT_PATH$input_path"
20127    fi
20128  fi
20129
20130  # remove trailing .exe if any
20131  new_path="${new_path/%.exe/}"
20132
20133    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20134
20135  # First separate the path from the arguments. This will split at the first
20136  # space.
20137  complete="$FOUND_MAKE"
20138  path="${complete%% *}"
20139  tmp="$complete EOL"
20140  arguments="${tmp#* }"
20141
20142  # Input might be given as Windows format, start by converting to
20143  # unix format.
20144  new_path="$path"
20145
20146  windows_path="$new_path"
20147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20148    unix_path=`$CYGPATH -u "$windows_path"`
20149    new_path="$unix_path"
20150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20152    new_path="$unix_path"
20153  fi
20154
20155
20156  # Now try to locate executable using which
20157  new_path=`$WHICH "$new_path" 2> /dev/null`
20158
20159  if test "x$new_path" = x; then
20160    # Oops. Which didn't find the executable.
20161    # The splitting of arguments from the executable at a space might have been incorrect,
20162    # since paths with space are more likely in Windows. Give it another try with the whole
20163    # argument.
20164    path="$complete"
20165    arguments="EOL"
20166    new_path="$path"
20167
20168  windows_path="$new_path"
20169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20170    unix_path=`$CYGPATH -u "$windows_path"`
20171    new_path="$unix_path"
20172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20174    new_path="$unix_path"
20175  fi
20176
20177
20178    new_path=`$WHICH "$new_path" 2> /dev/null`
20179    # bat and cmd files are not always considered executable in MSYS causing which
20180    # to not find them
20181    if test "x$new_path" = x \
20182        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20183        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20184      new_path="$path"
20185
20186  windows_path="$new_path"
20187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20188    unix_path=`$CYGPATH -u "$windows_path"`
20189    new_path="$unix_path"
20190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20192    new_path="$unix_path"
20193  fi
20194
20195    fi
20196
20197    if test "x$new_path" = x; then
20198      # It's still not found. Now this is an unrecoverable error.
20199      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20200$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20201      has_space=`$ECHO "$complete" | $GREP " "`
20202      if test "x$has_space" != x; then
20203        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20204$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20205      fi
20206      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20207    fi
20208  fi
20209
20210  # Now new_path has a complete unix path to the binary
20211  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20212    # Keep paths in /bin as-is, but remove trailing .exe if any
20213    new_path="${new_path/%.exe/}"
20214    # Do not save /bin paths to all_fixpath_prefixes!
20215  else
20216    # Not in mixed or Windows style, start by that.
20217    new_path=`cmd //c echo $new_path`
20218
20219  input_path="$new_path"
20220  # Check if we need to convert this using DOS-style short mode. If the path
20221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20222  # take no chances and rewrite it.
20223  # Note: m4 eats our [], so we need to use [ and ] instead.
20224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20225  if test "x$has_forbidden_chars" != x; then
20226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20227    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20228  fi
20229
20230    # Output is in $new_path
20231
20232  windows_path="$new_path"
20233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20234    unix_path=`$CYGPATH -u "$windows_path"`
20235    new_path="$unix_path"
20236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20237    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20238    new_path="$unix_path"
20239  fi
20240
20241    # remove trailing .exe if any
20242    new_path="${new_path/%.exe/}"
20243
20244    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20245    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20246  fi
20247
20248    else
20249      # We're on a unix platform. Hooray! :)
20250      # First separate the path from the arguments. This will split at the first
20251      # space.
20252      complete="$FOUND_MAKE"
20253      path="${complete%% *}"
20254      tmp="$complete EOL"
20255      arguments="${tmp#* }"
20256
20257      # Cannot rely on the command "which" here since it doesn't always work.
20258      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20259      if test -z "$is_absolute_path"; then
20260        # Path to executable is not absolute. Find it.
20261        IFS_save="$IFS"
20262        IFS=:
20263        for p in $PATH; do
20264          if test -f "$p/$path" && test -x "$p/$path"; then
20265            new_path="$p/$path"
20266            break
20267          fi
20268        done
20269        IFS="$IFS_save"
20270      else
20271        # This is an absolute path, we can use it without further modifications.
20272        new_path="$path"
20273      fi
20274
20275      if test "x$new_path" = x; then
20276        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20277$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20278        has_space=`$ECHO "$complete" | $GREP " "`
20279        if test "x$has_space" != x; then
20280          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20281$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20282        fi
20283        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20284      fi
20285    fi
20286
20287    # Now join together the path and the arguments once again
20288    if test "x$arguments" != xEOL; then
20289      new_complete="$new_path ${arguments% *}"
20290    else
20291      new_complete="$new_path"
20292    fi
20293
20294    if test "x$complete" != "x$new_complete"; then
20295      FOUND_MAKE="$new_complete"
20296      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20297$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20298    fi
20299  fi
20300
20301        fi
20302      fi
20303    fi
20304  fi
20305
20306        if test "x$FOUND_MAKE" = x; then
20307          for ac_prog in make
20308do
20309  # Extract the first word of "$ac_prog", so it can be a program name with args.
20310set dummy $ac_prog; ac_word=$2
20311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20312$as_echo_n "checking for $ac_word... " >&6; }
20313if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20314  $as_echo_n "(cached) " >&6
20315else
20316  case $CHECK_TOOLSDIR_MAKE in
20317  [\\/]* | ?:[\\/]*)
20318  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20319  ;;
20320  *)
20321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20322for as_dir in $PATH
20323do
20324  IFS=$as_save_IFS
20325  test -z "$as_dir" && as_dir=.
20326    for ac_exec_ext in '' $ac_executable_extensions; do
20327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20328    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20330    break 2
20331  fi
20332done
20333  done
20334IFS=$as_save_IFS
20335
20336  ;;
20337esac
20338fi
20339CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20340if test -n "$CHECK_TOOLSDIR_MAKE"; then
20341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20342$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20343else
20344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20345$as_echo "no" >&6; }
20346fi
20347
20348
20349  test -n "$CHECK_TOOLSDIR_MAKE" && break
20350done
20351
20352
20353  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20354  DESCRIPTION="make in tools-dir"
20355
20356  # On Cygwin, we require a newer version of make than on other platforms
20357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20358    MAKE_VERSION_EXPR="-e 4\."
20359    MAKE_REQUIRED_VERSION="4.0"
20360   else
20361    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20362    MAKE_REQUIRED_VERSION="3.81"
20363  fi
20364
20365  if test "x$MAKE_CANDIDATE" != x; then
20366    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20367$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20368    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20369    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20370    if test "x$IS_GNU_MAKE" = x; then
20371      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20372$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20373    else
20374      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20375      if test "x$IS_MODERN_MAKE" = x; then
20376        { $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
20377$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;}
20378      else
20379        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20380          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20381            MAKE_EXPECTED_ENV='cygwin'
20382          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20383            MAKE_EXPECTED_ENV='msys'
20384          else
20385            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20386          fi
20387          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20388          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20389        else
20390          # Not relevant for non-Windows
20391          IS_MAKE_CORRECT_ENV=true
20392        fi
20393        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20394          { $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
20395$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;}
20396        else
20397          FOUND_MAKE=$MAKE_CANDIDATE
20398
20399  # Only process if variable expands to non-empty
20400
20401  if test "x$FOUND_MAKE" != x; then
20402    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20403
20404  # First separate the path from the arguments. This will split at the first
20405  # space.
20406  complete="$FOUND_MAKE"
20407  path="${complete%% *}"
20408  tmp="$complete EOL"
20409  arguments="${tmp#* }"
20410
20411  # Input might be given as Windows format, start by converting to
20412  # unix format.
20413  new_path=`$CYGPATH -u "$path"`
20414
20415  # Now try to locate executable using which
20416  new_path=`$WHICH "$new_path" 2> /dev/null`
20417  # bat and cmd files are not always considered executable in cygwin causing which
20418  # to not find them
20419  if test "x$new_path" = x \
20420      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20421      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20422    new_path=`$CYGPATH -u "$path"`
20423  fi
20424  if test "x$new_path" = x; then
20425    # Oops. Which didn't find the executable.
20426    # The splitting of arguments from the executable at a space might have been incorrect,
20427    # since paths with space are more likely in Windows. Give it another try with the whole
20428    # argument.
20429    path="$complete"
20430    arguments="EOL"
20431    new_path=`$CYGPATH -u "$path"`
20432    new_path=`$WHICH "$new_path" 2> /dev/null`
20433    # bat and cmd files are not always considered executable in cygwin causing which
20434    # to not find them
20435    if test "x$new_path" = x \
20436        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20437        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20438      new_path=`$CYGPATH -u "$path"`
20439    fi
20440    if test "x$new_path" = x; then
20441      # It's still not found. Now this is an unrecoverable error.
20442      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20443$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20444      has_space=`$ECHO "$complete" | $GREP " "`
20445      if test "x$has_space" != x; then
20446        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20447$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20448      fi
20449      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20450    fi
20451  fi
20452
20453  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20454  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20455  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20456  # "foo.exe" is OK but "foo" is an error.
20457  #
20458  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20459  # It is also a way to make sure we got the proper file name for the real test later on.
20460  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20461  if test "x$test_shortpath" = x; then
20462    # Short path failed, file does not exist as specified.
20463    # Try adding .exe or .cmd
20464    if test -f "${new_path}.exe"; then
20465      input_to_shortpath="${new_path}.exe"
20466    elif test -f "${new_path}.cmd"; then
20467      input_to_shortpath="${new_path}.cmd"
20468    else
20469      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20470$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20471      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20472$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20473      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20474    fi
20475  else
20476    input_to_shortpath="$new_path"
20477  fi
20478
20479  # Call helper function which possibly converts this using DOS-style short mode.
20480  # If so, the updated path is stored in $new_path.
20481  new_path="$input_to_shortpath"
20482
20483  input_path="$input_to_shortpath"
20484  # Check if we need to convert this using DOS-style short mode. If the path
20485  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20486  # take no chances and rewrite it.
20487  # Note: m4 eats our [], so we need to use [ and ] instead.
20488  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20489  if test "x$has_forbidden_chars" != x; then
20490    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20491    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20492    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20493    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20494      # Going to short mode and back again did indeed matter. Since short mode is
20495      # case insensitive, let's make it lowercase to improve readability.
20496      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20497      # Now convert it back to Unix-style (cygpath)
20498      input_path=`$CYGPATH -u "$shortmode_path"`
20499      new_path="$input_path"
20500    fi
20501  fi
20502
20503  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20504  if test "x$test_cygdrive_prefix" = x; then
20505    # As a simple fix, exclude /usr/bin since it's not a real path.
20506    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20507      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20508      # a path prefixed by /cygdrive for fixpath to work.
20509      new_path="$CYGWIN_ROOT_PATH$input_path"
20510    fi
20511  fi
20512
20513  # remove trailing .exe if any
20514  new_path="${new_path/%.exe/}"
20515
20516    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20517
20518  # First separate the path from the arguments. This will split at the first
20519  # space.
20520  complete="$FOUND_MAKE"
20521  path="${complete%% *}"
20522  tmp="$complete EOL"
20523  arguments="${tmp#* }"
20524
20525  # Input might be given as Windows format, start by converting to
20526  # unix format.
20527  new_path="$path"
20528
20529  windows_path="$new_path"
20530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20531    unix_path=`$CYGPATH -u "$windows_path"`
20532    new_path="$unix_path"
20533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20534    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20535    new_path="$unix_path"
20536  fi
20537
20538
20539  # Now try to locate executable using which
20540  new_path=`$WHICH "$new_path" 2> /dev/null`
20541
20542  if test "x$new_path" = x; then
20543    # Oops. Which didn't find the executable.
20544    # The splitting of arguments from the executable at a space might have been incorrect,
20545    # since paths with space are more likely in Windows. Give it another try with the whole
20546    # argument.
20547    path="$complete"
20548    arguments="EOL"
20549    new_path="$path"
20550
20551  windows_path="$new_path"
20552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20553    unix_path=`$CYGPATH -u "$windows_path"`
20554    new_path="$unix_path"
20555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20556    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20557    new_path="$unix_path"
20558  fi
20559
20560
20561    new_path=`$WHICH "$new_path" 2> /dev/null`
20562    # bat and cmd files are not always considered executable in MSYS causing which
20563    # to not find them
20564    if test "x$new_path" = x \
20565        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20566        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20567      new_path="$path"
20568
20569  windows_path="$new_path"
20570  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20571    unix_path=`$CYGPATH -u "$windows_path"`
20572    new_path="$unix_path"
20573  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20574    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20575    new_path="$unix_path"
20576  fi
20577
20578    fi
20579
20580    if test "x$new_path" = x; then
20581      # It's still not found. Now this is an unrecoverable error.
20582      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20583$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20584      has_space=`$ECHO "$complete" | $GREP " "`
20585      if test "x$has_space" != x; then
20586        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20587$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20588      fi
20589      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20590    fi
20591  fi
20592
20593  # Now new_path has a complete unix path to the binary
20594  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20595    # Keep paths in /bin as-is, but remove trailing .exe if any
20596    new_path="${new_path/%.exe/}"
20597    # Do not save /bin paths to all_fixpath_prefixes!
20598  else
20599    # Not in mixed or Windows style, start by that.
20600    new_path=`cmd //c echo $new_path`
20601
20602  input_path="$new_path"
20603  # Check if we need to convert this using DOS-style short mode. If the path
20604  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20605  # take no chances and rewrite it.
20606  # Note: m4 eats our [], so we need to use [ and ] instead.
20607  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20608  if test "x$has_forbidden_chars" != x; then
20609    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20610    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20611  fi
20612
20613    # Output is in $new_path
20614
20615  windows_path="$new_path"
20616  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20617    unix_path=`$CYGPATH -u "$windows_path"`
20618    new_path="$unix_path"
20619  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20620    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20621    new_path="$unix_path"
20622  fi
20623
20624    # remove trailing .exe if any
20625    new_path="${new_path/%.exe/}"
20626
20627    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20628    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20629  fi
20630
20631    else
20632      # We're on a unix platform. Hooray! :)
20633      # First separate the path from the arguments. This will split at the first
20634      # space.
20635      complete="$FOUND_MAKE"
20636      path="${complete%% *}"
20637      tmp="$complete EOL"
20638      arguments="${tmp#* }"
20639
20640      # Cannot rely on the command "which" here since it doesn't always work.
20641      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20642      if test -z "$is_absolute_path"; then
20643        # Path to executable is not absolute. Find it.
20644        IFS_save="$IFS"
20645        IFS=:
20646        for p in $PATH; do
20647          if test -f "$p/$path" && test -x "$p/$path"; then
20648            new_path="$p/$path"
20649            break
20650          fi
20651        done
20652        IFS="$IFS_save"
20653      else
20654        # This is an absolute path, we can use it without further modifications.
20655        new_path="$path"
20656      fi
20657
20658      if test "x$new_path" = x; then
20659        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20660$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20661        has_space=`$ECHO "$complete" | $GREP " "`
20662        if test "x$has_space" != x; then
20663          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20664$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20665        fi
20666        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20667      fi
20668    fi
20669
20670    # Now join together the path and the arguments once again
20671    if test "x$arguments" != xEOL; then
20672      new_complete="$new_path ${arguments% *}"
20673    else
20674      new_complete="$new_path"
20675    fi
20676
20677    if test "x$complete" != "x$new_complete"; then
20678      FOUND_MAKE="$new_complete"
20679      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20680$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20681    fi
20682  fi
20683
20684        fi
20685      fi
20686    fi
20687  fi
20688
20689        fi
20690        PATH=$OLD_PATH
20691      fi
20692    fi
20693
20694    if test "x$FOUND_MAKE" = x; then
20695      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
20696    fi
20697
20698    else
20699      # If it succeeded, then it was overridden by the user. We will use it
20700      # for the tool.
20701
20702      # First remove it from the list of overridden variables, so we can test
20703      # for unknown variables in the end.
20704      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20705
20706      # Check if we try to supply an empty value
20707      if test "x$MAKE" = x; then
20708        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20709$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20710        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20711$as_echo_n "checking for MAKE... " >&6; }
20712        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20713$as_echo "disabled" >&6; }
20714      else
20715        # Check if the provided tool contains a complete path.
20716        tool_specified="$MAKE"
20717        tool_basename="${tool_specified##*/}"
20718        if test "x$tool_basename" = "x$tool_specified"; then
20719          # A command without a complete path is provided, search $PATH.
20720          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20721$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20722          # Extract the first word of "$tool_basename", so it can be a program name with args.
20723set dummy $tool_basename; ac_word=$2
20724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20725$as_echo_n "checking for $ac_word... " >&6; }
20726if ${ac_cv_path_MAKE+:} false; then :
20727  $as_echo_n "(cached) " >&6
20728else
20729  case $MAKE in
20730  [\\/]* | ?:[\\/]*)
20731  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20732  ;;
20733  *)
20734  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20735for as_dir in $PATH
20736do
20737  IFS=$as_save_IFS
20738  test -z "$as_dir" && as_dir=.
20739    for ac_exec_ext in '' $ac_executable_extensions; do
20740  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20741    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20743    break 2
20744  fi
20745done
20746  done
20747IFS=$as_save_IFS
20748
20749  ;;
20750esac
20751fi
20752MAKE=$ac_cv_path_MAKE
20753if test -n "$MAKE"; then
20754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20755$as_echo "$MAKE" >&6; }
20756else
20757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20758$as_echo "no" >&6; }
20759fi
20760
20761
20762          if test "x$MAKE" = x; then
20763            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20764          fi
20765        else
20766          # Otherwise we believe it is a complete path. Use it as it is.
20767          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20768$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20769          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20770$as_echo_n "checking for MAKE... " >&6; }
20771          if test ! -x "$tool_specified"; then
20772            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20773$as_echo "not found" >&6; }
20774            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20775          fi
20776          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20777$as_echo "$tool_specified" >&6; }
20778        fi
20779      fi
20780    fi
20781
20782    # If MAKE was set by user, verify the version
20783
20784  MAKE_CANDIDATE=""$MAKE""
20785  DESCRIPTION="user supplied MAKE=$MAKE"
20786
20787  # On Cygwin, we require a newer version of make than on other platforms
20788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20789    MAKE_VERSION_EXPR="-e 4\."
20790    MAKE_REQUIRED_VERSION="4.0"
20791   else
20792    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20793    MAKE_REQUIRED_VERSION="3.81"
20794  fi
20795
20796  if test "x$MAKE_CANDIDATE" != x; then
20797    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20798$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20799    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20800    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20801    if test "x$IS_GNU_MAKE" = x; then
20802      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20803$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20804    else
20805      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20806      if test "x$IS_MODERN_MAKE" = x; then
20807        { $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
20808$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;}
20809      else
20810        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20811          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20812            MAKE_EXPECTED_ENV='cygwin'
20813          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20814            MAKE_EXPECTED_ENV='msys'
20815          else
20816            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20817          fi
20818          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20819          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20820        else
20821          # Not relevant for non-Windows
20822          IS_MAKE_CORRECT_ENV=true
20823        fi
20824        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20825          { $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
20826$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;}
20827        else
20828          FOUND_MAKE=$MAKE_CANDIDATE
20829
20830  # Only process if variable expands to non-empty
20831
20832  if test "x$FOUND_MAKE" != x; then
20833    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20834
20835  # First separate the path from the arguments. This will split at the first
20836  # space.
20837  complete="$FOUND_MAKE"
20838  path="${complete%% *}"
20839  tmp="$complete EOL"
20840  arguments="${tmp#* }"
20841
20842  # Input might be given as Windows format, start by converting to
20843  # unix format.
20844  new_path=`$CYGPATH -u "$path"`
20845
20846  # Now try to locate executable using which
20847  new_path=`$WHICH "$new_path" 2> /dev/null`
20848  # bat and cmd files are not always considered executable in cygwin causing which
20849  # to not find them
20850  if test "x$new_path" = x \
20851      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20852      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20853    new_path=`$CYGPATH -u "$path"`
20854  fi
20855  if test "x$new_path" = x; then
20856    # Oops. Which didn't find the executable.
20857    # The splitting of arguments from the executable at a space might have been incorrect,
20858    # since paths with space are more likely in Windows. Give it another try with the whole
20859    # argument.
20860    path="$complete"
20861    arguments="EOL"
20862    new_path=`$CYGPATH -u "$path"`
20863    new_path=`$WHICH "$new_path" 2> /dev/null`
20864    # bat and cmd files are not always considered executable in cygwin causing which
20865    # to not find them
20866    if test "x$new_path" = x \
20867        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20868        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20869      new_path=`$CYGPATH -u "$path"`
20870    fi
20871    if test "x$new_path" = x; then
20872      # It's still not found. Now this is an unrecoverable error.
20873      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20874$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20875      has_space=`$ECHO "$complete" | $GREP " "`
20876      if test "x$has_space" != x; then
20877        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20878$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20879      fi
20880      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20881    fi
20882  fi
20883
20884  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20885  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20886  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20887  # "foo.exe" is OK but "foo" is an error.
20888  #
20889  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20890  # It is also a way to make sure we got the proper file name for the real test later on.
20891  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20892  if test "x$test_shortpath" = x; then
20893    # Short path failed, file does not exist as specified.
20894    # Try adding .exe or .cmd
20895    if test -f "${new_path}.exe"; then
20896      input_to_shortpath="${new_path}.exe"
20897    elif test -f "${new_path}.cmd"; then
20898      input_to_shortpath="${new_path}.cmd"
20899    else
20900      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20901$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20902      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20903$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20904      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20905    fi
20906  else
20907    input_to_shortpath="$new_path"
20908  fi
20909
20910  # Call helper function which possibly converts this using DOS-style short mode.
20911  # If so, the updated path is stored in $new_path.
20912  new_path="$input_to_shortpath"
20913
20914  input_path="$input_to_shortpath"
20915  # Check if we need to convert this using DOS-style short mode. If the path
20916  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20917  # take no chances and rewrite it.
20918  # Note: m4 eats our [], so we need to use [ and ] instead.
20919  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20920  if test "x$has_forbidden_chars" != x; then
20921    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20922    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20923    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20924    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20925      # Going to short mode and back again did indeed matter. Since short mode is
20926      # case insensitive, let's make it lowercase to improve readability.
20927      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20928      # Now convert it back to Unix-style (cygpath)
20929      input_path=`$CYGPATH -u "$shortmode_path"`
20930      new_path="$input_path"
20931    fi
20932  fi
20933
20934  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20935  if test "x$test_cygdrive_prefix" = x; then
20936    # As a simple fix, exclude /usr/bin since it's not a real path.
20937    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20938      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20939      # a path prefixed by /cygdrive for fixpath to work.
20940      new_path="$CYGWIN_ROOT_PATH$input_path"
20941    fi
20942  fi
20943
20944  # remove trailing .exe if any
20945  new_path="${new_path/%.exe/}"
20946
20947    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20948
20949  # First separate the path from the arguments. This will split at the first
20950  # space.
20951  complete="$FOUND_MAKE"
20952  path="${complete%% *}"
20953  tmp="$complete EOL"
20954  arguments="${tmp#* }"
20955
20956  # Input might be given as Windows format, start by converting to
20957  # unix format.
20958  new_path="$path"
20959
20960  windows_path="$new_path"
20961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20962    unix_path=`$CYGPATH -u "$windows_path"`
20963    new_path="$unix_path"
20964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20965    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20966    new_path="$unix_path"
20967  fi
20968
20969
20970  # Now try to locate executable using which
20971  new_path=`$WHICH "$new_path" 2> /dev/null`
20972
20973  if test "x$new_path" = x; then
20974    # Oops. Which didn't find the executable.
20975    # The splitting of arguments from the executable at a space might have been incorrect,
20976    # since paths with space are more likely in Windows. Give it another try with the whole
20977    # argument.
20978    path="$complete"
20979    arguments="EOL"
20980    new_path="$path"
20981
20982  windows_path="$new_path"
20983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20984    unix_path=`$CYGPATH -u "$windows_path"`
20985    new_path="$unix_path"
20986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20987    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20988    new_path="$unix_path"
20989  fi
20990
20991
20992    new_path=`$WHICH "$new_path" 2> /dev/null`
20993    # bat and cmd files are not always considered executable in MSYS causing which
20994    # to not find them
20995    if test "x$new_path" = x \
20996        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20997        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20998      new_path="$path"
20999
21000  windows_path="$new_path"
21001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21002    unix_path=`$CYGPATH -u "$windows_path"`
21003    new_path="$unix_path"
21004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21005    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21006    new_path="$unix_path"
21007  fi
21008
21009    fi
21010
21011    if test "x$new_path" = x; then
21012      # It's still not found. Now this is an unrecoverable error.
21013      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21014$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21015      has_space=`$ECHO "$complete" | $GREP " "`
21016      if test "x$has_space" != x; then
21017        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21018$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21019      fi
21020      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21021    fi
21022  fi
21023
21024  # Now new_path has a complete unix path to the binary
21025  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21026    # Keep paths in /bin as-is, but remove trailing .exe if any
21027    new_path="${new_path/%.exe/}"
21028    # Do not save /bin paths to all_fixpath_prefixes!
21029  else
21030    # Not in mixed or Windows style, start by that.
21031    new_path=`cmd //c echo $new_path`
21032
21033  input_path="$new_path"
21034  # Check if we need to convert this using DOS-style short mode. If the path
21035  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21036  # take no chances and rewrite it.
21037  # Note: m4 eats our [], so we need to use [ and ] instead.
21038  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21039  if test "x$has_forbidden_chars" != x; then
21040    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21041    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21042  fi
21043
21044    # Output is in $new_path
21045
21046  windows_path="$new_path"
21047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21048    unix_path=`$CYGPATH -u "$windows_path"`
21049    new_path="$unix_path"
21050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21051    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21052    new_path="$unix_path"
21053  fi
21054
21055    # remove trailing .exe if any
21056    new_path="${new_path/%.exe/}"
21057
21058    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21059    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21060  fi
21061
21062    else
21063      # We're on a unix platform. Hooray! :)
21064      # First separate the path from the arguments. This will split at the first
21065      # space.
21066      complete="$FOUND_MAKE"
21067      path="${complete%% *}"
21068      tmp="$complete EOL"
21069      arguments="${tmp#* }"
21070
21071      # Cannot rely on the command "which" here since it doesn't always work.
21072      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21073      if test -z "$is_absolute_path"; then
21074        # Path to executable is not absolute. Find it.
21075        IFS_save="$IFS"
21076        IFS=:
21077        for p in $PATH; do
21078          if test -f "$p/$path" && test -x "$p/$path"; then
21079            new_path="$p/$path"
21080            break
21081          fi
21082        done
21083        IFS="$IFS_save"
21084      else
21085        # This is an absolute path, we can use it without further modifications.
21086        new_path="$path"
21087      fi
21088
21089      if test "x$new_path" = x; then
21090        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21091$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21092        has_space=`$ECHO "$complete" | $GREP " "`
21093        if test "x$has_space" != x; then
21094          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21095$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21096        fi
21097        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21098      fi
21099    fi
21100
21101    # Now join together the path and the arguments once again
21102    if test "x$arguments" != xEOL; then
21103      new_complete="$new_path ${arguments% *}"
21104    else
21105      new_complete="$new_path"
21106    fi
21107
21108    if test "x$complete" != "x$new_complete"; then
21109      FOUND_MAKE="$new_complete"
21110      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21111$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21112    fi
21113  fi
21114
21115        fi
21116      fi
21117    fi
21118  fi
21119
21120    if test "x$FOUND_MAKE" = x; then
21121      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21122    fi
21123
21124  fi
21125
21126
21127  MAKE=$FOUND_MAKE
21128
21129  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21130$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21131
21132
21133  # Check if make supports the output sync option and if so, setup using it.
21134  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21135$as_echo_n "checking if make --output-sync is supported... " >&6; }
21136  if $MAKE --version -O > /dev/null 2>&1; then
21137    OUTPUT_SYNC_SUPPORTED=true
21138    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21139$as_echo "yes" >&6; }
21140    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21141$as_echo_n "checking for output-sync value... " >&6; }
21142
21143# Check whether --with-output-sync was given.
21144if test "${with_output_sync+set}" = set; then :
21145  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21146fi
21147
21148    if test "x$OUTPUT_SYNC" = "x"; then
21149      OUTPUT_SYNC=none
21150    fi
21151    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21152$as_echo "$OUTPUT_SYNC" >&6; }
21153    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21154      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21155    fi
21156  else
21157    OUTPUT_SYNC_SUPPORTED=false
21158    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21159$as_echo "no" >&6; }
21160  fi
21161
21162
21163
21164
21165
21166
21167  # Test if find supports -delete
21168  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21169$as_echo_n "checking if find supports -delete... " >&6; }
21170  FIND_DELETE="-delete"
21171
21172  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21173
21174  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21175
21176  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21177  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21178    # No, it does not.
21179    $RM $DELETEDIR/TestIfFindSupportsDelete
21180    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21181      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21182      FIND_DELETE="-print | $XARGS $RM"
21183    else
21184      FIND_DELETE="-exec $RM \{\} \+"
21185    fi
21186    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21187$as_echo "no" >&6; }
21188  else
21189    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21190$as_echo "yes" >&6; }
21191  fi
21192  $RMDIR $DELETEDIR
21193
21194
21195
21196  # Test which kind of tar was found
21197  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21198    TAR_TYPE="gnu"
21199  elif test "x$($TAR --version | $GREP "bsdtar")" != "x"; then
21200    TAR_TYPE="bsd"
21201  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21202    TAR_TYPE="bsd"
21203  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21204    TAR_TYPE="solaris"
21205  fi
21206  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21207$as_echo_n "checking what type of tar was found... " >&6; }
21208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21209$as_echo "$TAR_TYPE" >&6; }
21210
21211  TAR_CREATE_FILE_PARAM=""
21212
21213  if test "x$TAR_TYPE" = "xgnu"; then
21214    TAR_INCLUDE_PARAM="T"
21215    TAR_SUPPORTS_TRANSFORM="true"
21216    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21217      # When using gnu tar for Solaris targets, need to use compatibility mode
21218      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21219    fi
21220  else
21221    TAR_INCLUDE_PARAM="I"
21222    TAR_SUPPORTS_TRANSFORM="false"
21223  fi
21224
21225
21226
21227
21228
21229
21230  # Test that grep supports -Fx with a list of pattern which includes null pattern.
21231  # This is a problem for the grep resident on AIX.
21232  { $as_echo "$as_me:${as_lineno-$LINENO}: checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly" >&5
21233$as_echo_n "checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly... " >&6; }
21234  # Multiple subsequent spaces..
21235  STACK_SPACES='aaa   bbb   ccc'
21236  # ..converted to subsequent newlines, causes STACK_LIST to be a list with some empty
21237  # patterns in it.
21238  STACK_LIST=${STACK_SPACES// /$'\n'}
21239  NEEDLE_SPACES='ccc bbb aaa'
21240  NEEDLE_LIST=${NEEDLE_SPACES// /$'\n'}
21241  RESULT="$($GREP -Fvx "$STACK_LIST" <<< "$NEEDLE_LIST")"
21242  if test "x$RESULT" == "x"; then
21243    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21244$as_echo "yes" >&6; }
21245  else
21246    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21247      ADDINFO="Please make sure you use GNU grep, usually found at /opt/freeware/bin."
21248    fi
21249    as_fn_error $? "grep does not handle -Fx correctly. ${ADDINFO}" "$LINENO" 5
21250  fi
21251
21252
21253  # These tools might not be installed by default,
21254  # need hint on how to install them.
21255
21256
21257
21258  # Publish this variable in the help.
21259
21260
21261  if [ -z "${UNZIP+x}" ]; then
21262    # The variable is not set by user, try to locate tool using the code snippet
21263    for ac_prog in unzip
21264do
21265  # Extract the first word of "$ac_prog", so it can be a program name with args.
21266set dummy $ac_prog; ac_word=$2
21267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21268$as_echo_n "checking for $ac_word... " >&6; }
21269if ${ac_cv_path_UNZIP+:} false; then :
21270  $as_echo_n "(cached) " >&6
21271else
21272  case $UNZIP in
21273  [\\/]* | ?:[\\/]*)
21274  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21275  ;;
21276  *)
21277  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21278for as_dir in $PATH
21279do
21280  IFS=$as_save_IFS
21281  test -z "$as_dir" && as_dir=.
21282    for ac_exec_ext in '' $ac_executable_extensions; do
21283  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21284    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21286    break 2
21287  fi
21288done
21289  done
21290IFS=$as_save_IFS
21291
21292  ;;
21293esac
21294fi
21295UNZIP=$ac_cv_path_UNZIP
21296if test -n "$UNZIP"; then
21297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21298$as_echo "$UNZIP" >&6; }
21299else
21300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21301$as_echo "no" >&6; }
21302fi
21303
21304
21305  test -n "$UNZIP" && break
21306done
21307
21308  else
21309    # The variable is set, but is it from the command line or the environment?
21310
21311    # Try to remove the string !UNZIP! from our list.
21312    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21313    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21314      # If it failed, the variable was not from the command line. Ignore it,
21315      # but warn the user (except for BASH, which is always set by the calling BASH).
21316      if test "xUNZIP" != xBASH; then
21317        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21318$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21319      fi
21320      # Try to locate tool using the code snippet
21321      for ac_prog in unzip
21322do
21323  # Extract the first word of "$ac_prog", so it can be a program name with args.
21324set dummy $ac_prog; ac_word=$2
21325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21326$as_echo_n "checking for $ac_word... " >&6; }
21327if ${ac_cv_path_UNZIP+:} false; then :
21328  $as_echo_n "(cached) " >&6
21329else
21330  case $UNZIP in
21331  [\\/]* | ?:[\\/]*)
21332  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21333  ;;
21334  *)
21335  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21336for as_dir in $PATH
21337do
21338  IFS=$as_save_IFS
21339  test -z "$as_dir" && as_dir=.
21340    for ac_exec_ext in '' $ac_executable_extensions; do
21341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21342    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21344    break 2
21345  fi
21346done
21347  done
21348IFS=$as_save_IFS
21349
21350  ;;
21351esac
21352fi
21353UNZIP=$ac_cv_path_UNZIP
21354if test -n "$UNZIP"; then
21355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21356$as_echo "$UNZIP" >&6; }
21357else
21358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21359$as_echo "no" >&6; }
21360fi
21361
21362
21363  test -n "$UNZIP" && break
21364done
21365
21366    else
21367      # If it succeeded, then it was overridden by the user. We will use it
21368      # for the tool.
21369
21370      # First remove it from the list of overridden variables, so we can test
21371      # for unknown variables in the end.
21372      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21373
21374      # Check if we try to supply an empty value
21375      if test "x$UNZIP" = x; then
21376        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21377$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21378        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21379$as_echo_n "checking for UNZIP... " >&6; }
21380        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21381$as_echo "disabled" >&6; }
21382      else
21383        # Check if the provided tool contains a complete path.
21384        tool_specified="$UNZIP"
21385        tool_basename="${tool_specified##*/}"
21386        if test "x$tool_basename" = "x$tool_specified"; then
21387          # A command without a complete path is provided, search $PATH.
21388          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21389$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21390          # Extract the first word of "$tool_basename", so it can be a program name with args.
21391set dummy $tool_basename; ac_word=$2
21392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21393$as_echo_n "checking for $ac_word... " >&6; }
21394if ${ac_cv_path_UNZIP+:} false; then :
21395  $as_echo_n "(cached) " >&6
21396else
21397  case $UNZIP in
21398  [\\/]* | ?:[\\/]*)
21399  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21400  ;;
21401  *)
21402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21403for as_dir in $PATH
21404do
21405  IFS=$as_save_IFS
21406  test -z "$as_dir" && as_dir=.
21407    for ac_exec_ext in '' $ac_executable_extensions; do
21408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21409    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21411    break 2
21412  fi
21413done
21414  done
21415IFS=$as_save_IFS
21416
21417  ;;
21418esac
21419fi
21420UNZIP=$ac_cv_path_UNZIP
21421if test -n "$UNZIP"; then
21422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21423$as_echo "$UNZIP" >&6; }
21424else
21425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21426$as_echo "no" >&6; }
21427fi
21428
21429
21430          if test "x$UNZIP" = x; then
21431            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21432          fi
21433        else
21434          # Otherwise we believe it is a complete path. Use it as it is.
21435          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21436$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21437          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21438$as_echo_n "checking for UNZIP... " >&6; }
21439          if test ! -x "$tool_specified"; then
21440            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21441$as_echo "not found" >&6; }
21442            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21443          fi
21444          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21445$as_echo "$tool_specified" >&6; }
21446        fi
21447      fi
21448    fi
21449
21450  fi
21451
21452
21453
21454  if test "x$UNZIP" = x; then
21455    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21456  fi
21457
21458
21459  # Since zip uses "ZIP" as a environment variable for passing options, we need
21460  # to name our variable differently, hence ZIPEXE.
21461
21462
21463
21464  # Publish this variable in the help.
21465
21466
21467  if [ -z "${ZIPEXE+x}" ]; then
21468    # The variable is not set by user, try to locate tool using the code snippet
21469    for ac_prog in zip
21470do
21471  # Extract the first word of "$ac_prog", so it can be a program name with args.
21472set dummy $ac_prog; ac_word=$2
21473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21474$as_echo_n "checking for $ac_word... " >&6; }
21475if ${ac_cv_path_ZIPEXE+:} false; then :
21476  $as_echo_n "(cached) " >&6
21477else
21478  case $ZIPEXE in
21479  [\\/]* | ?:[\\/]*)
21480  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21481  ;;
21482  *)
21483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21484for as_dir in $PATH
21485do
21486  IFS=$as_save_IFS
21487  test -z "$as_dir" && as_dir=.
21488    for ac_exec_ext in '' $ac_executable_extensions; do
21489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21490    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21492    break 2
21493  fi
21494done
21495  done
21496IFS=$as_save_IFS
21497
21498  ;;
21499esac
21500fi
21501ZIPEXE=$ac_cv_path_ZIPEXE
21502if test -n "$ZIPEXE"; then
21503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21504$as_echo "$ZIPEXE" >&6; }
21505else
21506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21507$as_echo "no" >&6; }
21508fi
21509
21510
21511  test -n "$ZIPEXE" && break
21512done
21513
21514  else
21515    # The variable is set, but is it from the command line or the environment?
21516
21517    # Try to remove the string !ZIPEXE! from our list.
21518    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIPEXE!/}
21519    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21520      # If it failed, the variable was not from the command line. Ignore it,
21521      # but warn the user (except for BASH, which is always set by the calling BASH).
21522      if test "xZIPEXE" != xBASH; then
21523        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&5
21524$as_echo "$as_me: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&2;}
21525      fi
21526      # Try to locate tool using the code snippet
21527      for ac_prog in zip
21528do
21529  # Extract the first word of "$ac_prog", so it can be a program name with args.
21530set dummy $ac_prog; ac_word=$2
21531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21532$as_echo_n "checking for $ac_word... " >&6; }
21533if ${ac_cv_path_ZIPEXE+:} false; then :
21534  $as_echo_n "(cached) " >&6
21535else
21536  case $ZIPEXE in
21537  [\\/]* | ?:[\\/]*)
21538  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21539  ;;
21540  *)
21541  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21542for as_dir in $PATH
21543do
21544  IFS=$as_save_IFS
21545  test -z "$as_dir" && as_dir=.
21546    for ac_exec_ext in '' $ac_executable_extensions; do
21547  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21548    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21550    break 2
21551  fi
21552done
21553  done
21554IFS=$as_save_IFS
21555
21556  ;;
21557esac
21558fi
21559ZIPEXE=$ac_cv_path_ZIPEXE
21560if test -n "$ZIPEXE"; then
21561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21562$as_echo "$ZIPEXE" >&6; }
21563else
21564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21565$as_echo "no" >&6; }
21566fi
21567
21568
21569  test -n "$ZIPEXE" && break
21570done
21571
21572    else
21573      # If it succeeded, then it was overridden by the user. We will use it
21574      # for the tool.
21575
21576      # First remove it from the list of overridden variables, so we can test
21577      # for unknown variables in the end.
21578      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21579
21580      # Check if we try to supply an empty value
21581      if test "x$ZIPEXE" = x; then
21582        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIPEXE= (no value)" >&5
21583$as_echo "$as_me: Setting user supplied tool ZIPEXE= (no value)" >&6;}
21584        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21585$as_echo_n "checking for ZIPEXE... " >&6; }
21586        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21587$as_echo "disabled" >&6; }
21588      else
21589        # Check if the provided tool contains a complete path.
21590        tool_specified="$ZIPEXE"
21591        tool_basename="${tool_specified##*/}"
21592        if test "x$tool_basename" = "x$tool_specified"; then
21593          # A command without a complete path is provided, search $PATH.
21594          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIPEXE=$tool_basename" >&5
21595$as_echo "$as_me: Will search for user supplied tool ZIPEXE=$tool_basename" >&6;}
21596          # Extract the first word of "$tool_basename", so it can be a program name with args.
21597set dummy $tool_basename; ac_word=$2
21598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21599$as_echo_n "checking for $ac_word... " >&6; }
21600if ${ac_cv_path_ZIPEXE+:} false; then :
21601  $as_echo_n "(cached) " >&6
21602else
21603  case $ZIPEXE in
21604  [\\/]* | ?:[\\/]*)
21605  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21606  ;;
21607  *)
21608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21609for as_dir in $PATH
21610do
21611  IFS=$as_save_IFS
21612  test -z "$as_dir" && as_dir=.
21613    for ac_exec_ext in '' $ac_executable_extensions; do
21614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21615    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21617    break 2
21618  fi
21619done
21620  done
21621IFS=$as_save_IFS
21622
21623  ;;
21624esac
21625fi
21626ZIPEXE=$ac_cv_path_ZIPEXE
21627if test -n "$ZIPEXE"; then
21628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21629$as_echo "$ZIPEXE" >&6; }
21630else
21631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21632$as_echo "no" >&6; }
21633fi
21634
21635
21636          if test "x$ZIPEXE" = x; then
21637            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21638          fi
21639        else
21640          # Otherwise we believe it is a complete path. Use it as it is.
21641          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIPEXE=$tool_specified" >&5
21642$as_echo "$as_me: Will use user supplied tool ZIPEXE=$tool_specified" >&6;}
21643          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21644$as_echo_n "checking for ZIPEXE... " >&6; }
21645          if test ! -x "$tool_specified"; then
21646            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21647$as_echo "not found" >&6; }
21648            as_fn_error $? "User supplied tool ZIPEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
21649          fi
21650          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21651$as_echo "$tool_specified" >&6; }
21652        fi
21653      fi
21654    fi
21655
21656  fi
21657
21658
21659
21660  if test "x$ZIPEXE" = x; then
21661    as_fn_error $? "Could not find required tool for ZIPEXE" "$LINENO" 5
21662  fi
21663
21664
21665
21666  # Non-required basic tools
21667
21668
21669
21670  # Publish this variable in the help.
21671
21672
21673  if [ -z "${LDD+x}" ]; then
21674    # The variable is not set by user, try to locate tool using the code snippet
21675    for ac_prog in ldd
21676do
21677  # Extract the first word of "$ac_prog", so it can be a program name with args.
21678set dummy $ac_prog; ac_word=$2
21679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21680$as_echo_n "checking for $ac_word... " >&6; }
21681if ${ac_cv_path_LDD+:} false; then :
21682  $as_echo_n "(cached) " >&6
21683else
21684  case $LDD in
21685  [\\/]* | ?:[\\/]*)
21686  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21687  ;;
21688  *)
21689  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21690for as_dir in $PATH
21691do
21692  IFS=$as_save_IFS
21693  test -z "$as_dir" && as_dir=.
21694    for ac_exec_ext in '' $ac_executable_extensions; do
21695  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21696    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21698    break 2
21699  fi
21700done
21701  done
21702IFS=$as_save_IFS
21703
21704  ;;
21705esac
21706fi
21707LDD=$ac_cv_path_LDD
21708if test -n "$LDD"; then
21709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21710$as_echo "$LDD" >&6; }
21711else
21712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21713$as_echo "no" >&6; }
21714fi
21715
21716
21717  test -n "$LDD" && break
21718done
21719
21720  else
21721    # The variable is set, but is it from the command line or the environment?
21722
21723    # Try to remove the string !LDD! from our list.
21724    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21725    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21726      # If it failed, the variable was not from the command line. Ignore it,
21727      # but warn the user (except for BASH, which is always set by the calling BASH).
21728      if test "xLDD" != xBASH; then
21729        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21730$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21731      fi
21732      # Try to locate tool using the code snippet
21733      for ac_prog in ldd
21734do
21735  # Extract the first word of "$ac_prog", so it can be a program name with args.
21736set dummy $ac_prog; ac_word=$2
21737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21738$as_echo_n "checking for $ac_word... " >&6; }
21739if ${ac_cv_path_LDD+:} false; then :
21740  $as_echo_n "(cached) " >&6
21741else
21742  case $LDD in
21743  [\\/]* | ?:[\\/]*)
21744  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21745  ;;
21746  *)
21747  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21748for as_dir in $PATH
21749do
21750  IFS=$as_save_IFS
21751  test -z "$as_dir" && as_dir=.
21752    for ac_exec_ext in '' $ac_executable_extensions; do
21753  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21754    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21755    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21756    break 2
21757  fi
21758done
21759  done
21760IFS=$as_save_IFS
21761
21762  ;;
21763esac
21764fi
21765LDD=$ac_cv_path_LDD
21766if test -n "$LDD"; then
21767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21768$as_echo "$LDD" >&6; }
21769else
21770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21771$as_echo "no" >&6; }
21772fi
21773
21774
21775  test -n "$LDD" && break
21776done
21777
21778    else
21779      # If it succeeded, then it was overridden by the user. We will use it
21780      # for the tool.
21781
21782      # First remove it from the list of overridden variables, so we can test
21783      # for unknown variables in the end.
21784      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21785
21786      # Check if we try to supply an empty value
21787      if test "x$LDD" = x; then
21788        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21789$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21790        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21791$as_echo_n "checking for LDD... " >&6; }
21792        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21793$as_echo "disabled" >&6; }
21794      else
21795        # Check if the provided tool contains a complete path.
21796        tool_specified="$LDD"
21797        tool_basename="${tool_specified##*/}"
21798        if test "x$tool_basename" = "x$tool_specified"; then
21799          # A command without a complete path is provided, search $PATH.
21800          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21801$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21802          # Extract the first word of "$tool_basename", so it can be a program name with args.
21803set dummy $tool_basename; ac_word=$2
21804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21805$as_echo_n "checking for $ac_word... " >&6; }
21806if ${ac_cv_path_LDD+:} false; then :
21807  $as_echo_n "(cached) " >&6
21808else
21809  case $LDD in
21810  [\\/]* | ?:[\\/]*)
21811  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21812  ;;
21813  *)
21814  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21815for as_dir in $PATH
21816do
21817  IFS=$as_save_IFS
21818  test -z "$as_dir" && as_dir=.
21819    for ac_exec_ext in '' $ac_executable_extensions; do
21820  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21821    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21822    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21823    break 2
21824  fi
21825done
21826  done
21827IFS=$as_save_IFS
21828
21829  ;;
21830esac
21831fi
21832LDD=$ac_cv_path_LDD
21833if test -n "$LDD"; then
21834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21835$as_echo "$LDD" >&6; }
21836else
21837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21838$as_echo "no" >&6; }
21839fi
21840
21841
21842          if test "x$LDD" = x; then
21843            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21844          fi
21845        else
21846          # Otherwise we believe it is a complete path. Use it as it is.
21847          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21848$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21849          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21850$as_echo_n "checking for LDD... " >&6; }
21851          if test ! -x "$tool_specified"; then
21852            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21853$as_echo "not found" >&6; }
21854            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21855          fi
21856          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21857$as_echo "$tool_specified" >&6; }
21858        fi
21859      fi
21860    fi
21861
21862  fi
21863
21864
21865  if test "x$LDD" = "x"; then
21866    # List shared lib dependencies is used for
21867    # debug output and checking for forbidden dependencies.
21868    # We can build without it.
21869    LDD="true"
21870  fi
21871
21872
21873  # Publish this variable in the help.
21874
21875
21876  if [ -z "${OTOOL+x}" ]; then
21877    # The variable is not set by user, try to locate tool using the code snippet
21878    for ac_prog in otool
21879do
21880  # Extract the first word of "$ac_prog", so it can be a program name with args.
21881set dummy $ac_prog; ac_word=$2
21882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21883$as_echo_n "checking for $ac_word... " >&6; }
21884if ${ac_cv_path_OTOOL+:} false; then :
21885  $as_echo_n "(cached) " >&6
21886else
21887  case $OTOOL in
21888  [\\/]* | ?:[\\/]*)
21889  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21890  ;;
21891  *)
21892  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21893for as_dir in $PATH
21894do
21895  IFS=$as_save_IFS
21896  test -z "$as_dir" && as_dir=.
21897    for ac_exec_ext in '' $ac_executable_extensions; do
21898  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21899    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21900    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21901    break 2
21902  fi
21903done
21904  done
21905IFS=$as_save_IFS
21906
21907  ;;
21908esac
21909fi
21910OTOOL=$ac_cv_path_OTOOL
21911if test -n "$OTOOL"; then
21912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21913$as_echo "$OTOOL" >&6; }
21914else
21915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21916$as_echo "no" >&6; }
21917fi
21918
21919
21920  test -n "$OTOOL" && break
21921done
21922
21923  else
21924    # The variable is set, but is it from the command line or the environment?
21925
21926    # Try to remove the string !OTOOL! from our list.
21927    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21928    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21929      # If it failed, the variable was not from the command line. Ignore it,
21930      # but warn the user (except for BASH, which is always set by the calling BASH).
21931      if test "xOTOOL" != xBASH; then
21932        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21933$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21934      fi
21935      # Try to locate tool using the code snippet
21936      for ac_prog in otool
21937do
21938  # Extract the first word of "$ac_prog", so it can be a program name with args.
21939set dummy $ac_prog; ac_word=$2
21940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21941$as_echo_n "checking for $ac_word... " >&6; }
21942if ${ac_cv_path_OTOOL+:} false; then :
21943  $as_echo_n "(cached) " >&6
21944else
21945  case $OTOOL in
21946  [\\/]* | ?:[\\/]*)
21947  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21948  ;;
21949  *)
21950  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21951for as_dir in $PATH
21952do
21953  IFS=$as_save_IFS
21954  test -z "$as_dir" && as_dir=.
21955    for ac_exec_ext in '' $ac_executable_extensions; do
21956  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21957    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21959    break 2
21960  fi
21961done
21962  done
21963IFS=$as_save_IFS
21964
21965  ;;
21966esac
21967fi
21968OTOOL=$ac_cv_path_OTOOL
21969if test -n "$OTOOL"; then
21970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21971$as_echo "$OTOOL" >&6; }
21972else
21973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21974$as_echo "no" >&6; }
21975fi
21976
21977
21978  test -n "$OTOOL" && break
21979done
21980
21981    else
21982      # If it succeeded, then it was overridden by the user. We will use it
21983      # for the tool.
21984
21985      # First remove it from the list of overridden variables, so we can test
21986      # for unknown variables in the end.
21987      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21988
21989      # Check if we try to supply an empty value
21990      if test "x$OTOOL" = x; then
21991        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21992$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21993        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21994$as_echo_n "checking for OTOOL... " >&6; }
21995        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21996$as_echo "disabled" >&6; }
21997      else
21998        # Check if the provided tool contains a complete path.
21999        tool_specified="$OTOOL"
22000        tool_basename="${tool_specified##*/}"
22001        if test "x$tool_basename" = "x$tool_specified"; then
22002          # A command without a complete path is provided, search $PATH.
22003          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
22004$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
22005          # Extract the first word of "$tool_basename", so it can be a program name with args.
22006set dummy $tool_basename; ac_word=$2
22007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22008$as_echo_n "checking for $ac_word... " >&6; }
22009if ${ac_cv_path_OTOOL+:} false; then :
22010  $as_echo_n "(cached) " >&6
22011else
22012  case $OTOOL in
22013  [\\/]* | ?:[\\/]*)
22014  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22015  ;;
22016  *)
22017  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22018for as_dir in $PATH
22019do
22020  IFS=$as_save_IFS
22021  test -z "$as_dir" && as_dir=.
22022    for ac_exec_ext in '' $ac_executable_extensions; do
22023  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22024    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22025    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22026    break 2
22027  fi
22028done
22029  done
22030IFS=$as_save_IFS
22031
22032  ;;
22033esac
22034fi
22035OTOOL=$ac_cv_path_OTOOL
22036if test -n "$OTOOL"; then
22037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22038$as_echo "$OTOOL" >&6; }
22039else
22040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22041$as_echo "no" >&6; }
22042fi
22043
22044
22045          if test "x$OTOOL" = x; then
22046            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22047          fi
22048        else
22049          # Otherwise we believe it is a complete path. Use it as it is.
22050          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
22051$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
22052          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22053$as_echo_n "checking for OTOOL... " >&6; }
22054          if test ! -x "$tool_specified"; then
22055            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22056$as_echo "not found" >&6; }
22057            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
22058          fi
22059          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22060$as_echo "$tool_specified" >&6; }
22061        fi
22062      fi
22063    fi
22064
22065  fi
22066
22067
22068  if test "x$OTOOL" = "x"; then
22069    OTOOL="true"
22070  fi
22071
22072
22073  # Publish this variable in the help.
22074
22075
22076  if [ -z "${READELF+x}" ]; then
22077    # The variable is not set by user, try to locate tool using the code snippet
22078    for ac_prog in greadelf readelf
22079do
22080  # Extract the first word of "$ac_prog", so it can be a program name with args.
22081set dummy $ac_prog; ac_word=$2
22082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22083$as_echo_n "checking for $ac_word... " >&6; }
22084if ${ac_cv_path_READELF+:} false; then :
22085  $as_echo_n "(cached) " >&6
22086else
22087  case $READELF in
22088  [\\/]* | ?:[\\/]*)
22089  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22090  ;;
22091  *)
22092  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22093for as_dir in $PATH
22094do
22095  IFS=$as_save_IFS
22096  test -z "$as_dir" && as_dir=.
22097    for ac_exec_ext in '' $ac_executable_extensions; do
22098  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22099    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22101    break 2
22102  fi
22103done
22104  done
22105IFS=$as_save_IFS
22106
22107  ;;
22108esac
22109fi
22110READELF=$ac_cv_path_READELF
22111if test -n "$READELF"; then
22112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22113$as_echo "$READELF" >&6; }
22114else
22115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22116$as_echo "no" >&6; }
22117fi
22118
22119
22120  test -n "$READELF" && break
22121done
22122
22123  else
22124    # The variable is set, but is it from the command line or the environment?
22125
22126    # Try to remove the string !READELF! from our list.
22127    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22128    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22129      # If it failed, the variable was not from the command line. Ignore it,
22130      # but warn the user (except for BASH, which is always set by the calling BASH).
22131      if test "xREADELF" != xBASH; then
22132        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22133$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22134      fi
22135      # Try to locate tool using the code snippet
22136      for ac_prog in greadelf readelf
22137do
22138  # Extract the first word of "$ac_prog", so it can be a program name with args.
22139set dummy $ac_prog; ac_word=$2
22140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22141$as_echo_n "checking for $ac_word... " >&6; }
22142if ${ac_cv_path_READELF+:} false; then :
22143  $as_echo_n "(cached) " >&6
22144else
22145  case $READELF in
22146  [\\/]* | ?:[\\/]*)
22147  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22148  ;;
22149  *)
22150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22151for as_dir in $PATH
22152do
22153  IFS=$as_save_IFS
22154  test -z "$as_dir" && as_dir=.
22155    for ac_exec_ext in '' $ac_executable_extensions; do
22156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22157    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22159    break 2
22160  fi
22161done
22162  done
22163IFS=$as_save_IFS
22164
22165  ;;
22166esac
22167fi
22168READELF=$ac_cv_path_READELF
22169if test -n "$READELF"; then
22170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22171$as_echo "$READELF" >&6; }
22172else
22173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22174$as_echo "no" >&6; }
22175fi
22176
22177
22178  test -n "$READELF" && break
22179done
22180
22181    else
22182      # If it succeeded, then it was overridden by the user. We will use it
22183      # for the tool.
22184
22185      # First remove it from the list of overridden variables, so we can test
22186      # for unknown variables in the end.
22187      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22188
22189      # Check if we try to supply an empty value
22190      if test "x$READELF" = x; then
22191        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22192$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22193        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22194$as_echo_n "checking for READELF... " >&6; }
22195        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22196$as_echo "disabled" >&6; }
22197      else
22198        # Check if the provided tool contains a complete path.
22199        tool_specified="$READELF"
22200        tool_basename="${tool_specified##*/}"
22201        if test "x$tool_basename" = "x$tool_specified"; then
22202          # A command without a complete path is provided, search $PATH.
22203          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22204$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22205          # Extract the first word of "$tool_basename", so it can be a program name with args.
22206set dummy $tool_basename; ac_word=$2
22207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22208$as_echo_n "checking for $ac_word... " >&6; }
22209if ${ac_cv_path_READELF+:} false; then :
22210  $as_echo_n "(cached) " >&6
22211else
22212  case $READELF in
22213  [\\/]* | ?:[\\/]*)
22214  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22215  ;;
22216  *)
22217  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22218for as_dir in $PATH
22219do
22220  IFS=$as_save_IFS
22221  test -z "$as_dir" && as_dir=.
22222    for ac_exec_ext in '' $ac_executable_extensions; do
22223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22224    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22226    break 2
22227  fi
22228done
22229  done
22230IFS=$as_save_IFS
22231
22232  ;;
22233esac
22234fi
22235READELF=$ac_cv_path_READELF
22236if test -n "$READELF"; then
22237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22238$as_echo "$READELF" >&6; }
22239else
22240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22241$as_echo "no" >&6; }
22242fi
22243
22244
22245          if test "x$READELF" = x; then
22246            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22247          fi
22248        else
22249          # Otherwise we believe it is a complete path. Use it as it is.
22250          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22251$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22252          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22253$as_echo_n "checking for READELF... " >&6; }
22254          if test ! -x "$tool_specified"; then
22255            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22256$as_echo "not found" >&6; }
22257            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22258          fi
22259          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22260$as_echo "$tool_specified" >&6; }
22261        fi
22262      fi
22263    fi
22264
22265  fi
22266
22267
22268
22269
22270  # Publish this variable in the help.
22271
22272
22273  if [ -z "${HG+x}" ]; then
22274    # The variable is not set by user, try to locate tool using the code snippet
22275    for ac_prog in hg
22276do
22277  # Extract the first word of "$ac_prog", so it can be a program name with args.
22278set dummy $ac_prog; ac_word=$2
22279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22280$as_echo_n "checking for $ac_word... " >&6; }
22281if ${ac_cv_path_HG+:} false; then :
22282  $as_echo_n "(cached) " >&6
22283else
22284  case $HG in
22285  [\\/]* | ?:[\\/]*)
22286  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22287  ;;
22288  *)
22289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22290for as_dir in $PATH
22291do
22292  IFS=$as_save_IFS
22293  test -z "$as_dir" && as_dir=.
22294    for ac_exec_ext in '' $ac_executable_extensions; do
22295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22296    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22298    break 2
22299  fi
22300done
22301  done
22302IFS=$as_save_IFS
22303
22304  ;;
22305esac
22306fi
22307HG=$ac_cv_path_HG
22308if test -n "$HG"; then
22309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22310$as_echo "$HG" >&6; }
22311else
22312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22313$as_echo "no" >&6; }
22314fi
22315
22316
22317  test -n "$HG" && break
22318done
22319
22320  else
22321    # The variable is set, but is it from the command line or the environment?
22322
22323    # Try to remove the string !HG! from our list.
22324    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22325    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22326      # If it failed, the variable was not from the command line. Ignore it,
22327      # but warn the user (except for BASH, which is always set by the calling BASH).
22328      if test "xHG" != xBASH; then
22329        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22330$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22331      fi
22332      # Try to locate tool using the code snippet
22333      for ac_prog in hg
22334do
22335  # Extract the first word of "$ac_prog", so it can be a program name with args.
22336set dummy $ac_prog; ac_word=$2
22337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22338$as_echo_n "checking for $ac_word... " >&6; }
22339if ${ac_cv_path_HG+:} false; then :
22340  $as_echo_n "(cached) " >&6
22341else
22342  case $HG in
22343  [\\/]* | ?:[\\/]*)
22344  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22345  ;;
22346  *)
22347  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22348for as_dir in $PATH
22349do
22350  IFS=$as_save_IFS
22351  test -z "$as_dir" && as_dir=.
22352    for ac_exec_ext in '' $ac_executable_extensions; do
22353  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22354    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22356    break 2
22357  fi
22358done
22359  done
22360IFS=$as_save_IFS
22361
22362  ;;
22363esac
22364fi
22365HG=$ac_cv_path_HG
22366if test -n "$HG"; then
22367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22368$as_echo "$HG" >&6; }
22369else
22370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22371$as_echo "no" >&6; }
22372fi
22373
22374
22375  test -n "$HG" && break
22376done
22377
22378    else
22379      # If it succeeded, then it was overridden by the user. We will use it
22380      # for the tool.
22381
22382      # First remove it from the list of overridden variables, so we can test
22383      # for unknown variables in the end.
22384      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22385
22386      # Check if we try to supply an empty value
22387      if test "x$HG" = x; then
22388        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22389$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22390        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22391$as_echo_n "checking for HG... " >&6; }
22392        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22393$as_echo "disabled" >&6; }
22394      else
22395        # Check if the provided tool contains a complete path.
22396        tool_specified="$HG"
22397        tool_basename="${tool_specified##*/}"
22398        if test "x$tool_basename" = "x$tool_specified"; then
22399          # A command without a complete path is provided, search $PATH.
22400          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22401$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22402          # Extract the first word of "$tool_basename", so it can be a program name with args.
22403set dummy $tool_basename; ac_word=$2
22404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22405$as_echo_n "checking for $ac_word... " >&6; }
22406if ${ac_cv_path_HG+:} false; then :
22407  $as_echo_n "(cached) " >&6
22408else
22409  case $HG in
22410  [\\/]* | ?:[\\/]*)
22411  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22412  ;;
22413  *)
22414  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22415for as_dir in $PATH
22416do
22417  IFS=$as_save_IFS
22418  test -z "$as_dir" && as_dir=.
22419    for ac_exec_ext in '' $ac_executable_extensions; do
22420  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22421    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22422    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22423    break 2
22424  fi
22425done
22426  done
22427IFS=$as_save_IFS
22428
22429  ;;
22430esac
22431fi
22432HG=$ac_cv_path_HG
22433if test -n "$HG"; then
22434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22435$as_echo "$HG" >&6; }
22436else
22437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22438$as_echo "no" >&6; }
22439fi
22440
22441
22442          if test "x$HG" = x; then
22443            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22444          fi
22445        else
22446          # Otherwise we believe it is a complete path. Use it as it is.
22447          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22448$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22449          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22450$as_echo_n "checking for HG... " >&6; }
22451          if test ! -x "$tool_specified"; then
22452            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22453$as_echo "not found" >&6; }
22454            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22455          fi
22456          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22457$as_echo "$tool_specified" >&6; }
22458        fi
22459      fi
22460    fi
22461
22462  fi
22463
22464
22465
22466
22467  # Publish this variable in the help.
22468
22469
22470  if [ -z "${STAT+x}" ]; then
22471    # The variable is not set by user, try to locate tool using the code snippet
22472    for ac_prog in stat
22473do
22474  # Extract the first word of "$ac_prog", so it can be a program name with args.
22475set dummy $ac_prog; ac_word=$2
22476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22477$as_echo_n "checking for $ac_word... " >&6; }
22478if ${ac_cv_path_STAT+:} false; then :
22479  $as_echo_n "(cached) " >&6
22480else
22481  case $STAT in
22482  [\\/]* | ?:[\\/]*)
22483  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22484  ;;
22485  *)
22486  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22487for as_dir in $PATH
22488do
22489  IFS=$as_save_IFS
22490  test -z "$as_dir" && as_dir=.
22491    for ac_exec_ext in '' $ac_executable_extensions; do
22492  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22493    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22494    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22495    break 2
22496  fi
22497done
22498  done
22499IFS=$as_save_IFS
22500
22501  ;;
22502esac
22503fi
22504STAT=$ac_cv_path_STAT
22505if test -n "$STAT"; then
22506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22507$as_echo "$STAT" >&6; }
22508else
22509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22510$as_echo "no" >&6; }
22511fi
22512
22513
22514  test -n "$STAT" && break
22515done
22516
22517  else
22518    # The variable is set, but is it from the command line or the environment?
22519
22520    # Try to remove the string !STAT! from our list.
22521    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22522    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22523      # If it failed, the variable was not from the command line. Ignore it,
22524      # but warn the user (except for BASH, which is always set by the calling BASH).
22525      if test "xSTAT" != xBASH; then
22526        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22527$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22528      fi
22529      # Try to locate tool using the code snippet
22530      for ac_prog in stat
22531do
22532  # Extract the first word of "$ac_prog", so it can be a program name with args.
22533set dummy $ac_prog; ac_word=$2
22534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22535$as_echo_n "checking for $ac_word... " >&6; }
22536if ${ac_cv_path_STAT+:} false; then :
22537  $as_echo_n "(cached) " >&6
22538else
22539  case $STAT in
22540  [\\/]* | ?:[\\/]*)
22541  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22542  ;;
22543  *)
22544  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22545for as_dir in $PATH
22546do
22547  IFS=$as_save_IFS
22548  test -z "$as_dir" && as_dir=.
22549    for ac_exec_ext in '' $ac_executable_extensions; do
22550  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22551    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22553    break 2
22554  fi
22555done
22556  done
22557IFS=$as_save_IFS
22558
22559  ;;
22560esac
22561fi
22562STAT=$ac_cv_path_STAT
22563if test -n "$STAT"; then
22564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22565$as_echo "$STAT" >&6; }
22566else
22567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22568$as_echo "no" >&6; }
22569fi
22570
22571
22572  test -n "$STAT" && break
22573done
22574
22575    else
22576      # If it succeeded, then it was overridden by the user. We will use it
22577      # for the tool.
22578
22579      # First remove it from the list of overridden variables, so we can test
22580      # for unknown variables in the end.
22581      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22582
22583      # Check if we try to supply an empty value
22584      if test "x$STAT" = x; then
22585        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22586$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22587        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22588$as_echo_n "checking for STAT... " >&6; }
22589        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22590$as_echo "disabled" >&6; }
22591      else
22592        # Check if the provided tool contains a complete path.
22593        tool_specified="$STAT"
22594        tool_basename="${tool_specified##*/}"
22595        if test "x$tool_basename" = "x$tool_specified"; then
22596          # A command without a complete path is provided, search $PATH.
22597          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22598$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22599          # Extract the first word of "$tool_basename", so it can be a program name with args.
22600set dummy $tool_basename; ac_word=$2
22601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22602$as_echo_n "checking for $ac_word... " >&6; }
22603if ${ac_cv_path_STAT+:} false; then :
22604  $as_echo_n "(cached) " >&6
22605else
22606  case $STAT in
22607  [\\/]* | ?:[\\/]*)
22608  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22609  ;;
22610  *)
22611  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22612for as_dir in $PATH
22613do
22614  IFS=$as_save_IFS
22615  test -z "$as_dir" && as_dir=.
22616    for ac_exec_ext in '' $ac_executable_extensions; do
22617  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22618    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22619    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22620    break 2
22621  fi
22622done
22623  done
22624IFS=$as_save_IFS
22625
22626  ;;
22627esac
22628fi
22629STAT=$ac_cv_path_STAT
22630if test -n "$STAT"; then
22631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22632$as_echo "$STAT" >&6; }
22633else
22634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22635$as_echo "no" >&6; }
22636fi
22637
22638
22639          if test "x$STAT" = x; then
22640            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22641          fi
22642        else
22643          # Otherwise we believe it is a complete path. Use it as it is.
22644          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22645$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22646          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22647$as_echo_n "checking for STAT... " >&6; }
22648          if test ! -x "$tool_specified"; then
22649            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22650$as_echo "not found" >&6; }
22651            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22652          fi
22653          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22654$as_echo "$tool_specified" >&6; }
22655        fi
22656      fi
22657    fi
22658
22659  fi
22660
22661
22662
22663
22664  # Publish this variable in the help.
22665
22666
22667  if [ -z "${TIME+x}" ]; then
22668    # The variable is not set by user, try to locate tool using the code snippet
22669    for ac_prog in time
22670do
22671  # Extract the first word of "$ac_prog", so it can be a program name with args.
22672set dummy $ac_prog; ac_word=$2
22673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22674$as_echo_n "checking for $ac_word... " >&6; }
22675if ${ac_cv_path_TIME+:} false; then :
22676  $as_echo_n "(cached) " >&6
22677else
22678  case $TIME in
22679  [\\/]* | ?:[\\/]*)
22680  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22681  ;;
22682  *)
22683  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22684for as_dir in $PATH
22685do
22686  IFS=$as_save_IFS
22687  test -z "$as_dir" && as_dir=.
22688    for ac_exec_ext in '' $ac_executable_extensions; do
22689  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22690    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22692    break 2
22693  fi
22694done
22695  done
22696IFS=$as_save_IFS
22697
22698  ;;
22699esac
22700fi
22701TIME=$ac_cv_path_TIME
22702if test -n "$TIME"; then
22703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22704$as_echo "$TIME" >&6; }
22705else
22706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22707$as_echo "no" >&6; }
22708fi
22709
22710
22711  test -n "$TIME" && break
22712done
22713
22714  else
22715    # The variable is set, but is it from the command line or the environment?
22716
22717    # Try to remove the string !TIME! from our list.
22718    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22719    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22720      # If it failed, the variable was not from the command line. Ignore it,
22721      # but warn the user (except for BASH, which is always set by the calling BASH).
22722      if test "xTIME" != xBASH; then
22723        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22724$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22725      fi
22726      # Try to locate tool using the code snippet
22727      for ac_prog in time
22728do
22729  # Extract the first word of "$ac_prog", so it can be a program name with args.
22730set dummy $ac_prog; ac_word=$2
22731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22732$as_echo_n "checking for $ac_word... " >&6; }
22733if ${ac_cv_path_TIME+:} false; then :
22734  $as_echo_n "(cached) " >&6
22735else
22736  case $TIME in
22737  [\\/]* | ?:[\\/]*)
22738  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22739  ;;
22740  *)
22741  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22742for as_dir in $PATH
22743do
22744  IFS=$as_save_IFS
22745  test -z "$as_dir" && as_dir=.
22746    for ac_exec_ext in '' $ac_executable_extensions; do
22747  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22748    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22750    break 2
22751  fi
22752done
22753  done
22754IFS=$as_save_IFS
22755
22756  ;;
22757esac
22758fi
22759TIME=$ac_cv_path_TIME
22760if test -n "$TIME"; then
22761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22762$as_echo "$TIME" >&6; }
22763else
22764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22765$as_echo "no" >&6; }
22766fi
22767
22768
22769  test -n "$TIME" && break
22770done
22771
22772    else
22773      # If it succeeded, then it was overridden by the user. We will use it
22774      # for the tool.
22775
22776      # First remove it from the list of overridden variables, so we can test
22777      # for unknown variables in the end.
22778      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22779
22780      # Check if we try to supply an empty value
22781      if test "x$TIME" = x; then
22782        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22783$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22784        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22785$as_echo_n "checking for TIME... " >&6; }
22786        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22787$as_echo "disabled" >&6; }
22788      else
22789        # Check if the provided tool contains a complete path.
22790        tool_specified="$TIME"
22791        tool_basename="${tool_specified##*/}"
22792        if test "x$tool_basename" = "x$tool_specified"; then
22793          # A command without a complete path is provided, search $PATH.
22794          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22795$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22796          # Extract the first word of "$tool_basename", so it can be a program name with args.
22797set dummy $tool_basename; ac_word=$2
22798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22799$as_echo_n "checking for $ac_word... " >&6; }
22800if ${ac_cv_path_TIME+:} false; then :
22801  $as_echo_n "(cached) " >&6
22802else
22803  case $TIME in
22804  [\\/]* | ?:[\\/]*)
22805  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22806  ;;
22807  *)
22808  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22809for as_dir in $PATH
22810do
22811  IFS=$as_save_IFS
22812  test -z "$as_dir" && as_dir=.
22813    for ac_exec_ext in '' $ac_executable_extensions; do
22814  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22815    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22816    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22817    break 2
22818  fi
22819done
22820  done
22821IFS=$as_save_IFS
22822
22823  ;;
22824esac
22825fi
22826TIME=$ac_cv_path_TIME
22827if test -n "$TIME"; then
22828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22829$as_echo "$TIME" >&6; }
22830else
22831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22832$as_echo "no" >&6; }
22833fi
22834
22835
22836          if test "x$TIME" = x; then
22837            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22838          fi
22839        else
22840          # Otherwise we believe it is a complete path. Use it as it is.
22841          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22842$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22843          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22844$as_echo_n "checking for TIME... " >&6; }
22845          if test ! -x "$tool_specified"; then
22846            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22847$as_echo "not found" >&6; }
22848            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22849          fi
22850          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22851$as_echo "$tool_specified" >&6; }
22852        fi
22853      fi
22854    fi
22855
22856  fi
22857
22858
22859  # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
22860  # be in the user path.
22861
22862
22863  # Publish this variable in the help.
22864
22865
22866  if [ -z "${DTRACE+x}" ]; then
22867    # The variable is not set by user, try to locate tool using the code snippet
22868    for ac_prog in dtrace
22869do
22870  # Extract the first word of "$ac_prog", so it can be a program name with args.
22871set dummy $ac_prog; ac_word=$2
22872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22873$as_echo_n "checking for $ac_word... " >&6; }
22874if ${ac_cv_path_DTRACE+:} false; then :
22875  $as_echo_n "(cached) " >&6
22876else
22877  case $DTRACE in
22878  [\\/]* | ?:[\\/]*)
22879  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22880  ;;
22881  *)
22882  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22883as_dummy="$PATH:/usr/sbin"
22884for as_dir in $as_dummy
22885do
22886  IFS=$as_save_IFS
22887  test -z "$as_dir" && as_dir=.
22888    for ac_exec_ext in '' $ac_executable_extensions; do
22889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22890    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22892    break 2
22893  fi
22894done
22895  done
22896IFS=$as_save_IFS
22897
22898  ;;
22899esac
22900fi
22901DTRACE=$ac_cv_path_DTRACE
22902if test -n "$DTRACE"; then
22903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22904$as_echo "$DTRACE" >&6; }
22905else
22906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22907$as_echo "no" >&6; }
22908fi
22909
22910
22911  test -n "$DTRACE" && break
22912done
22913
22914  else
22915    # The variable is set, but is it from the command line or the environment?
22916
22917    # Try to remove the string !DTRACE! from our list.
22918    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22919    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22920      # If it failed, the variable was not from the command line. Ignore it,
22921      # but warn the user (except for BASH, which is always set by the calling BASH).
22922      if test "xDTRACE" != xBASH; then
22923        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22924$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22925      fi
22926      # Try to locate tool using the code snippet
22927      for ac_prog in dtrace
22928do
22929  # Extract the first word of "$ac_prog", so it can be a program name with args.
22930set dummy $ac_prog; ac_word=$2
22931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22932$as_echo_n "checking for $ac_word... " >&6; }
22933if ${ac_cv_path_DTRACE+:} false; then :
22934  $as_echo_n "(cached) " >&6
22935else
22936  case $DTRACE in
22937  [\\/]* | ?:[\\/]*)
22938  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22939  ;;
22940  *)
22941  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22942as_dummy="$PATH:/usr/sbin"
22943for as_dir in $as_dummy
22944do
22945  IFS=$as_save_IFS
22946  test -z "$as_dir" && as_dir=.
22947    for ac_exec_ext in '' $ac_executable_extensions; do
22948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22949    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22951    break 2
22952  fi
22953done
22954  done
22955IFS=$as_save_IFS
22956
22957  ;;
22958esac
22959fi
22960DTRACE=$ac_cv_path_DTRACE
22961if test -n "$DTRACE"; then
22962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22963$as_echo "$DTRACE" >&6; }
22964else
22965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22966$as_echo "no" >&6; }
22967fi
22968
22969
22970  test -n "$DTRACE" && break
22971done
22972
22973    else
22974      # If it succeeded, then it was overridden by the user. We will use it
22975      # for the tool.
22976
22977      # First remove it from the list of overridden variables, so we can test
22978      # for unknown variables in the end.
22979      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22980
22981      # Check if we try to supply an empty value
22982      if test "x$DTRACE" = x; then
22983        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
22984$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
22985        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22986$as_echo_n "checking for DTRACE... " >&6; }
22987        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22988$as_echo "disabled" >&6; }
22989      else
22990        # Check if the provided tool contains a complete path.
22991        tool_specified="$DTRACE"
22992        tool_basename="${tool_specified##*/}"
22993        if test "x$tool_basename" = "x$tool_specified"; then
22994          # A command without a complete path is provided, search $PATH.
22995          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
22996$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
22997          # Extract the first word of "$tool_basename", so it can be a program name with args.
22998set dummy $tool_basename; ac_word=$2
22999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23000$as_echo_n "checking for $ac_word... " >&6; }
23001if ${ac_cv_path_DTRACE+:} false; then :
23002  $as_echo_n "(cached) " >&6
23003else
23004  case $DTRACE in
23005  [\\/]* | ?:[\\/]*)
23006  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23007  ;;
23008  *)
23009  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23010for as_dir in $PATH
23011do
23012  IFS=$as_save_IFS
23013  test -z "$as_dir" && as_dir=.
23014    for ac_exec_ext in '' $ac_executable_extensions; do
23015  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23016    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23018    break 2
23019  fi
23020done
23021  done
23022IFS=$as_save_IFS
23023
23024  ;;
23025esac
23026fi
23027DTRACE=$ac_cv_path_DTRACE
23028if test -n "$DTRACE"; then
23029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23030$as_echo "$DTRACE" >&6; }
23031else
23032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23033$as_echo "no" >&6; }
23034fi
23035
23036
23037          if test "x$DTRACE" = x; then
23038            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23039          fi
23040        else
23041          # Otherwise we believe it is a complete path. Use it as it is.
23042          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
23043$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
23044          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23045$as_echo_n "checking for DTRACE... " >&6; }
23046          if test ! -x "$tool_specified"; then
23047            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23048$as_echo "not found" >&6; }
23049            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
23050          fi
23051          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23052$as_echo "$tool_specified" >&6; }
23053        fi
23054      fi
23055    fi
23056
23057  fi
23058
23059
23060
23061
23062  # Publish this variable in the help.
23063
23064
23065  if [ -z "${PATCH+x}" ]; then
23066    # The variable is not set by user, try to locate tool using the code snippet
23067    for ac_prog in gpatch patch
23068do
23069  # Extract the first word of "$ac_prog", so it can be a program name with args.
23070set dummy $ac_prog; ac_word=$2
23071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23072$as_echo_n "checking for $ac_word... " >&6; }
23073if ${ac_cv_path_PATCH+:} false; then :
23074  $as_echo_n "(cached) " >&6
23075else
23076  case $PATCH in
23077  [\\/]* | ?:[\\/]*)
23078  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23079  ;;
23080  *)
23081  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23082for as_dir in $PATH
23083do
23084  IFS=$as_save_IFS
23085  test -z "$as_dir" && as_dir=.
23086    for ac_exec_ext in '' $ac_executable_extensions; do
23087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23088    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23090    break 2
23091  fi
23092done
23093  done
23094IFS=$as_save_IFS
23095
23096  ;;
23097esac
23098fi
23099PATCH=$ac_cv_path_PATCH
23100if test -n "$PATCH"; then
23101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23102$as_echo "$PATCH" >&6; }
23103else
23104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23105$as_echo "no" >&6; }
23106fi
23107
23108
23109  test -n "$PATCH" && break
23110done
23111
23112  else
23113    # The variable is set, but is it from the command line or the environment?
23114
23115    # Try to remove the string !PATCH! from our list.
23116    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23117    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23118      # If it failed, the variable was not from the command line. Ignore it,
23119      # but warn the user (except for BASH, which is always set by the calling BASH).
23120      if test "xPATCH" != xBASH; then
23121        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23122$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23123      fi
23124      # Try to locate tool using the code snippet
23125      for ac_prog in gpatch patch
23126do
23127  # Extract the first word of "$ac_prog", so it can be a program name with args.
23128set dummy $ac_prog; ac_word=$2
23129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23130$as_echo_n "checking for $ac_word... " >&6; }
23131if ${ac_cv_path_PATCH+:} false; then :
23132  $as_echo_n "(cached) " >&6
23133else
23134  case $PATCH in
23135  [\\/]* | ?:[\\/]*)
23136  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23137  ;;
23138  *)
23139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23140for as_dir in $PATH
23141do
23142  IFS=$as_save_IFS
23143  test -z "$as_dir" && as_dir=.
23144    for ac_exec_ext in '' $ac_executable_extensions; do
23145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23146    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23148    break 2
23149  fi
23150done
23151  done
23152IFS=$as_save_IFS
23153
23154  ;;
23155esac
23156fi
23157PATCH=$ac_cv_path_PATCH
23158if test -n "$PATCH"; then
23159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23160$as_echo "$PATCH" >&6; }
23161else
23162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23163$as_echo "no" >&6; }
23164fi
23165
23166
23167  test -n "$PATCH" && break
23168done
23169
23170    else
23171      # If it succeeded, then it was overridden by the user. We will use it
23172      # for the tool.
23173
23174      # First remove it from the list of overridden variables, so we can test
23175      # for unknown variables in the end.
23176      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23177
23178      # Check if we try to supply an empty value
23179      if test "x$PATCH" = x; then
23180        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23181$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23182        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23183$as_echo_n "checking for PATCH... " >&6; }
23184        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23185$as_echo "disabled" >&6; }
23186      else
23187        # Check if the provided tool contains a complete path.
23188        tool_specified="$PATCH"
23189        tool_basename="${tool_specified##*/}"
23190        if test "x$tool_basename" = "x$tool_specified"; then
23191          # A command without a complete path is provided, search $PATH.
23192          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23193$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23194          # Extract the first word of "$tool_basename", so it can be a program name with args.
23195set dummy $tool_basename; ac_word=$2
23196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23197$as_echo_n "checking for $ac_word... " >&6; }
23198if ${ac_cv_path_PATCH+:} false; then :
23199  $as_echo_n "(cached) " >&6
23200else
23201  case $PATCH in
23202  [\\/]* | ?:[\\/]*)
23203  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23204  ;;
23205  *)
23206  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23207for as_dir in $PATH
23208do
23209  IFS=$as_save_IFS
23210  test -z "$as_dir" && as_dir=.
23211    for ac_exec_ext in '' $ac_executable_extensions; do
23212  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23213    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23215    break 2
23216  fi
23217done
23218  done
23219IFS=$as_save_IFS
23220
23221  ;;
23222esac
23223fi
23224PATCH=$ac_cv_path_PATCH
23225if test -n "$PATCH"; then
23226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23227$as_echo "$PATCH" >&6; }
23228else
23229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23230$as_echo "no" >&6; }
23231fi
23232
23233
23234          if test "x$PATCH" = x; then
23235            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23236          fi
23237        else
23238          # Otherwise we believe it is a complete path. Use it as it is.
23239          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23240$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23241          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23242$as_echo_n "checking for PATCH... " >&6; }
23243          if test ! -x "$tool_specified"; then
23244            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23245$as_echo "not found" >&6; }
23246            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23247          fi
23248          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23249$as_echo "$tool_specified" >&6; }
23250        fi
23251      fi
23252    fi
23253
23254  fi
23255
23256
23257  # Check if it's GNU time
23258  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23259  if test "x$IS_GNU_TIME" != x; then
23260    IS_GNU_TIME=yes
23261  else
23262    IS_GNU_TIME=no
23263  fi
23264
23265
23266  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23267
23268
23269
23270  # Publish this variable in the help.
23271
23272
23273  if [ -z "${DSYMUTIL+x}" ]; then
23274    # The variable is not set by user, try to locate tool using the code snippet
23275    for ac_prog in dsymutil
23276do
23277  # Extract the first word of "$ac_prog", so it can be a program name with args.
23278set dummy $ac_prog; ac_word=$2
23279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23280$as_echo_n "checking for $ac_word... " >&6; }
23281if ${ac_cv_path_DSYMUTIL+:} false; then :
23282  $as_echo_n "(cached) " >&6
23283else
23284  case $DSYMUTIL in
23285  [\\/]* | ?:[\\/]*)
23286  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23287  ;;
23288  *)
23289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23290for as_dir in $PATH
23291do
23292  IFS=$as_save_IFS
23293  test -z "$as_dir" && as_dir=.
23294    for ac_exec_ext in '' $ac_executable_extensions; do
23295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23296    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23298    break 2
23299  fi
23300done
23301  done
23302IFS=$as_save_IFS
23303
23304  ;;
23305esac
23306fi
23307DSYMUTIL=$ac_cv_path_DSYMUTIL
23308if test -n "$DSYMUTIL"; then
23309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23310$as_echo "$DSYMUTIL" >&6; }
23311else
23312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23313$as_echo "no" >&6; }
23314fi
23315
23316
23317  test -n "$DSYMUTIL" && break
23318done
23319
23320  else
23321    # The variable is set, but is it from the command line or the environment?
23322
23323    # Try to remove the string !DSYMUTIL! from our list.
23324    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23325    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23326      # If it failed, the variable was not from the command line. Ignore it,
23327      # but warn the user (except for BASH, which is always set by the calling BASH).
23328      if test "xDSYMUTIL" != xBASH; then
23329        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23330$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23331      fi
23332      # Try to locate tool using the code snippet
23333      for ac_prog in dsymutil
23334do
23335  # Extract the first word of "$ac_prog", so it can be a program name with args.
23336set dummy $ac_prog; ac_word=$2
23337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23338$as_echo_n "checking for $ac_word... " >&6; }
23339if ${ac_cv_path_DSYMUTIL+:} false; then :
23340  $as_echo_n "(cached) " >&6
23341else
23342  case $DSYMUTIL in
23343  [\\/]* | ?:[\\/]*)
23344  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23345  ;;
23346  *)
23347  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23348for as_dir in $PATH
23349do
23350  IFS=$as_save_IFS
23351  test -z "$as_dir" && as_dir=.
23352    for ac_exec_ext in '' $ac_executable_extensions; do
23353  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23354    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23356    break 2
23357  fi
23358done
23359  done
23360IFS=$as_save_IFS
23361
23362  ;;
23363esac
23364fi
23365DSYMUTIL=$ac_cv_path_DSYMUTIL
23366if test -n "$DSYMUTIL"; then
23367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23368$as_echo "$DSYMUTIL" >&6; }
23369else
23370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23371$as_echo "no" >&6; }
23372fi
23373
23374
23375  test -n "$DSYMUTIL" && break
23376done
23377
23378    else
23379      # If it succeeded, then it was overridden by the user. We will use it
23380      # for the tool.
23381
23382      # First remove it from the list of overridden variables, so we can test
23383      # for unknown variables in the end.
23384      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23385
23386      # Check if we try to supply an empty value
23387      if test "x$DSYMUTIL" = x; then
23388        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23389$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23390        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23391$as_echo_n "checking for DSYMUTIL... " >&6; }
23392        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23393$as_echo "disabled" >&6; }
23394      else
23395        # Check if the provided tool contains a complete path.
23396        tool_specified="$DSYMUTIL"
23397        tool_basename="${tool_specified##*/}"
23398        if test "x$tool_basename" = "x$tool_specified"; then
23399          # A command without a complete path is provided, search $PATH.
23400          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23401$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23402          # Extract the first word of "$tool_basename", so it can be a program name with args.
23403set dummy $tool_basename; ac_word=$2
23404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23405$as_echo_n "checking for $ac_word... " >&6; }
23406if ${ac_cv_path_DSYMUTIL+:} false; then :
23407  $as_echo_n "(cached) " >&6
23408else
23409  case $DSYMUTIL in
23410  [\\/]* | ?:[\\/]*)
23411  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23412  ;;
23413  *)
23414  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23415for as_dir in $PATH
23416do
23417  IFS=$as_save_IFS
23418  test -z "$as_dir" && as_dir=.
23419    for ac_exec_ext in '' $ac_executable_extensions; do
23420  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23421    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23422    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23423    break 2
23424  fi
23425done
23426  done
23427IFS=$as_save_IFS
23428
23429  ;;
23430esac
23431fi
23432DSYMUTIL=$ac_cv_path_DSYMUTIL
23433if test -n "$DSYMUTIL"; then
23434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23435$as_echo "$DSYMUTIL" >&6; }
23436else
23437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23438$as_echo "no" >&6; }
23439fi
23440
23441
23442          if test "x$DSYMUTIL" = x; then
23443            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23444          fi
23445        else
23446          # Otherwise we believe it is a complete path. Use it as it is.
23447          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23448$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23449          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23450$as_echo_n "checking for DSYMUTIL... " >&6; }
23451          if test ! -x "$tool_specified"; then
23452            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23453$as_echo "not found" >&6; }
23454            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23455          fi
23456          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23457$as_echo "$tool_specified" >&6; }
23458        fi
23459      fi
23460    fi
23461
23462  fi
23463
23464
23465
23466  if test "x$DSYMUTIL" = x; then
23467    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23468  fi
23469
23470
23471
23472
23473
23474  # Publish this variable in the help.
23475
23476
23477  if [ -z "${XATTR+x}" ]; then
23478    # The variable is not set by user, try to locate tool using the code snippet
23479    for ac_prog in xattr
23480do
23481  # Extract the first word of "$ac_prog", so it can be a program name with args.
23482set dummy $ac_prog; ac_word=$2
23483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23484$as_echo_n "checking for $ac_word... " >&6; }
23485if ${ac_cv_path_XATTR+:} false; then :
23486  $as_echo_n "(cached) " >&6
23487else
23488  case $XATTR in
23489  [\\/]* | ?:[\\/]*)
23490  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23491  ;;
23492  *)
23493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23494for as_dir in $PATH
23495do
23496  IFS=$as_save_IFS
23497  test -z "$as_dir" && as_dir=.
23498    for ac_exec_ext in '' $ac_executable_extensions; do
23499  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23500    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23502    break 2
23503  fi
23504done
23505  done
23506IFS=$as_save_IFS
23507
23508  ;;
23509esac
23510fi
23511XATTR=$ac_cv_path_XATTR
23512if test -n "$XATTR"; then
23513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23514$as_echo "$XATTR" >&6; }
23515else
23516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23517$as_echo "no" >&6; }
23518fi
23519
23520
23521  test -n "$XATTR" && break
23522done
23523
23524  else
23525    # The variable is set, but is it from the command line or the environment?
23526
23527    # Try to remove the string !XATTR! from our list.
23528    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23529    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23530      # If it failed, the variable was not from the command line. Ignore it,
23531      # but warn the user (except for BASH, which is always set by the calling BASH).
23532      if test "xXATTR" != xBASH; then
23533        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23534$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
23535      fi
23536      # Try to locate tool using the code snippet
23537      for ac_prog in xattr
23538do
23539  # Extract the first word of "$ac_prog", so it can be a program name with args.
23540set dummy $ac_prog; ac_word=$2
23541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23542$as_echo_n "checking for $ac_word... " >&6; }
23543if ${ac_cv_path_XATTR+:} false; then :
23544  $as_echo_n "(cached) " >&6
23545else
23546  case $XATTR in
23547  [\\/]* | ?:[\\/]*)
23548  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23549  ;;
23550  *)
23551  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23552for as_dir in $PATH
23553do
23554  IFS=$as_save_IFS
23555  test -z "$as_dir" && as_dir=.
23556    for ac_exec_ext in '' $ac_executable_extensions; do
23557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23558    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23560    break 2
23561  fi
23562done
23563  done
23564IFS=$as_save_IFS
23565
23566  ;;
23567esac
23568fi
23569XATTR=$ac_cv_path_XATTR
23570if test -n "$XATTR"; then
23571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23572$as_echo "$XATTR" >&6; }
23573else
23574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23575$as_echo "no" >&6; }
23576fi
23577
23578
23579  test -n "$XATTR" && break
23580done
23581
23582    else
23583      # If it succeeded, then it was overridden by the user. We will use it
23584      # for the tool.
23585
23586      # First remove it from the list of overridden variables, so we can test
23587      # for unknown variables in the end.
23588      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23589
23590      # Check if we try to supply an empty value
23591      if test "x$XATTR" = x; then
23592        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23593$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23594        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23595$as_echo_n "checking for XATTR... " >&6; }
23596        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23597$as_echo "disabled" >&6; }
23598      else
23599        # Check if the provided tool contains a complete path.
23600        tool_specified="$XATTR"
23601        tool_basename="${tool_specified##*/}"
23602        if test "x$tool_basename" = "x$tool_specified"; then
23603          # A command without a complete path is provided, search $PATH.
23604          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23605$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23606          # Extract the first word of "$tool_basename", so it can be a program name with args.
23607set dummy $tool_basename; ac_word=$2
23608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23609$as_echo_n "checking for $ac_word... " >&6; }
23610if ${ac_cv_path_XATTR+:} false; then :
23611  $as_echo_n "(cached) " >&6
23612else
23613  case $XATTR in
23614  [\\/]* | ?:[\\/]*)
23615  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23616  ;;
23617  *)
23618  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23619for as_dir in $PATH
23620do
23621  IFS=$as_save_IFS
23622  test -z "$as_dir" && as_dir=.
23623    for ac_exec_ext in '' $ac_executable_extensions; do
23624  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23625    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23626    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23627    break 2
23628  fi
23629done
23630  done
23631IFS=$as_save_IFS
23632
23633  ;;
23634esac
23635fi
23636XATTR=$ac_cv_path_XATTR
23637if test -n "$XATTR"; then
23638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23639$as_echo "$XATTR" >&6; }
23640else
23641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23642$as_echo "no" >&6; }
23643fi
23644
23645
23646          if test "x$XATTR" = x; then
23647            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23648          fi
23649        else
23650          # Otherwise we believe it is a complete path. Use it as it is.
23651          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23652$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23653          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23654$as_echo_n "checking for XATTR... " >&6; }
23655          if test ! -x "$tool_specified"; then
23656            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23657$as_echo "not found" >&6; }
23658            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23659          fi
23660          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23661$as_echo "$tool_specified" >&6; }
23662        fi
23663      fi
23664    fi
23665
23666  fi
23667
23668
23669
23670  if test "x$XATTR" = x; then
23671    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23672  fi
23673
23674
23675
23676
23677  # Publish this variable in the help.
23678
23679
23680  if [ -z "${CODESIGN+x}" ]; then
23681    # The variable is not set by user, try to locate tool using the code snippet
23682    for ac_prog in codesign
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_CODESIGN+:} false; then :
23689  $as_echo_n "(cached) " >&6
23690else
23691  case $CODESIGN in
23692  [\\/]* | ?:[\\/]*)
23693  ac_cv_path_CODESIGN="$CODESIGN" # 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_CODESIGN="$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
23714CODESIGN=$ac_cv_path_CODESIGN
23715if test -n "$CODESIGN"; then
23716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23717$as_echo "$CODESIGN" >&6; }
23718else
23719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23720$as_echo "no" >&6; }
23721fi
23722
23723
23724  test -n "$CODESIGN" && 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 !CODESIGN! from our list.
23731    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
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 "xCODESIGN" != xBASH; then
23736        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23737$as_echo "$as_me: WARNING: Ignoring value of CODESIGN 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 codesign
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_CODESIGN+:} false; then :
23747  $as_echo_n "(cached) " >&6
23748else
23749  case $CODESIGN in
23750  [\\/]* | ?:[\\/]*)
23751  ac_cv_path_CODESIGN="$CODESIGN" # 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_CODESIGN="$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
23772CODESIGN=$ac_cv_path_CODESIGN
23773if test -n "$CODESIGN"; then
23774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23775$as_echo "$CODESIGN" >&6; }
23776else
23777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23778$as_echo "no" >&6; }
23779fi
23780
23781
23782  test -n "$CODESIGN" && 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$CODESIGN" = x; then
23795        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23796$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23797        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23798$as_echo_n "checking for CODESIGN... " >&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="$CODESIGN"
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 CODESIGN=$tool_basename" >&5
23808$as_echo "$as_me: Will search for user supplied tool CODESIGN=$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_CODESIGN+:} false; then :
23814  $as_echo_n "(cached) " >&6
23815else
23816  case $CODESIGN in
23817  [\\/]* | ?:[\\/]*)
23818  ac_cv_path_CODESIGN="$CODESIGN" # 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_CODESIGN="$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
23839CODESIGN=$ac_cv_path_CODESIGN
23840if test -n "$CODESIGN"; then
23841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23842$as_echo "$CODESIGN" >&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$CODESIGN" = 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 CODESIGN=$tool_specified" >&5
23855$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23856          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23857$as_echo_n "checking for CODESIGN... " >&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 CODESIGN=$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    if test "x$CODESIGN" != "x"; then
23873      # Verify that the openjdk_codesign certificate is present
23874      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23875$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23876      $RM codesign-testfile
23877      $TOUCH codesign-testfile
23878      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23879      $RM codesign-testfile
23880      if test "x$CODESIGN" = x; then
23881        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23882$as_echo "no" >&6; }
23883      else
23884        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23885$as_echo "yes" >&6; }
23886      fi
23887    fi
23888
23889
23890
23891  # Publish this variable in the help.
23892
23893
23894  if [ -z "${SETFILE+x}" ]; then
23895    # The variable is not set by user, try to locate tool using the code snippet
23896    for ac_prog in SetFile
23897do
23898  # Extract the first word of "$ac_prog", so it can be a program name with args.
23899set dummy $ac_prog; ac_word=$2
23900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23901$as_echo_n "checking for $ac_word... " >&6; }
23902if ${ac_cv_path_SETFILE+:} false; then :
23903  $as_echo_n "(cached) " >&6
23904else
23905  case $SETFILE in
23906  [\\/]* | ?:[\\/]*)
23907  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23908  ;;
23909  *)
23910  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23911for as_dir in $PATH
23912do
23913  IFS=$as_save_IFS
23914  test -z "$as_dir" && as_dir=.
23915    for ac_exec_ext in '' $ac_executable_extensions; do
23916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23917    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23919    break 2
23920  fi
23921done
23922  done
23923IFS=$as_save_IFS
23924
23925  ;;
23926esac
23927fi
23928SETFILE=$ac_cv_path_SETFILE
23929if test -n "$SETFILE"; then
23930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23931$as_echo "$SETFILE" >&6; }
23932else
23933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23934$as_echo "no" >&6; }
23935fi
23936
23937
23938  test -n "$SETFILE" && break
23939done
23940
23941  else
23942    # The variable is set, but is it from the command line or the environment?
23943
23944    # Try to remove the string !SETFILE! from our list.
23945    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23946    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23947      # If it failed, the variable was not from the command line. Ignore it,
23948      # but warn the user (except for BASH, which is always set by the calling BASH).
23949      if test "xSETFILE" != xBASH; then
23950        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23951$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23952      fi
23953      # Try to locate tool using the code snippet
23954      for ac_prog in SetFile
23955do
23956  # Extract the first word of "$ac_prog", so it can be a program name with args.
23957set dummy $ac_prog; ac_word=$2
23958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23959$as_echo_n "checking for $ac_word... " >&6; }
23960if ${ac_cv_path_SETFILE+:} false; then :
23961  $as_echo_n "(cached) " >&6
23962else
23963  case $SETFILE in
23964  [\\/]* | ?:[\\/]*)
23965  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23966  ;;
23967  *)
23968  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23969for as_dir in $PATH
23970do
23971  IFS=$as_save_IFS
23972  test -z "$as_dir" && as_dir=.
23973    for ac_exec_ext in '' $ac_executable_extensions; do
23974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23975    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23977    break 2
23978  fi
23979done
23980  done
23981IFS=$as_save_IFS
23982
23983  ;;
23984esac
23985fi
23986SETFILE=$ac_cv_path_SETFILE
23987if test -n "$SETFILE"; then
23988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23989$as_echo "$SETFILE" >&6; }
23990else
23991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23992$as_echo "no" >&6; }
23993fi
23994
23995
23996  test -n "$SETFILE" && break
23997done
23998
23999    else
24000      # If it succeeded, then it was overridden by the user. We will use it
24001      # for the tool.
24002
24003      # First remove it from the list of overridden variables, so we can test
24004      # for unknown variables in the end.
24005      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24006
24007      # Check if we try to supply an empty value
24008      if test "x$SETFILE" = x; then
24009        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
24010$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
24011        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24012$as_echo_n "checking for SETFILE... " >&6; }
24013        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24014$as_echo "disabled" >&6; }
24015      else
24016        # Check if the provided tool contains a complete path.
24017        tool_specified="$SETFILE"
24018        tool_basename="${tool_specified##*/}"
24019        if test "x$tool_basename" = "x$tool_specified"; then
24020          # A command without a complete path is provided, search $PATH.
24021          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
24022$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
24023          # Extract the first word of "$tool_basename", so it can be a program name with args.
24024set dummy $tool_basename; ac_word=$2
24025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24026$as_echo_n "checking for $ac_word... " >&6; }
24027if ${ac_cv_path_SETFILE+:} false; then :
24028  $as_echo_n "(cached) " >&6
24029else
24030  case $SETFILE in
24031  [\\/]* | ?:[\\/]*)
24032  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24033  ;;
24034  *)
24035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24036for as_dir in $PATH
24037do
24038  IFS=$as_save_IFS
24039  test -z "$as_dir" && as_dir=.
24040    for ac_exec_ext in '' $ac_executable_extensions; do
24041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24042    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24044    break 2
24045  fi
24046done
24047  done
24048IFS=$as_save_IFS
24049
24050  ;;
24051esac
24052fi
24053SETFILE=$ac_cv_path_SETFILE
24054if test -n "$SETFILE"; then
24055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24056$as_echo "$SETFILE" >&6; }
24057else
24058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24059$as_echo "no" >&6; }
24060fi
24061
24062
24063          if test "x$SETFILE" = x; then
24064            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24065          fi
24066        else
24067          # Otherwise we believe it is a complete path. Use it as it is.
24068          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
24069$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
24070          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24071$as_echo_n "checking for SETFILE... " >&6; }
24072          if test ! -x "$tool_specified"; then
24073            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24074$as_echo "not found" >&6; }
24075            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
24076          fi
24077          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24078$as_echo "$tool_specified" >&6; }
24079        fi
24080      fi
24081    fi
24082
24083  fi
24084
24085
24086
24087  if test "x$SETFILE" = x; then
24088    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24089  fi
24090
24091
24092  fi
24093
24094
24095  # Check bash version
24096  # Extra [ ] to stop m4 mangling
24097   BASH_VER=`$BASH --version | $SED -n  -e 's/^.*bash.*ersion *\([0-9.]*\).*$/\1/ p'`
24098  { $as_echo "$as_me:${as_lineno-$LINENO}: checking bash version" >&5
24099$as_echo_n "checking bash version... " >&6; }
24100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH_VER" >&5
24101$as_echo "$BASH_VER" >&6; }
24102
24103  BASH_MAJOR=`$ECHO $BASH_VER | $CUT -d . -f 1`
24104  BASH_MINOR=`$ECHO $BASH_VER | $CUT -d . -f 2`
24105  if test $BASH_MAJOR -lt 3 || (test $BASH_MAJOR -eq 3 && test $BASH_MINOR -lt 2); then
24106    as_fn_error $? "bash version 3.2 or better is required" "$LINENO" 5
24107  fi
24108
24109  # Test if bash supports pipefail.
24110  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24111$as_echo_n "checking if bash supports pipefail... " >&6; }
24112  if ${BASH} -c 'set -o pipefail'; then
24113    BASH_ARGS="$BASH_ARGS -o pipefail"
24114    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24115$as_echo "yes" >&6; }
24116  else
24117    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24118$as_echo "no" >&6; }
24119  fi
24120
24121  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24122$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24123  if ${BASH} -e -c 'true'; then
24124    BASH_ARGS="$BASH_ARGS -e"
24125    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24126$as_echo "yes" >&6; }
24127  else
24128    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24129$as_echo "no" >&6; }
24130  fi
24131
24132
24133
24134
24135# Check if pkg-config is available.
24136
24137
24138if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24139	if test -n "$ac_tool_prefix"; then
24140  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24141set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24143$as_echo_n "checking for $ac_word... " >&6; }
24144if ${ac_cv_path_PKG_CONFIG+:} false; then :
24145  $as_echo_n "(cached) " >&6
24146else
24147  case $PKG_CONFIG in
24148  [\\/]* | ?:[\\/]*)
24149  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24150  ;;
24151  *)
24152  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24153for as_dir in $PATH
24154do
24155  IFS=$as_save_IFS
24156  test -z "$as_dir" && as_dir=.
24157    for ac_exec_ext in '' $ac_executable_extensions; do
24158  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24159    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24160    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24161    break 2
24162  fi
24163done
24164  done
24165IFS=$as_save_IFS
24166
24167  ;;
24168esac
24169fi
24170PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24171if test -n "$PKG_CONFIG"; then
24172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24173$as_echo "$PKG_CONFIG" >&6; }
24174else
24175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24176$as_echo "no" >&6; }
24177fi
24178
24179
24180fi
24181if test -z "$ac_cv_path_PKG_CONFIG"; then
24182  ac_pt_PKG_CONFIG=$PKG_CONFIG
24183  # Extract the first word of "pkg-config", so it can be a program name with args.
24184set dummy pkg-config; ac_word=$2
24185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24186$as_echo_n "checking for $ac_word... " >&6; }
24187if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24188  $as_echo_n "(cached) " >&6
24189else
24190  case $ac_pt_PKG_CONFIG in
24191  [\\/]* | ?:[\\/]*)
24192  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24193  ;;
24194  *)
24195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24196for as_dir in $PATH
24197do
24198  IFS=$as_save_IFS
24199  test -z "$as_dir" && as_dir=.
24200    for ac_exec_ext in '' $ac_executable_extensions; do
24201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24202    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24204    break 2
24205  fi
24206done
24207  done
24208IFS=$as_save_IFS
24209
24210  ;;
24211esac
24212fi
24213ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24214if test -n "$ac_pt_PKG_CONFIG"; then
24215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24216$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24217else
24218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24219$as_echo "no" >&6; }
24220fi
24221
24222  if test "x$ac_pt_PKG_CONFIG" = x; then
24223    PKG_CONFIG=""
24224  else
24225    case $cross_compiling:$ac_tool_warned in
24226yes:)
24227{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24228$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24229ac_tool_warned=yes ;;
24230esac
24231    PKG_CONFIG=$ac_pt_PKG_CONFIG
24232  fi
24233else
24234  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24235fi
24236
24237fi
24238if test -n "$PKG_CONFIG"; then
24239	_pkg_min_version=0.9.0
24240	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24241$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24242	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24243		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24244$as_echo "yes" >&6; }
24245	else
24246		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24247$as_echo "no" >&6; }
24248		PKG_CONFIG=""
24249	fi
24250
24251fi
24252
24253# After basic tools have been setup, we can check build os specific details.
24254
24255  ###############################################################################
24256
24257  # Note that this is the build platform OS version!
24258
24259  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24260  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24261  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24262  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24263
24264
24265
24266
24267
24268# Misc basic settings
24269
24270
24271# Check whether --with-default-make-target was given.
24272if test "${with_default_make_target+set}" = set; then :
24273  withval=$with_default_make_target;
24274fi
24275
24276  if test "x$with_default_make_target" = "x" \
24277      || test "x$with_default_make_target" = "xyes"; then
24278    DEFAULT_MAKE_TARGET="exploded-image"
24279  elif test "x$with_default_make_target" = "xno"; then
24280    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24281  else
24282    DEFAULT_MAKE_TARGET="$with_default_make_target"
24283  fi
24284
24285
24286
24287
24288###############################################################################
24289#
24290# Determine OpenJDK variants, options and version numbers.
24291#
24292###############################################################################
24293
24294# We need build & target for this.
24295
24296  # Should we build a JDK without a graphical UI?
24297  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24298$as_echo_n "checking headless only... " >&6; }
24299  # Check whether --enable-headless-only was given.
24300if test "${enable_headless_only+set}" = set; then :
24301  enableval=$enable_headless_only;
24302fi
24303
24304
24305  if test "x$enable_headless_only" = "xyes"; then
24306    ENABLE_HEADLESS_ONLY="true"
24307    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24308$as_echo "yes" >&6; }
24309  elif test "x$enable_headless_only" = "xno"; then
24310    ENABLE_HEADLESS_ONLY="false"
24311    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24312$as_echo "no" >&6; }
24313  elif test "x$enable_headless_only" = "x"; then
24314    ENABLE_HEADLESS_ONLY="false"
24315    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24316$as_echo "no" >&6; }
24317  else
24318    as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24319  fi
24320
24321
24322
24323  # Choose cacerts source file
24324
24325# Check whether --with-cacerts-file was given.
24326if test "${with_cacerts_file+set}" = set; then :
24327  withval=$with_cacerts_file;
24328fi
24329
24330  if test "x$with_cacerts_file" != x; then
24331    CACERTS_FILE=$with_cacerts_file
24332  fi
24333
24334
24335  # Enable or disable unlimited crypto
24336  # Check whether --enable-unlimited-crypto was given.
24337if test "${enable_unlimited_crypto+set}" = set; then :
24338  enableval=$enable_unlimited_crypto;
24339else
24340  enable_unlimited_crypto=yes
24341fi
24342
24343  if test "x$enable_unlimited_crypto" = "xyes"; then
24344    UNLIMITED_CRYPTO=true
24345  else
24346    UNLIMITED_CRYPTO=false
24347  fi
24348
24349
24350  # Should we build the serviceability agent (SA)?
24351  INCLUDE_SA=true
24352  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24353    INCLUDE_SA=false
24354  fi
24355  if test "x$OPENJDK_TARGET_OS" = xaix ; then
24356    INCLUDE_SA=false
24357  fi
24358
24359
24360  # Compress jars
24361  COMPRESS_JARS=false
24362
24363
24364
24365  # Setup default copyright year. Mostly overridden when building close to a new year.
24366
24367# Check whether --with-copyright-year was given.
24368if test "${with_copyright_year+set}" = set; then :
24369  withval=$with_copyright_year;
24370fi
24371
24372  if test "x$with_copyright_year" = xyes; then
24373    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24374  elif test "x$with_copyright_year" != x; then
24375    COPYRIGHT_YEAR="$with_copyright_year"
24376  else
24377    COPYRIGHT_YEAR=`$DATE +'%Y'`
24378  fi
24379
24380
24381
24382  # Check whether --enable-keep-packaged-modules was given.
24383if test "${enable_keep_packaged_modules+set}" = set; then :
24384  enableval=$enable_keep_packaged_modules;
24385fi
24386
24387
24388  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24389$as_echo_n "checking if packaged modules are kept... " >&6; }
24390  if test "x$enable_keep_packaged_modules" = "xyes"; then
24391    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24392$as_echo "yes" >&6; }
24393    JLINK_KEEP_PACKAGED_MODULES=true
24394  elif test "x$enable_keep_packaged_modules" = "xno"; then
24395    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24396$as_echo "no" >&6; }
24397    JLINK_KEEP_PACKAGED_MODULES=false
24398  elif test "x$enable_keep_packaged_modules" = "x"; then
24399    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24400$as_echo "yes (default)" >&6; }
24401    JLINK_KEEP_PACKAGED_MODULES=true
24402  else
24403    { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
24404$as_echo "error" >&6; }
24405    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24406  fi
24407
24408
24409
24410
24411  # Warn user that old version arguments are deprecated.
24412
24413
24414# Check whether --with-milestone was given.
24415if test "${with_milestone+set}" = set; then :
24416  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24417$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24418fi
24419
24420
24421
24422
24423# Check whether --with-update-version was given.
24424if test "${with_update_version+set}" = set; then :
24425  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24426$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24427fi
24428
24429
24430
24431
24432# Check whether --with-user-release-suffix was given.
24433if test "${with_user_release_suffix+set}" = set; then :
24434  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
24435$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24436fi
24437
24438
24439
24440
24441# Check whether --with-build-number was given.
24442if test "${with_build_number+set}" = set; then :
24443  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24444$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24445fi
24446
24447
24448
24449  # Source the version numbers file
24450  . $AUTOCONF_DIR/version-numbers
24451
24452  # Some non-version number information is set in that file
24453
24454
24455
24456
24457
24458
24459
24460
24461
24462  # Override version from arguments
24463
24464  # If --with-version-string is set, process it first. It is possible to
24465  # override parts with more specific flags, since these are processed later.
24466
24467# Check whether --with-version-string was given.
24468if test "${with_version_string+set}" = set; then :
24469  withval=$with_version_string;
24470fi
24471
24472  if test "x$with_version_string" = xyes; then
24473    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24474  elif test "x$with_version_string" != x; then
24475    # Additional [] needed to keep m4 from mangling shell constructs.
24476    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24477      VERSION_MAJOR=${BASH_REMATCH[1]}
24478      VERSION_MINOR=${BASH_REMATCH[3]}
24479      VERSION_SECURITY=${BASH_REMATCH[5]}
24480      VERSION_PATCH=${BASH_REMATCH[7]}
24481      VERSION_PRE=${BASH_REMATCH[9]}
24482      version_plus_separator=${BASH_REMATCH[11]}
24483      VERSION_BUILD=${BASH_REMATCH[12]}
24484      VERSION_OPT=${BASH_REMATCH[14]}
24485      # Unspecified numerical fields are interpreted as 0.
24486      if test "x$VERSION_MINOR" = x; then
24487        VERSION_MINOR=0
24488      fi
24489      if test "x$VERSION_SECURITY" = x; then
24490        VERSION_SECURITY=0
24491      fi
24492      if test "x$VERSION_PATCH" = x; then
24493        VERSION_PATCH=0
24494      fi
24495      if test "x$version_plus_separator" != x \
24496          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
24497        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
24498      fi
24499      # Stop the version part process from setting default values.
24500      # We still allow them to explicitly override though.
24501      NO_DEFAULT_VERSION_PARTS=true
24502    else
24503      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
24504    fi
24505  fi
24506
24507
24508# Check whether --with-version-pre was given.
24509if test "${with_version_pre+set}" = set; then :
24510  withval=$with_version_pre; with_version_pre_present=true
24511else
24512  with_version_pre_present=false
24513fi
24514
24515
24516  if test "x$with_version_pre_present" = xtrue; then
24517    if test "x$with_version_pre" = xyes; then
24518      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
24519    elif test "x$with_version_pre" = xno; then
24520      # Interpret --without-* as empty string instead of the literal "no"
24521      VERSION_PRE=
24522    else
24523      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
24524       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
24525      if test "x$VERSION_PRE" != "x$with_version_pre"; then
24526        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
24527$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
24528      fi
24529    fi
24530  else
24531    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24532      # Default is to use "internal" as pre
24533      VERSION_PRE="internal"
24534    fi
24535  fi
24536
24537
24538# Check whether --with-version-opt was given.
24539if test "${with_version_opt+set}" = set; then :
24540  withval=$with_version_opt; with_version_opt_present=true
24541else
24542  with_version_opt_present=false
24543fi
24544
24545
24546  if test "x$with_version_opt_present" = xtrue; then
24547    if test "x$with_version_opt" = xyes; then
24548      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
24549    elif test "x$with_version_opt" = xno; then
24550      # Interpret --without-* as empty string instead of the literal "no"
24551      VERSION_OPT=
24552    else
24553      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
24554       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
24555      if test "x$VERSION_OPT" != "x$with_version_opt"; then
24556        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
24557$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
24558      fi
24559    fi
24560  else
24561    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24562      # Default is to calculate a string like this 'adhoc.<username>.<base dir name>'
24563      # Outer [ ] to quote m4.
24564       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
24565      VERSION_OPT="adhoc.$USERNAME.$basedirname"
24566    fi
24567  fi
24568
24569
24570# Check whether --with-version-build was given.
24571if test "${with_version_build+set}" = set; then :
24572  withval=$with_version_build; with_version_build_present=true
24573else
24574  with_version_build_present=false
24575fi
24576
24577
24578  if test "x$with_version_build_present" = xtrue; then
24579    if test "x$with_version_build" = xyes; then
24580      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24581    elif test "x$with_version_build" = xno; then
24582      # Interpret --without-* as empty string instead of the literal "no"
24583      VERSION_BUILD=
24584    elif test "x$with_version_build" = x; then
24585      VERSION_BUILD=
24586    else
24587
24588  # Additional [] needed to keep m4 from mangling shell constructs.
24589  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24590    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24591  fi
24592  # Extract the version number without leading zeros.
24593  cleaned_value=${BASH_REMATCH[1]}
24594  if test "x$cleaned_value" = x; then
24595    # Special case for zero
24596    cleaned_value=${BASH_REMATCH[2]}
24597  fi
24598
24599  if test $cleaned_value -gt 255; then
24600    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24601  fi
24602  if test "x$cleaned_value" != "x$with_version_build"; then
24603    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24604$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24605  fi
24606  VERSION_BUILD=$cleaned_value
24607
24608    fi
24609  else
24610    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24611      # Default is to not have a build number.
24612      VERSION_BUILD=""
24613      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24614      VERSION_BUILD=0
24615    fi
24616  fi
24617
24618
24619# Check whether --with-version-major was given.
24620if test "${with_version_major+set}" = set; then :
24621  withval=$with_version_major; with_version_major_present=true
24622else
24623  with_version_major_present=false
24624fi
24625
24626
24627  if test "x$with_version_major_present" = xtrue; then
24628    if test "x$with_version_major" = xyes; then
24629      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24630    else
24631
24632  # Additional [] needed to keep m4 from mangling shell constructs.
24633  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24634    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24635  fi
24636  # Extract the version number without leading zeros.
24637  cleaned_value=${BASH_REMATCH[1]}
24638  if test "x$cleaned_value" = x; then
24639    # Special case for zero
24640    cleaned_value=${BASH_REMATCH[2]}
24641  fi
24642
24643  if test $cleaned_value -gt 255; then
24644    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24645  fi
24646  if test "x$cleaned_value" != "x$with_version_major"; then
24647    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24648$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24649  fi
24650  VERSION_MAJOR=$cleaned_value
24651
24652    fi
24653  else
24654    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24655      # Default is to get value from version-numbers
24656      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24657    fi
24658  fi
24659
24660
24661# Check whether --with-version-minor was given.
24662if test "${with_version_minor+set}" = set; then :
24663  withval=$with_version_minor; with_version_minor_present=true
24664else
24665  with_version_minor_present=false
24666fi
24667
24668
24669  if test "x$with_version_minor_present" = xtrue; then
24670    if test "x$with_version_minor" = xyes; then
24671      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24672    elif test "x$with_version_minor" = xno; then
24673      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24674      VERSION_MINOR=0
24675    elif test "x$with_version_minor" = x; then
24676      VERSION_MINOR=0
24677    else
24678
24679  # Additional [] needed to keep m4 from mangling shell constructs.
24680  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24681    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24682  fi
24683  # Extract the version number without leading zeros.
24684  cleaned_value=${BASH_REMATCH[1]}
24685  if test "x$cleaned_value" = x; then
24686    # Special case for zero
24687    cleaned_value=${BASH_REMATCH[2]}
24688  fi
24689
24690  if test $cleaned_value -gt 255; then
24691    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24692  fi
24693  if test "x$cleaned_value" != "x$with_version_minor"; then
24694    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24695$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24696  fi
24697  VERSION_MINOR=$cleaned_value
24698
24699    fi
24700  else
24701    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24702      # Default is 0, if unspecified
24703      VERSION_MINOR=$DEFAULT_VERSION_MINOR
24704    fi
24705  fi
24706
24707
24708# Check whether --with-version-security was given.
24709if test "${with_version_security+set}" = set; then :
24710  withval=$with_version_security; with_version_security_present=true
24711else
24712  with_version_security_present=false
24713fi
24714
24715
24716  if test "x$with_version_security_present" = xtrue; then
24717    if test "x$with_version_security" = xyes; then
24718      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24719    elif test "x$with_version_security" = xno; then
24720      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24721      VERSION_SECURITY=0
24722    elif test "x$with_version_security" = x; then
24723      VERSION_SECURITY=0
24724    else
24725
24726  # Additional [] needed to keep m4 from mangling shell constructs.
24727  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24728    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24729  fi
24730  # Extract the version number without leading zeros.
24731  cleaned_value=${BASH_REMATCH[1]}
24732  if test "x$cleaned_value" = x; then
24733    # Special case for zero
24734    cleaned_value=${BASH_REMATCH[2]}
24735  fi
24736
24737  if test $cleaned_value -gt 255; then
24738    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24739  fi
24740  if test "x$cleaned_value" != "x$with_version_security"; then
24741    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24742$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24743  fi
24744  VERSION_SECURITY=$cleaned_value
24745
24746    fi
24747  else
24748    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24749      # Default is 0, if unspecified
24750      VERSION_SECURITY=$DEFAULT_VERSION_SECURITY
24751    fi
24752  fi
24753
24754
24755# Check whether --with-version-patch was given.
24756if test "${with_version_patch+set}" = set; then :
24757  withval=$with_version_patch; with_version_patch_present=true
24758else
24759  with_version_patch_present=false
24760fi
24761
24762
24763  if test "x$with_version_patch_present" = xtrue; then
24764    if test "x$with_version_patch" = xyes; then
24765      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24766    elif test "x$with_version_patch" = xno; then
24767      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24768      VERSION_PATCH=0
24769    elif test "x$with_version_patch" = x; then
24770      VERSION_PATCH=0
24771    else
24772
24773  # Additional [] needed to keep m4 from mangling shell constructs.
24774  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24775    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24776  fi
24777  # Extract the version number without leading zeros.
24778  cleaned_value=${BASH_REMATCH[1]}
24779  if test "x$cleaned_value" = x; then
24780    # Special case for zero
24781    cleaned_value=${BASH_REMATCH[2]}
24782  fi
24783
24784  if test $cleaned_value -gt 255; then
24785    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24786  fi
24787  if test "x$cleaned_value" != "x$with_version_patch"; then
24788    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24789$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24790  fi
24791  VERSION_PATCH=$cleaned_value
24792
24793    fi
24794  else
24795    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24796      # Default is 0, if unspecified
24797      VERSION_PATCH=$DEFAULT_VERSION_PATCH
24798    fi
24799  fi
24800
24801  # Calculate derived version properties
24802
24803  # Set VERSION_IS_GA based on if VERSION_PRE has a value
24804  if test "x$VERSION_PRE" = x; then
24805    VERSION_IS_GA=true
24806  else
24807    VERSION_IS_GA=false
24808  fi
24809
24810  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24811  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24812
24813  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24814  # Strip trailing zeroes from stripped_version_number
24815  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24816  VERSION_NUMBER=$stripped_version_number
24817
24818  # The complete version string, with additional build information
24819  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24820    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24821  else
24822    # If either build or opt is set, we need a + separator
24823    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24824  fi
24825
24826  # The short version string, just VERSION_NUMBER and PRE, if present.
24827  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24828
24829  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24830$as_echo_n "checking for version string... " >&6; }
24831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24832$as_echo "$VERSION_STRING" >&6; }
24833
24834
24835
24836
24837
24838
24839
24840
24841
24842
24843
24844
24845
24846
24847
24848###############################################################################
24849#
24850# Setup BootJDK, used to bootstrap the build.
24851#
24852###############################################################################
24853
24854
24855  BOOT_JDK_FOUND=no
24856
24857# Check whether --with-boot-jdk was given.
24858if test "${with_boot_jdk+set}" = set; then :
24859  withval=$with_boot_jdk;
24860fi
24861
24862
24863  # We look for the Boot JDK through various means, going from more certain to
24864  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24865  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24866  # must check if this is indeed valid; otherwise we'll continue looking.
24867
24868  # Test: Is bootjdk explicitly set by command line arguments?
24869
24870  if test "x$BOOT_JDK_FOUND" = xno; then
24871    # Now execute the test
24872
24873  if test "x$with_boot_jdk" != x; then
24874    BOOT_JDK=$with_boot_jdk
24875    BOOT_JDK_FOUND=maybe
24876    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24877$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24878  fi
24879
24880
24881    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24882    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24883      # Do we have a bin/java?
24884      if test ! -x "$BOOT_JDK/bin/java"; then
24885        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24886$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24887        BOOT_JDK_FOUND=no
24888      else
24889        # Do we have a bin/javac?
24890        if test ! -x "$BOOT_JDK/bin/javac"; then
24891          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24892$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24893          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24894$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24895          BOOT_JDK_FOUND=no
24896        else
24897          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24898          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
24899
24900          # Extra M4 quote needed to protect [] in grep expression.
24901          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24902          if test "x$FOUND_CORRECT_VERSION" = x; then
24903            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24904$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24905            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24906$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24907            BOOT_JDK_FOUND=no
24908          else
24909            # We're done! :-)
24910            BOOT_JDK_FOUND=yes
24911
24912  # Only process if variable expands to non-empty
24913
24914  if test "x$BOOT_JDK" != x; then
24915    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24916
24917  # Input might be given as Windows format, start by converting to
24918  # unix format.
24919  path="$BOOT_JDK"
24920  new_path=`$CYGPATH -u "$path"`
24921
24922  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24923  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24924  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24925  # "foo.exe" is OK but "foo" is an error.
24926  #
24927  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24928  # It is also a way to make sure we got the proper file name for the real test later on.
24929  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24930  if test "x$test_shortpath" = x; then
24931    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24932$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24933    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24934  fi
24935
24936  # Call helper function which possibly converts this using DOS-style short mode.
24937  # If so, the updated path is stored in $new_path.
24938
24939  input_path="$new_path"
24940  # Check if we need to convert this using DOS-style short mode. If the path
24941  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24942  # take no chances and rewrite it.
24943  # Note: m4 eats our [], so we need to use [ and ] instead.
24944  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24945  if test "x$has_forbidden_chars" != x; then
24946    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24947    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24948    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24949    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24950      # Going to short mode and back again did indeed matter. Since short mode is
24951      # case insensitive, let's make it lowercase to improve readability.
24952      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24953      # Now convert it back to Unix-style (cygpath)
24954      input_path=`$CYGPATH -u "$shortmode_path"`
24955      new_path="$input_path"
24956    fi
24957  fi
24958
24959  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24960  if test "x$test_cygdrive_prefix" = x; then
24961    # As a simple fix, exclude /usr/bin since it's not a real path.
24962    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24963      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24964      # a path prefixed by /cygdrive for fixpath to work.
24965      new_path="$CYGWIN_ROOT_PATH$input_path"
24966    fi
24967  fi
24968
24969
24970  if test "x$path" != "x$new_path"; then
24971    BOOT_JDK="$new_path"
24972    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24973$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24974  fi
24975
24976    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24977
24978  path="$BOOT_JDK"
24979  has_colon=`$ECHO $path | $GREP ^.:`
24980  new_path="$path"
24981  if test "x$has_colon" = x; then
24982    # Not in mixed or Windows style, start by that.
24983    new_path=`cmd //c echo $path`
24984  fi
24985
24986
24987  input_path="$new_path"
24988  # Check if we need to convert this using DOS-style short mode. If the path
24989  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24990  # take no chances and rewrite it.
24991  # Note: m4 eats our [], so we need to use [ and ] instead.
24992  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24993  if test "x$has_forbidden_chars" != x; then
24994    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24995    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24996  fi
24997
24998
24999  windows_path="$new_path"
25000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25001    unix_path=`$CYGPATH -u "$windows_path"`
25002    new_path="$unix_path"
25003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25004    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25005    new_path="$unix_path"
25006  fi
25007
25008  if test "x$path" != "x$new_path"; then
25009    BOOT_JDK="$new_path"
25010    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25011$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25012  fi
25013
25014  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25015  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25016
25017    else
25018      # We're on a unix platform. Hooray! :)
25019      path="$BOOT_JDK"
25020      has_space=`$ECHO "$path" | $GREP " "`
25021      if test "x$has_space" != x; then
25022        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25023$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25024        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25025      fi
25026
25027      # Use eval to expand a potential ~
25028      eval path="$path"
25029      if test ! -f "$path" && test ! -d "$path"; then
25030        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25031      fi
25032
25033      if test -d "$path"; then
25034        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25035      else
25036        dir="`$DIRNAME "$path"`"
25037        base="`$BASENAME "$path"`"
25038        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25039      fi
25040    fi
25041  fi
25042
25043            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25044$as_echo_n "checking for Boot JDK... " >&6; }
25045            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25046$as_echo "$BOOT_JDK" >&6; }
25047            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25048$as_echo_n "checking Boot JDK version... " >&6; }
25049            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25050            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25051$as_echo "$BOOT_JDK_VERSION" >&6; }
25052          fi # end check jdk version
25053        fi # end check javac
25054      fi # end check java
25055    fi # end check boot jdk found
25056  fi
25057
25058  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
25059    # Having specified an argument which is incorrect will produce an instant failure;
25060    # we should not go on looking
25061    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
25062  fi
25063
25064  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
25065
25066  if test "x$BOOT_JDK_FOUND" = xno; then
25067    # Now execute the test
25068
25069  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
25070    # First check at user selected default
25071
25072  if test "x$BOOT_JDK_FOUND" = xno; then
25073    # Now execute the test
25074
25075  if test -x /usr/libexec/java_home; then
25076    BOOT_JDK=`/usr/libexec/java_home `
25077    BOOT_JDK_FOUND=maybe
25078    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
25079$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
25080  fi
25081
25082
25083    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25084    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25085      # Do we have a bin/java?
25086      if test ! -x "$BOOT_JDK/bin/java"; then
25087        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25088$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25089        BOOT_JDK_FOUND=no
25090      else
25091        # Do we have a bin/javac?
25092        if test ! -x "$BOOT_JDK/bin/javac"; then
25093          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25094$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25095          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25096$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25097          BOOT_JDK_FOUND=no
25098        else
25099          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25100          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25101
25102          # Extra M4 quote needed to protect [] in grep expression.
25103          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25104          if test "x$FOUND_CORRECT_VERSION" = x; then
25105            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25106$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25107            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25108$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25109            BOOT_JDK_FOUND=no
25110          else
25111            # We're done! :-)
25112            BOOT_JDK_FOUND=yes
25113
25114  # Only process if variable expands to non-empty
25115
25116  if test "x$BOOT_JDK" != x; then
25117    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25118
25119  # Input might be given as Windows format, start by converting to
25120  # unix format.
25121  path="$BOOT_JDK"
25122  new_path=`$CYGPATH -u "$path"`
25123
25124  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25125  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25126  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25127  # "foo.exe" is OK but "foo" is an error.
25128  #
25129  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25130  # It is also a way to make sure we got the proper file name for the real test later on.
25131  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25132  if test "x$test_shortpath" = x; then
25133    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25134$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25135    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25136  fi
25137
25138  # Call helper function which possibly converts this using DOS-style short mode.
25139  # If so, the updated path is stored in $new_path.
25140
25141  input_path="$new_path"
25142  # Check if we need to convert this using DOS-style short mode. If the path
25143  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25144  # take no chances and rewrite it.
25145  # Note: m4 eats our [], so we need to use [ and ] instead.
25146  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25147  if test "x$has_forbidden_chars" != x; then
25148    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25149    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25150    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25151    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25152      # Going to short mode and back again did indeed matter. Since short mode is
25153      # case insensitive, let's make it lowercase to improve readability.
25154      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25155      # Now convert it back to Unix-style (cygpath)
25156      input_path=`$CYGPATH -u "$shortmode_path"`
25157      new_path="$input_path"
25158    fi
25159  fi
25160
25161  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25162  if test "x$test_cygdrive_prefix" = x; then
25163    # As a simple fix, exclude /usr/bin since it's not a real path.
25164    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25165      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25166      # a path prefixed by /cygdrive for fixpath to work.
25167      new_path="$CYGWIN_ROOT_PATH$input_path"
25168    fi
25169  fi
25170
25171
25172  if test "x$path" != "x$new_path"; then
25173    BOOT_JDK="$new_path"
25174    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25175$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25176  fi
25177
25178    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25179
25180  path="$BOOT_JDK"
25181  has_colon=`$ECHO $path | $GREP ^.:`
25182  new_path="$path"
25183  if test "x$has_colon" = x; then
25184    # Not in mixed or Windows style, start by that.
25185    new_path=`cmd //c echo $path`
25186  fi
25187
25188
25189  input_path="$new_path"
25190  # Check if we need to convert this using DOS-style short mode. If the path
25191  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25192  # take no chances and rewrite it.
25193  # Note: m4 eats our [], so we need to use [ and ] instead.
25194  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25195  if test "x$has_forbidden_chars" != x; then
25196    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25197    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25198  fi
25199
25200
25201  windows_path="$new_path"
25202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25203    unix_path=`$CYGPATH -u "$windows_path"`
25204    new_path="$unix_path"
25205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25206    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25207    new_path="$unix_path"
25208  fi
25209
25210  if test "x$path" != "x$new_path"; then
25211    BOOT_JDK="$new_path"
25212    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25213$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25214  fi
25215
25216  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25217  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25218
25219    else
25220      # We're on a unix platform. Hooray! :)
25221      path="$BOOT_JDK"
25222      has_space=`$ECHO "$path" | $GREP " "`
25223      if test "x$has_space" != x; then
25224        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25225$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25226        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25227      fi
25228
25229      # Use eval to expand a potential ~
25230      eval path="$path"
25231      if test ! -f "$path" && test ! -d "$path"; then
25232        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25233      fi
25234
25235      if test -d "$path"; then
25236        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25237      else
25238        dir="`$DIRNAME "$path"`"
25239        base="`$BASENAME "$path"`"
25240        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25241      fi
25242    fi
25243  fi
25244
25245            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25246$as_echo_n "checking for Boot JDK... " >&6; }
25247            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25248$as_echo "$BOOT_JDK" >&6; }
25249            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25250$as_echo_n "checking Boot JDK version... " >&6; }
25251            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25252            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25253$as_echo "$BOOT_JDK_VERSION" >&6; }
25254          fi # end check jdk version
25255        fi # end check javac
25256      fi # end check java
25257    fi # end check boot jdk found
25258  fi
25259
25260    # If that did not work out (e.g. too old), try explicit versions instead
25261
25262  if test "x$BOOT_JDK_FOUND" = xno; then
25263    # Now execute the test
25264
25265  if test -x /usr/libexec/java_home; then
25266    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25267    BOOT_JDK_FOUND=maybe
25268    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25269$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25270  fi
25271
25272
25273    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25274    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25275      # Do we have a bin/java?
25276      if test ! -x "$BOOT_JDK/bin/java"; then
25277        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25278$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25279        BOOT_JDK_FOUND=no
25280      else
25281        # Do we have a bin/javac?
25282        if test ! -x "$BOOT_JDK/bin/javac"; then
25283          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25284$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25285          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25286$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25287          BOOT_JDK_FOUND=no
25288        else
25289          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25290          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25291
25292          # Extra M4 quote needed to protect [] in grep expression.
25293          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25294          if test "x$FOUND_CORRECT_VERSION" = x; then
25295            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25296$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25297            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25298$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25299            BOOT_JDK_FOUND=no
25300          else
25301            # We're done! :-)
25302            BOOT_JDK_FOUND=yes
25303
25304  # Only process if variable expands to non-empty
25305
25306  if test "x$BOOT_JDK" != x; then
25307    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25308
25309  # Input might be given as Windows format, start by converting to
25310  # unix format.
25311  path="$BOOT_JDK"
25312  new_path=`$CYGPATH -u "$path"`
25313
25314  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25315  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25316  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25317  # "foo.exe" is OK but "foo" is an error.
25318  #
25319  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25320  # It is also a way to make sure we got the proper file name for the real test later on.
25321  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25322  if test "x$test_shortpath" = x; then
25323    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25324$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25325    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25326  fi
25327
25328  # Call helper function which possibly converts this using DOS-style short mode.
25329  # If so, the updated path is stored in $new_path.
25330
25331  input_path="$new_path"
25332  # Check if we need to convert this using DOS-style short mode. If the path
25333  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25334  # take no chances and rewrite it.
25335  # Note: m4 eats our [], so we need to use [ and ] instead.
25336  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25337  if test "x$has_forbidden_chars" != x; then
25338    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25339    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25340    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25341    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25342      # Going to short mode and back again did indeed matter. Since short mode is
25343      # case insensitive, let's make it lowercase to improve readability.
25344      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25345      # Now convert it back to Unix-style (cygpath)
25346      input_path=`$CYGPATH -u "$shortmode_path"`
25347      new_path="$input_path"
25348    fi
25349  fi
25350
25351  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25352  if test "x$test_cygdrive_prefix" = x; then
25353    # As a simple fix, exclude /usr/bin since it's not a real path.
25354    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25355      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25356      # a path prefixed by /cygdrive for fixpath to work.
25357      new_path="$CYGWIN_ROOT_PATH$input_path"
25358    fi
25359  fi
25360
25361
25362  if test "x$path" != "x$new_path"; then
25363    BOOT_JDK="$new_path"
25364    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25365$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25366  fi
25367
25368    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25369
25370  path="$BOOT_JDK"
25371  has_colon=`$ECHO $path | $GREP ^.:`
25372  new_path="$path"
25373  if test "x$has_colon" = x; then
25374    # Not in mixed or Windows style, start by that.
25375    new_path=`cmd //c echo $path`
25376  fi
25377
25378
25379  input_path="$new_path"
25380  # Check if we need to convert this using DOS-style short mode. If the path
25381  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25382  # take no chances and rewrite it.
25383  # Note: m4 eats our [], so we need to use [ and ] instead.
25384  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25385  if test "x$has_forbidden_chars" != x; then
25386    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25387    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25388  fi
25389
25390
25391  windows_path="$new_path"
25392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25393    unix_path=`$CYGPATH -u "$windows_path"`
25394    new_path="$unix_path"
25395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25397    new_path="$unix_path"
25398  fi
25399
25400  if test "x$path" != "x$new_path"; then
25401    BOOT_JDK="$new_path"
25402    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25403$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25404  fi
25405
25406  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25407  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25408
25409    else
25410      # We're on a unix platform. Hooray! :)
25411      path="$BOOT_JDK"
25412      has_space=`$ECHO "$path" | $GREP " "`
25413      if test "x$has_space" != x; then
25414        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25415$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25416        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25417      fi
25418
25419      # Use eval to expand a potential ~
25420      eval path="$path"
25421      if test ! -f "$path" && test ! -d "$path"; then
25422        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25423      fi
25424
25425      if test -d "$path"; then
25426        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25427      else
25428        dir="`$DIRNAME "$path"`"
25429        base="`$BASENAME "$path"`"
25430        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25431      fi
25432    fi
25433  fi
25434
25435            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25436$as_echo_n "checking for Boot JDK... " >&6; }
25437            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25438$as_echo "$BOOT_JDK" >&6; }
25439            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25440$as_echo_n "checking Boot JDK version... " >&6; }
25441            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25442            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25443$as_echo "$BOOT_JDK_VERSION" >&6; }
25444          fi # end check jdk version
25445        fi # end check javac
25446      fi # end check java
25447    fi # end check boot jdk found
25448  fi
25449
25450
25451  if test "x$BOOT_JDK_FOUND" = xno; then
25452    # Now execute the test
25453
25454  if test -x /usr/libexec/java_home; then
25455    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25456    BOOT_JDK_FOUND=maybe
25457    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25458$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25459  fi
25460
25461
25462    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25463    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25464      # Do we have a bin/java?
25465      if test ! -x "$BOOT_JDK/bin/java"; then
25466        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25467$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25468        BOOT_JDK_FOUND=no
25469      else
25470        # Do we have a bin/javac?
25471        if test ! -x "$BOOT_JDK/bin/javac"; then
25472          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25473$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25474          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25475$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25476          BOOT_JDK_FOUND=no
25477        else
25478          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25479          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25480
25481          # Extra M4 quote needed to protect [] in grep expression.
25482          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25483          if test "x$FOUND_CORRECT_VERSION" = x; then
25484            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25485$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25486            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25487$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25488            BOOT_JDK_FOUND=no
25489          else
25490            # We're done! :-)
25491            BOOT_JDK_FOUND=yes
25492
25493  # Only process if variable expands to non-empty
25494
25495  if test "x$BOOT_JDK" != x; then
25496    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25497
25498  # Input might be given as Windows format, start by converting to
25499  # unix format.
25500  path="$BOOT_JDK"
25501  new_path=`$CYGPATH -u "$path"`
25502
25503  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25504  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25505  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25506  # "foo.exe" is OK but "foo" is an error.
25507  #
25508  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25509  # It is also a way to make sure we got the proper file name for the real test later on.
25510  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25511  if test "x$test_shortpath" = x; then
25512    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25513$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25514    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25515  fi
25516
25517  # Call helper function which possibly converts this using DOS-style short mode.
25518  # If so, the updated path is stored in $new_path.
25519
25520  input_path="$new_path"
25521  # Check if we need to convert this using DOS-style short mode. If the path
25522  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25523  # take no chances and rewrite it.
25524  # Note: m4 eats our [], so we need to use [ and ] instead.
25525  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25526  if test "x$has_forbidden_chars" != x; then
25527    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25528    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25529    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25530    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25531      # Going to short mode and back again did indeed matter. Since short mode is
25532      # case insensitive, let's make it lowercase to improve readability.
25533      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25534      # Now convert it back to Unix-style (cygpath)
25535      input_path=`$CYGPATH -u "$shortmode_path"`
25536      new_path="$input_path"
25537    fi
25538  fi
25539
25540  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25541  if test "x$test_cygdrive_prefix" = x; then
25542    # As a simple fix, exclude /usr/bin since it's not a real path.
25543    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25544      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25545      # a path prefixed by /cygdrive for fixpath to work.
25546      new_path="$CYGWIN_ROOT_PATH$input_path"
25547    fi
25548  fi
25549
25550
25551  if test "x$path" != "x$new_path"; then
25552    BOOT_JDK="$new_path"
25553    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25554$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25555  fi
25556
25557    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25558
25559  path="$BOOT_JDK"
25560  has_colon=`$ECHO $path | $GREP ^.:`
25561  new_path="$path"
25562  if test "x$has_colon" = x; then
25563    # Not in mixed or Windows style, start by that.
25564    new_path=`cmd //c echo $path`
25565  fi
25566
25567
25568  input_path="$new_path"
25569  # Check if we need to convert this using DOS-style short mode. If the path
25570  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25571  # take no chances and rewrite it.
25572  # Note: m4 eats our [], so we need to use [ and ] instead.
25573  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25574  if test "x$has_forbidden_chars" != x; then
25575    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25576    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25577  fi
25578
25579
25580  windows_path="$new_path"
25581  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25582    unix_path=`$CYGPATH -u "$windows_path"`
25583    new_path="$unix_path"
25584  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25585    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25586    new_path="$unix_path"
25587  fi
25588
25589  if test "x$path" != "x$new_path"; then
25590    BOOT_JDK="$new_path"
25591    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25592$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25593  fi
25594
25595  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25596  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25597
25598    else
25599      # We're on a unix platform. Hooray! :)
25600      path="$BOOT_JDK"
25601      has_space=`$ECHO "$path" | $GREP " "`
25602      if test "x$has_space" != x; then
25603        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25604$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25605        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25606      fi
25607
25608      # Use eval to expand a potential ~
25609      eval path="$path"
25610      if test ! -f "$path" && test ! -d "$path"; then
25611        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25612      fi
25613
25614      if test -d "$path"; then
25615        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25616      else
25617        dir="`$DIRNAME "$path"`"
25618        base="`$BASENAME "$path"`"
25619        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25620      fi
25621    fi
25622  fi
25623
25624            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25625$as_echo_n "checking for Boot JDK... " >&6; }
25626            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25627$as_echo "$BOOT_JDK" >&6; }
25628            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25629$as_echo_n "checking Boot JDK version... " >&6; }
25630            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25631            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25632$as_echo "$BOOT_JDK_VERSION" >&6; }
25633          fi # end check jdk version
25634        fi # end check javac
25635      fi # end check java
25636    fi # end check boot jdk found
25637  fi
25638
25639
25640  if test "x$BOOT_JDK_FOUND" = xno; then
25641    # Now execute the test
25642
25643  if test -x /usr/libexec/java_home; then
25644    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25645    BOOT_JDK_FOUND=maybe
25646    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25647$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25648  fi
25649
25650
25651    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25652    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25653      # Do we have a bin/java?
25654      if test ! -x "$BOOT_JDK/bin/java"; then
25655        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25656$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25657        BOOT_JDK_FOUND=no
25658      else
25659        # Do we have a bin/javac?
25660        if test ! -x "$BOOT_JDK/bin/javac"; then
25661          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25662$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25663          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25664$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25665          BOOT_JDK_FOUND=no
25666        else
25667          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25668          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25669
25670          # Extra M4 quote needed to protect [] in grep expression.
25671          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25672          if test "x$FOUND_CORRECT_VERSION" = x; then
25673            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25674$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25675            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25676$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25677            BOOT_JDK_FOUND=no
25678          else
25679            # We're done! :-)
25680            BOOT_JDK_FOUND=yes
25681
25682  # Only process if variable expands to non-empty
25683
25684  if test "x$BOOT_JDK" != x; then
25685    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25686
25687  # Input might be given as Windows format, start by converting to
25688  # unix format.
25689  path="$BOOT_JDK"
25690  new_path=`$CYGPATH -u "$path"`
25691
25692  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25693  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25694  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25695  # "foo.exe" is OK but "foo" is an error.
25696  #
25697  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25698  # It is also a way to make sure we got the proper file name for the real test later on.
25699  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25700  if test "x$test_shortpath" = x; then
25701    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25702$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25703    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25704  fi
25705
25706  # Call helper function which possibly converts this using DOS-style short mode.
25707  # If so, the updated path is stored in $new_path.
25708
25709  input_path="$new_path"
25710  # Check if we need to convert this using DOS-style short mode. If the path
25711  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25712  # take no chances and rewrite it.
25713  # Note: m4 eats our [], so we need to use [ and ] instead.
25714  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25715  if test "x$has_forbidden_chars" != x; then
25716    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25717    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25718    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25719    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25720      # Going to short mode and back again did indeed matter. Since short mode is
25721      # case insensitive, let's make it lowercase to improve readability.
25722      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25723      # Now convert it back to Unix-style (cygpath)
25724      input_path=`$CYGPATH -u "$shortmode_path"`
25725      new_path="$input_path"
25726    fi
25727  fi
25728
25729  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25730  if test "x$test_cygdrive_prefix" = x; then
25731    # As a simple fix, exclude /usr/bin since it's not a real path.
25732    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25733      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25734      # a path prefixed by /cygdrive for fixpath to work.
25735      new_path="$CYGWIN_ROOT_PATH$input_path"
25736    fi
25737  fi
25738
25739
25740  if test "x$path" != "x$new_path"; then
25741    BOOT_JDK="$new_path"
25742    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25743$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25744  fi
25745
25746    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25747
25748  path="$BOOT_JDK"
25749  has_colon=`$ECHO $path | $GREP ^.:`
25750  new_path="$path"
25751  if test "x$has_colon" = x; then
25752    # Not in mixed or Windows style, start by that.
25753    new_path=`cmd //c echo $path`
25754  fi
25755
25756
25757  input_path="$new_path"
25758  # Check if we need to convert this using DOS-style short mode. If the path
25759  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25760  # take no chances and rewrite it.
25761  # Note: m4 eats our [], so we need to use [ and ] instead.
25762  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25763  if test "x$has_forbidden_chars" != x; then
25764    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25765    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25766  fi
25767
25768
25769  windows_path="$new_path"
25770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25771    unix_path=`$CYGPATH -u "$windows_path"`
25772    new_path="$unix_path"
25773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25775    new_path="$unix_path"
25776  fi
25777
25778  if test "x$path" != "x$new_path"; then
25779    BOOT_JDK="$new_path"
25780    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25781$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25782  fi
25783
25784  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25785  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25786
25787    else
25788      # We're on a unix platform. Hooray! :)
25789      path="$BOOT_JDK"
25790      has_space=`$ECHO "$path" | $GREP " "`
25791      if test "x$has_space" != x; then
25792        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25793$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25794        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25795      fi
25796
25797      # Use eval to expand a potential ~
25798      eval path="$path"
25799      if test ! -f "$path" && test ! -d "$path"; then
25800        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25801      fi
25802
25803      if test -d "$path"; then
25804        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25805      else
25806        dir="`$DIRNAME "$path"`"
25807        base="`$BASENAME "$path"`"
25808        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25809      fi
25810    fi
25811  fi
25812
25813            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25814$as_echo_n "checking for Boot JDK... " >&6; }
25815            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25816$as_echo "$BOOT_JDK" >&6; }
25817            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25818$as_echo_n "checking Boot JDK version... " >&6; }
25819            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25820            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25821$as_echo "$BOOT_JDK_VERSION" >&6; }
25822          fi # end check jdk version
25823        fi # end check javac
25824      fi # end check java
25825    fi # end check boot jdk found
25826  fi
25827
25828  fi
25829
25830
25831    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25832    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25833      # Do we have a bin/java?
25834      if test ! -x "$BOOT_JDK/bin/java"; then
25835        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25836$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25837        BOOT_JDK_FOUND=no
25838      else
25839        # Do we have a bin/javac?
25840        if test ! -x "$BOOT_JDK/bin/javac"; then
25841          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25842$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25843          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25844$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25845          BOOT_JDK_FOUND=no
25846        else
25847          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25848          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25849
25850          # Extra M4 quote needed to protect [] in grep expression.
25851          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25852          if test "x$FOUND_CORRECT_VERSION" = x; then
25853            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25854$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25855            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25856$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25857            BOOT_JDK_FOUND=no
25858          else
25859            # We're done! :-)
25860            BOOT_JDK_FOUND=yes
25861
25862  # Only process if variable expands to non-empty
25863
25864  if test "x$BOOT_JDK" != x; then
25865    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25866
25867  # Input might be given as Windows format, start by converting to
25868  # unix format.
25869  path="$BOOT_JDK"
25870  new_path=`$CYGPATH -u "$path"`
25871
25872  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25873  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25874  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25875  # "foo.exe" is OK but "foo" is an error.
25876  #
25877  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25878  # It is also a way to make sure we got the proper file name for the real test later on.
25879  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25880  if test "x$test_shortpath" = x; then
25881    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25882$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25883    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25884  fi
25885
25886  # Call helper function which possibly converts this using DOS-style short mode.
25887  # If so, the updated path is stored in $new_path.
25888
25889  input_path="$new_path"
25890  # Check if we need to convert this using DOS-style short mode. If the path
25891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25892  # take no chances and rewrite it.
25893  # Note: m4 eats our [], so we need to use [ and ] instead.
25894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25895  if test "x$has_forbidden_chars" != x; then
25896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25897    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25898    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25899    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25900      # Going to short mode and back again did indeed matter. Since short mode is
25901      # case insensitive, let's make it lowercase to improve readability.
25902      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25903      # Now convert it back to Unix-style (cygpath)
25904      input_path=`$CYGPATH -u "$shortmode_path"`
25905      new_path="$input_path"
25906    fi
25907  fi
25908
25909  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25910  if test "x$test_cygdrive_prefix" = x; then
25911    # As a simple fix, exclude /usr/bin since it's not a real path.
25912    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25913      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25914      # a path prefixed by /cygdrive for fixpath to work.
25915      new_path="$CYGWIN_ROOT_PATH$input_path"
25916    fi
25917  fi
25918
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    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25927
25928  path="$BOOT_JDK"
25929  has_colon=`$ECHO $path | $GREP ^.:`
25930  new_path="$path"
25931  if test "x$has_colon" = x; then
25932    # Not in mixed or Windows style, start by that.
25933    new_path=`cmd //c echo $path`
25934  fi
25935
25936
25937  input_path="$new_path"
25938  # Check if we need to convert this using DOS-style short mode. If the path
25939  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25940  # take no chances and rewrite it.
25941  # Note: m4 eats our [], so we need to use [ and ] instead.
25942  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25943  if test "x$has_forbidden_chars" != x; then
25944    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25945    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25946  fi
25947
25948
25949  windows_path="$new_path"
25950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25951    unix_path=`$CYGPATH -u "$windows_path"`
25952    new_path="$unix_path"
25953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25955    new_path="$unix_path"
25956  fi
25957
25958  if test "x$path" != "x$new_path"; then
25959    BOOT_JDK="$new_path"
25960    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25961$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25962  fi
25963
25964  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25965  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25966
25967    else
25968      # We're on a unix platform. Hooray! :)
25969      path="$BOOT_JDK"
25970      has_space=`$ECHO "$path" | $GREP " "`
25971      if test "x$has_space" != x; then
25972        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25973$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25974        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25975      fi
25976
25977      # Use eval to expand a potential ~
25978      eval path="$path"
25979      if test ! -f "$path" && test ! -d "$path"; then
25980        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25981      fi
25982
25983      if test -d "$path"; then
25984        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25985      else
25986        dir="`$DIRNAME "$path"`"
25987        base="`$BASENAME "$path"`"
25988        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25989      fi
25990    fi
25991  fi
25992
25993            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25994$as_echo_n "checking for Boot JDK... " >&6; }
25995            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25996$as_echo "$BOOT_JDK" >&6; }
25997            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25998$as_echo_n "checking Boot JDK version... " >&6; }
25999            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26000            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26001$as_echo "$BOOT_JDK_VERSION" >&6; }
26002          fi # end check jdk version
26003        fi # end check javac
26004      fi # end check java
26005    fi # end check boot jdk found
26006  fi
26007
26008
26009  # Test: Is $JAVA_HOME set?
26010
26011  if test "x$BOOT_JDK_FOUND" = xno; then
26012    # Now execute the test
26013
26014  if test "x$JAVA_HOME" != x; then
26015    JAVA_HOME_PROCESSED="$JAVA_HOME"
26016
26017  # Only process if variable expands to non-empty
26018
26019  if test "x$JAVA_HOME_PROCESSED" != x; then
26020    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26021
26022  # Input might be given as Windows format, start by converting to
26023  # unix format.
26024  path="$JAVA_HOME_PROCESSED"
26025  new_path=`$CYGPATH -u "$path"`
26026
26027  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26028  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26029  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26030  # "foo.exe" is OK but "foo" is an error.
26031  #
26032  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26033  # It is also a way to make sure we got the proper file name for the real test later on.
26034  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26035  if test "x$test_shortpath" = x; then
26036    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26037$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26038    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
26039  fi
26040
26041  # Call helper function which possibly converts this using DOS-style short mode.
26042  # If so, the updated path is stored in $new_path.
26043
26044  input_path="$new_path"
26045  # Check if we need to convert this using DOS-style short mode. If the path
26046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26047  # take no chances and rewrite it.
26048  # Note: m4 eats our [], so we need to use [ and ] instead.
26049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26050  if test "x$has_forbidden_chars" != x; then
26051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26052    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26053    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26054    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26055      # Going to short mode and back again did indeed matter. Since short mode is
26056      # case insensitive, let's make it lowercase to improve readability.
26057      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26058      # Now convert it back to Unix-style (cygpath)
26059      input_path=`$CYGPATH -u "$shortmode_path"`
26060      new_path="$input_path"
26061    fi
26062  fi
26063
26064  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26065  if test "x$test_cygdrive_prefix" = x; then
26066    # As a simple fix, exclude /usr/bin since it's not a real path.
26067    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26068      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26069      # a path prefixed by /cygdrive for fixpath to work.
26070      new_path="$CYGWIN_ROOT_PATH$input_path"
26071    fi
26072  fi
26073
26074
26075  if test "x$path" != "x$new_path"; then
26076    JAVA_HOME_PROCESSED="$new_path"
26077    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26078$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26079  fi
26080
26081    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26082
26083  path="$JAVA_HOME_PROCESSED"
26084  has_colon=`$ECHO $path | $GREP ^.:`
26085  new_path="$path"
26086  if test "x$has_colon" = x; then
26087    # Not in mixed or Windows style, start by that.
26088    new_path=`cmd //c echo $path`
26089  fi
26090
26091
26092  input_path="$new_path"
26093  # Check if we need to convert this using DOS-style short mode. If the path
26094  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26095  # take no chances and rewrite it.
26096  # Note: m4 eats our [], so we need to use [ and ] instead.
26097  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26098  if test "x$has_forbidden_chars" != x; then
26099    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26100    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26101  fi
26102
26103
26104  windows_path="$new_path"
26105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26106    unix_path=`$CYGPATH -u "$windows_path"`
26107    new_path="$unix_path"
26108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26109    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26110    new_path="$unix_path"
26111  fi
26112
26113  if test "x$path" != "x$new_path"; then
26114    JAVA_HOME_PROCESSED="$new_path"
26115    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26116$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26117  fi
26118
26119  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26120  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26121
26122    else
26123      # We're on a unix platform. Hooray! :)
26124      path="$JAVA_HOME_PROCESSED"
26125      has_space=`$ECHO "$path" | $GREP " "`
26126      if test "x$has_space" != x; then
26127        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26128$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26129        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26130      fi
26131
26132      # Use eval to expand a potential ~
26133      eval path="$path"
26134      if test ! -f "$path" && test ! -d "$path"; then
26135        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26136      fi
26137
26138      if test -d "$path"; then
26139        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26140      else
26141        dir="`$DIRNAME "$path"`"
26142        base="`$BASENAME "$path"`"
26143        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26144      fi
26145    fi
26146  fi
26147
26148    if test ! -d "$JAVA_HOME_PROCESSED"; then
26149      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26150$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26151    else
26152      # Aha, the user has set a JAVA_HOME
26153      # let us use that as the Boot JDK.
26154      BOOT_JDK="$JAVA_HOME_PROCESSED"
26155      BOOT_JDK_FOUND=maybe
26156      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26157$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26158    fi
26159  fi
26160
26161
26162    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26163    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26164      # Do we have a bin/java?
26165      if test ! -x "$BOOT_JDK/bin/java"; then
26166        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26167$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26168        BOOT_JDK_FOUND=no
26169      else
26170        # Do we have a bin/javac?
26171        if test ! -x "$BOOT_JDK/bin/javac"; then
26172          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26173$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26174          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26175$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26176          BOOT_JDK_FOUND=no
26177        else
26178          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26179          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26180
26181          # Extra M4 quote needed to protect [] in grep expression.
26182          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26183          if test "x$FOUND_CORRECT_VERSION" = x; then
26184            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26185$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26186            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26187$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26188            BOOT_JDK_FOUND=no
26189          else
26190            # We're done! :-)
26191            BOOT_JDK_FOUND=yes
26192
26193  # Only process if variable expands to non-empty
26194
26195  if test "x$BOOT_JDK" != x; then
26196    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26197
26198  # Input might be given as Windows format, start by converting to
26199  # unix format.
26200  path="$BOOT_JDK"
26201  new_path=`$CYGPATH -u "$path"`
26202
26203  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26204  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26205  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26206  # "foo.exe" is OK but "foo" is an error.
26207  #
26208  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26209  # It is also a way to make sure we got the proper file name for the real test later on.
26210  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26211  if test "x$test_shortpath" = x; then
26212    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26213$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26214    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26215  fi
26216
26217  # Call helper function which possibly converts this using DOS-style short mode.
26218  # If so, the updated path is stored in $new_path.
26219
26220  input_path="$new_path"
26221  # Check if we need to convert this using DOS-style short mode. If the path
26222  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26223  # take no chances and rewrite it.
26224  # Note: m4 eats our [], so we need to use [ and ] instead.
26225  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26226  if test "x$has_forbidden_chars" != x; then
26227    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26228    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26229    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26230    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26231      # Going to short mode and back again did indeed matter. Since short mode is
26232      # case insensitive, let's make it lowercase to improve readability.
26233      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26234      # Now convert it back to Unix-style (cygpath)
26235      input_path=`$CYGPATH -u "$shortmode_path"`
26236      new_path="$input_path"
26237    fi
26238  fi
26239
26240  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26241  if test "x$test_cygdrive_prefix" = x; then
26242    # As a simple fix, exclude /usr/bin since it's not a real path.
26243    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26244      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26245      # a path prefixed by /cygdrive for fixpath to work.
26246      new_path="$CYGWIN_ROOT_PATH$input_path"
26247    fi
26248  fi
26249
26250
26251  if test "x$path" != "x$new_path"; then
26252    BOOT_JDK="$new_path"
26253    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26254$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26255  fi
26256
26257    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26258
26259  path="$BOOT_JDK"
26260  has_colon=`$ECHO $path | $GREP ^.:`
26261  new_path="$path"
26262  if test "x$has_colon" = x; then
26263    # Not in mixed or Windows style, start by that.
26264    new_path=`cmd //c echo $path`
26265  fi
26266
26267
26268  input_path="$new_path"
26269  # Check if we need to convert this using DOS-style short mode. If the path
26270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26271  # take no chances and rewrite it.
26272  # Note: m4 eats our [], so we need to use [ and ] instead.
26273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26274  if test "x$has_forbidden_chars" != x; then
26275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26276    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26277  fi
26278
26279
26280  windows_path="$new_path"
26281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26282    unix_path=`$CYGPATH -u "$windows_path"`
26283    new_path="$unix_path"
26284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26285    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26286    new_path="$unix_path"
26287  fi
26288
26289  if test "x$path" != "x$new_path"; then
26290    BOOT_JDK="$new_path"
26291    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26292$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26293  fi
26294
26295  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26296  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26297
26298    else
26299      # We're on a unix platform. Hooray! :)
26300      path="$BOOT_JDK"
26301      has_space=`$ECHO "$path" | $GREP " "`
26302      if test "x$has_space" != x; then
26303        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26304$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26305        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26306      fi
26307
26308      # Use eval to expand a potential ~
26309      eval path="$path"
26310      if test ! -f "$path" && test ! -d "$path"; then
26311        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26312      fi
26313
26314      if test -d "$path"; then
26315        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26316      else
26317        dir="`$DIRNAME "$path"`"
26318        base="`$BASENAME "$path"`"
26319        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26320      fi
26321    fi
26322  fi
26323
26324            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26325$as_echo_n "checking for Boot JDK... " >&6; }
26326            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26327$as_echo "$BOOT_JDK" >&6; }
26328            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26329$as_echo_n "checking Boot JDK version... " >&6; }
26330            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26331            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26332$as_echo "$BOOT_JDK_VERSION" >&6; }
26333          fi # end check jdk version
26334        fi # end check javac
26335      fi # end check java
26336    fi # end check boot jdk found
26337  fi
26338
26339
26340  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26341
26342  if test "x$BOOT_JDK_FOUND" = xno; then
26343    # Now execute the test
26344
26345  # Extract the first word of "javac", so it can be a program name with args.
26346set dummy javac; ac_word=$2
26347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26348$as_echo_n "checking for $ac_word... " >&6; }
26349if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26350  $as_echo_n "(cached) " >&6
26351else
26352  case $JAVAC_CHECK in
26353  [\\/]* | ?:[\\/]*)
26354  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26355  ;;
26356  *)
26357  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26358for as_dir in $PATH
26359do
26360  IFS=$as_save_IFS
26361  test -z "$as_dir" && as_dir=.
26362    for ac_exec_ext in '' $ac_executable_extensions; do
26363  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26364    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26365    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26366    break 2
26367  fi
26368done
26369  done
26370IFS=$as_save_IFS
26371
26372  ;;
26373esac
26374fi
26375JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26376if test -n "$JAVAC_CHECK"; then
26377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26378$as_echo "$JAVAC_CHECK" >&6; }
26379else
26380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26381$as_echo "no" >&6; }
26382fi
26383
26384
26385  # Extract the first word of "java", so it can be a program name with args.
26386set dummy java; ac_word=$2
26387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26388$as_echo_n "checking for $ac_word... " >&6; }
26389if ${ac_cv_path_JAVA_CHECK+:} false; then :
26390  $as_echo_n "(cached) " >&6
26391else
26392  case $JAVA_CHECK in
26393  [\\/]* | ?:[\\/]*)
26394  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26395  ;;
26396  *)
26397  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26398for as_dir in $PATH
26399do
26400  IFS=$as_save_IFS
26401  test -z "$as_dir" && as_dir=.
26402    for ac_exec_ext in '' $ac_executable_extensions; do
26403  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26404    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26405    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26406    break 2
26407  fi
26408done
26409  done
26410IFS=$as_save_IFS
26411
26412  ;;
26413esac
26414fi
26415JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26416if test -n "$JAVA_CHECK"; then
26417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26418$as_echo "$JAVA_CHECK" >&6; }
26419else
26420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26421$as_echo "no" >&6; }
26422fi
26423
26424
26425  BINARY="$JAVAC_CHECK"
26426  if test "x$JAVAC_CHECK" = x; then
26427    BINARY="$JAVA_CHECK"
26428  fi
26429  if test "x$BINARY" != x; then
26430    # So there is a java(c) binary, it might be part of a JDK.
26431    # Lets find the JDK/JRE directory by following symbolic links.
26432    # Linux/GNU systems often have links from /usr/bin/java to
26433    # /etc/alternatives/java to the real JDK binary.
26434
26435  if test "x$OPENJDK_BUILD_OS" != xwindows; then
26436    # Follow a chain of symbolic links. Use readlink
26437    # where it exists, else fall back to horribly
26438    # complicated shell code.
26439    if test "x$READLINK_TESTED" != yes; then
26440      # On MacOSX there is a readlink tool with a different
26441      # purpose than the GNU readlink tool. Check the found readlink.
26442      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26443      if test "x$ISGNU" = x; then
26444        # A readlink that we do not know how to use.
26445        # Are there other non-GNU readlinks out there?
26446        READLINK_TESTED=yes
26447        READLINK=
26448      fi
26449    fi
26450
26451    if test "x$READLINK" != x; then
26452      BINARY=`$READLINK -f $BINARY`
26453    else
26454      # Save the current directory for restoring afterwards
26455      STARTDIR=$PWD
26456      COUNTER=0
26457      sym_link_dir=`$DIRNAME $BINARY`
26458      sym_link_file=`$BASENAME $BINARY`
26459      cd $sym_link_dir
26460      # Use -P flag to resolve symlinks in directories.
26461      cd `$THEPWDCMD -P`
26462      sym_link_dir=`$THEPWDCMD -P`
26463      # Resolve file symlinks
26464      while test $COUNTER -lt 20; do
26465        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26466        if test "x$ISLINK" == x; then
26467          # This is not a symbolic link! We are done!
26468          break
26469        fi
26470        # Again resolve directory symlinks since the target of the just found
26471        # link could be in a different directory
26472        cd `$DIRNAME $ISLINK`
26473        sym_link_dir=`$THEPWDCMD -P`
26474        sym_link_file=`$BASENAME $ISLINK`
26475        let COUNTER=COUNTER+1
26476      done
26477      cd $STARTDIR
26478      BINARY=$sym_link_dir/$sym_link_file
26479    fi
26480  fi
26481
26482    BOOT_JDK=`dirname "$BINARY"`
26483    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26484    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26485      # Looks like we found ourselves an JDK
26486      BOOT_JDK_FOUND=maybe
26487      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26488$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26489    fi
26490  fi
26491
26492
26493    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26494    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26495      # Do we have a bin/java?
26496      if test ! -x "$BOOT_JDK/bin/java"; then
26497        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26498$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26499        BOOT_JDK_FOUND=no
26500      else
26501        # Do we have a bin/javac?
26502        if test ! -x "$BOOT_JDK/bin/javac"; then
26503          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26504$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26505          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26506$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26507          BOOT_JDK_FOUND=no
26508        else
26509          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26510          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26511
26512          # Extra M4 quote needed to protect [] in grep expression.
26513          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26514          if test "x$FOUND_CORRECT_VERSION" = x; then
26515            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26516$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26517            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26518$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26519            BOOT_JDK_FOUND=no
26520          else
26521            # We're done! :-)
26522            BOOT_JDK_FOUND=yes
26523
26524  # Only process if variable expands to non-empty
26525
26526  if test "x$BOOT_JDK" != x; then
26527    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26528
26529  # Input might be given as Windows format, start by converting to
26530  # unix format.
26531  path="$BOOT_JDK"
26532  new_path=`$CYGPATH -u "$path"`
26533
26534  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26535  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26536  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26537  # "foo.exe" is OK but "foo" is an error.
26538  #
26539  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26540  # It is also a way to make sure we got the proper file name for the real test later on.
26541  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26542  if test "x$test_shortpath" = x; then
26543    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26544$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26545    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26546  fi
26547
26548  # Call helper function which possibly converts this using DOS-style short mode.
26549  # If so, the updated path is stored in $new_path.
26550
26551  input_path="$new_path"
26552  # Check if we need to convert this using DOS-style short mode. If the path
26553  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26554  # take no chances and rewrite it.
26555  # Note: m4 eats our [], so we need to use [ and ] instead.
26556  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26557  if test "x$has_forbidden_chars" != x; then
26558    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26559    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26560    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26561    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26562      # Going to short mode and back again did indeed matter. Since short mode is
26563      # case insensitive, let's make it lowercase to improve readability.
26564      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26565      # Now convert it back to Unix-style (cygpath)
26566      input_path=`$CYGPATH -u "$shortmode_path"`
26567      new_path="$input_path"
26568    fi
26569  fi
26570
26571  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26572  if test "x$test_cygdrive_prefix" = x; then
26573    # As a simple fix, exclude /usr/bin since it's not a real path.
26574    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26575      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26576      # a path prefixed by /cygdrive for fixpath to work.
26577      new_path="$CYGWIN_ROOT_PATH$input_path"
26578    fi
26579  fi
26580
26581
26582  if test "x$path" != "x$new_path"; then
26583    BOOT_JDK="$new_path"
26584    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26585$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26586  fi
26587
26588    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26589
26590  path="$BOOT_JDK"
26591  has_colon=`$ECHO $path | $GREP ^.:`
26592  new_path="$path"
26593  if test "x$has_colon" = x; then
26594    # Not in mixed or Windows style, start by that.
26595    new_path=`cmd //c echo $path`
26596  fi
26597
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    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26608  fi
26609
26610
26611  windows_path="$new_path"
26612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26613    unix_path=`$CYGPATH -u "$windows_path"`
26614    new_path="$unix_path"
26615  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26616    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26617    new_path="$unix_path"
26618  fi
26619
26620  if test "x$path" != "x$new_path"; then
26621    BOOT_JDK="$new_path"
26622    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26623$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26624  fi
26625
26626  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26627  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26628
26629    else
26630      # We're on a unix platform. Hooray! :)
26631      path="$BOOT_JDK"
26632      has_space=`$ECHO "$path" | $GREP " "`
26633      if test "x$has_space" != x; then
26634        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26635$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26636        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26637      fi
26638
26639      # Use eval to expand a potential ~
26640      eval path="$path"
26641      if test ! -f "$path" && test ! -d "$path"; then
26642        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26643      fi
26644
26645      if test -d "$path"; then
26646        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26647      else
26648        dir="`$DIRNAME "$path"`"
26649        base="`$BASENAME "$path"`"
26650        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26651      fi
26652    fi
26653  fi
26654
26655            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26656$as_echo_n "checking for Boot JDK... " >&6; }
26657            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26658$as_echo "$BOOT_JDK" >&6; }
26659            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26660$as_echo_n "checking Boot JDK version... " >&6; }
26661            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26662            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26663$as_echo "$BOOT_JDK_VERSION" >&6; }
26664          fi # end check jdk version
26665        fi # end check javac
26666      fi # end check java
26667    fi # end check boot jdk found
26668  fi
26669
26670
26671  # Test: Is there a JDK installed in default, well-known locations?
26672
26673  if test "x$BOOT_JDK_FOUND" = xno; then
26674    # Now execute the test
26675
26676  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26677
26678  if test "x$BOOT_JDK_FOUND" = xno; then
26679    # Now execute the test
26680
26681  if test "x$ProgramW6432" != x; then
26682    VIRTUAL_DIR="$ProgramW6432/Java"
26683
26684  windows_path="$VIRTUAL_DIR"
26685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26686    unix_path=`$CYGPATH -u "$windows_path"`
26687    VIRTUAL_DIR="$unix_path"
26688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26689    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26690    VIRTUAL_DIR="$unix_path"
26691  fi
26692
26693
26694  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26695  BOOT_JDK_SUFFIX=""
26696  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26697  if test "x$ALL_JDKS_FOUND" != x; then
26698    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26699
26700  if test "x$BOOT_JDK_FOUND" = xno; then
26701    # Now execute the test
26702
26703        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26704        if test -d "$BOOT_JDK"; then
26705          BOOT_JDK_FOUND=maybe
26706          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26707$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26708        fi
26709
26710
26711    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26712    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26713      # Do we have a bin/java?
26714      if test ! -x "$BOOT_JDK/bin/java"; then
26715        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26716$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26717        BOOT_JDK_FOUND=no
26718      else
26719        # Do we have a bin/javac?
26720        if test ! -x "$BOOT_JDK/bin/javac"; then
26721          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26722$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26723          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26724$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26725          BOOT_JDK_FOUND=no
26726        else
26727          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26728          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26729
26730          # Extra M4 quote needed to protect [] in grep expression.
26731          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26732          if test "x$FOUND_CORRECT_VERSION" = x; then
26733            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26734$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26735            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26736$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26737            BOOT_JDK_FOUND=no
26738          else
26739            # We're done! :-)
26740            BOOT_JDK_FOUND=yes
26741
26742  # Only process if variable expands to non-empty
26743
26744  if test "x$BOOT_JDK" != x; then
26745    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26746
26747  # Input might be given as Windows format, start by converting to
26748  # unix format.
26749  path="$BOOT_JDK"
26750  new_path=`$CYGPATH -u "$path"`
26751
26752  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26753  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26754  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26755  # "foo.exe" is OK but "foo" is an error.
26756  #
26757  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26758  # It is also a way to make sure we got the proper file name for the real test later on.
26759  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26760  if test "x$test_shortpath" = x; then
26761    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26762$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26763    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26764  fi
26765
26766  # Call helper function which possibly converts this using DOS-style short mode.
26767  # If so, the updated path is stored in $new_path.
26768
26769  input_path="$new_path"
26770  # Check if we need to convert this using DOS-style short mode. If the path
26771  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26772  # take no chances and rewrite it.
26773  # Note: m4 eats our [], so we need to use [ and ] instead.
26774  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26775  if test "x$has_forbidden_chars" != x; then
26776    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26777    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26778    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26779    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26780      # Going to short mode and back again did indeed matter. Since short mode is
26781      # case insensitive, let's make it lowercase to improve readability.
26782      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26783      # Now convert it back to Unix-style (cygpath)
26784      input_path=`$CYGPATH -u "$shortmode_path"`
26785      new_path="$input_path"
26786    fi
26787  fi
26788
26789  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26790  if test "x$test_cygdrive_prefix" = x; then
26791    # As a simple fix, exclude /usr/bin since it's not a real path.
26792    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26793      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26794      # a path prefixed by /cygdrive for fixpath to work.
26795      new_path="$CYGWIN_ROOT_PATH$input_path"
26796    fi
26797  fi
26798
26799
26800  if test "x$path" != "x$new_path"; then
26801    BOOT_JDK="$new_path"
26802    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26803$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26804  fi
26805
26806    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26807
26808  path="$BOOT_JDK"
26809  has_colon=`$ECHO $path | $GREP ^.:`
26810  new_path="$path"
26811  if test "x$has_colon" = x; then
26812    # Not in mixed or Windows style, start by that.
26813    new_path=`cmd //c echo $path`
26814  fi
26815
26816
26817  input_path="$new_path"
26818  # Check if we need to convert this using DOS-style short mode. If the path
26819  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26820  # take no chances and rewrite it.
26821  # Note: m4 eats our [], so we need to use [ and ] instead.
26822  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26823  if test "x$has_forbidden_chars" != x; then
26824    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26825    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26826  fi
26827
26828
26829  windows_path="$new_path"
26830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26831    unix_path=`$CYGPATH -u "$windows_path"`
26832    new_path="$unix_path"
26833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26834    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26835    new_path="$unix_path"
26836  fi
26837
26838  if test "x$path" != "x$new_path"; then
26839    BOOT_JDK="$new_path"
26840    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26841$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26842  fi
26843
26844  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26845  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26846
26847    else
26848      # We're on a unix platform. Hooray! :)
26849      path="$BOOT_JDK"
26850      has_space=`$ECHO "$path" | $GREP " "`
26851      if test "x$has_space" != x; then
26852        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26853$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26854        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26855      fi
26856
26857      # Use eval to expand a potential ~
26858      eval path="$path"
26859      if test ! -f "$path" && test ! -d "$path"; then
26860        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26861      fi
26862
26863      if test -d "$path"; then
26864        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26865      else
26866        dir="`$DIRNAME "$path"`"
26867        base="`$BASENAME "$path"`"
26868        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26869      fi
26870    fi
26871  fi
26872
26873            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26874$as_echo_n "checking for Boot JDK... " >&6; }
26875            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26876$as_echo "$BOOT_JDK" >&6; }
26877            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26878$as_echo_n "checking Boot JDK version... " >&6; }
26879            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26880            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26881$as_echo "$BOOT_JDK_VERSION" >&6; }
26882          fi # end check jdk version
26883        fi # end check javac
26884      fi # end check java
26885    fi # end check boot jdk found
26886  fi
26887
26888    done
26889  fi
26890
26891  fi
26892
26893
26894    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26895    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26896      # Do we have a bin/java?
26897      if test ! -x "$BOOT_JDK/bin/java"; then
26898        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26899$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26900        BOOT_JDK_FOUND=no
26901      else
26902        # Do we have a bin/javac?
26903        if test ! -x "$BOOT_JDK/bin/javac"; then
26904          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26905$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26906          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26907$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26908          BOOT_JDK_FOUND=no
26909        else
26910          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26911          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26912
26913          # Extra M4 quote needed to protect [] in grep expression.
26914          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26915          if test "x$FOUND_CORRECT_VERSION" = x; then
26916            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26917$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26918            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26919$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26920            BOOT_JDK_FOUND=no
26921          else
26922            # We're done! :-)
26923            BOOT_JDK_FOUND=yes
26924
26925  # Only process if variable expands to non-empty
26926
26927  if test "x$BOOT_JDK" != x; then
26928    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26929
26930  # Input might be given as Windows format, start by converting to
26931  # unix format.
26932  path="$BOOT_JDK"
26933  new_path=`$CYGPATH -u "$path"`
26934
26935  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26936  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26937  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26938  # "foo.exe" is OK but "foo" is an error.
26939  #
26940  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26941  # It is also a way to make sure we got the proper file name for the real test later on.
26942  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26943  if test "x$test_shortpath" = x; then
26944    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26945$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26946    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26947  fi
26948
26949  # Call helper function which possibly converts this using DOS-style short mode.
26950  # If so, the updated path is stored in $new_path.
26951
26952  input_path="$new_path"
26953  # Check if we need to convert this using DOS-style short mode. If the path
26954  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26955  # take no chances and rewrite it.
26956  # Note: m4 eats our [], so we need to use [ and ] instead.
26957  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26958  if test "x$has_forbidden_chars" != x; then
26959    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26960    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26961    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26962    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26963      # Going to short mode and back again did indeed matter. Since short mode is
26964      # case insensitive, let's make it lowercase to improve readability.
26965      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26966      # Now convert it back to Unix-style (cygpath)
26967      input_path=`$CYGPATH -u "$shortmode_path"`
26968      new_path="$input_path"
26969    fi
26970  fi
26971
26972  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26973  if test "x$test_cygdrive_prefix" = x; then
26974    # As a simple fix, exclude /usr/bin since it's not a real path.
26975    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26976      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26977      # a path prefixed by /cygdrive for fixpath to work.
26978      new_path="$CYGWIN_ROOT_PATH$input_path"
26979    fi
26980  fi
26981
26982
26983  if test "x$path" != "x$new_path"; then
26984    BOOT_JDK="$new_path"
26985    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26986$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26987  fi
26988
26989    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26990
26991  path="$BOOT_JDK"
26992  has_colon=`$ECHO $path | $GREP ^.:`
26993  new_path="$path"
26994  if test "x$has_colon" = x; then
26995    # Not in mixed or Windows style, start by that.
26996    new_path=`cmd //c echo $path`
26997  fi
26998
26999
27000  input_path="$new_path"
27001  # Check if we need to convert this using DOS-style short mode. If the path
27002  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27003  # take no chances and rewrite it.
27004  # Note: m4 eats our [], so we need to use [ and ] instead.
27005  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27006  if test "x$has_forbidden_chars" != x; then
27007    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27008    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27009  fi
27010
27011
27012  windows_path="$new_path"
27013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27014    unix_path=`$CYGPATH -u "$windows_path"`
27015    new_path="$unix_path"
27016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27017    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27018    new_path="$unix_path"
27019  fi
27020
27021  if test "x$path" != "x$new_path"; then
27022    BOOT_JDK="$new_path"
27023    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27024$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27025  fi
27026
27027  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27028  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27029
27030    else
27031      # We're on a unix platform. Hooray! :)
27032      path="$BOOT_JDK"
27033      has_space=`$ECHO "$path" | $GREP " "`
27034      if test "x$has_space" != x; then
27035        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27036$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27037        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27038      fi
27039
27040      # Use eval to expand a potential ~
27041      eval path="$path"
27042      if test ! -f "$path" && test ! -d "$path"; then
27043        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27044      fi
27045
27046      if test -d "$path"; then
27047        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27048      else
27049        dir="`$DIRNAME "$path"`"
27050        base="`$BASENAME "$path"`"
27051        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27052      fi
27053    fi
27054  fi
27055
27056            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27057$as_echo_n "checking for Boot JDK... " >&6; }
27058            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27059$as_echo "$BOOT_JDK" >&6; }
27060            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27061$as_echo_n "checking Boot JDK version... " >&6; }
27062            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27063            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27064$as_echo "$BOOT_JDK_VERSION" >&6; }
27065          fi # end check jdk version
27066        fi # end check javac
27067      fi # end check java
27068    fi # end check boot jdk found
27069  fi
27070
27071
27072  if test "x$BOOT_JDK_FOUND" = xno; then
27073    # Now execute the test
27074
27075  if test "x$PROGRAMW6432" != x; then
27076    VIRTUAL_DIR="$PROGRAMW6432/Java"
27077
27078  windows_path="$VIRTUAL_DIR"
27079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27080    unix_path=`$CYGPATH -u "$windows_path"`
27081    VIRTUAL_DIR="$unix_path"
27082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27083    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27084    VIRTUAL_DIR="$unix_path"
27085  fi
27086
27087
27088  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27089  BOOT_JDK_SUFFIX=""
27090  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27091  if test "x$ALL_JDKS_FOUND" != x; then
27092    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27093
27094  if test "x$BOOT_JDK_FOUND" = xno; then
27095    # Now execute the test
27096
27097        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27098        if test -d "$BOOT_JDK"; then
27099          BOOT_JDK_FOUND=maybe
27100          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27101$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27102        fi
27103
27104
27105    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27106    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27107      # Do we have a bin/java?
27108      if test ! -x "$BOOT_JDK/bin/java"; then
27109        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27110$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27111        BOOT_JDK_FOUND=no
27112      else
27113        # Do we have a bin/javac?
27114        if test ! -x "$BOOT_JDK/bin/javac"; then
27115          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27116$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27117          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27118$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27119          BOOT_JDK_FOUND=no
27120        else
27121          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27122          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27123
27124          # Extra M4 quote needed to protect [] in grep expression.
27125          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27126          if test "x$FOUND_CORRECT_VERSION" = x; then
27127            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27128$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27129            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27130$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27131            BOOT_JDK_FOUND=no
27132          else
27133            # We're done! :-)
27134            BOOT_JDK_FOUND=yes
27135
27136  # Only process if variable expands to non-empty
27137
27138  if test "x$BOOT_JDK" != x; then
27139    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27140
27141  # Input might be given as Windows format, start by converting to
27142  # unix format.
27143  path="$BOOT_JDK"
27144  new_path=`$CYGPATH -u "$path"`
27145
27146  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27147  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27148  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27149  # "foo.exe" is OK but "foo" is an error.
27150  #
27151  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27152  # It is also a way to make sure we got the proper file name for the real test later on.
27153  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27154  if test "x$test_shortpath" = x; then
27155    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27156$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27157    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27158  fi
27159
27160  # Call helper function which possibly converts this using DOS-style short mode.
27161  # If so, the updated path is stored in $new_path.
27162
27163  input_path="$new_path"
27164  # Check if we need to convert this using DOS-style short mode. If the path
27165  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27166  # take no chances and rewrite it.
27167  # Note: m4 eats our [], so we need to use [ and ] instead.
27168  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27169  if test "x$has_forbidden_chars" != x; then
27170    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27171    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27172    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27173    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27174      # Going to short mode and back again did indeed matter. Since short mode is
27175      # case insensitive, let's make it lowercase to improve readability.
27176      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27177      # Now convert it back to Unix-style (cygpath)
27178      input_path=`$CYGPATH -u "$shortmode_path"`
27179      new_path="$input_path"
27180    fi
27181  fi
27182
27183  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27184  if test "x$test_cygdrive_prefix" = x; then
27185    # As a simple fix, exclude /usr/bin since it's not a real path.
27186    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27187      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27188      # a path prefixed by /cygdrive for fixpath to work.
27189      new_path="$CYGWIN_ROOT_PATH$input_path"
27190    fi
27191  fi
27192
27193
27194  if test "x$path" != "x$new_path"; then
27195    BOOT_JDK="$new_path"
27196    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27197$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27198  fi
27199
27200    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27201
27202  path="$BOOT_JDK"
27203  has_colon=`$ECHO $path | $GREP ^.:`
27204  new_path="$path"
27205  if test "x$has_colon" = x; then
27206    # Not in mixed or Windows style, start by that.
27207    new_path=`cmd //c echo $path`
27208  fi
27209
27210
27211  input_path="$new_path"
27212  # Check if we need to convert this using DOS-style short mode. If the path
27213  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27214  # take no chances and rewrite it.
27215  # Note: m4 eats our [], so we need to use [ and ] instead.
27216  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27217  if test "x$has_forbidden_chars" != x; then
27218    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27219    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27220  fi
27221
27222
27223  windows_path="$new_path"
27224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27225    unix_path=`$CYGPATH -u "$windows_path"`
27226    new_path="$unix_path"
27227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27228    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27229    new_path="$unix_path"
27230  fi
27231
27232  if test "x$path" != "x$new_path"; then
27233    BOOT_JDK="$new_path"
27234    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27235$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27236  fi
27237
27238  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27239  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27240
27241    else
27242      # We're on a unix platform. Hooray! :)
27243      path="$BOOT_JDK"
27244      has_space=`$ECHO "$path" | $GREP " "`
27245      if test "x$has_space" != x; then
27246        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27247$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27248        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27249      fi
27250
27251      # Use eval to expand a potential ~
27252      eval path="$path"
27253      if test ! -f "$path" && test ! -d "$path"; then
27254        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27255      fi
27256
27257      if test -d "$path"; then
27258        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27259      else
27260        dir="`$DIRNAME "$path"`"
27261        base="`$BASENAME "$path"`"
27262        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27263      fi
27264    fi
27265  fi
27266
27267            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27268$as_echo_n "checking for Boot JDK... " >&6; }
27269            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27270$as_echo "$BOOT_JDK" >&6; }
27271            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27272$as_echo_n "checking Boot JDK version... " >&6; }
27273            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27274            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27275$as_echo "$BOOT_JDK_VERSION" >&6; }
27276          fi # end check jdk version
27277        fi # end check javac
27278      fi # end check java
27279    fi # end check boot jdk found
27280  fi
27281
27282    done
27283  fi
27284
27285  fi
27286
27287
27288    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27289    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27290      # Do we have a bin/java?
27291      if test ! -x "$BOOT_JDK/bin/java"; then
27292        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27293$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27294        BOOT_JDK_FOUND=no
27295      else
27296        # Do we have a bin/javac?
27297        if test ! -x "$BOOT_JDK/bin/javac"; then
27298          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27299$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27300          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27301$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27302          BOOT_JDK_FOUND=no
27303        else
27304          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27305          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27306
27307          # Extra M4 quote needed to protect [] in grep expression.
27308          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27309          if test "x$FOUND_CORRECT_VERSION" = x; then
27310            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27311$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27312            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27313$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27314            BOOT_JDK_FOUND=no
27315          else
27316            # We're done! :-)
27317            BOOT_JDK_FOUND=yes
27318
27319  # Only process if variable expands to non-empty
27320
27321  if test "x$BOOT_JDK" != x; then
27322    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27323
27324  # Input might be given as Windows format, start by converting to
27325  # unix format.
27326  path="$BOOT_JDK"
27327  new_path=`$CYGPATH -u "$path"`
27328
27329  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27330  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27331  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27332  # "foo.exe" is OK but "foo" is an error.
27333  #
27334  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27335  # It is also a way to make sure we got the proper file name for the real test later on.
27336  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27337  if test "x$test_shortpath" = x; then
27338    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27339$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27340    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27341  fi
27342
27343  # Call helper function which possibly converts this using DOS-style short mode.
27344  # If so, the updated path is stored in $new_path.
27345
27346  input_path="$new_path"
27347  # Check if we need to convert this using DOS-style short mode. If the path
27348  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27349  # take no chances and rewrite it.
27350  # Note: m4 eats our [], so we need to use [ and ] instead.
27351  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27352  if test "x$has_forbidden_chars" != x; then
27353    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27354    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27355    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27356    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27357      # Going to short mode and back again did indeed matter. Since short mode is
27358      # case insensitive, let's make it lowercase to improve readability.
27359      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27360      # Now convert it back to Unix-style (cygpath)
27361      input_path=`$CYGPATH -u "$shortmode_path"`
27362      new_path="$input_path"
27363    fi
27364  fi
27365
27366  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27367  if test "x$test_cygdrive_prefix" = x; then
27368    # As a simple fix, exclude /usr/bin since it's not a real path.
27369    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27370      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27371      # a path prefixed by /cygdrive for fixpath to work.
27372      new_path="$CYGWIN_ROOT_PATH$input_path"
27373    fi
27374  fi
27375
27376
27377  if test "x$path" != "x$new_path"; then
27378    BOOT_JDK="$new_path"
27379    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27380$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27381  fi
27382
27383    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27384
27385  path="$BOOT_JDK"
27386  has_colon=`$ECHO $path | $GREP ^.:`
27387  new_path="$path"
27388  if test "x$has_colon" = x; then
27389    # Not in mixed or Windows style, start by that.
27390    new_path=`cmd //c echo $path`
27391  fi
27392
27393
27394  input_path="$new_path"
27395  # Check if we need to convert this using DOS-style short mode. If the path
27396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27397  # take no chances and rewrite it.
27398  # Note: m4 eats our [], so we need to use [ and ] instead.
27399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27400  if test "x$has_forbidden_chars" != x; then
27401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27402    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27403  fi
27404
27405
27406  windows_path="$new_path"
27407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27408    unix_path=`$CYGPATH -u "$windows_path"`
27409    new_path="$unix_path"
27410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27412    new_path="$unix_path"
27413  fi
27414
27415  if test "x$path" != "x$new_path"; then
27416    BOOT_JDK="$new_path"
27417    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27418$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27419  fi
27420
27421  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27422  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27423
27424    else
27425      # We're on a unix platform. Hooray! :)
27426      path="$BOOT_JDK"
27427      has_space=`$ECHO "$path" | $GREP " "`
27428      if test "x$has_space" != x; then
27429        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27430$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27431        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27432      fi
27433
27434      # Use eval to expand a potential ~
27435      eval path="$path"
27436      if test ! -f "$path" && test ! -d "$path"; then
27437        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27438      fi
27439
27440      if test -d "$path"; then
27441        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27442      else
27443        dir="`$DIRNAME "$path"`"
27444        base="`$BASENAME "$path"`"
27445        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27446      fi
27447    fi
27448  fi
27449
27450            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27451$as_echo_n "checking for Boot JDK... " >&6; }
27452            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27453$as_echo "$BOOT_JDK" >&6; }
27454            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27455$as_echo_n "checking Boot JDK version... " >&6; }
27456            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27457            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27458$as_echo "$BOOT_JDK_VERSION" >&6; }
27459          fi # end check jdk version
27460        fi # end check javac
27461      fi # end check java
27462    fi # end check boot jdk found
27463  fi
27464
27465
27466  if test "x$BOOT_JDK_FOUND" = xno; then
27467    # Now execute the test
27468
27469  if test "x$PROGRAMFILES" != x; then
27470    VIRTUAL_DIR="$PROGRAMFILES/Java"
27471
27472  windows_path="$VIRTUAL_DIR"
27473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27474    unix_path=`$CYGPATH -u "$windows_path"`
27475    VIRTUAL_DIR="$unix_path"
27476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27477    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27478    VIRTUAL_DIR="$unix_path"
27479  fi
27480
27481
27482  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27483  BOOT_JDK_SUFFIX=""
27484  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27485  if test "x$ALL_JDKS_FOUND" != x; then
27486    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27487
27488  if test "x$BOOT_JDK_FOUND" = xno; then
27489    # Now execute the test
27490
27491        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27492        if test -d "$BOOT_JDK"; then
27493          BOOT_JDK_FOUND=maybe
27494          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27495$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27496        fi
27497
27498
27499    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27500    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27501      # Do we have a bin/java?
27502      if test ! -x "$BOOT_JDK/bin/java"; then
27503        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27504$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27505        BOOT_JDK_FOUND=no
27506      else
27507        # Do we have a bin/javac?
27508        if test ! -x "$BOOT_JDK/bin/javac"; then
27509          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27510$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27511          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27512$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27513          BOOT_JDK_FOUND=no
27514        else
27515          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27516          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27517
27518          # Extra M4 quote needed to protect [] in grep expression.
27519          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27520          if test "x$FOUND_CORRECT_VERSION" = x; then
27521            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27522$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27523            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27524$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27525            BOOT_JDK_FOUND=no
27526          else
27527            # We're done! :-)
27528            BOOT_JDK_FOUND=yes
27529
27530  # Only process if variable expands to non-empty
27531
27532  if test "x$BOOT_JDK" != x; then
27533    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27534
27535  # Input might be given as Windows format, start by converting to
27536  # unix format.
27537  path="$BOOT_JDK"
27538  new_path=`$CYGPATH -u "$path"`
27539
27540  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27541  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27542  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27543  # "foo.exe" is OK but "foo" is an error.
27544  #
27545  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27546  # It is also a way to make sure we got the proper file name for the real test later on.
27547  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27548  if test "x$test_shortpath" = x; then
27549    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27550$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27551    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27552  fi
27553
27554  # Call helper function which possibly converts this using DOS-style short mode.
27555  # If so, the updated path is stored in $new_path.
27556
27557  input_path="$new_path"
27558  # Check if we need to convert this using DOS-style short mode. If the path
27559  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27560  # take no chances and rewrite it.
27561  # Note: m4 eats our [], so we need to use [ and ] instead.
27562  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27563  if test "x$has_forbidden_chars" != x; then
27564    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27565    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27566    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27567    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27568      # Going to short mode and back again did indeed matter. Since short mode is
27569      # case insensitive, let's make it lowercase to improve readability.
27570      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27571      # Now convert it back to Unix-style (cygpath)
27572      input_path=`$CYGPATH -u "$shortmode_path"`
27573      new_path="$input_path"
27574    fi
27575  fi
27576
27577  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27578  if test "x$test_cygdrive_prefix" = x; then
27579    # As a simple fix, exclude /usr/bin since it's not a real path.
27580    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27581      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27582      # a path prefixed by /cygdrive for fixpath to work.
27583      new_path="$CYGWIN_ROOT_PATH$input_path"
27584    fi
27585  fi
27586
27587
27588  if test "x$path" != "x$new_path"; then
27589    BOOT_JDK="$new_path"
27590    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27591$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27592  fi
27593
27594    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27595
27596  path="$BOOT_JDK"
27597  has_colon=`$ECHO $path | $GREP ^.:`
27598  new_path="$path"
27599  if test "x$has_colon" = x; then
27600    # Not in mixed or Windows style, start by that.
27601    new_path=`cmd //c echo $path`
27602  fi
27603
27604
27605  input_path="$new_path"
27606  # Check if we need to convert this using DOS-style short mode. If the path
27607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27608  # take no chances and rewrite it.
27609  # Note: m4 eats our [], so we need to use [ and ] instead.
27610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27611  if test "x$has_forbidden_chars" != x; then
27612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27613    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27614  fi
27615
27616
27617  windows_path="$new_path"
27618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27619    unix_path=`$CYGPATH -u "$windows_path"`
27620    new_path="$unix_path"
27621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27623    new_path="$unix_path"
27624  fi
27625
27626  if test "x$path" != "x$new_path"; then
27627    BOOT_JDK="$new_path"
27628    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27629$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27630  fi
27631
27632  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27633  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27634
27635    else
27636      # We're on a unix platform. Hooray! :)
27637      path="$BOOT_JDK"
27638      has_space=`$ECHO "$path" | $GREP " "`
27639      if test "x$has_space" != x; then
27640        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27641$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27642        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27643      fi
27644
27645      # Use eval to expand a potential ~
27646      eval path="$path"
27647      if test ! -f "$path" && test ! -d "$path"; then
27648        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27649      fi
27650
27651      if test -d "$path"; then
27652        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27653      else
27654        dir="`$DIRNAME "$path"`"
27655        base="`$BASENAME "$path"`"
27656        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27657      fi
27658    fi
27659  fi
27660
27661            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27662$as_echo_n "checking for Boot JDK... " >&6; }
27663            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27664$as_echo "$BOOT_JDK" >&6; }
27665            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27666$as_echo_n "checking Boot JDK version... " >&6; }
27667            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27668            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27669$as_echo "$BOOT_JDK_VERSION" >&6; }
27670          fi # end check jdk version
27671        fi # end check javac
27672      fi # end check java
27673    fi # end check boot jdk found
27674  fi
27675
27676    done
27677  fi
27678
27679  fi
27680
27681
27682    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27683    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27684      # Do we have a bin/java?
27685      if test ! -x "$BOOT_JDK/bin/java"; then
27686        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27687$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27688        BOOT_JDK_FOUND=no
27689      else
27690        # Do we have a bin/javac?
27691        if test ! -x "$BOOT_JDK/bin/javac"; then
27692          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27693$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27694          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27695$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27696          BOOT_JDK_FOUND=no
27697        else
27698          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27699          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27700
27701          # Extra M4 quote needed to protect [] in grep expression.
27702          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27703          if test "x$FOUND_CORRECT_VERSION" = x; then
27704            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27705$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27706            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27707$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27708            BOOT_JDK_FOUND=no
27709          else
27710            # We're done! :-)
27711            BOOT_JDK_FOUND=yes
27712
27713  # Only process if variable expands to non-empty
27714
27715  if test "x$BOOT_JDK" != x; then
27716    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27717
27718  # Input might be given as Windows format, start by converting to
27719  # unix format.
27720  path="$BOOT_JDK"
27721  new_path=`$CYGPATH -u "$path"`
27722
27723  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27724  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27725  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27726  # "foo.exe" is OK but "foo" is an error.
27727  #
27728  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27729  # It is also a way to make sure we got the proper file name for the real test later on.
27730  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27731  if test "x$test_shortpath" = x; then
27732    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27733$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27734    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27735  fi
27736
27737  # Call helper function which possibly converts this using DOS-style short mode.
27738  # If so, the updated path is stored in $new_path.
27739
27740  input_path="$new_path"
27741  # Check if we need to convert this using DOS-style short mode. If the path
27742  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27743  # take no chances and rewrite it.
27744  # Note: m4 eats our [], so we need to use [ and ] instead.
27745  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27746  if test "x$has_forbidden_chars" != x; then
27747    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27748    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27749    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27750    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27751      # Going to short mode and back again did indeed matter. Since short mode is
27752      # case insensitive, let's make it lowercase to improve readability.
27753      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27754      # Now convert it back to Unix-style (cygpath)
27755      input_path=`$CYGPATH -u "$shortmode_path"`
27756      new_path="$input_path"
27757    fi
27758  fi
27759
27760  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27761  if test "x$test_cygdrive_prefix" = x; then
27762    # As a simple fix, exclude /usr/bin since it's not a real path.
27763    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27764      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27765      # a path prefixed by /cygdrive for fixpath to work.
27766      new_path="$CYGWIN_ROOT_PATH$input_path"
27767    fi
27768  fi
27769
27770
27771  if test "x$path" != "x$new_path"; then
27772    BOOT_JDK="$new_path"
27773    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27774$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27775  fi
27776
27777    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27778
27779  path="$BOOT_JDK"
27780  has_colon=`$ECHO $path | $GREP ^.:`
27781  new_path="$path"
27782  if test "x$has_colon" = x; then
27783    # Not in mixed or Windows style, start by that.
27784    new_path=`cmd //c echo $path`
27785  fi
27786
27787
27788  input_path="$new_path"
27789  # Check if we need to convert this using DOS-style short mode. If the path
27790  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27791  # take no chances and rewrite it.
27792  # Note: m4 eats our [], so we need to use [ and ] instead.
27793  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27794  if test "x$has_forbidden_chars" != x; then
27795    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27796    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27797  fi
27798
27799
27800  windows_path="$new_path"
27801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27802    unix_path=`$CYGPATH -u "$windows_path"`
27803    new_path="$unix_path"
27804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27805    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27806    new_path="$unix_path"
27807  fi
27808
27809  if test "x$path" != "x$new_path"; then
27810    BOOT_JDK="$new_path"
27811    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27812$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27813  fi
27814
27815  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27816  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27817
27818    else
27819      # We're on a unix platform. Hooray! :)
27820      path="$BOOT_JDK"
27821      has_space=`$ECHO "$path" | $GREP " "`
27822      if test "x$has_space" != x; then
27823        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27824$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27825        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27826      fi
27827
27828      # Use eval to expand a potential ~
27829      eval path="$path"
27830      if test ! -f "$path" && test ! -d "$path"; then
27831        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27832      fi
27833
27834      if test -d "$path"; then
27835        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27836      else
27837        dir="`$DIRNAME "$path"`"
27838        base="`$BASENAME "$path"`"
27839        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27840      fi
27841    fi
27842  fi
27843
27844            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27845$as_echo_n "checking for Boot JDK... " >&6; }
27846            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27847$as_echo "$BOOT_JDK" >&6; }
27848            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27849$as_echo_n "checking Boot JDK version... " >&6; }
27850            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27851            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27852$as_echo "$BOOT_JDK_VERSION" >&6; }
27853          fi # end check jdk version
27854        fi # end check javac
27855      fi # end check java
27856    fi # end check boot jdk found
27857  fi
27858
27859
27860  if test "x$BOOT_JDK_FOUND" = xno; then
27861    # Now execute the test
27862
27863  if test "x$ProgramFiles" != x; then
27864    VIRTUAL_DIR="$ProgramFiles/Java"
27865
27866  windows_path="$VIRTUAL_DIR"
27867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27868    unix_path=`$CYGPATH -u "$windows_path"`
27869    VIRTUAL_DIR="$unix_path"
27870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27872    VIRTUAL_DIR="$unix_path"
27873  fi
27874
27875
27876  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27877  BOOT_JDK_SUFFIX=""
27878  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27879  if test "x$ALL_JDKS_FOUND" != x; then
27880    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27881
27882  if test "x$BOOT_JDK_FOUND" = xno; then
27883    # Now execute the test
27884
27885        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27886        if test -d "$BOOT_JDK"; then
27887          BOOT_JDK_FOUND=maybe
27888          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27889$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27890        fi
27891
27892
27893    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27894    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27895      # Do we have a bin/java?
27896      if test ! -x "$BOOT_JDK/bin/java"; then
27897        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27898$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27899        BOOT_JDK_FOUND=no
27900      else
27901        # Do we have a bin/javac?
27902        if test ! -x "$BOOT_JDK/bin/javac"; then
27903          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27904$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27905          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27906$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27907          BOOT_JDK_FOUND=no
27908        else
27909          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27910          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27911
27912          # Extra M4 quote needed to protect [] in grep expression.
27913          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27914          if test "x$FOUND_CORRECT_VERSION" = x; then
27915            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27916$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27917            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27918$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27919            BOOT_JDK_FOUND=no
27920          else
27921            # We're done! :-)
27922            BOOT_JDK_FOUND=yes
27923
27924  # Only process if variable expands to non-empty
27925
27926  if test "x$BOOT_JDK" != x; then
27927    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27928
27929  # Input might be given as Windows format, start by converting to
27930  # unix format.
27931  path="$BOOT_JDK"
27932  new_path=`$CYGPATH -u "$path"`
27933
27934  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27935  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27936  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27937  # "foo.exe" is OK but "foo" is an error.
27938  #
27939  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27940  # It is also a way to make sure we got the proper file name for the real test later on.
27941  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27942  if test "x$test_shortpath" = x; then
27943    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27944$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27945    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27946  fi
27947
27948  # Call helper function which possibly converts this using DOS-style short mode.
27949  # If so, the updated path is stored in $new_path.
27950
27951  input_path="$new_path"
27952  # Check if we need to convert this using DOS-style short mode. If the path
27953  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27954  # take no chances and rewrite it.
27955  # Note: m4 eats our [], so we need to use [ and ] instead.
27956  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27957  if test "x$has_forbidden_chars" != x; then
27958    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27959    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27960    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27961    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27962      # Going to short mode and back again did indeed matter. Since short mode is
27963      # case insensitive, let's make it lowercase to improve readability.
27964      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27965      # Now convert it back to Unix-style (cygpath)
27966      input_path=`$CYGPATH -u "$shortmode_path"`
27967      new_path="$input_path"
27968    fi
27969  fi
27970
27971  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27972  if test "x$test_cygdrive_prefix" = x; then
27973    # As a simple fix, exclude /usr/bin since it's not a real path.
27974    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27975      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27976      # a path prefixed by /cygdrive for fixpath to work.
27977      new_path="$CYGWIN_ROOT_PATH$input_path"
27978    fi
27979  fi
27980
27981
27982  if test "x$path" != "x$new_path"; then
27983    BOOT_JDK="$new_path"
27984    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27985$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27986  fi
27987
27988    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27989
27990  path="$BOOT_JDK"
27991  has_colon=`$ECHO $path | $GREP ^.:`
27992  new_path="$path"
27993  if test "x$has_colon" = x; then
27994    # Not in mixed or Windows style, start by that.
27995    new_path=`cmd //c echo $path`
27996  fi
27997
27998
27999  input_path="$new_path"
28000  # Check if we need to convert this using DOS-style short mode. If the path
28001  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28002  # take no chances and rewrite it.
28003  # Note: m4 eats our [], so we need to use [ and ] instead.
28004  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28005  if test "x$has_forbidden_chars" != x; then
28006    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28007    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28008  fi
28009
28010
28011  windows_path="$new_path"
28012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28013    unix_path=`$CYGPATH -u "$windows_path"`
28014    new_path="$unix_path"
28015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28017    new_path="$unix_path"
28018  fi
28019
28020  if test "x$path" != "x$new_path"; then
28021    BOOT_JDK="$new_path"
28022    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28023$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28024  fi
28025
28026  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28027  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28028
28029    else
28030      # We're on a unix platform. Hooray! :)
28031      path="$BOOT_JDK"
28032      has_space=`$ECHO "$path" | $GREP " "`
28033      if test "x$has_space" != x; then
28034        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28035$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28036        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28037      fi
28038
28039      # Use eval to expand a potential ~
28040      eval path="$path"
28041      if test ! -f "$path" && test ! -d "$path"; then
28042        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28043      fi
28044
28045      if test -d "$path"; then
28046        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28047      else
28048        dir="`$DIRNAME "$path"`"
28049        base="`$BASENAME "$path"`"
28050        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28051      fi
28052    fi
28053  fi
28054
28055            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28056$as_echo_n "checking for Boot JDK... " >&6; }
28057            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28058$as_echo "$BOOT_JDK" >&6; }
28059            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28060$as_echo_n "checking Boot JDK version... " >&6; }
28061            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28062            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28063$as_echo "$BOOT_JDK_VERSION" >&6; }
28064          fi # end check jdk version
28065        fi # end check javac
28066      fi # end check java
28067    fi # end check boot jdk found
28068  fi
28069
28070    done
28071  fi
28072
28073  fi
28074
28075
28076    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28077    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28078      # Do we have a bin/java?
28079      if test ! -x "$BOOT_JDK/bin/java"; then
28080        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28081$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28082        BOOT_JDK_FOUND=no
28083      else
28084        # Do we have a bin/javac?
28085        if test ! -x "$BOOT_JDK/bin/javac"; then
28086          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28087$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28088          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28089$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28090          BOOT_JDK_FOUND=no
28091        else
28092          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28093          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28094
28095          # Extra M4 quote needed to protect [] in grep expression.
28096          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28097          if test "x$FOUND_CORRECT_VERSION" = x; then
28098            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28099$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28100            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28101$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28102            BOOT_JDK_FOUND=no
28103          else
28104            # We're done! :-)
28105            BOOT_JDK_FOUND=yes
28106
28107  # Only process if variable expands to non-empty
28108
28109  if test "x$BOOT_JDK" != x; then
28110    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28111
28112  # Input might be given as Windows format, start by converting to
28113  # unix format.
28114  path="$BOOT_JDK"
28115  new_path=`$CYGPATH -u "$path"`
28116
28117  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28118  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28119  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28120  # "foo.exe" is OK but "foo" is an error.
28121  #
28122  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28123  # It is also a way to make sure we got the proper file name for the real test later on.
28124  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28125  if test "x$test_shortpath" = x; then
28126    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28127$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28128    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28129  fi
28130
28131  # Call helper function which possibly converts this using DOS-style short mode.
28132  # If so, the updated path is stored in $new_path.
28133
28134  input_path="$new_path"
28135  # Check if we need to convert this using DOS-style short mode. If the path
28136  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28137  # take no chances and rewrite it.
28138  # Note: m4 eats our [], so we need to use [ and ] instead.
28139  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28140  if test "x$has_forbidden_chars" != x; then
28141    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28142    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28143    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28144    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28145      # Going to short mode and back again did indeed matter. Since short mode is
28146      # case insensitive, let's make it lowercase to improve readability.
28147      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28148      # Now convert it back to Unix-style (cygpath)
28149      input_path=`$CYGPATH -u "$shortmode_path"`
28150      new_path="$input_path"
28151    fi
28152  fi
28153
28154  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28155  if test "x$test_cygdrive_prefix" = x; then
28156    # As a simple fix, exclude /usr/bin since it's not a real path.
28157    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28158      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28159      # a path prefixed by /cygdrive for fixpath to work.
28160      new_path="$CYGWIN_ROOT_PATH$input_path"
28161    fi
28162  fi
28163
28164
28165  if test "x$path" != "x$new_path"; then
28166    BOOT_JDK="$new_path"
28167    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28168$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28169  fi
28170
28171    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28172
28173  path="$BOOT_JDK"
28174  has_colon=`$ECHO $path | $GREP ^.:`
28175  new_path="$path"
28176  if test "x$has_colon" = x; then
28177    # Not in mixed or Windows style, start by that.
28178    new_path=`cmd //c echo $path`
28179  fi
28180
28181
28182  input_path="$new_path"
28183  # Check if we need to convert this using DOS-style short mode. If the path
28184  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28185  # take no chances and rewrite it.
28186  # Note: m4 eats our [], so we need to use [ and ] instead.
28187  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28188  if test "x$has_forbidden_chars" != x; then
28189    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28190    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28191  fi
28192
28193
28194  windows_path="$new_path"
28195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28196    unix_path=`$CYGPATH -u "$windows_path"`
28197    new_path="$unix_path"
28198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28200    new_path="$unix_path"
28201  fi
28202
28203  if test "x$path" != "x$new_path"; then
28204    BOOT_JDK="$new_path"
28205    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28206$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28207  fi
28208
28209  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28210  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28211
28212    else
28213      # We're on a unix platform. Hooray! :)
28214      path="$BOOT_JDK"
28215      has_space=`$ECHO "$path" | $GREP " "`
28216      if test "x$has_space" != x; then
28217        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28218$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28219        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28220      fi
28221
28222      # Use eval to expand a potential ~
28223      eval path="$path"
28224      if test ! -f "$path" && test ! -d "$path"; then
28225        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28226      fi
28227
28228      if test -d "$path"; then
28229        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28230      else
28231        dir="`$DIRNAME "$path"`"
28232        base="`$BASENAME "$path"`"
28233        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28234      fi
28235    fi
28236  fi
28237
28238            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28239$as_echo_n "checking for Boot JDK... " >&6; }
28240            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28241$as_echo "$BOOT_JDK" >&6; }
28242            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28243$as_echo_n "checking Boot JDK version... " >&6; }
28244            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28245            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28246$as_echo "$BOOT_JDK_VERSION" >&6; }
28247          fi # end check jdk version
28248        fi # end check javac
28249      fi # end check java
28250    fi # end check boot jdk found
28251  fi
28252
28253
28254  if test "x$BOOT_JDK_FOUND" = xno; then
28255    # Now execute the test
28256
28257  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28258  BOOT_JDK_SUFFIX=""
28259  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28260  if test "x$ALL_JDKS_FOUND" != x; then
28261    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28262
28263  if test "x$BOOT_JDK_FOUND" = xno; then
28264    # Now execute the test
28265
28266        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28267        if test -d "$BOOT_JDK"; then
28268          BOOT_JDK_FOUND=maybe
28269          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28270$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28271        fi
28272
28273
28274    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28275    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28276      # Do we have a bin/java?
28277      if test ! -x "$BOOT_JDK/bin/java"; then
28278        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28279$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28280        BOOT_JDK_FOUND=no
28281      else
28282        # Do we have a bin/javac?
28283        if test ! -x "$BOOT_JDK/bin/javac"; then
28284          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28285$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28286          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28287$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28288          BOOT_JDK_FOUND=no
28289        else
28290          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28291          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28292
28293          # Extra M4 quote needed to protect [] in grep expression.
28294          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28295          if test "x$FOUND_CORRECT_VERSION" = x; then
28296            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28297$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28298            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28299$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28300            BOOT_JDK_FOUND=no
28301          else
28302            # We're done! :-)
28303            BOOT_JDK_FOUND=yes
28304
28305  # Only process if variable expands to non-empty
28306
28307  if test "x$BOOT_JDK" != x; then
28308    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28309
28310  # Input might be given as Windows format, start by converting to
28311  # unix format.
28312  path="$BOOT_JDK"
28313  new_path=`$CYGPATH -u "$path"`
28314
28315  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28316  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28317  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28318  # "foo.exe" is OK but "foo" is an error.
28319  #
28320  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28321  # It is also a way to make sure we got the proper file name for the real test later on.
28322  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28323  if test "x$test_shortpath" = x; then
28324    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28325$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28326    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28327  fi
28328
28329  # Call helper function which possibly converts this using DOS-style short mode.
28330  # If so, the updated path is stored in $new_path.
28331
28332  input_path="$new_path"
28333  # Check if we need to convert this using DOS-style short mode. If the path
28334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28335  # take no chances and rewrite it.
28336  # Note: m4 eats our [], so we need to use [ and ] instead.
28337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28338  if test "x$has_forbidden_chars" != x; then
28339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28340    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28341    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28342    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28343      # Going to short mode and back again did indeed matter. Since short mode is
28344      # case insensitive, let's make it lowercase to improve readability.
28345      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28346      # Now convert it back to Unix-style (cygpath)
28347      input_path=`$CYGPATH -u "$shortmode_path"`
28348      new_path="$input_path"
28349    fi
28350  fi
28351
28352  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28353  if test "x$test_cygdrive_prefix" = x; then
28354    # As a simple fix, exclude /usr/bin since it's not a real path.
28355    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28356      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28357      # a path prefixed by /cygdrive for fixpath to work.
28358      new_path="$CYGWIN_ROOT_PATH$input_path"
28359    fi
28360  fi
28361
28362
28363  if test "x$path" != "x$new_path"; then
28364    BOOT_JDK="$new_path"
28365    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28366$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28367  fi
28368
28369    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28370
28371  path="$BOOT_JDK"
28372  has_colon=`$ECHO $path | $GREP ^.:`
28373  new_path="$path"
28374  if test "x$has_colon" = x; then
28375    # Not in mixed or Windows style, start by that.
28376    new_path=`cmd //c echo $path`
28377  fi
28378
28379
28380  input_path="$new_path"
28381  # Check if we need to convert this using DOS-style short mode. If the path
28382  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28383  # take no chances and rewrite it.
28384  # Note: m4 eats our [], so we need to use [ and ] instead.
28385  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28386  if test "x$has_forbidden_chars" != x; then
28387    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28388    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28389  fi
28390
28391
28392  windows_path="$new_path"
28393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28394    unix_path=`$CYGPATH -u "$windows_path"`
28395    new_path="$unix_path"
28396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28398    new_path="$unix_path"
28399  fi
28400
28401  if test "x$path" != "x$new_path"; then
28402    BOOT_JDK="$new_path"
28403    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28404$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28405  fi
28406
28407  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28408  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28409
28410    else
28411      # We're on a unix platform. Hooray! :)
28412      path="$BOOT_JDK"
28413      has_space=`$ECHO "$path" | $GREP " "`
28414      if test "x$has_space" != x; then
28415        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28416$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28417        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28418      fi
28419
28420      # Use eval to expand a potential ~
28421      eval path="$path"
28422      if test ! -f "$path" && test ! -d "$path"; then
28423        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28424      fi
28425
28426      if test -d "$path"; then
28427        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28428      else
28429        dir="`$DIRNAME "$path"`"
28430        base="`$BASENAME "$path"`"
28431        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28432      fi
28433    fi
28434  fi
28435
28436            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28437$as_echo_n "checking for Boot JDK... " >&6; }
28438            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28439$as_echo "$BOOT_JDK" >&6; }
28440            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28441$as_echo_n "checking Boot JDK version... " >&6; }
28442            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28443            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28444$as_echo "$BOOT_JDK_VERSION" >&6; }
28445          fi # end check jdk version
28446        fi # end check javac
28447      fi # end check java
28448    fi # end check boot jdk found
28449  fi
28450
28451    done
28452  fi
28453
28454
28455    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28456    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28457      # Do we have a bin/java?
28458      if test ! -x "$BOOT_JDK/bin/java"; then
28459        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28460$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28461        BOOT_JDK_FOUND=no
28462      else
28463        # Do we have a bin/javac?
28464        if test ! -x "$BOOT_JDK/bin/javac"; then
28465          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28466$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28467          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28468$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28469          BOOT_JDK_FOUND=no
28470        else
28471          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28472          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28473
28474          # Extra M4 quote needed to protect [] in grep expression.
28475          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28476          if test "x$FOUND_CORRECT_VERSION" = x; then
28477            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28478$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28479            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28480$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28481            BOOT_JDK_FOUND=no
28482          else
28483            # We're done! :-)
28484            BOOT_JDK_FOUND=yes
28485
28486  # Only process if variable expands to non-empty
28487
28488  if test "x$BOOT_JDK" != x; then
28489    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28490
28491  # Input might be given as Windows format, start by converting to
28492  # unix format.
28493  path="$BOOT_JDK"
28494  new_path=`$CYGPATH -u "$path"`
28495
28496  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28497  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28498  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28499  # "foo.exe" is OK but "foo" is an error.
28500  #
28501  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28502  # It is also a way to make sure we got the proper file name for the real test later on.
28503  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28504  if test "x$test_shortpath" = x; then
28505    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28506$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28507    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28508  fi
28509
28510  # Call helper function which possibly converts this using DOS-style short mode.
28511  # If so, the updated path is stored in $new_path.
28512
28513  input_path="$new_path"
28514  # Check if we need to convert this using DOS-style short mode. If the path
28515  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28516  # take no chances and rewrite it.
28517  # Note: m4 eats our [], so we need to use [ and ] instead.
28518  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28519  if test "x$has_forbidden_chars" != x; then
28520    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28521    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28522    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28523    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28524      # Going to short mode and back again did indeed matter. Since short mode is
28525      # case insensitive, let's make it lowercase to improve readability.
28526      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28527      # Now convert it back to Unix-style (cygpath)
28528      input_path=`$CYGPATH -u "$shortmode_path"`
28529      new_path="$input_path"
28530    fi
28531  fi
28532
28533  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28534  if test "x$test_cygdrive_prefix" = x; then
28535    # As a simple fix, exclude /usr/bin since it's not a real path.
28536    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28537      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28538      # a path prefixed by /cygdrive for fixpath to work.
28539      new_path="$CYGWIN_ROOT_PATH$input_path"
28540    fi
28541  fi
28542
28543
28544  if test "x$path" != "x$new_path"; then
28545    BOOT_JDK="$new_path"
28546    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28547$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28548  fi
28549
28550    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28551
28552  path="$BOOT_JDK"
28553  has_colon=`$ECHO $path | $GREP ^.:`
28554  new_path="$path"
28555  if test "x$has_colon" = x; then
28556    # Not in mixed or Windows style, start by that.
28557    new_path=`cmd //c echo $path`
28558  fi
28559
28560
28561  input_path="$new_path"
28562  # Check if we need to convert this using DOS-style short mode. If the path
28563  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28564  # take no chances and rewrite it.
28565  # Note: m4 eats our [], so we need to use [ and ] instead.
28566  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28567  if test "x$has_forbidden_chars" != x; then
28568    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28569    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28570  fi
28571
28572
28573  windows_path="$new_path"
28574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28575    unix_path=`$CYGPATH -u "$windows_path"`
28576    new_path="$unix_path"
28577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28578    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28579    new_path="$unix_path"
28580  fi
28581
28582  if test "x$path" != "x$new_path"; then
28583    BOOT_JDK="$new_path"
28584    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28585$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28586  fi
28587
28588  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28589  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28590
28591    else
28592      # We're on a unix platform. Hooray! :)
28593      path="$BOOT_JDK"
28594      has_space=`$ECHO "$path" | $GREP " "`
28595      if test "x$has_space" != x; then
28596        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28597$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28598        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28599      fi
28600
28601      # Use eval to expand a potential ~
28602      eval path="$path"
28603      if test ! -f "$path" && test ! -d "$path"; then
28604        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28605      fi
28606
28607      if test -d "$path"; then
28608        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28609      else
28610        dir="`$DIRNAME "$path"`"
28611        base="`$BASENAME "$path"`"
28612        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28613      fi
28614    fi
28615  fi
28616
28617            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28618$as_echo_n "checking for Boot JDK... " >&6; }
28619            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28620$as_echo "$BOOT_JDK" >&6; }
28621            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28622$as_echo_n "checking Boot JDK version... " >&6; }
28623            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28624            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28625$as_echo "$BOOT_JDK_VERSION" >&6; }
28626          fi # end check jdk version
28627        fi # end check javac
28628      fi # end check java
28629    fi # end check boot jdk found
28630  fi
28631
28632  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28633
28634  if test "x$BOOT_JDK_FOUND" = xno; then
28635    # Now execute the test
28636
28637  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28638  BOOT_JDK_SUFFIX="/Contents/Home"
28639  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28640  if test "x$ALL_JDKS_FOUND" != x; then
28641    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28642
28643  if test "x$BOOT_JDK_FOUND" = xno; then
28644    # Now execute the test
28645
28646        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28647        if test -d "$BOOT_JDK"; then
28648          BOOT_JDK_FOUND=maybe
28649          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28650$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28651        fi
28652
28653
28654    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28655    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28656      # Do we have a bin/java?
28657      if test ! -x "$BOOT_JDK/bin/java"; then
28658        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28659$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28660        BOOT_JDK_FOUND=no
28661      else
28662        # Do we have a bin/javac?
28663        if test ! -x "$BOOT_JDK/bin/javac"; then
28664          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28665$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28666          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28667$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28668          BOOT_JDK_FOUND=no
28669        else
28670          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28671          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28672
28673          # Extra M4 quote needed to protect [] in grep expression.
28674          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28675          if test "x$FOUND_CORRECT_VERSION" = x; then
28676            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28677$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28678            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28679$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28680            BOOT_JDK_FOUND=no
28681          else
28682            # We're done! :-)
28683            BOOT_JDK_FOUND=yes
28684
28685  # Only process if variable expands to non-empty
28686
28687  if test "x$BOOT_JDK" != x; then
28688    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28689
28690  # Input might be given as Windows format, start by converting to
28691  # unix format.
28692  path="$BOOT_JDK"
28693  new_path=`$CYGPATH -u "$path"`
28694
28695  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28696  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28697  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28698  # "foo.exe" is OK but "foo" is an error.
28699  #
28700  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28701  # It is also a way to make sure we got the proper file name for the real test later on.
28702  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28703  if test "x$test_shortpath" = x; then
28704    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28705$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28706    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28707  fi
28708
28709  # Call helper function which possibly converts this using DOS-style short mode.
28710  # If so, the updated path is stored in $new_path.
28711
28712  input_path="$new_path"
28713  # Check if we need to convert this using DOS-style short mode. If the path
28714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28715  # take no chances and rewrite it.
28716  # Note: m4 eats our [], so we need to use [ and ] instead.
28717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28718  if test "x$has_forbidden_chars" != x; then
28719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28720    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28721    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28722    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28723      # Going to short mode and back again did indeed matter. Since short mode is
28724      # case insensitive, let's make it lowercase to improve readability.
28725      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28726      # Now convert it back to Unix-style (cygpath)
28727      input_path=`$CYGPATH -u "$shortmode_path"`
28728      new_path="$input_path"
28729    fi
28730  fi
28731
28732  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28733  if test "x$test_cygdrive_prefix" = x; then
28734    # As a simple fix, exclude /usr/bin since it's not a real path.
28735    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28736      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28737      # a path prefixed by /cygdrive for fixpath to work.
28738      new_path="$CYGWIN_ROOT_PATH$input_path"
28739    fi
28740  fi
28741
28742
28743  if test "x$path" != "x$new_path"; then
28744    BOOT_JDK="$new_path"
28745    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28746$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28747  fi
28748
28749    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28750
28751  path="$BOOT_JDK"
28752  has_colon=`$ECHO $path | $GREP ^.:`
28753  new_path="$path"
28754  if test "x$has_colon" = x; then
28755    # Not in mixed or Windows style, start by that.
28756    new_path=`cmd //c echo $path`
28757  fi
28758
28759
28760  input_path="$new_path"
28761  # Check if we need to convert this using DOS-style short mode. If the path
28762  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28763  # take no chances and rewrite it.
28764  # Note: m4 eats our [], so we need to use [ and ] instead.
28765  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28766  if test "x$has_forbidden_chars" != x; then
28767    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28768    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28769  fi
28770
28771
28772  windows_path="$new_path"
28773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28774    unix_path=`$CYGPATH -u "$windows_path"`
28775    new_path="$unix_path"
28776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28777    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28778    new_path="$unix_path"
28779  fi
28780
28781  if test "x$path" != "x$new_path"; then
28782    BOOT_JDK="$new_path"
28783    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28784$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28785  fi
28786
28787  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28788  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28789
28790    else
28791      # We're on a unix platform. Hooray! :)
28792      path="$BOOT_JDK"
28793      has_space=`$ECHO "$path" | $GREP " "`
28794      if test "x$has_space" != x; then
28795        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28796$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28797        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28798      fi
28799
28800      # Use eval to expand a potential ~
28801      eval path="$path"
28802      if test ! -f "$path" && test ! -d "$path"; then
28803        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28804      fi
28805
28806      if test -d "$path"; then
28807        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28808      else
28809        dir="`$DIRNAME "$path"`"
28810        base="`$BASENAME "$path"`"
28811        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28812      fi
28813    fi
28814  fi
28815
28816            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28817$as_echo_n "checking for Boot JDK... " >&6; }
28818            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28819$as_echo "$BOOT_JDK" >&6; }
28820            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28821$as_echo_n "checking Boot JDK version... " >&6; }
28822            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28823            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28824$as_echo "$BOOT_JDK_VERSION" >&6; }
28825          fi # end check jdk version
28826        fi # end check javac
28827      fi # end check java
28828    fi # end check boot jdk found
28829  fi
28830
28831    done
28832  fi
28833
28834
28835    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28836    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28837      # Do we have a bin/java?
28838      if test ! -x "$BOOT_JDK/bin/java"; then
28839        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28840$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28841        BOOT_JDK_FOUND=no
28842      else
28843        # Do we have a bin/javac?
28844        if test ! -x "$BOOT_JDK/bin/javac"; then
28845          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28846$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28847          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28848$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28849          BOOT_JDK_FOUND=no
28850        else
28851          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28852          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28853
28854          # Extra M4 quote needed to protect [] in grep expression.
28855          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28856          if test "x$FOUND_CORRECT_VERSION" = x; then
28857            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28858$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28859            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28860$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28861            BOOT_JDK_FOUND=no
28862          else
28863            # We're done! :-)
28864            BOOT_JDK_FOUND=yes
28865
28866  # Only process if variable expands to non-empty
28867
28868  if test "x$BOOT_JDK" != x; then
28869    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28870
28871  # Input might be given as Windows format, start by converting to
28872  # unix format.
28873  path="$BOOT_JDK"
28874  new_path=`$CYGPATH -u "$path"`
28875
28876  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28877  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28878  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28879  # "foo.exe" is OK but "foo" is an error.
28880  #
28881  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28882  # It is also a way to make sure we got the proper file name for the real test later on.
28883  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28884  if test "x$test_shortpath" = x; then
28885    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28886$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28887    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28888  fi
28889
28890  # Call helper function which possibly converts this using DOS-style short mode.
28891  # If so, the updated path is stored in $new_path.
28892
28893  input_path="$new_path"
28894  # Check if we need to convert this using DOS-style short mode. If the path
28895  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28896  # take no chances and rewrite it.
28897  # Note: m4 eats our [], so we need to use [ and ] instead.
28898  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28899  if test "x$has_forbidden_chars" != x; then
28900    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28901    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28902    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28903    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28904      # Going to short mode and back again did indeed matter. Since short mode is
28905      # case insensitive, let's make it lowercase to improve readability.
28906      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28907      # Now convert it back to Unix-style (cygpath)
28908      input_path=`$CYGPATH -u "$shortmode_path"`
28909      new_path="$input_path"
28910    fi
28911  fi
28912
28913  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28914  if test "x$test_cygdrive_prefix" = x; then
28915    # As a simple fix, exclude /usr/bin since it's not a real path.
28916    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28917      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28918      # a path prefixed by /cygdrive for fixpath to work.
28919      new_path="$CYGWIN_ROOT_PATH$input_path"
28920    fi
28921  fi
28922
28923
28924  if test "x$path" != "x$new_path"; then
28925    BOOT_JDK="$new_path"
28926    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28927$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28928  fi
28929
28930    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28931
28932  path="$BOOT_JDK"
28933  has_colon=`$ECHO $path | $GREP ^.:`
28934  new_path="$path"
28935  if test "x$has_colon" = x; then
28936    # Not in mixed or Windows style, start by that.
28937    new_path=`cmd //c echo $path`
28938  fi
28939
28940
28941  input_path="$new_path"
28942  # Check if we need to convert this using DOS-style short mode. If the path
28943  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28944  # take no chances and rewrite it.
28945  # Note: m4 eats our [], so we need to use [ and ] instead.
28946  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28947  if test "x$has_forbidden_chars" != x; then
28948    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28949    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28950  fi
28951
28952
28953  windows_path="$new_path"
28954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28955    unix_path=`$CYGPATH -u "$windows_path"`
28956    new_path="$unix_path"
28957  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28958    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28959    new_path="$unix_path"
28960  fi
28961
28962  if test "x$path" != "x$new_path"; then
28963    BOOT_JDK="$new_path"
28964    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28965$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28966  fi
28967
28968  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28969  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28970
28971    else
28972      # We're on a unix platform. Hooray! :)
28973      path="$BOOT_JDK"
28974      has_space=`$ECHO "$path" | $GREP " "`
28975      if test "x$has_space" != x; then
28976        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28977$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28978        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28979      fi
28980
28981      # Use eval to expand a potential ~
28982      eval path="$path"
28983      if test ! -f "$path" && test ! -d "$path"; then
28984        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28985      fi
28986
28987      if test -d "$path"; then
28988        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28989      else
28990        dir="`$DIRNAME "$path"`"
28991        base="`$BASENAME "$path"`"
28992        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28993      fi
28994    fi
28995  fi
28996
28997            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28998$as_echo_n "checking for Boot JDK... " >&6; }
28999            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29000$as_echo "$BOOT_JDK" >&6; }
29001            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29002$as_echo_n "checking Boot JDK version... " >&6; }
29003            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29004            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29005$as_echo "$BOOT_JDK_VERSION" >&6; }
29006          fi # end check jdk version
29007        fi # end check javac
29008      fi # end check java
29009    fi # end check boot jdk found
29010  fi
29011
29012
29013  if test "x$BOOT_JDK_FOUND" = xno; then
29014    # Now execute the test
29015
29016  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
29017  BOOT_JDK_SUFFIX="/Contents/Home"
29018  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29019  if test "x$ALL_JDKS_FOUND" != x; then
29020    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29021
29022  if test "x$BOOT_JDK_FOUND" = xno; then
29023    # Now execute the test
29024
29025        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29026        if test -d "$BOOT_JDK"; then
29027          BOOT_JDK_FOUND=maybe
29028          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29029$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29030        fi
29031
29032
29033    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29034    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29035      # Do we have a bin/java?
29036      if test ! -x "$BOOT_JDK/bin/java"; then
29037        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29038$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29039        BOOT_JDK_FOUND=no
29040      else
29041        # Do we have a bin/javac?
29042        if test ! -x "$BOOT_JDK/bin/javac"; then
29043          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29044$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29045          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29046$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29047          BOOT_JDK_FOUND=no
29048        else
29049          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29050          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29051
29052          # Extra M4 quote needed to protect [] in grep expression.
29053          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29054          if test "x$FOUND_CORRECT_VERSION" = x; then
29055            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29056$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29057            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29058$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29059            BOOT_JDK_FOUND=no
29060          else
29061            # We're done! :-)
29062            BOOT_JDK_FOUND=yes
29063
29064  # Only process if variable expands to non-empty
29065
29066  if test "x$BOOT_JDK" != x; then
29067    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29068
29069  # Input might be given as Windows format, start by converting to
29070  # unix format.
29071  path="$BOOT_JDK"
29072  new_path=`$CYGPATH -u "$path"`
29073
29074  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29075  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29076  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29077  # "foo.exe" is OK but "foo" is an error.
29078  #
29079  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29080  # It is also a way to make sure we got the proper file name for the real test later on.
29081  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29082  if test "x$test_shortpath" = x; then
29083    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29084$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29085    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29086  fi
29087
29088  # Call helper function which possibly converts this using DOS-style short mode.
29089  # If so, the updated path is stored in $new_path.
29090
29091  input_path="$new_path"
29092  # Check if we need to convert this using DOS-style short mode. If the path
29093  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29094  # take no chances and rewrite it.
29095  # Note: m4 eats our [], so we need to use [ and ] instead.
29096  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29097  if test "x$has_forbidden_chars" != x; then
29098    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29099    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29100    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29101    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29102      # Going to short mode and back again did indeed matter. Since short mode is
29103      # case insensitive, let's make it lowercase to improve readability.
29104      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29105      # Now convert it back to Unix-style (cygpath)
29106      input_path=`$CYGPATH -u "$shortmode_path"`
29107      new_path="$input_path"
29108    fi
29109  fi
29110
29111  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29112  if test "x$test_cygdrive_prefix" = x; then
29113    # As a simple fix, exclude /usr/bin since it's not a real path.
29114    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29115      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29116      # a path prefixed by /cygdrive for fixpath to work.
29117      new_path="$CYGWIN_ROOT_PATH$input_path"
29118    fi
29119  fi
29120
29121
29122  if test "x$path" != "x$new_path"; then
29123    BOOT_JDK="$new_path"
29124    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29125$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29126  fi
29127
29128    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29129
29130  path="$BOOT_JDK"
29131  has_colon=`$ECHO $path | $GREP ^.:`
29132  new_path="$path"
29133  if test "x$has_colon" = x; then
29134    # Not in mixed or Windows style, start by that.
29135    new_path=`cmd //c echo $path`
29136  fi
29137
29138
29139  input_path="$new_path"
29140  # Check if we need to convert this using DOS-style short mode. If the path
29141  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29142  # take no chances and rewrite it.
29143  # Note: m4 eats our [], so we need to use [ and ] instead.
29144  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29145  if test "x$has_forbidden_chars" != x; then
29146    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29147    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29148  fi
29149
29150
29151  windows_path="$new_path"
29152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29153    unix_path=`$CYGPATH -u "$windows_path"`
29154    new_path="$unix_path"
29155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29156    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29157    new_path="$unix_path"
29158  fi
29159
29160  if test "x$path" != "x$new_path"; then
29161    BOOT_JDK="$new_path"
29162    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29163$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29164  fi
29165
29166  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29167  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29168
29169    else
29170      # We're on a unix platform. Hooray! :)
29171      path="$BOOT_JDK"
29172      has_space=`$ECHO "$path" | $GREP " "`
29173      if test "x$has_space" != x; then
29174        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29175$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29176        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29177      fi
29178
29179      # Use eval to expand a potential ~
29180      eval path="$path"
29181      if test ! -f "$path" && test ! -d "$path"; then
29182        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29183      fi
29184
29185      if test -d "$path"; then
29186        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29187      else
29188        dir="`$DIRNAME "$path"`"
29189        base="`$BASENAME "$path"`"
29190        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29191      fi
29192    fi
29193  fi
29194
29195            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29196$as_echo_n "checking for Boot JDK... " >&6; }
29197            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29198$as_echo "$BOOT_JDK" >&6; }
29199            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29200$as_echo_n "checking Boot JDK version... " >&6; }
29201            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29202            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29203$as_echo "$BOOT_JDK_VERSION" >&6; }
29204          fi # end check jdk version
29205        fi # end check javac
29206      fi # end check java
29207    fi # end check boot jdk found
29208  fi
29209
29210    done
29211  fi
29212
29213
29214    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29215    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29216      # Do we have a bin/java?
29217      if test ! -x "$BOOT_JDK/bin/java"; then
29218        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29219$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29220        BOOT_JDK_FOUND=no
29221      else
29222        # Do we have a bin/javac?
29223        if test ! -x "$BOOT_JDK/bin/javac"; then
29224          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29225$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29226          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29227$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29228          BOOT_JDK_FOUND=no
29229        else
29230          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29231          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29232
29233          # Extra M4 quote needed to protect [] in grep expression.
29234          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29235          if test "x$FOUND_CORRECT_VERSION" = x; then
29236            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29237$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29238            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29239$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29240            BOOT_JDK_FOUND=no
29241          else
29242            # We're done! :-)
29243            BOOT_JDK_FOUND=yes
29244
29245  # Only process if variable expands to non-empty
29246
29247  if test "x$BOOT_JDK" != x; then
29248    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29249
29250  # Input might be given as Windows format, start by converting to
29251  # unix format.
29252  path="$BOOT_JDK"
29253  new_path=`$CYGPATH -u "$path"`
29254
29255  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29256  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29257  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29258  # "foo.exe" is OK but "foo" is an error.
29259  #
29260  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29261  # It is also a way to make sure we got the proper file name for the real test later on.
29262  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29263  if test "x$test_shortpath" = x; then
29264    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29265$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29266    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29267  fi
29268
29269  # Call helper function which possibly converts this using DOS-style short mode.
29270  # If so, the updated path is stored in $new_path.
29271
29272  input_path="$new_path"
29273  # Check if we need to convert this using DOS-style short mode. If the path
29274  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29275  # take no chances and rewrite it.
29276  # Note: m4 eats our [], so we need to use [ and ] instead.
29277  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29278  if test "x$has_forbidden_chars" != x; then
29279    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29280    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29281    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29282    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29283      # Going to short mode and back again did indeed matter. Since short mode is
29284      # case insensitive, let's make it lowercase to improve readability.
29285      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29286      # Now convert it back to Unix-style (cygpath)
29287      input_path=`$CYGPATH -u "$shortmode_path"`
29288      new_path="$input_path"
29289    fi
29290  fi
29291
29292  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29293  if test "x$test_cygdrive_prefix" = x; then
29294    # As a simple fix, exclude /usr/bin since it's not a real path.
29295    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29296      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29297      # a path prefixed by /cygdrive for fixpath to work.
29298      new_path="$CYGWIN_ROOT_PATH$input_path"
29299    fi
29300  fi
29301
29302
29303  if test "x$path" != "x$new_path"; then
29304    BOOT_JDK="$new_path"
29305    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29306$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29307  fi
29308
29309    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29310
29311  path="$BOOT_JDK"
29312  has_colon=`$ECHO $path | $GREP ^.:`
29313  new_path="$path"
29314  if test "x$has_colon" = x; then
29315    # Not in mixed or Windows style, start by that.
29316    new_path=`cmd //c echo $path`
29317  fi
29318
29319
29320  input_path="$new_path"
29321  # Check if we need to convert this using DOS-style short mode. If the path
29322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29323  # take no chances and rewrite it.
29324  # Note: m4 eats our [], so we need to use [ and ] instead.
29325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29326  if test "x$has_forbidden_chars" != x; then
29327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29328    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29329  fi
29330
29331
29332  windows_path="$new_path"
29333  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29334    unix_path=`$CYGPATH -u "$windows_path"`
29335    new_path="$unix_path"
29336  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29337    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29338    new_path="$unix_path"
29339  fi
29340
29341  if test "x$path" != "x$new_path"; then
29342    BOOT_JDK="$new_path"
29343    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29344$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29345  fi
29346
29347  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29348  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29349
29350    else
29351      # We're on a unix platform. Hooray! :)
29352      path="$BOOT_JDK"
29353      has_space=`$ECHO "$path" | $GREP " "`
29354      if test "x$has_space" != x; then
29355        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29356$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29357        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29358      fi
29359
29360      # Use eval to expand a potential ~
29361      eval path="$path"
29362      if test ! -f "$path" && test ! -d "$path"; then
29363        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29364      fi
29365
29366      if test -d "$path"; then
29367        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29368      else
29369        dir="`$DIRNAME "$path"`"
29370        base="`$BASENAME "$path"`"
29371        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29372      fi
29373    fi
29374  fi
29375
29376            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29377$as_echo_n "checking for Boot JDK... " >&6; }
29378            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29379$as_echo "$BOOT_JDK" >&6; }
29380            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29381$as_echo_n "checking Boot JDK version... " >&6; }
29382            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29383            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29384$as_echo "$BOOT_JDK_VERSION" >&6; }
29385          fi # end check jdk version
29386        fi # end check javac
29387      fi # end check java
29388    fi # end check boot jdk found
29389  fi
29390
29391  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29392
29393  if test "x$BOOT_JDK_FOUND" = xno; then
29394    # Now execute the test
29395
29396  BOOT_JDK_PREFIX="/usr/lib/jvm"
29397  BOOT_JDK_SUFFIX=""
29398  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29399  if test "x$ALL_JDKS_FOUND" != x; then
29400    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29401
29402  if test "x$BOOT_JDK_FOUND" = xno; then
29403    # Now execute the test
29404
29405        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29406        if test -d "$BOOT_JDK"; then
29407          BOOT_JDK_FOUND=maybe
29408          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29409$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29410        fi
29411
29412
29413    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29414    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29415      # Do we have a bin/java?
29416      if test ! -x "$BOOT_JDK/bin/java"; then
29417        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29418$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29419        BOOT_JDK_FOUND=no
29420      else
29421        # Do we have a bin/javac?
29422        if test ! -x "$BOOT_JDK/bin/javac"; then
29423          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29424$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29425          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29426$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29427          BOOT_JDK_FOUND=no
29428        else
29429          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29430          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29431
29432          # Extra M4 quote needed to protect [] in grep expression.
29433          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29434          if test "x$FOUND_CORRECT_VERSION" = x; then
29435            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29436$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29437            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29438$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29439            BOOT_JDK_FOUND=no
29440          else
29441            # We're done! :-)
29442            BOOT_JDK_FOUND=yes
29443
29444  # Only process if variable expands to non-empty
29445
29446  if test "x$BOOT_JDK" != x; then
29447    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29448
29449  # Input might be given as Windows format, start by converting to
29450  # unix format.
29451  path="$BOOT_JDK"
29452  new_path=`$CYGPATH -u "$path"`
29453
29454  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29455  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29456  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29457  # "foo.exe" is OK but "foo" is an error.
29458  #
29459  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29460  # It is also a way to make sure we got the proper file name for the real test later on.
29461  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29462  if test "x$test_shortpath" = x; then
29463    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29464$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29465    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29466  fi
29467
29468  # Call helper function which possibly converts this using DOS-style short mode.
29469  # If so, the updated path is stored in $new_path.
29470
29471  input_path="$new_path"
29472  # Check if we need to convert this using DOS-style short mode. If the path
29473  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29474  # take no chances and rewrite it.
29475  # Note: m4 eats our [], so we need to use [ and ] instead.
29476  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29477  if test "x$has_forbidden_chars" != x; then
29478    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29479    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29480    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29481    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29482      # Going to short mode and back again did indeed matter. Since short mode is
29483      # case insensitive, let's make it lowercase to improve readability.
29484      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29485      # Now convert it back to Unix-style (cygpath)
29486      input_path=`$CYGPATH -u "$shortmode_path"`
29487      new_path="$input_path"
29488    fi
29489  fi
29490
29491  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29492  if test "x$test_cygdrive_prefix" = x; then
29493    # As a simple fix, exclude /usr/bin since it's not a real path.
29494    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29495      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29496      # a path prefixed by /cygdrive for fixpath to work.
29497      new_path="$CYGWIN_ROOT_PATH$input_path"
29498    fi
29499  fi
29500
29501
29502  if test "x$path" != "x$new_path"; then
29503    BOOT_JDK="$new_path"
29504    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29505$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29506  fi
29507
29508    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29509
29510  path="$BOOT_JDK"
29511  has_colon=`$ECHO $path | $GREP ^.:`
29512  new_path="$path"
29513  if test "x$has_colon" = x; then
29514    # Not in mixed or Windows style, start by that.
29515    new_path=`cmd //c echo $path`
29516  fi
29517
29518
29519  input_path="$new_path"
29520  # Check if we need to convert this using DOS-style short mode. If the path
29521  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29522  # take no chances and rewrite it.
29523  # Note: m4 eats our [], so we need to use [ and ] instead.
29524  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29525  if test "x$has_forbidden_chars" != x; then
29526    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29527    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29528  fi
29529
29530
29531  windows_path="$new_path"
29532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29533    unix_path=`$CYGPATH -u "$windows_path"`
29534    new_path="$unix_path"
29535  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29536    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29537    new_path="$unix_path"
29538  fi
29539
29540  if test "x$path" != "x$new_path"; then
29541    BOOT_JDK="$new_path"
29542    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29543$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29544  fi
29545
29546  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29547  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29548
29549    else
29550      # We're on a unix platform. Hooray! :)
29551      path="$BOOT_JDK"
29552      has_space=`$ECHO "$path" | $GREP " "`
29553      if test "x$has_space" != x; then
29554        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29555$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29556        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29557      fi
29558
29559      # Use eval to expand a potential ~
29560      eval path="$path"
29561      if test ! -f "$path" && test ! -d "$path"; then
29562        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29563      fi
29564
29565      if test -d "$path"; then
29566        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29567      else
29568        dir="`$DIRNAME "$path"`"
29569        base="`$BASENAME "$path"`"
29570        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29571      fi
29572    fi
29573  fi
29574
29575            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29576$as_echo_n "checking for Boot JDK... " >&6; }
29577            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29578$as_echo "$BOOT_JDK" >&6; }
29579            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29580$as_echo_n "checking Boot JDK version... " >&6; }
29581            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29582            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29583$as_echo "$BOOT_JDK_VERSION" >&6; }
29584          fi # end check jdk version
29585        fi # end check javac
29586      fi # end check java
29587    fi # end check boot jdk found
29588  fi
29589
29590    done
29591  fi
29592
29593
29594    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29595    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29596      # Do we have a bin/java?
29597      if test ! -x "$BOOT_JDK/bin/java"; then
29598        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29599$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29600        BOOT_JDK_FOUND=no
29601      else
29602        # Do we have a bin/javac?
29603        if test ! -x "$BOOT_JDK/bin/javac"; then
29604          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29605$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29606          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29607$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29608          BOOT_JDK_FOUND=no
29609        else
29610          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29611          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29612
29613          # Extra M4 quote needed to protect [] in grep expression.
29614          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29615          if test "x$FOUND_CORRECT_VERSION" = x; then
29616            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29617$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29618            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29619$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29620            BOOT_JDK_FOUND=no
29621          else
29622            # We're done! :-)
29623            BOOT_JDK_FOUND=yes
29624
29625  # Only process if variable expands to non-empty
29626
29627  if test "x$BOOT_JDK" != x; then
29628    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29629
29630  # Input might be given as Windows format, start by converting to
29631  # unix format.
29632  path="$BOOT_JDK"
29633  new_path=`$CYGPATH -u "$path"`
29634
29635  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29636  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29637  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29638  # "foo.exe" is OK but "foo" is an error.
29639  #
29640  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29641  # It is also a way to make sure we got the proper file name for the real test later on.
29642  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29643  if test "x$test_shortpath" = x; then
29644    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29645$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29646    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29647  fi
29648
29649  # Call helper function which possibly converts this using DOS-style short mode.
29650  # If so, the updated path is stored in $new_path.
29651
29652  input_path="$new_path"
29653  # Check if we need to convert this using DOS-style short mode. If the path
29654  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29655  # take no chances and rewrite it.
29656  # Note: m4 eats our [], so we need to use [ and ] instead.
29657  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29658  if test "x$has_forbidden_chars" != x; then
29659    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29660    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29661    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29662    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29663      # Going to short mode and back again did indeed matter. Since short mode is
29664      # case insensitive, let's make it lowercase to improve readability.
29665      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29666      # Now convert it back to Unix-style (cygpath)
29667      input_path=`$CYGPATH -u "$shortmode_path"`
29668      new_path="$input_path"
29669    fi
29670  fi
29671
29672  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29673  if test "x$test_cygdrive_prefix" = x; then
29674    # As a simple fix, exclude /usr/bin since it's not a real path.
29675    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29676      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29677      # a path prefixed by /cygdrive for fixpath to work.
29678      new_path="$CYGWIN_ROOT_PATH$input_path"
29679    fi
29680  fi
29681
29682
29683  if test "x$path" != "x$new_path"; then
29684    BOOT_JDK="$new_path"
29685    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29686$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29687  fi
29688
29689    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29690
29691  path="$BOOT_JDK"
29692  has_colon=`$ECHO $path | $GREP ^.:`
29693  new_path="$path"
29694  if test "x$has_colon" = x; then
29695    # Not in mixed or Windows style, start by that.
29696    new_path=`cmd //c echo $path`
29697  fi
29698
29699
29700  input_path="$new_path"
29701  # Check if we need to convert this using DOS-style short mode. If the path
29702  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29703  # take no chances and rewrite it.
29704  # Note: m4 eats our [], so we need to use [ and ] instead.
29705  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29706  if test "x$has_forbidden_chars" != x; then
29707    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29708    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29709  fi
29710
29711
29712  windows_path="$new_path"
29713  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29714    unix_path=`$CYGPATH -u "$windows_path"`
29715    new_path="$unix_path"
29716  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29717    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29718    new_path="$unix_path"
29719  fi
29720
29721  if test "x$path" != "x$new_path"; then
29722    BOOT_JDK="$new_path"
29723    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29724$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29725  fi
29726
29727  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29728  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29729
29730    else
29731      # We're on a unix platform. Hooray! :)
29732      path="$BOOT_JDK"
29733      has_space=`$ECHO "$path" | $GREP " "`
29734      if test "x$has_space" != x; then
29735        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29736$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29737        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29738      fi
29739
29740      # Use eval to expand a potential ~
29741      eval path="$path"
29742      if test ! -f "$path" && test ! -d "$path"; then
29743        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29744      fi
29745
29746      if test -d "$path"; then
29747        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29748      else
29749        dir="`$DIRNAME "$path"`"
29750        base="`$BASENAME "$path"`"
29751        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29752      fi
29753    fi
29754  fi
29755
29756            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29757$as_echo_n "checking for Boot JDK... " >&6; }
29758            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29759$as_echo "$BOOT_JDK" >&6; }
29760            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29761$as_echo_n "checking Boot JDK version... " >&6; }
29762            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29763            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29764$as_echo "$BOOT_JDK_VERSION" >&6; }
29765          fi # end check jdk version
29766        fi # end check javac
29767      fi # end check java
29768    fi # end check boot jdk found
29769  fi
29770
29771  fi
29772
29773
29774    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29775    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29776      # Do we have a bin/java?
29777      if test ! -x "$BOOT_JDK/bin/java"; then
29778        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29779$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29780        BOOT_JDK_FOUND=no
29781      else
29782        # Do we have a bin/javac?
29783        if test ! -x "$BOOT_JDK/bin/javac"; then
29784          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29785$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29786          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29787$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29788          BOOT_JDK_FOUND=no
29789        else
29790          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29791          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29792
29793          # Extra M4 quote needed to protect [] in grep expression.
29794          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29795          if test "x$FOUND_CORRECT_VERSION" = x; then
29796            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29797$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29798            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29799$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29800            BOOT_JDK_FOUND=no
29801          else
29802            # We're done! :-)
29803            BOOT_JDK_FOUND=yes
29804
29805  # Only process if variable expands to non-empty
29806
29807  if test "x$BOOT_JDK" != x; then
29808    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29809
29810  # Input might be given as Windows format, start by converting to
29811  # unix format.
29812  path="$BOOT_JDK"
29813  new_path=`$CYGPATH -u "$path"`
29814
29815  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29816  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29817  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29818  # "foo.exe" is OK but "foo" is an error.
29819  #
29820  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29821  # It is also a way to make sure we got the proper file name for the real test later on.
29822  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29823  if test "x$test_shortpath" = x; then
29824    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29825$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29826    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29827  fi
29828
29829  # Call helper function which possibly converts this using DOS-style short mode.
29830  # If so, the updated path is stored in $new_path.
29831
29832  input_path="$new_path"
29833  # Check if we need to convert this using DOS-style short mode. If the path
29834  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29835  # take no chances and rewrite it.
29836  # Note: m4 eats our [], so we need to use [ and ] instead.
29837  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29838  if test "x$has_forbidden_chars" != x; then
29839    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29840    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29841    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29842    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29843      # Going to short mode and back again did indeed matter. Since short mode is
29844      # case insensitive, let's make it lowercase to improve readability.
29845      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29846      # Now convert it back to Unix-style (cygpath)
29847      input_path=`$CYGPATH -u "$shortmode_path"`
29848      new_path="$input_path"
29849    fi
29850  fi
29851
29852  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29853  if test "x$test_cygdrive_prefix" = x; then
29854    # As a simple fix, exclude /usr/bin since it's not a real path.
29855    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29856      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29857      # a path prefixed by /cygdrive for fixpath to work.
29858      new_path="$CYGWIN_ROOT_PATH$input_path"
29859    fi
29860  fi
29861
29862
29863  if test "x$path" != "x$new_path"; then
29864    BOOT_JDK="$new_path"
29865    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29866$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29867  fi
29868
29869    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29870
29871  path="$BOOT_JDK"
29872  has_colon=`$ECHO $path | $GREP ^.:`
29873  new_path="$path"
29874  if test "x$has_colon" = x; then
29875    # Not in mixed or Windows style, start by that.
29876    new_path=`cmd //c echo $path`
29877  fi
29878
29879
29880  input_path="$new_path"
29881  # Check if we need to convert this using DOS-style short mode. If the path
29882  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29883  # take no chances and rewrite it.
29884  # Note: m4 eats our [], so we need to use [ and ] instead.
29885  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29886  if test "x$has_forbidden_chars" != x; then
29887    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29888    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29889  fi
29890
29891
29892  windows_path="$new_path"
29893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29894    unix_path=`$CYGPATH -u "$windows_path"`
29895    new_path="$unix_path"
29896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29898    new_path="$unix_path"
29899  fi
29900
29901  if test "x$path" != "x$new_path"; then
29902    BOOT_JDK="$new_path"
29903    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29904$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29905  fi
29906
29907  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29908  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29909
29910    else
29911      # We're on a unix platform. Hooray! :)
29912      path="$BOOT_JDK"
29913      has_space=`$ECHO "$path" | $GREP " "`
29914      if test "x$has_space" != x; then
29915        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29916$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29917        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29918      fi
29919
29920      # Use eval to expand a potential ~
29921      eval path="$path"
29922      if test ! -f "$path" && test ! -d "$path"; then
29923        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29924      fi
29925
29926      if test -d "$path"; then
29927        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29928      else
29929        dir="`$DIRNAME "$path"`"
29930        base="`$BASENAME "$path"`"
29931        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29932      fi
29933    fi
29934  fi
29935
29936            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29937$as_echo_n "checking for Boot JDK... " >&6; }
29938            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29939$as_echo "$BOOT_JDK" >&6; }
29940            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29941$as_echo_n "checking Boot JDK version... " >&6; }
29942            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29943            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29944$as_echo "$BOOT_JDK_VERSION" >&6; }
29945          fi # end check jdk version
29946        fi # end check javac
29947      fi # end check java
29948    fi # end check boot jdk found
29949  fi
29950
29951
29952  # If we haven't found anything yet, we've truly lost. Give up.
29953  if test "x$BOOT_JDK_FOUND" = xno; then
29954
29955  # Print a helpful message on how to acquire the necessary build dependency.
29956  # openjdk is the help tag: freetype, cups, alsa etc
29957  MISSING_DEPENDENCY=openjdk
29958
29959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29960    cygwin_help $MISSING_DEPENDENCY
29961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29962    msys_help $MISSING_DEPENDENCY
29963  else
29964    PKGHANDLER_COMMAND=
29965
29966    case $PKGHANDLER in
29967      apt-get)
29968        apt_help     $MISSING_DEPENDENCY ;;
29969      yum)
29970        yum_help     $MISSING_DEPENDENCY ;;
29971      brew)
29972        brew_help    $MISSING_DEPENDENCY ;;
29973      port)
29974        port_help    $MISSING_DEPENDENCY ;;
29975      pkgutil)
29976        pkgutil_help $MISSING_DEPENDENCY ;;
29977      pkgadd)
29978        pkgadd_help  $MISSING_DEPENDENCY ;;
29979    esac
29980
29981    if test "x$PKGHANDLER_COMMAND" != x; then
29982      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29983    fi
29984  fi
29985
29986    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29987$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29988    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitly setting --with-boot-jdk" >&5
29989$as_echo "$as_me: This might be fixed by explicitly setting --with-boot-jdk" >&6;}
29990    as_fn_error $? "Cannot continue" "$LINENO" 5
29991  fi
29992
29993
29994
29995  # Setup tools from the Boot JDK.
29996
29997  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29998
29999  # Publish this variable in the help.
30000
30001
30002  if [ -z "${JAVA+x}" ]; then
30003    # The variable is not set by user, try to locate tool using the code snippet
30004
30005      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30006$as_echo_n "checking for java in Boot JDK... " >&6; }
30007      JAVA=$BOOT_JDK/bin/java
30008      if test ! -x $JAVA; then
30009        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30010$as_echo "not found" >&6; }
30011        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30012$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30013        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30014      fi
30015      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30016$as_echo "ok" >&6; }
30017
30018
30019  else
30020    # The variable is set, but is it from the command line or the environment?
30021
30022    # Try to remove the string !JAVA! from our list.
30023    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
30024    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30025      # If it failed, the variable was not from the command line. Ignore it,
30026      # but warn the user (except for BASH, which is always set by the calling BASH).
30027      if test "xJAVA" != xBASH; then
30028        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
30029$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
30030      fi
30031      # Try to locate tool using the code snippet
30032
30033      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30034$as_echo_n "checking for java in Boot JDK... " >&6; }
30035      JAVA=$BOOT_JDK/bin/java
30036      if test ! -x $JAVA; then
30037        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30038$as_echo "not found" >&6; }
30039        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30040$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30041        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30042      fi
30043      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30044$as_echo "ok" >&6; }
30045
30046
30047    else
30048      # If it succeeded, then it was overridden by the user. We will use it
30049      # for the tool.
30050
30051      # First remove it from the list of overridden variables, so we can test
30052      # for unknown variables in the end.
30053      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30054
30055      # Check if we try to supply an empty value
30056      if test "x$JAVA" = x; then
30057        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
30058$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
30059        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30060$as_echo_n "checking for JAVA... " >&6; }
30061        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30062$as_echo "disabled" >&6; }
30063      else
30064        # Check if the provided tool contains a complete path.
30065        tool_specified="$JAVA"
30066        tool_basename="${tool_specified##*/}"
30067        if test "x$tool_basename" = "x$tool_specified"; then
30068          # A command without a complete path is provided, search $PATH.
30069          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
30070$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
30071          # Extract the first word of "$tool_basename", so it can be a program name with args.
30072set dummy $tool_basename; ac_word=$2
30073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30074$as_echo_n "checking for $ac_word... " >&6; }
30075if ${ac_cv_path_JAVA+:} false; then :
30076  $as_echo_n "(cached) " >&6
30077else
30078  case $JAVA in
30079  [\\/]* | ?:[\\/]*)
30080  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
30081  ;;
30082  *)
30083  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30084for as_dir in $PATH
30085do
30086  IFS=$as_save_IFS
30087  test -z "$as_dir" && as_dir=.
30088    for ac_exec_ext in '' $ac_executable_extensions; do
30089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30090    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
30091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30092    break 2
30093  fi
30094done
30095  done
30096IFS=$as_save_IFS
30097
30098  ;;
30099esac
30100fi
30101JAVA=$ac_cv_path_JAVA
30102if test -n "$JAVA"; then
30103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30104$as_echo "$JAVA" >&6; }
30105else
30106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30107$as_echo "no" >&6; }
30108fi
30109
30110
30111          if test "x$JAVA" = x; then
30112            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30113          fi
30114        else
30115          # Otherwise we believe it is a complete path. Use it as it is.
30116          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30117$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30118          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30119$as_echo_n "checking for JAVA... " >&6; }
30120          if test ! -x "$tool_specified"; then
30121            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30122$as_echo "not found" >&6; }
30123            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30124          fi
30125          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30126$as_echo "$tool_specified" >&6; }
30127        fi
30128      fi
30129    fi
30130
30131  fi
30132
30133
30134
30135  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30136
30137  # Publish this variable in the help.
30138
30139
30140  if [ -z "${JAVAC+x}" ]; then
30141    # The variable is not set by user, try to locate tool using the code snippet
30142
30143      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30144$as_echo_n "checking for javac in Boot JDK... " >&6; }
30145      JAVAC=$BOOT_JDK/bin/javac
30146      if test ! -x $JAVAC; then
30147        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30148$as_echo "not found" >&6; }
30149        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30150$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30151        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30152      fi
30153      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30154$as_echo "ok" >&6; }
30155
30156
30157  else
30158    # The variable is set, but is it from the command line or the environment?
30159
30160    # Try to remove the string !JAVAC! from our list.
30161    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30162    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30163      # If it failed, the variable was not from the command line. Ignore it,
30164      # but warn the user (except for BASH, which is always set by the calling BASH).
30165      if test "xJAVAC" != xBASH; then
30166        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30167$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30168      fi
30169      # Try to locate tool using the code snippet
30170
30171      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30172$as_echo_n "checking for javac in Boot JDK... " >&6; }
30173      JAVAC=$BOOT_JDK/bin/javac
30174      if test ! -x $JAVAC; then
30175        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30176$as_echo "not found" >&6; }
30177        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30178$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30179        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30180      fi
30181      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30182$as_echo "ok" >&6; }
30183
30184
30185    else
30186      # If it succeeded, then it was overridden by the user. We will use it
30187      # for the tool.
30188
30189      # First remove it from the list of overridden variables, so we can test
30190      # for unknown variables in the end.
30191      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30192
30193      # Check if we try to supply an empty value
30194      if test "x$JAVAC" = x; then
30195        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30196$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30197        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30198$as_echo_n "checking for JAVAC... " >&6; }
30199        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30200$as_echo "disabled" >&6; }
30201      else
30202        # Check if the provided tool contains a complete path.
30203        tool_specified="$JAVAC"
30204        tool_basename="${tool_specified##*/}"
30205        if test "x$tool_basename" = "x$tool_specified"; then
30206          # A command without a complete path is provided, search $PATH.
30207          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30208$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30209          # Extract the first word of "$tool_basename", so it can be a program name with args.
30210set dummy $tool_basename; ac_word=$2
30211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30212$as_echo_n "checking for $ac_word... " >&6; }
30213if ${ac_cv_path_JAVAC+:} false; then :
30214  $as_echo_n "(cached) " >&6
30215else
30216  case $JAVAC in
30217  [\\/]* | ?:[\\/]*)
30218  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30219  ;;
30220  *)
30221  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30222for as_dir in $PATH
30223do
30224  IFS=$as_save_IFS
30225  test -z "$as_dir" && as_dir=.
30226    for ac_exec_ext in '' $ac_executable_extensions; do
30227  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30228    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30229    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30230    break 2
30231  fi
30232done
30233  done
30234IFS=$as_save_IFS
30235
30236  ;;
30237esac
30238fi
30239JAVAC=$ac_cv_path_JAVAC
30240if test -n "$JAVAC"; then
30241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30242$as_echo "$JAVAC" >&6; }
30243else
30244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30245$as_echo "no" >&6; }
30246fi
30247
30248
30249          if test "x$JAVAC" = x; then
30250            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30251          fi
30252        else
30253          # Otherwise we believe it is a complete path. Use it as it is.
30254          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30255$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30256          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30257$as_echo_n "checking for JAVAC... " >&6; }
30258          if test ! -x "$tool_specified"; then
30259            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30260$as_echo "not found" >&6; }
30261            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30262          fi
30263          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30264$as_echo "$tool_specified" >&6; }
30265        fi
30266      fi
30267    fi
30268
30269  fi
30270
30271
30272
30273  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30274
30275  # Publish this variable in the help.
30276
30277
30278  if [ -z "${JAVAH+x}" ]; then
30279    # The variable is not set by user, try to locate tool using the code snippet
30280
30281      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30282$as_echo_n "checking for javah in Boot JDK... " >&6; }
30283      JAVAH=$BOOT_JDK/bin/javah
30284      if test ! -x $JAVAH; then
30285        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30286$as_echo "not found" >&6; }
30287        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30288$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30289        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30290      fi
30291      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30292$as_echo "ok" >&6; }
30293
30294
30295  else
30296    # The variable is set, but is it from the command line or the environment?
30297
30298    # Try to remove the string !JAVAH! from our list.
30299    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30300    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30301      # If it failed, the variable was not from the command line. Ignore it,
30302      # but warn the user (except for BASH, which is always set by the calling BASH).
30303      if test "xJAVAH" != xBASH; then
30304        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30305$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30306      fi
30307      # Try to locate tool using the code snippet
30308
30309      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30310$as_echo_n "checking for javah in Boot JDK... " >&6; }
30311      JAVAH=$BOOT_JDK/bin/javah
30312      if test ! -x $JAVAH; then
30313        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30314$as_echo "not found" >&6; }
30315        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30316$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30317        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30318      fi
30319      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30320$as_echo "ok" >&6; }
30321
30322
30323    else
30324      # If it succeeded, then it was overridden by the user. We will use it
30325      # for the tool.
30326
30327      # First remove it from the list of overridden variables, so we can test
30328      # for unknown variables in the end.
30329      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30330
30331      # Check if we try to supply an empty value
30332      if test "x$JAVAH" = x; then
30333        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30334$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30335        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30336$as_echo_n "checking for JAVAH... " >&6; }
30337        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30338$as_echo "disabled" >&6; }
30339      else
30340        # Check if the provided tool contains a complete path.
30341        tool_specified="$JAVAH"
30342        tool_basename="${tool_specified##*/}"
30343        if test "x$tool_basename" = "x$tool_specified"; then
30344          # A command without a complete path is provided, search $PATH.
30345          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30346$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30347          # Extract the first word of "$tool_basename", so it can be a program name with args.
30348set dummy $tool_basename; ac_word=$2
30349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30350$as_echo_n "checking for $ac_word... " >&6; }
30351if ${ac_cv_path_JAVAH+:} false; then :
30352  $as_echo_n "(cached) " >&6
30353else
30354  case $JAVAH in
30355  [\\/]* | ?:[\\/]*)
30356  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30357  ;;
30358  *)
30359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30360for as_dir in $PATH
30361do
30362  IFS=$as_save_IFS
30363  test -z "$as_dir" && as_dir=.
30364    for ac_exec_ext in '' $ac_executable_extensions; do
30365  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30366    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30368    break 2
30369  fi
30370done
30371  done
30372IFS=$as_save_IFS
30373
30374  ;;
30375esac
30376fi
30377JAVAH=$ac_cv_path_JAVAH
30378if test -n "$JAVAH"; then
30379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30380$as_echo "$JAVAH" >&6; }
30381else
30382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30383$as_echo "no" >&6; }
30384fi
30385
30386
30387          if test "x$JAVAH" = x; then
30388            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30389          fi
30390        else
30391          # Otherwise we believe it is a complete path. Use it as it is.
30392          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30393$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30394          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30395$as_echo_n "checking for JAVAH... " >&6; }
30396          if test ! -x "$tool_specified"; then
30397            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30398$as_echo "not found" >&6; }
30399            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30400          fi
30401          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30402$as_echo "$tool_specified" >&6; }
30403        fi
30404      fi
30405    fi
30406
30407  fi
30408
30409
30410
30411  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30412
30413  # Publish this variable in the help.
30414
30415
30416  if [ -z "${JAR+x}" ]; then
30417    # The variable is not set by user, try to locate tool using the code snippet
30418
30419      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30420$as_echo_n "checking for jar in Boot JDK... " >&6; }
30421      JAR=$BOOT_JDK/bin/jar
30422      if test ! -x $JAR; then
30423        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30424$as_echo "not found" >&6; }
30425        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30426$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30427        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30428      fi
30429      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30430$as_echo "ok" >&6; }
30431
30432
30433  else
30434    # The variable is set, but is it from the command line or the environment?
30435
30436    # Try to remove the string !JAR! from our list.
30437    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30438    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30439      # If it failed, the variable was not from the command line. Ignore it,
30440      # but warn the user (except for BASH, which is always set by the calling BASH).
30441      if test "xJAR" != xBASH; then
30442        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30443$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30444      fi
30445      # Try to locate tool using the code snippet
30446
30447      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30448$as_echo_n "checking for jar in Boot JDK... " >&6; }
30449      JAR=$BOOT_JDK/bin/jar
30450      if test ! -x $JAR; then
30451        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30452$as_echo "not found" >&6; }
30453        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30454$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30455        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30456      fi
30457      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30458$as_echo "ok" >&6; }
30459
30460
30461    else
30462      # If it succeeded, then it was overridden by the user. We will use it
30463      # for the tool.
30464
30465      # First remove it from the list of overridden variables, so we can test
30466      # for unknown variables in the end.
30467      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30468
30469      # Check if we try to supply an empty value
30470      if test "x$JAR" = x; then
30471        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30472$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30473        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30474$as_echo_n "checking for JAR... " >&6; }
30475        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30476$as_echo "disabled" >&6; }
30477      else
30478        # Check if the provided tool contains a complete path.
30479        tool_specified="$JAR"
30480        tool_basename="${tool_specified##*/}"
30481        if test "x$tool_basename" = "x$tool_specified"; then
30482          # A command without a complete path is provided, search $PATH.
30483          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30484$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30485          # Extract the first word of "$tool_basename", so it can be a program name with args.
30486set dummy $tool_basename; ac_word=$2
30487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30488$as_echo_n "checking for $ac_word... " >&6; }
30489if ${ac_cv_path_JAR+:} false; then :
30490  $as_echo_n "(cached) " >&6
30491else
30492  case $JAR in
30493  [\\/]* | ?:[\\/]*)
30494  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
30495  ;;
30496  *)
30497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30498for as_dir in $PATH
30499do
30500  IFS=$as_save_IFS
30501  test -z "$as_dir" && as_dir=.
30502    for ac_exec_ext in '' $ac_executable_extensions; do
30503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30504    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
30505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30506    break 2
30507  fi
30508done
30509  done
30510IFS=$as_save_IFS
30511
30512  ;;
30513esac
30514fi
30515JAR=$ac_cv_path_JAR
30516if test -n "$JAR"; then
30517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
30518$as_echo "$JAR" >&6; }
30519else
30520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30521$as_echo "no" >&6; }
30522fi
30523
30524
30525          if test "x$JAR" = x; then
30526            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30527          fi
30528        else
30529          # Otherwise we believe it is a complete path. Use it as it is.
30530          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
30531$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
30532          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30533$as_echo_n "checking for JAR... " >&6; }
30534          if test ! -x "$tool_specified"; then
30535            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30536$as_echo "not found" >&6; }
30537            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
30538          fi
30539          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30540$as_echo "$tool_specified" >&6; }
30541        fi
30542      fi
30543    fi
30544
30545  fi
30546
30547
30548
30549  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30550
30551  # Publish this variable in the help.
30552
30553
30554  if [ -z "${JARSIGNER+x}" ]; then
30555    # The variable is not set by user, try to locate tool using the code snippet
30556
30557      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30558$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30559      JARSIGNER=$BOOT_JDK/bin/jarsigner
30560      if test ! -x $JARSIGNER; then
30561        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30562$as_echo "not found" >&6; }
30563        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30564$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30565        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30566      fi
30567      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30568$as_echo "ok" >&6; }
30569
30570
30571  else
30572    # The variable is set, but is it from the command line or the environment?
30573
30574    # Try to remove the string !JARSIGNER! from our list.
30575    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30576    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30577      # If it failed, the variable was not from the command line. Ignore it,
30578      # but warn the user (except for BASH, which is always set by the calling BASH).
30579      if test "xJARSIGNER" != xBASH; then
30580        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30581$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30582      fi
30583      # Try to locate tool using the code snippet
30584
30585      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30586$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30587      JARSIGNER=$BOOT_JDK/bin/jarsigner
30588      if test ! -x $JARSIGNER; then
30589        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30590$as_echo "not found" >&6; }
30591        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30592$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30593        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30594      fi
30595      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30596$as_echo "ok" >&6; }
30597
30598
30599    else
30600      # If it succeeded, then it was overridden by the user. We will use it
30601      # for the tool.
30602
30603      # First remove it from the list of overridden variables, so we can test
30604      # for unknown variables in the end.
30605      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30606
30607      # Check if we try to supply an empty value
30608      if test "x$JARSIGNER" = x; then
30609        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30610$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30611        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30612$as_echo_n "checking for JARSIGNER... " >&6; }
30613        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30614$as_echo "disabled" >&6; }
30615      else
30616        # Check if the provided tool contains a complete path.
30617        tool_specified="$JARSIGNER"
30618        tool_basename="${tool_specified##*/}"
30619        if test "x$tool_basename" = "x$tool_specified"; then
30620          # A command without a complete path is provided, search $PATH.
30621          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30622$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30623          # Extract the first word of "$tool_basename", so it can be a program name with args.
30624set dummy $tool_basename; ac_word=$2
30625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30626$as_echo_n "checking for $ac_word... " >&6; }
30627if ${ac_cv_path_JARSIGNER+:} false; then :
30628  $as_echo_n "(cached) " >&6
30629else
30630  case $JARSIGNER in
30631  [\\/]* | ?:[\\/]*)
30632  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30633  ;;
30634  *)
30635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30636for as_dir in $PATH
30637do
30638  IFS=$as_save_IFS
30639  test -z "$as_dir" && as_dir=.
30640    for ac_exec_ext in '' $ac_executable_extensions; do
30641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30642    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30644    break 2
30645  fi
30646done
30647  done
30648IFS=$as_save_IFS
30649
30650  ;;
30651esac
30652fi
30653JARSIGNER=$ac_cv_path_JARSIGNER
30654if test -n "$JARSIGNER"; then
30655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30656$as_echo "$JARSIGNER" >&6; }
30657else
30658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30659$as_echo "no" >&6; }
30660fi
30661
30662
30663          if test "x$JARSIGNER" = x; then
30664            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30665          fi
30666        else
30667          # Otherwise we believe it is a complete path. Use it as it is.
30668          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30669$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30670          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30671$as_echo_n "checking for JARSIGNER... " >&6; }
30672          if test ! -x "$tool_specified"; then
30673            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30674$as_echo "not found" >&6; }
30675            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30676          fi
30677          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30678$as_echo "$tool_specified" >&6; }
30679        fi
30680      fi
30681    fi
30682
30683  fi
30684
30685
30686
30687  # Finally, set some other options...
30688
30689  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30690  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30691
30692
30693  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30694$as_echo_n "checking if Boot JDK supports modules... " >&6; }
30695  if "$JAVA" --list-modules > /dev/null 2>&1; then
30696    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30697$as_echo "yes" >&6; }
30698    BOOT_JDK_MODULAR="true"
30699  else
30700    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30701$as_echo "no" >&6; }
30702    BOOT_JDK_MODULAR="false"
30703  fi
30704
30705
30706
30707
30708  # Check if the boot jdk is 32 or 64 bit
30709  if "$JAVA" -d64 -version > /dev/null 2>&1; then
30710    BOOT_JDK_BITS="64"
30711  else
30712    BOOT_JDK_BITS="32"
30713  fi
30714  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30715$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30717$as_echo "$BOOT_JDK_BITS" >&6; }
30718
30719
30720
30721# Check whether --with-build-jdk was given.
30722if test "${with_build_jdk+set}" = set; then :
30723  withval=$with_build_jdk;
30724fi
30725
30726
30727  CREATE_BUILDJDK=false
30728  EXTERNAL_BUILDJDK=false
30729  BUILD_JDK_FOUND="no"
30730  if test "x$with_build_jdk" != "x"; then
30731
30732  if test "x$BUILD_JDK_FOUND" = xno; then
30733    # Execute the test
30734
30735       if test "x$with_build_jdk" != x; then
30736         BUILD_JDK=$with_build_jdk
30737         BUILD_JDK_FOUND=maybe
30738         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30739$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30740       fi
30741
30742    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30743    if test "x$BUILD_JDK_FOUND" = xmaybe; then
30744      # Do we have a bin/java?
30745      if test ! -x "$BUILD_JDK/bin/java"; then
30746        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30747$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30748        BUILD_JDK_FOUND=no
30749      elif test ! -x "$BUILD_JDK/bin/jlink"; then
30750        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30751$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30752        BUILD_JDK_FOUND=no
30753      elif test ! -x "$BUILD_JDK/bin/jmod"; then
30754        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
30755$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
30756        BUILD_JDK_FOUND=no
30757      elif test ! -x "$BUILD_JDK/bin/javac"; then
30758        # Do we have a bin/javac?
30759        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30760$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30761        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30762$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30763        BUILD_JDK_FOUND=no
30764      else
30765        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30766        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30767
30768        # Extra M4 quote needed to protect [] in grep expression.
30769        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30770        if test "x$FOUND_CORRECT_VERSION" = x; then
30771          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30772$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30773          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30774$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30775          BUILD_JDK_FOUND=no
30776        else
30777          # We're done!
30778          BUILD_JDK_FOUND=yes
30779
30780  # Only process if variable expands to non-empty
30781
30782  if test "x$BUILD_JDK" != x; then
30783    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30784
30785  # Input might be given as Windows format, start by converting to
30786  # unix format.
30787  path="$BUILD_JDK"
30788  new_path=`$CYGPATH -u "$path"`
30789
30790  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30791  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30792  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30793  # "foo.exe" is OK but "foo" is an error.
30794  #
30795  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30796  # It is also a way to make sure we got the proper file name for the real test later on.
30797  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30798  if test "x$test_shortpath" = x; then
30799    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30800$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30801    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30802  fi
30803
30804  # Call helper function which possibly converts this using DOS-style short mode.
30805  # If so, the updated path is stored in $new_path.
30806
30807  input_path="$new_path"
30808  # Check if we need to convert this using DOS-style short mode. If the path
30809  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30810  # take no chances and rewrite it.
30811  # Note: m4 eats our [], so we need to use [ and ] instead.
30812  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30813  if test "x$has_forbidden_chars" != x; then
30814    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30815    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30816    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30817    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30818      # Going to short mode and back again did indeed matter. Since short mode is
30819      # case insensitive, let's make it lowercase to improve readability.
30820      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30821      # Now convert it back to Unix-style (cygpath)
30822      input_path=`$CYGPATH -u "$shortmode_path"`
30823      new_path="$input_path"
30824    fi
30825  fi
30826
30827  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30828  if test "x$test_cygdrive_prefix" = x; then
30829    # As a simple fix, exclude /usr/bin since it's not a real path.
30830    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30831      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30832      # a path prefixed by /cygdrive for fixpath to work.
30833      new_path="$CYGWIN_ROOT_PATH$input_path"
30834    fi
30835  fi
30836
30837
30838  if test "x$path" != "x$new_path"; then
30839    BUILD_JDK="$new_path"
30840    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30841$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30842  fi
30843
30844    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30845
30846  path="$BUILD_JDK"
30847  has_colon=`$ECHO $path | $GREP ^.:`
30848  new_path="$path"
30849  if test "x$has_colon" = x; then
30850    # Not in mixed or Windows style, start by that.
30851    new_path=`cmd //c echo $path`
30852  fi
30853
30854
30855  input_path="$new_path"
30856  # Check if we need to convert this using DOS-style short mode. If the path
30857  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30858  # take no chances and rewrite it.
30859  # Note: m4 eats our [], so we need to use [ and ] instead.
30860  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30861  if test "x$has_forbidden_chars" != x; then
30862    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30863    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30864  fi
30865
30866
30867  windows_path="$new_path"
30868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30869    unix_path=`$CYGPATH -u "$windows_path"`
30870    new_path="$unix_path"
30871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30873    new_path="$unix_path"
30874  fi
30875
30876  if test "x$path" != "x$new_path"; then
30877    BUILD_JDK="$new_path"
30878    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30879$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30880  fi
30881
30882  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30883  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30884
30885    else
30886      # We're on a unix platform. Hooray! :)
30887      path="$BUILD_JDK"
30888      has_space=`$ECHO "$path" | $GREP " "`
30889      if test "x$has_space" != x; then
30890        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30891$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30892        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30893      fi
30894
30895      # Use eval to expand a potential ~
30896      eval path="$path"
30897      if test ! -f "$path" && test ! -d "$path"; then
30898        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30899      fi
30900
30901      if test -d "$path"; then
30902        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30903      else
30904        dir="`$DIRNAME "$path"`"
30905        base="`$BASENAME "$path"`"
30906        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30907      fi
30908    fi
30909  fi
30910
30911          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30912$as_echo_n "checking for Build JDK... " >&6; }
30913          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30914$as_echo "$BUILD_JDK" >&6; }
30915          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30916$as_echo_n "checking Build JDK version... " >&6; }
30917          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30918          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30919$as_echo "$BUILD_JDK_VERSION" >&6; }
30920        fi # end check jdk version
30921      fi # end check java
30922    fi # end check build jdk found
30923  fi
30924
30925    EXTERNAL_BUILDJDK=true
30926  else
30927    if test "x$COMPILE_TYPE" = "xcross"; then
30928      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30929      BUILD_JDK_FOUND=yes
30930      CREATE_BUILDJDK=true
30931      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30932$as_echo_n "checking for Build JDK... " >&6; }
30933      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30934$as_echo "yes, will build it for the host platform" >&6; }
30935    else
30936      BUILD_JDK="\$(JDK_OUTPUTDIR)"
30937      BUILD_JDK_FOUND=yes
30938      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30939$as_echo_n "checking for Build JDK... " >&6; }
30940      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30941$as_echo "yes, will use output dir" >&6; }
30942    fi
30943  fi
30944
30945  JMOD="$BUILD_JDK/bin/jmod"
30946  JLINK="$BUILD_JDK/bin/jlink"
30947
30948
30949
30950  if test "x$BUILD_JDK_FOUND" != "xyes"; then
30951    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30952$as_echo_n "checking for Build JDK... " >&6; }
30953    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30954$as_echo "no" >&6; }
30955    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30956  fi
30957
30958
30959
30960
30961
30962
30963###############################################################################
30964#
30965# Configure the sources to use. We can add or override individual directories.
30966#
30967###############################################################################
30968
30969
30970  # Where are the sources.
30971  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30972  CORBA_TOPDIR="$SRC_ROOT/corba"
30973  JAXP_TOPDIR="$SRC_ROOT/jaxp"
30974  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30975  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30976  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30977  JDK_TOPDIR="$SRC_ROOT/jdk"
30978
30979
30980
30981
30982
30983
30984
30985
30986
30987  # This feature is no longer supported.
30988
30989
30990
30991# Check whether --with-add-source-root was given.
30992if test "${with_add_source_root+set}" = set; then :
30993  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
30994$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30995fi
30996
30997
30998
30999
31000# Check whether --with-override-source-root was given.
31001if test "${with_override_source_root+set}" = set; then :
31002  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
31003$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
31004fi
31005
31006
31007
31008
31009# Check whether --with-adds-and-overrides was given.
31010if test "${with_adds_and_overrides+set}" = set; then :
31011  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
31012$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
31013fi
31014
31015
31016
31017
31018# Check whether --with-override-langtools was given.
31019if test "${with_override_langtools+set}" = set; then :
31020  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
31021$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
31022fi
31023
31024
31025
31026
31027# Check whether --with-override-corba was given.
31028if test "${with_override_corba+set}" = set; then :
31029  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
31030$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
31031fi
31032
31033
31034
31035
31036# Check whether --with-override-jaxp was given.
31037if test "${with_override_jaxp+set}" = set; then :
31038  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
31039$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
31040fi
31041
31042
31043
31044
31045# Check whether --with-override-jaxws was given.
31046if test "${with_override_jaxws+set}" = set; then :
31047  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
31048$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
31049fi
31050
31051
31052
31053
31054# Check whether --with-override-hotspot was given.
31055if test "${with_override_hotspot+set}" = set; then :
31056  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
31057$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
31058fi
31059
31060
31061
31062
31063# Check whether --with-override-nashorn was given.
31064if test "${with_override_nashorn+set}" = set; then :
31065  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
31066$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
31067fi
31068
31069
31070
31071
31072# Check whether --with-override-jdk was given.
31073if test "${with_override_jdk+set}" = set; then :
31074  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
31075$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
31076fi
31077
31078
31079
31080
31081  BUILD_OUTPUT="$OUTPUT_ROOT"
31082
31083  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31084
31085
31086
31087# Check whether --with-import_hotspot was given.
31088if test "${with_import_hotspot+set}" = set; then :
31089  withval=$with_import_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&5
31090$as_echo "$as_me: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&2;}
31091fi
31092
31093
31094
31095
31096
31097
31098# Check whether --with-import-modules was given.
31099if test "${with_import_modules+set}" = set; then :
31100  withval=$with_import_modules;
31101fi
31102
31103
31104  if test "x$with_import_modules" != x \
31105      && test "x$with_import_modules" != "xno"; then
31106    if test -d "$with_import_modules"; then
31107      IMPORT_MODULES_TOPDIR="$with_import_modules"
31108
31109  # Only process if variable expands to non-empty
31110
31111  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31112    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31113
31114  # Input might be given as Windows format, start by converting to
31115  # unix format.
31116  path="$IMPORT_MODULES_TOPDIR"
31117  new_path=`$CYGPATH -u "$path"`
31118
31119  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31120  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31121  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31122  # "foo.exe" is OK but "foo" is an error.
31123  #
31124  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31125  # It is also a way to make sure we got the proper file name for the real test later on.
31126  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31127  if test "x$test_shortpath" = x; then
31128    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31129$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31130    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31131  fi
31132
31133  # Call helper function which possibly converts this using DOS-style short mode.
31134  # If so, the updated path is stored in $new_path.
31135
31136  input_path="$new_path"
31137  # Check if we need to convert this using DOS-style short mode. If the path
31138  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31139  # take no chances and rewrite it.
31140  # Note: m4 eats our [], so we need to use [ and ] instead.
31141  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31142  if test "x$has_forbidden_chars" != x; then
31143    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31144    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31145    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31146    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31147      # Going to short mode and back again did indeed matter. Since short mode is
31148      # case insensitive, let's make it lowercase to improve readability.
31149      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31150      # Now convert it back to Unix-style (cygpath)
31151      input_path=`$CYGPATH -u "$shortmode_path"`
31152      new_path="$input_path"
31153    fi
31154  fi
31155
31156  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31157  if test "x$test_cygdrive_prefix" = x; then
31158    # As a simple fix, exclude /usr/bin since it's not a real path.
31159    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31160      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31161      # a path prefixed by /cygdrive for fixpath to work.
31162      new_path="$CYGWIN_ROOT_PATH$input_path"
31163    fi
31164  fi
31165
31166
31167  if test "x$path" != "x$new_path"; then
31168    IMPORT_MODULES_TOPDIR="$new_path"
31169    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31170$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31171  fi
31172
31173    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31174
31175  path="$IMPORT_MODULES_TOPDIR"
31176  has_colon=`$ECHO $path | $GREP ^.:`
31177  new_path="$path"
31178  if test "x$has_colon" = x; then
31179    # Not in mixed or Windows style, start by that.
31180    new_path=`cmd //c echo $path`
31181  fi
31182
31183
31184  input_path="$new_path"
31185  # Check if we need to convert this using DOS-style short mode. If the path
31186  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31187  # take no chances and rewrite it.
31188  # Note: m4 eats our [], so we need to use [ and ] instead.
31189  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31190  if test "x$has_forbidden_chars" != x; then
31191    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31192    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31193  fi
31194
31195
31196  windows_path="$new_path"
31197  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31198    unix_path=`$CYGPATH -u "$windows_path"`
31199    new_path="$unix_path"
31200  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31201    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31202    new_path="$unix_path"
31203  fi
31204
31205  if test "x$path" != "x$new_path"; then
31206    IMPORT_MODULES_TOPDIR="$new_path"
31207    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31208$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31209  fi
31210
31211  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31212  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31213
31214    else
31215      # We're on a unix platform. Hooray! :)
31216      path="$IMPORT_MODULES_TOPDIR"
31217      has_space=`$ECHO "$path" | $GREP " "`
31218      if test "x$has_space" != x; then
31219        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31220$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31221        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31222      fi
31223
31224      # Use eval to expand a potential ~
31225      eval path="$path"
31226      if test ! -f "$path" && test ! -d "$path"; then
31227        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31228      fi
31229
31230      if test -d "$path"; then
31231        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31232      else
31233        dir="`$DIRNAME "$path"`"
31234        base="`$BASENAME "$path"`"
31235        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31236      fi
31237    fi
31238  fi
31239
31240    elif test -e "$with_import_modules"; then
31241      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31242      $RM -rf "$IMPORT_MODULES_TOPDIR"
31243      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31244      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31245        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31246      fi
31247    else
31248      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31249    fi
31250  fi
31251
31252  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31253    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31254  fi
31255  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31256    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31257  fi
31258  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31259    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31260  fi
31261  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31262    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31263  fi
31264  if test -d "$IMPORT_MODULES_TOPDIR/modules_legal"; then
31265    IMPORT_MODULES_LEGAL="$IMPORT_MODULES_TOPDIR/modules_legal"
31266  fi
31267  if test -d "$IMPORT_MODULES_TOPDIR/modules_man"; then
31268    IMPORT_MODULES_MAN="$IMPORT_MODULES_TOPDIR/modules_man"
31269  fi
31270  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31271    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31272  fi
31273  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31274    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31275  fi
31276
31277
31278
31279
31280
31281
31282
31283
31284
31285
31286
31287###############################################################################
31288#
31289# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31290# native code.
31291#
31292###############################################################################
31293
31294# See if we are doing a complete static build or not
31295
31296  # Check whether --enable-static-build was given.
31297if test "${enable_static_build+set}" = set; then :
31298  enableval=$enable_static_build;
31299fi
31300
31301  STATIC_BUILD=false
31302  if test "x$enable_static_build" = "xyes"; then
31303    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31304$as_echo_n "checking if static build is enabled... " >&6; }
31305    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31306$as_echo "yes" >&6; }
31307    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31308      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31309    fi
31310    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31311    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31312    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31313    STATIC_BUILD=true
31314  elif test "x$enable_static_build" = "xno"; then
31315    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31316$as_echo_n "checking if static build is enabled... " >&6; }
31317    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31318$as_echo "no" >&6; }
31319  elif test "x$enable_static_build" != "x"; then
31320    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31321  fi
31322
31323
31324
31325
31326# First determine the toolchain type (compiler family)
31327
31328
31329# Check whether --with-toolchain-type was given.
31330if test "${with_toolchain_type+set}" = set; then :
31331  withval=$with_toolchain_type;
31332fi
31333
31334
31335  # Use indirect variable referencing
31336  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31337  VALID_TOOLCHAINS=${!toolchain_var_name}
31338
31339  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31340    if test -n "$XCODEBUILD"; then
31341      # On Mac OS X, default toolchain to clang after Xcode 5
31342      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31343      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31344      if test $? -ne 0; then
31345        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31346      fi
31347      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31348          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31349          $CUT -f 1 -d .`
31350      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31351$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31352      if test $XCODE_MAJOR_VERSION -ge 5; then
31353          DEFAULT_TOOLCHAIN="clang"
31354      else
31355          DEFAULT_TOOLCHAIN="gcc"
31356      fi
31357    else
31358      # If Xcode is not installed, but the command line tools are
31359      # then we can't run xcodebuild. On these systems we should
31360      # default to clang
31361      DEFAULT_TOOLCHAIN="clang"
31362    fi
31363  else
31364    # First toolchain type in the list is the default
31365    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31366  fi
31367
31368  if test "x$with_toolchain_type" = xlist; then
31369    # List all toolchains
31370    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31371$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31372    for toolchain in $VALID_TOOLCHAINS; do
31373      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31374      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31375      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31376    done
31377
31378    exit 0
31379  elif test "x$with_toolchain_type" != x; then
31380    # User override; check that it is valid
31381    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31382      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31383$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31384      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31385$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31386      as_fn_error $? "Cannot continue." "$LINENO" 5
31387    fi
31388    TOOLCHAIN_TYPE=$with_toolchain_type
31389  else
31390    # No flag given, use default
31391    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31392  fi
31393
31394
31395  TOOLCHAIN_CC_BINARY_clang="clang"
31396  TOOLCHAIN_CC_BINARY_gcc="gcc"
31397  TOOLCHAIN_CC_BINARY_microsoft="cl"
31398  TOOLCHAIN_CC_BINARY_solstudio="cc"
31399  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31400
31401  TOOLCHAIN_CXX_BINARY_clang="clang++"
31402  TOOLCHAIN_CXX_BINARY_gcc="g++"
31403  TOOLCHAIN_CXX_BINARY_microsoft="cl"
31404  TOOLCHAIN_CXX_BINARY_solstudio="CC"
31405  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31406
31407  # Use indirect variable referencing
31408  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31409  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31410  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31411  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31412  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31413  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31414  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31415  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31416
31417
31418  # Define filename patterns
31419  if test "x$OPENJDK_TARGET_OS" = xwindows; then
31420    LIBRARY_PREFIX=
31421    SHARED_LIBRARY_SUFFIX='.dll'
31422    STATIC_LIBRARY_SUFFIX='.lib'
31423    SHARED_LIBRARY='$1.dll'
31424    STATIC_LIBRARY='$1.lib'
31425    OBJ_SUFFIX='.obj'
31426    EXE_SUFFIX='.exe'
31427  else
31428    LIBRARY_PREFIX=lib
31429    SHARED_LIBRARY_SUFFIX='.so'
31430    STATIC_LIBRARY_SUFFIX='.a'
31431    SHARED_LIBRARY='lib$1.so'
31432    STATIC_LIBRARY='lib$1.a'
31433    OBJ_SUFFIX='.o'
31434    EXE_SUFFIX=''
31435    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31436      # For full static builds, we're overloading the SHARED_LIBRARY
31437      # variables in order to limit the amount of changes required.
31438      # It would be better to remove SHARED and just use LIBRARY and
31439      # LIBRARY_SUFFIX for libraries that can be built either
31440      # shared or static and use STATIC_* for libraries that are
31441      # always built statically.
31442      if test "x$STATIC_BUILD" = xtrue; then
31443        SHARED_LIBRARY='lib$1.a'
31444        SHARED_LIBRARY_SUFFIX='.a'
31445      else
31446        SHARED_LIBRARY='lib$1.dylib'
31447        SHARED_LIBRARY_SUFFIX='.dylib'
31448      fi
31449    fi
31450  fi
31451
31452
31453
31454
31455
31456
31457
31458
31459
31460
31461  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31462    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31463$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31464  else
31465    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31466$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31467  fi
31468
31469
31470# User supplied flags should be used when configure detects compilers
31471
31472  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31473    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31474$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31475  fi
31476
31477  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31478    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31479$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31480  fi
31481
31482  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31483    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31484$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31485  fi
31486
31487
31488# Check whether --with-extra-cflags was given.
31489if test "${with_extra_cflags+set}" = set; then :
31490  withval=$with_extra_cflags;
31491fi
31492
31493
31494
31495# Check whether --with-extra-cxxflags was given.
31496if test "${with_extra_cxxflags+set}" = set; then :
31497  withval=$with_extra_cxxflags;
31498fi
31499
31500
31501
31502# Check whether --with-extra-ldflags was given.
31503if test "${with_extra_ldflags+set}" = set; then :
31504  withval=$with_extra_ldflags;
31505fi
31506
31507
31508  EXTRA_CFLAGS="$with_extra_cflags"
31509  EXTRA_CXXFLAGS="$with_extra_cxxflags"
31510  EXTRA_LDFLAGS="$with_extra_ldflags"
31511
31512
31513
31514
31515
31516  # The global CFLAGS and LDLAGS variables are used by configure tests and
31517  # should include the extra parameters
31518  CFLAGS="$EXTRA_CFLAGS"
31519  CXXFLAGS="$EXTRA_CXXFLAGS"
31520  LDFLAGS="$EXTRA_LDFLAGS"
31521  CPPFLAGS=""
31522
31523# The sysroot cflags are needed for configure to be able to run the compilers
31524
31525  if test "x$SYSROOT" != "x"; then
31526    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31527      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31528        # Solaris Studio does not have a concept of sysroot. Instead we must
31529        # make sure the default include and lib dirs are appended to each
31530        # compile and link command line. Must also add -I-xbuiltin to enable
31531        # inlining of system functions and intrinsics.
31532        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
31533        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
31534            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
31535      fi
31536    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31537      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
31538      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
31539    elif test "x$TOOLCHAIN_TYPE" = xclang; then
31540      SYSROOT_CFLAGS="-isysroot $SYSROOT"
31541      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31542    fi
31543    # The global CFLAGS and LDFLAGS variables need these for configure to function
31544    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31545    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31546    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31547    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31548  fi
31549
31550  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31551    # We also need -iframework<path>/System/Library/Frameworks
31552    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31553    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31554    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31555    # set this here so it doesn't have to be peppered throughout the forest
31556    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31557    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31558  fi
31559
31560
31561
31562
31563
31564# Then detect the actual binaries needed
31565
31566  # FIXME: Is this needed?
31567  ac_ext=cpp
31568ac_cpp='$CXXCPP $CPPFLAGS'
31569ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31570ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31571ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31572
31573
31574  # Store the CFLAGS etc passed to the configure script.
31575  ORG_CFLAGS="$CFLAGS"
31576  ORG_CXXFLAGS="$CXXFLAGS"
31577
31578  # autoconf magic only relies on PATH, so update it if tools dir is specified
31579  OLD_PATH="$PATH"
31580
31581  # On Windows, we need to detect the visual studio installation first.
31582  # This will change the PATH, but we need to keep that new PATH even
31583  # after toolchain detection is done, since the compiler (on x86) uses
31584  # it for DLL resolution in runtime.
31585  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31586      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31587
31588  # Store path to cygwin link.exe to help excluding it when searching for
31589  # VS linker. This must be done before changing the PATH when looking for VS.
31590  # Extract the first word of "link", so it can be a program name with args.
31591set dummy link; ac_word=$2
31592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31593$as_echo_n "checking for $ac_word... " >&6; }
31594if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31595  $as_echo_n "(cached) " >&6
31596else
31597  case $CYGWIN_LINK in
31598  [\\/]* | ?:[\\/]*)
31599  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31600  ;;
31601  *)
31602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31603for as_dir in $PATH
31604do
31605  IFS=$as_save_IFS
31606  test -z "$as_dir" && as_dir=.
31607    for ac_exec_ext in '' $ac_executable_extensions; do
31608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31609    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31611    break 2
31612  fi
31613done
31614  done
31615IFS=$as_save_IFS
31616
31617  ;;
31618esac
31619fi
31620CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31621if test -n "$CYGWIN_LINK"; then
31622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31623$as_echo "$CYGWIN_LINK" >&6; }
31624else
31625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31626$as_echo "no" >&6; }
31627fi
31628
31629
31630  if test "x$CYGWIN_LINK" != x; then
31631    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31632$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31633    "$CYGWIN_LINK" --version > /dev/null
31634    if test $? -eq 0 ; then
31635      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31636$as_echo "yes" >&6; }
31637    else
31638      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31639$as_echo "no" >&6; }
31640      # This might be the VS linker. Don't exclude it later on.
31641      CYGWIN_LINK=""
31642    fi
31643  fi
31644
31645  # First-hand choice is to locate and run the vsvars bat file.
31646
31647
31648# Check whether --with-toolchain-version was given.
31649if test "${with_toolchain_version+set}" = set; then :
31650  withval=$with_toolchain_version;
31651fi
31652
31653
31654  if test "x$with_toolchain_version" = xlist; then
31655    # List all toolchains
31656    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31657$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31658    for version in $VALID_VS_VERSIONS; do
31659      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31660      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31661    done
31662
31663    exit 0
31664  elif test "x$DEVKIT_VS_VERSION" != x; then
31665    VS_VERSION=$DEVKIT_VS_VERSION
31666    TOOLCHAIN_VERSION=$VS_VERSION
31667    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31668    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31669    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31670    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31671    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31672    VS_PATH="$TOOLCHAIN_PATH:$PATH"
31673
31674    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31675    # can still be exported as INCLUDE for compiler invocations without
31676    # SYSROOT_CFLAGS
31677    OLDIFS="$IFS"
31678    IFS=";"
31679    for i in $DEVKIT_VS_INCLUDE; do
31680      ipath=$i
31681
31682  unix_path="$ipath"
31683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31684    windows_path=`$CYGPATH -m "$unix_path"`
31685    ipath="$windows_path"
31686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31687    windows_path=`cmd //c echo $unix_path`
31688    ipath="$windows_path"
31689  fi
31690
31691      VS_INCLUDE="$VS_INCLUDE;$ipath"
31692    done
31693    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31694    # as LIB for compiler invocations without SYSROOT_LDFLAGS
31695    for i in $DEVKIT_VS_LIB; do
31696      libpath=$i
31697
31698  unix_path="$libpath"
31699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31700    windows_path=`$CYGPATH -m "$unix_path"`
31701    libpath="$windows_path"
31702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31703    windows_path=`cmd //c echo $unix_path`
31704    libpath="$windows_path"
31705  fi
31706
31707      VS_LIB="$VS_LIB;$libpath"
31708    done
31709    IFS="$OLDIFS"
31710
31711    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31712$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31713
31714  elif test "x$with_toolchain_version" != x; then
31715    # User override; check that it is valid
31716    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31717      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31718$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31719      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31720$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31721      as_fn_error $? "Cannot continue." "$LINENO" 5
31722    fi
31723    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31724  else
31725    # No flag given, use default
31726    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31727  fi
31728
31729  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31730
31731  VS_VERSION="$VS_VERSION"
31732  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31733  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31734  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31735  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31736
31737  # When using --with-tools-dir, assume it points to the correct and default
31738  # version of Visual Studio or that --with-toolchain-version was also set.
31739  if test "x$with_tools_dir" != x; then
31740
31741  if test "x$VS_ENV_CMD" = x; then
31742    VS_VERSION="${VS_VERSION}"
31743    VS_BASE="$with_tools_dir/../.."
31744    METHOD="--with-tools-dir"
31745
31746    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31747      VCVARSFILE="vc/bin/vcvars32.bat"
31748    else
31749      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31750    fi
31751
31752
31753  windows_path="$VS_BASE"
31754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31755    unix_path=`$CYGPATH -u "$windows_path"`
31756    VS_BASE="$unix_path"
31757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31758    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31759    VS_BASE="$unix_path"
31760  fi
31761
31762    if test -d "$VS_BASE"; then
31763      if test -f "$VS_BASE/$VCVARSFILE"; then
31764        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31765$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31766        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31767        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31768        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31769        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31770      else
31771        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31772$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31773        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31774$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31775      fi
31776    fi
31777  fi
31778
31779
31780  if test "x$VS_ENV_CMD" = x; then
31781    VS_VERSION="${VS_VERSION}"
31782    VS_BASE="$with_tools_dir/../../.."
31783    METHOD="--with-tools-dir"
31784
31785    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31786      VCVARSFILE="vc/bin/vcvars32.bat"
31787    else
31788      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31789    fi
31790
31791
31792  windows_path="$VS_BASE"
31793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31794    unix_path=`$CYGPATH -u "$windows_path"`
31795    VS_BASE="$unix_path"
31796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31798    VS_BASE="$unix_path"
31799  fi
31800
31801    if test -d "$VS_BASE"; then
31802      if test -f "$VS_BASE/$VCVARSFILE"; then
31803        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31804$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31805        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31806        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31807        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31808        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31809      else
31810        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31811$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31812        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31813$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31814      fi
31815    fi
31816  fi
31817
31818    if test "x$VS_ENV_CMD" = x; then
31819      # Having specified an argument which is incorrect will produce an instant failure;
31820      # we should not go on looking
31821      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31822$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31823      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31824$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31825      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31826$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31827      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31828    fi
31829  fi
31830
31831  VS_ENV_CMD=""
31832  VS_ENV_ARGS=""
31833
31834  if test "x$VS_COMNTOOLS" != x; then
31835
31836  if test "x$VS_ENV_CMD" = x; then
31837    VS_VERSION="${VS_VERSION}"
31838    VS_BASE="$VS_COMNTOOLS/../.."
31839    METHOD="$VS_COMNTOOLS_VAR variable"
31840
31841    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31842      VCVARSFILE="vc/bin/vcvars32.bat"
31843    else
31844      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31845    fi
31846
31847
31848  windows_path="$VS_BASE"
31849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31850    unix_path=`$CYGPATH -u "$windows_path"`
31851    VS_BASE="$unix_path"
31852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31853    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31854    VS_BASE="$unix_path"
31855  fi
31856
31857    if test -d "$VS_BASE"; then
31858      if test -f "$VS_BASE/$VCVARSFILE"; then
31859        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31860$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31861        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31862        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31863        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31864        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31865      else
31866        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31867$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31868        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31869$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31870      fi
31871    fi
31872  fi
31873
31874  fi
31875  if test "x$PROGRAMFILES" != x; then
31876
31877  if test "x$VS_ENV_CMD" = x; then
31878    VS_VERSION="${VS_VERSION}"
31879    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31880    METHOD="well-known name"
31881
31882    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31883      VCVARSFILE="vc/bin/vcvars32.bat"
31884    else
31885      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31886    fi
31887
31888
31889  windows_path="$VS_BASE"
31890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31891    unix_path=`$CYGPATH -u "$windows_path"`
31892    VS_BASE="$unix_path"
31893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31894    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31895    VS_BASE="$unix_path"
31896  fi
31897
31898    if test -d "$VS_BASE"; then
31899      if test -f "$VS_BASE/$VCVARSFILE"; then
31900        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31901$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31902        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31903        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31904        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31905        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31906      else
31907        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31908$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31909        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31910$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31911      fi
31912    fi
31913  fi
31914
31915  fi
31916  # Work around the insanely named ProgramFiles(x86) env variable
31917  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31918  if test "x$PROGRAMFILES_X86" != x; then
31919
31920  if test "x$VS_ENV_CMD" = x; then
31921    VS_VERSION="${VS_VERSION}"
31922    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31923    METHOD="well-known name"
31924
31925    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31926      VCVARSFILE="vc/bin/vcvars32.bat"
31927    else
31928      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31929    fi
31930
31931
31932  windows_path="$VS_BASE"
31933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31934    unix_path=`$CYGPATH -u "$windows_path"`
31935    VS_BASE="$unix_path"
31936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31938    VS_BASE="$unix_path"
31939  fi
31940
31941    if test -d "$VS_BASE"; then
31942      if test -f "$VS_BASE/$VCVARSFILE"; then
31943        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31944$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31945        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31946        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31947        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31948        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31949      else
31950        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31951$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31952        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31953$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31954      fi
31955    fi
31956  fi
31957
31958  fi
31959
31960  if test "x$VS_ENV_CMD" = x; then
31961    VS_VERSION="${VS_VERSION}"
31962    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31963    METHOD="well-known name"
31964
31965    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31966      VCVARSFILE="vc/bin/vcvars32.bat"
31967    else
31968      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31969    fi
31970
31971
31972  windows_path="$VS_BASE"
31973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31974    unix_path=`$CYGPATH -u "$windows_path"`
31975    VS_BASE="$unix_path"
31976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31977    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31978    VS_BASE="$unix_path"
31979  fi
31980
31981    if test -d "$VS_BASE"; then
31982      if test -f "$VS_BASE/$VCVARSFILE"; then
31983        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31984$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31985        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31986        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31987        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31988        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31989      else
31990        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31991$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31992        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31993$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31994      fi
31995    fi
31996  fi
31997
31998
31999  if test "x$VS_ENV_CMD" = x; then
32000    VS_VERSION="${VS_VERSION}"
32001    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
32002    METHOD="well-known name"
32003
32004    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32005      VCVARSFILE="vc/bin/vcvars32.bat"
32006    else
32007      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32008    fi
32009
32010
32011  windows_path="$VS_BASE"
32012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32013    unix_path=`$CYGPATH -u "$windows_path"`
32014    VS_BASE="$unix_path"
32015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32017    VS_BASE="$unix_path"
32018  fi
32019
32020    if test -d "$VS_BASE"; then
32021      if test -f "$VS_BASE/$VCVARSFILE"; then
32022        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32023$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32024        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32025        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32026        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32027        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32028      else
32029        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32030$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32031        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32032$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32033      fi
32034    fi
32035  fi
32036
32037
32038  if test "x$SDK_INSTALL_DIR" != x; then
32039    if test "x$ProgramW6432" != x; then
32040
32041  if test "x$VS_ENV_CMD" = x; then
32042    VS_VERSION="${VS_VERSION}"
32043    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
32044    METHOD="well-known name"
32045
32046  windows_path="$WIN_SDK_BASE"
32047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32048    unix_path=`$CYGPATH -u "$windows_path"`
32049    WIN_SDK_BASE="$unix_path"
32050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32051    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32052    WIN_SDK_BASE="$unix_path"
32053  fi
32054
32055    if test -d "$WIN_SDK_BASE"; then
32056      # There have been cases of partial or broken SDK installations. A missing
32057      # lib dir is not going to work.
32058      if test ! -d "$WIN_SDK_BASE/lib"; then
32059        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32060$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32061        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32062$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32063      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32064        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32065$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32066        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32067        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32068          VS_ENV_ARGS="/x86"
32069        else
32070          VS_ENV_ARGS="/x64"
32071        fi
32072        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32073        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32074        # TODO: improve detection for other versions of SDK
32075        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32076      else
32077        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32078$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32079        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32080$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32081      fi
32082    fi
32083  fi
32084
32085    fi
32086    if test "x$PROGRAMW6432" != x; then
32087
32088  if test "x$VS_ENV_CMD" = x; then
32089    VS_VERSION="${VS_VERSION}"
32090    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32091    METHOD="well-known name"
32092
32093  windows_path="$WIN_SDK_BASE"
32094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32095    unix_path=`$CYGPATH -u "$windows_path"`
32096    WIN_SDK_BASE="$unix_path"
32097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32098    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32099    WIN_SDK_BASE="$unix_path"
32100  fi
32101
32102    if test -d "$WIN_SDK_BASE"; then
32103      # There have been cases of partial or broken SDK installations. A missing
32104      # lib dir is not going to work.
32105      if test ! -d "$WIN_SDK_BASE/lib"; then
32106        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32107$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32108        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32109$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32110      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32111        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32112$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32113        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32114        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32115          VS_ENV_ARGS="/x86"
32116        else
32117          VS_ENV_ARGS="/x64"
32118        fi
32119        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32120        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32121        # TODO: improve detection for other versions of SDK
32122        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32123      else
32124        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32125$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32126        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32127$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32128      fi
32129    fi
32130  fi
32131
32132    fi
32133    if test "x$PROGRAMFILES" != x; then
32134
32135  if test "x$VS_ENV_CMD" = x; then
32136    VS_VERSION="${VS_VERSION}"
32137    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32138    METHOD="well-known name"
32139
32140  windows_path="$WIN_SDK_BASE"
32141  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32142    unix_path=`$CYGPATH -u "$windows_path"`
32143    WIN_SDK_BASE="$unix_path"
32144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32145    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32146    WIN_SDK_BASE="$unix_path"
32147  fi
32148
32149    if test -d "$WIN_SDK_BASE"; then
32150      # There have been cases of partial or broken SDK installations. A missing
32151      # lib dir is not going to work.
32152      if test ! -d "$WIN_SDK_BASE/lib"; then
32153        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32154$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32155        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32156$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32157      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32158        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32159$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32160        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32161        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32162          VS_ENV_ARGS="/x86"
32163        else
32164          VS_ENV_ARGS="/x64"
32165        fi
32166        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32167        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32168        # TODO: improve detection for other versions of SDK
32169        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32170      else
32171        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32172$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32173        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32174$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32175      fi
32176    fi
32177  fi
32178
32179    fi
32180
32181  if test "x$VS_ENV_CMD" = x; then
32182    VS_VERSION="${VS_VERSION}"
32183    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32184    METHOD="well-known name"
32185
32186  windows_path="$WIN_SDK_BASE"
32187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32188    unix_path=`$CYGPATH -u "$windows_path"`
32189    WIN_SDK_BASE="$unix_path"
32190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32192    WIN_SDK_BASE="$unix_path"
32193  fi
32194
32195    if test -d "$WIN_SDK_BASE"; then
32196      # There have been cases of partial or broken SDK installations. A missing
32197      # lib dir is not going to work.
32198      if test ! -d "$WIN_SDK_BASE/lib"; then
32199        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32200$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32201        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32202$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32203      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32204        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32205$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32206        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32207        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32208          VS_ENV_ARGS="/x86"
32209        else
32210          VS_ENV_ARGS="/x64"
32211        fi
32212        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32213        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32214        # TODO: improve detection for other versions of SDK
32215        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32216      else
32217        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32218$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32219        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32220$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32221      fi
32222    fi
32223  fi
32224
32225
32226  if test "x$VS_ENV_CMD" = x; then
32227    VS_VERSION="${VS_VERSION}"
32228    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32229    METHOD="well-known name"
32230
32231  windows_path="$WIN_SDK_BASE"
32232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32233    unix_path=`$CYGPATH -u "$windows_path"`
32234    WIN_SDK_BASE="$unix_path"
32235  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32236    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32237    WIN_SDK_BASE="$unix_path"
32238  fi
32239
32240    if test -d "$WIN_SDK_BASE"; then
32241      # There have been cases of partial or broken SDK installations. A missing
32242      # lib dir is not going to work.
32243      if test ! -d "$WIN_SDK_BASE/lib"; then
32244        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32245$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32246        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32247$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32248      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32249        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32250$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32251        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32252        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32253          VS_ENV_ARGS="/x86"
32254        else
32255          VS_ENV_ARGS="/x64"
32256        fi
32257        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32258        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32259        # TODO: improve detection for other versions of SDK
32260        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32261      else
32262        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32263$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32264        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32265$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32266      fi
32267    fi
32268  fi
32269
32270  fi
32271
32272    if test "x$VS_ENV_CMD" != x; then
32273      TOOLCHAIN_VERSION=$VS_VERSION
32274      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32275      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32276      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32277      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32278      # The rest of the variables are already evaled while probing
32279      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32280$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32281      break
32282    fi
32283  done
32284
32285
32286  # If we have a devkit, skip all of the below.
32287  if test "x$DEVKIT_VS_VERSION" = x; then
32288    if test "x$VS_ENV_CMD" != x; then
32289      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32290
32291  # Only process if variable expands to non-empty
32292
32293  if test "x$VS_ENV_CMD" != x; then
32294    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32295
32296  # First separate the path from the arguments. This will split at the first
32297  # space.
32298  complete="$VS_ENV_CMD"
32299  path="${complete%% *}"
32300  tmp="$complete EOL"
32301  arguments="${tmp#* }"
32302
32303  # Input might be given as Windows format, start by converting to
32304  # unix format.
32305  new_path=`$CYGPATH -u "$path"`
32306
32307  # Now try to locate executable using which
32308  new_path=`$WHICH "$new_path" 2> /dev/null`
32309  # bat and cmd files are not always considered executable in cygwin causing which
32310  # to not find them
32311  if test "x$new_path" = x \
32312      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32313      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32314    new_path=`$CYGPATH -u "$path"`
32315  fi
32316  if test "x$new_path" = x; then
32317    # Oops. Which didn't find the executable.
32318    # The splitting of arguments from the executable at a space might have been incorrect,
32319    # since paths with space are more likely in Windows. Give it another try with the whole
32320    # argument.
32321    path="$complete"
32322    arguments="EOL"
32323    new_path=`$CYGPATH -u "$path"`
32324    new_path=`$WHICH "$new_path" 2> /dev/null`
32325    # bat and cmd files are not always considered executable in cygwin causing which
32326    # to not find them
32327    if test "x$new_path" = x \
32328        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32329        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32330      new_path=`$CYGPATH -u "$path"`
32331    fi
32332    if test "x$new_path" = x; then
32333      # It's still not found. Now this is an unrecoverable error.
32334      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32335$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32336      has_space=`$ECHO "$complete" | $GREP " "`
32337      if test "x$has_space" != x; then
32338        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32339$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32340      fi
32341      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32342    fi
32343  fi
32344
32345  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32346  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32347  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32348  # "foo.exe" is OK but "foo" is an error.
32349  #
32350  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32351  # It is also a way to make sure we got the proper file name for the real test later on.
32352  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32353  if test "x$test_shortpath" = x; then
32354    # Short path failed, file does not exist as specified.
32355    # Try adding .exe or .cmd
32356    if test -f "${new_path}.exe"; then
32357      input_to_shortpath="${new_path}.exe"
32358    elif test -f "${new_path}.cmd"; then
32359      input_to_shortpath="${new_path}.cmd"
32360    else
32361      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32362$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32363      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32364$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32365      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32366    fi
32367  else
32368    input_to_shortpath="$new_path"
32369  fi
32370
32371  # Call helper function which possibly converts this using DOS-style short mode.
32372  # If so, the updated path is stored in $new_path.
32373  new_path="$input_to_shortpath"
32374
32375  input_path="$input_to_shortpath"
32376  # Check if we need to convert this using DOS-style short mode. If the path
32377  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32378  # take no chances and rewrite it.
32379  # Note: m4 eats our [], so we need to use [ and ] instead.
32380  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32381  if test "x$has_forbidden_chars" != x; then
32382    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32383    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32384    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32385    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32386      # Going to short mode and back again did indeed matter. Since short mode is
32387      # case insensitive, let's make it lowercase to improve readability.
32388      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32389      # Now convert it back to Unix-style (cygpath)
32390      input_path=`$CYGPATH -u "$shortmode_path"`
32391      new_path="$input_path"
32392    fi
32393  fi
32394
32395  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32396  if test "x$test_cygdrive_prefix" = x; then
32397    # As a simple fix, exclude /usr/bin since it's not a real path.
32398    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32399      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32400      # a path prefixed by /cygdrive for fixpath to work.
32401      new_path="$CYGWIN_ROOT_PATH$input_path"
32402    fi
32403  fi
32404
32405  # remove trailing .exe if any
32406  new_path="${new_path/%.exe/}"
32407
32408    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32409
32410  # First separate the path from the arguments. This will split at the first
32411  # space.
32412  complete="$VS_ENV_CMD"
32413  path="${complete%% *}"
32414  tmp="$complete EOL"
32415  arguments="${tmp#* }"
32416
32417  # Input might be given as Windows format, start by converting to
32418  # unix format.
32419  new_path="$path"
32420
32421  windows_path="$new_path"
32422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32423    unix_path=`$CYGPATH -u "$windows_path"`
32424    new_path="$unix_path"
32425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32427    new_path="$unix_path"
32428  fi
32429
32430
32431  # Now try to locate executable using which
32432  new_path=`$WHICH "$new_path" 2> /dev/null`
32433
32434  if test "x$new_path" = x; then
32435    # Oops. Which didn't find the executable.
32436    # The splitting of arguments from the executable at a space might have been incorrect,
32437    # since paths with space are more likely in Windows. Give it another try with the whole
32438    # argument.
32439    path="$complete"
32440    arguments="EOL"
32441    new_path="$path"
32442
32443  windows_path="$new_path"
32444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32445    unix_path=`$CYGPATH -u "$windows_path"`
32446    new_path="$unix_path"
32447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32449    new_path="$unix_path"
32450  fi
32451
32452
32453    new_path=`$WHICH "$new_path" 2> /dev/null`
32454    # bat and cmd files are not always considered executable in MSYS causing which
32455    # to not find them
32456    if test "x$new_path" = x \
32457        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32458        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32459      new_path="$path"
32460
32461  windows_path="$new_path"
32462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32463    unix_path=`$CYGPATH -u "$windows_path"`
32464    new_path="$unix_path"
32465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32467    new_path="$unix_path"
32468  fi
32469
32470    fi
32471
32472    if test "x$new_path" = x; then
32473      # It's still not found. Now this is an unrecoverable error.
32474      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32475$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32476      has_space=`$ECHO "$complete" | $GREP " "`
32477      if test "x$has_space" != x; then
32478        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32479$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32480      fi
32481      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32482    fi
32483  fi
32484
32485  # Now new_path has a complete unix path to the binary
32486  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32487    # Keep paths in /bin as-is, but remove trailing .exe if any
32488    new_path="${new_path/%.exe/}"
32489    # Do not save /bin paths to all_fixpath_prefixes!
32490  else
32491    # Not in mixed or Windows style, start by that.
32492    new_path=`cmd //c echo $new_path`
32493
32494  input_path="$new_path"
32495  # Check if we need to convert this using DOS-style short mode. If the path
32496  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32497  # take no chances and rewrite it.
32498  # Note: m4 eats our [], so we need to use [ and ] instead.
32499  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32500  if test "x$has_forbidden_chars" != x; then
32501    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32502    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32503  fi
32504
32505    # Output is in $new_path
32506
32507  windows_path="$new_path"
32508  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32509    unix_path=`$CYGPATH -u "$windows_path"`
32510    new_path="$unix_path"
32511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32512    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32513    new_path="$unix_path"
32514  fi
32515
32516    # remove trailing .exe if any
32517    new_path="${new_path/%.exe/}"
32518
32519    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32520    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32521  fi
32522
32523    else
32524      # We're on a unix platform. Hooray! :)
32525      # First separate the path from the arguments. This will split at the first
32526      # space.
32527      complete="$VS_ENV_CMD"
32528      path="${complete%% *}"
32529      tmp="$complete EOL"
32530      arguments="${tmp#* }"
32531
32532      # Cannot rely on the command "which" here since it doesn't always work.
32533      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32534      if test -z "$is_absolute_path"; then
32535        # Path to executable is not absolute. Find it.
32536        IFS_save="$IFS"
32537        IFS=:
32538        for p in $PATH; do
32539          if test -f "$p/$path" && test -x "$p/$path"; then
32540            new_path="$p/$path"
32541            break
32542          fi
32543        done
32544        IFS="$IFS_save"
32545      else
32546        # This is an absolute path, we can use it without further modifications.
32547        new_path="$path"
32548      fi
32549
32550      if test "x$new_path" = x; then
32551        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32552$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32553        has_space=`$ECHO "$complete" | $GREP " "`
32554        if test "x$has_space" != x; then
32555          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32556$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32557        fi
32558        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32559      fi
32560    fi
32561
32562    # Now join together the path and the arguments once again
32563    if test "x$arguments" != xEOL; then
32564      new_complete="$new_path ${arguments% *}"
32565    else
32566      new_complete="$new_path"
32567    fi
32568
32569    if test "x$complete" != "x$new_complete"; then
32570      VS_ENV_CMD="$new_complete"
32571      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32572$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32573    fi
32574  fi
32575
32576
32577      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32578      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32579$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32580
32581      # We need to create a couple of temporary files.
32582      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32583      $MKDIR -p $VS_ENV_TMP_DIR
32584
32585      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32586      # Instead create a shell script which will set the relevant variables when run.
32587      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32588
32589  unix_path="$WINPATH_VS_ENV_CMD"
32590  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32591    windows_path=`$CYGPATH -m "$unix_path"`
32592    WINPATH_VS_ENV_CMD="$windows_path"
32593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32594    windows_path=`cmd //c echo $unix_path`
32595    WINPATH_VS_ENV_CMD="$windows_path"
32596  fi
32597
32598      WINPATH_BASH="$BASH"
32599
32600  unix_path="$WINPATH_BASH"
32601  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32602    windows_path=`$CYGPATH -m "$unix_path"`
32603    WINPATH_BASH="$windows_path"
32604  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32605    windows_path=`cmd //c echo $unix_path`
32606    WINPATH_BASH="$windows_path"
32607  fi
32608
32609
32610      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32611      # script (executable by bash) that will setup the important variables.
32612      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32613      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32614      # This will end up something like:
32615      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32616      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32617      # These will end up something like:
32618      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32619      # The trailing space for everyone except PATH is no typo, but is needed due
32620      # to trailing \ in the Windows paths. These will be stripped later.
32621      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32622          >> $EXTRACT_VC_ENV_BAT_FILE
32623      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32624          >> $EXTRACT_VC_ENV_BAT_FILE
32625      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32626          >> $EXTRACT_VC_ENV_BAT_FILE
32627      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32628          >> $EXTRACT_VC_ENV_BAT_FILE
32629      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32630          >> $EXTRACT_VC_ENV_BAT_FILE
32631      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32632          >> $EXTRACT_VC_ENV_BAT_FILE
32633
32634      # Now execute the newly created bat file.
32635      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32636      # Change directory so we don't need to mess with Windows paths in redirects.
32637      cd $VS_ENV_TMP_DIR
32638      cmd /c extract-vs-env.bat | $CAT
32639      cd $CURDIR
32640
32641      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32642        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32643$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32644        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32645$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32646        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32647$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32648        as_fn_error $? "Cannot continue" "$LINENO" 5
32649      fi
32650
32651      # Now set all paths and other env variables. This will allow the rest of
32652      # the configure script to find and run the compiler in the proper way.
32653      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32654$as_echo "$as_me: Setting extracted environment variables" >&6;}
32655      . $VS_ENV_TMP_DIR/set-vs-env.sh
32656      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32657      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32658    else
32659      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32660      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32661$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32662    fi
32663  fi
32664
32665  # At this point, we should have correct variables in the environment, or we can't continue.
32666  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32667$as_echo_n "checking for Visual Studio variables... " >&6; }
32668
32669  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32670      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32671    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32672      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32673$as_echo "present but broken" >&6; }
32674      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32675    else
32676      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32677$as_echo "ok" >&6; }
32678      # Remove any trailing "\" ";" and " " from the variables.
32679      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32680      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32681      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32682      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32683      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32684      # Remove any paths containing # (typically F#) as that messes up make. This
32685      # is needed if visual studio was installed with F# support.
32686      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32687
32688
32689
32690
32691
32692      # Convert VS_INCLUDE into SYSROOT_CFLAGS
32693      OLDIFS="$IFS"
32694      IFS=";"
32695      for i in $VS_INCLUDE; do
32696        ipath=$i
32697        # Only process non-empty elements
32698        if test "x$ipath" != x; then
32699          IFS="$OLDIFS"
32700          # Check that directory exists before calling fixup_path
32701          testpath=$ipath
32702
32703  windows_path="$testpath"
32704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32705    unix_path=`$CYGPATH -u "$windows_path"`
32706    testpath="$unix_path"
32707  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32708    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32709    testpath="$unix_path"
32710  fi
32711
32712          if test -d "$testpath"; then
32713
32714  # Only process if variable expands to non-empty
32715
32716  if test "x$ipath" != x; then
32717    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32718
32719  # Input might be given as Windows format, start by converting to
32720  # unix format.
32721  path="$ipath"
32722  new_path=`$CYGPATH -u "$path"`
32723
32724  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32725  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32726  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32727  # "foo.exe" is OK but "foo" is an error.
32728  #
32729  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32730  # It is also a way to make sure we got the proper file name for the real test later on.
32731  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32732  if test "x$test_shortpath" = x; then
32733    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32734$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32735    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32736  fi
32737
32738  # Call helper function which possibly converts this using DOS-style short mode.
32739  # If so, the updated path is stored in $new_path.
32740
32741  input_path="$new_path"
32742  # Check if we need to convert this using DOS-style short mode. If the path
32743  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32744  # take no chances and rewrite it.
32745  # Note: m4 eats our [], so we need to use [ and ] instead.
32746  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32747  if test "x$has_forbidden_chars" != x; then
32748    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32749    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32750    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32751    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32752      # Going to short mode and back again did indeed matter. Since short mode is
32753      # case insensitive, let's make it lowercase to improve readability.
32754      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32755      # Now convert it back to Unix-style (cygpath)
32756      input_path=`$CYGPATH -u "$shortmode_path"`
32757      new_path="$input_path"
32758    fi
32759  fi
32760
32761  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32762  if test "x$test_cygdrive_prefix" = x; then
32763    # As a simple fix, exclude /usr/bin since it's not a real path.
32764    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32765      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32766      # a path prefixed by /cygdrive for fixpath to work.
32767      new_path="$CYGWIN_ROOT_PATH$input_path"
32768    fi
32769  fi
32770
32771
32772  if test "x$path" != "x$new_path"; then
32773    ipath="$new_path"
32774    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32775$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32776  fi
32777
32778    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32779
32780  path="$ipath"
32781  has_colon=`$ECHO $path | $GREP ^.:`
32782  new_path="$path"
32783  if test "x$has_colon" = x; then
32784    # Not in mixed or Windows style, start by that.
32785    new_path=`cmd //c echo $path`
32786  fi
32787
32788
32789  input_path="$new_path"
32790  # Check if we need to convert this using DOS-style short mode. If the path
32791  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32792  # take no chances and rewrite it.
32793  # Note: m4 eats our [], so we need to use [ and ] instead.
32794  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32795  if test "x$has_forbidden_chars" != x; then
32796    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32797    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32798  fi
32799
32800
32801  windows_path="$new_path"
32802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32803    unix_path=`$CYGPATH -u "$windows_path"`
32804    new_path="$unix_path"
32805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32806    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32807    new_path="$unix_path"
32808  fi
32809
32810  if test "x$path" != "x$new_path"; then
32811    ipath="$new_path"
32812    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32813$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32814  fi
32815
32816  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32817  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32818
32819    else
32820      # We're on a unix platform. Hooray! :)
32821      path="$ipath"
32822      has_space=`$ECHO "$path" | $GREP " "`
32823      if test "x$has_space" != x; then
32824        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32825$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32826        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32827      fi
32828
32829      # Use eval to expand a potential ~
32830      eval path="$path"
32831      if test ! -f "$path" && test ! -d "$path"; then
32832        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32833      fi
32834
32835      if test -d "$path"; then
32836        ipath="`cd "$path"; $THEPWDCMD -L`"
32837      else
32838        dir="`$DIRNAME "$path"`"
32839        base="`$BASENAME "$path"`"
32840        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32841      fi
32842    fi
32843  fi
32844
32845            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32846          fi
32847          IFS=";"
32848        fi
32849      done
32850      # Convert VS_LIB into SYSROOT_LDFLAGS
32851      for i in $VS_LIB; do
32852        libpath=$i
32853        # Only process non-empty elements
32854        if test "x$libpath" != x; then
32855          IFS="$OLDIFS"
32856          # Check that directory exists before calling fixup_path
32857          testpath=$libpath
32858
32859  windows_path="$testpath"
32860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32861    unix_path=`$CYGPATH -u "$windows_path"`
32862    testpath="$unix_path"
32863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32864    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32865    testpath="$unix_path"
32866  fi
32867
32868          if test -d "$testpath"; then
32869
32870  # Only process if variable expands to non-empty
32871
32872  if test "x$libpath" != x; then
32873    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32874
32875  # Input might be given as Windows format, start by converting to
32876  # unix format.
32877  path="$libpath"
32878  new_path=`$CYGPATH -u "$path"`
32879
32880  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32881  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32882  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32883  # "foo.exe" is OK but "foo" is an error.
32884  #
32885  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32886  # It is also a way to make sure we got the proper file name for the real test later on.
32887  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32888  if test "x$test_shortpath" = x; then
32889    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32890$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32891    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32892  fi
32893
32894  # Call helper function which possibly converts this using DOS-style short mode.
32895  # If so, the updated path is stored in $new_path.
32896
32897  input_path="$new_path"
32898  # Check if we need to convert this using DOS-style short mode. If the path
32899  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32900  # take no chances and rewrite it.
32901  # Note: m4 eats our [], so we need to use [ and ] instead.
32902  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32903  if test "x$has_forbidden_chars" != x; then
32904    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32905    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32906    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32907    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32908      # Going to short mode and back again did indeed matter. Since short mode is
32909      # case insensitive, let's make it lowercase to improve readability.
32910      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32911      # Now convert it back to Unix-style (cygpath)
32912      input_path=`$CYGPATH -u "$shortmode_path"`
32913      new_path="$input_path"
32914    fi
32915  fi
32916
32917  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32918  if test "x$test_cygdrive_prefix" = x; then
32919    # As a simple fix, exclude /usr/bin since it's not a real path.
32920    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32921      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32922      # a path prefixed by /cygdrive for fixpath to work.
32923      new_path="$CYGWIN_ROOT_PATH$input_path"
32924    fi
32925  fi
32926
32927
32928  if test "x$path" != "x$new_path"; then
32929    libpath="$new_path"
32930    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32931$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32932  fi
32933
32934    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32935
32936  path="$libpath"
32937  has_colon=`$ECHO $path | $GREP ^.:`
32938  new_path="$path"
32939  if test "x$has_colon" = x; then
32940    # Not in mixed or Windows style, start by that.
32941    new_path=`cmd //c echo $path`
32942  fi
32943
32944
32945  input_path="$new_path"
32946  # Check if we need to convert this using DOS-style short mode. If the path
32947  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32948  # take no chances and rewrite it.
32949  # Note: m4 eats our [], so we need to use [ and ] instead.
32950  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32951  if test "x$has_forbidden_chars" != x; then
32952    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32953    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32954  fi
32955
32956
32957  windows_path="$new_path"
32958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32959    unix_path=`$CYGPATH -u "$windows_path"`
32960    new_path="$unix_path"
32961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32963    new_path="$unix_path"
32964  fi
32965
32966  if test "x$path" != "x$new_path"; then
32967    libpath="$new_path"
32968    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32969$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32970  fi
32971
32972  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32973  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32974
32975    else
32976      # We're on a unix platform. Hooray! :)
32977      path="$libpath"
32978      has_space=`$ECHO "$path" | $GREP " "`
32979      if test "x$has_space" != x; then
32980        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32981$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32982        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32983      fi
32984
32985      # Use eval to expand a potential ~
32986      eval path="$path"
32987      if test ! -f "$path" && test ! -d "$path"; then
32988        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32989      fi
32990
32991      if test -d "$path"; then
32992        libpath="`cd "$path"; $THEPWDCMD -L`"
32993      else
32994        dir="`$DIRNAME "$path"`"
32995        base="`$BASENAME "$path"`"
32996        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32997      fi
32998    fi
32999  fi
33000
33001            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
33002          fi
33003          IFS=";"
33004        fi
33005      done
33006      IFS="$OLDIFS"
33007    fi
33008  else
33009    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33010$as_echo "not found" >&6; }
33011
33012    if test "x$VS_ENV_CMD" = x; then
33013      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
33014$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
33015      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
33016$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
33017    else
33018      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
33019$as_echo "$as_me: Running the extraction script failed." >&6;}
33020    fi
33021    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33022$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33023    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33024$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33025    as_fn_error $? "Cannot continue" "$LINENO" 5
33026  fi
33027
33028    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
33029    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
33030    PATH="$VS_PATH"
33031    # The microsoft toolchain also requires INCLUDE and LIB to be set.
33032    export INCLUDE="$VS_INCLUDE"
33033    export LIB="$VS_LIB"
33034  else
33035    if test "x$XCODE_VERSION_OUTPUT" != x; then
33036      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
33037      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
33038      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
33039    else
33040      # Currently we do not define this for other toolchains. This might change as the need arise.
33041      TOOLCHAIN_VERSION=
33042    fi
33043  fi
33044
33045
33046  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
33047  # override all other locations.
33048  if test "x$TOOLCHAIN_PATH" != x; then
33049    PATH=$TOOLCHAIN_PATH:$PATH
33050  fi
33051
33052
33053  #
33054  # Setup the compilers (CC and CXX)
33055  #
33056
33057  COMPILER_NAME=C
33058  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33059
33060  if test "x$CC" != x; then
33061    # User has supplied compiler name already, always let that override.
33062    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33063$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33064    if test "x`basename $CC`" = "x$CC"; then
33065      # A command without a complete path is provided, search $PATH.
33066
33067      for ac_prog in $CC
33068do
33069  # Extract the first word of "$ac_prog", so it can be a program name with args.
33070set dummy $ac_prog; ac_word=$2
33071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33072$as_echo_n "checking for $ac_word... " >&6; }
33073if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33074  $as_echo_n "(cached) " >&6
33075else
33076  case $POTENTIAL_CC in
33077  [\\/]* | ?:[\\/]*)
33078  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33079  ;;
33080  *)
33081  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33082for as_dir in $PATH
33083do
33084  IFS=$as_save_IFS
33085  test -z "$as_dir" && as_dir=.
33086    for ac_exec_ext in '' $ac_executable_extensions; do
33087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33088    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33090    break 2
33091  fi
33092done
33093  done
33094IFS=$as_save_IFS
33095
33096  ;;
33097esac
33098fi
33099POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33100if test -n "$POTENTIAL_CC"; then
33101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33102$as_echo "$POTENTIAL_CC" >&6; }
33103else
33104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33105$as_echo "no" >&6; }
33106fi
33107
33108
33109  test -n "$POTENTIAL_CC" && break
33110done
33111
33112      if test "x$POTENTIAL_CC" != x; then
33113        CC=$POTENTIAL_CC
33114      else
33115        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33116      fi
33117    else
33118      # Otherwise it might already be a complete path
33119      if test ! -x "$CC"; then
33120        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33121      fi
33122    fi
33123  else
33124    # No user supplied value. Locate compiler ourselves.
33125
33126    # If we are cross compiling, assume cross compilation tools follows the
33127    # cross compilation standard where they are prefixed with the autoconf
33128    # standard name for the target. For example the binary
33129    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33130    # If we are not cross compiling, then the default compiler name will be
33131    # used.
33132
33133    CC=
33134    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33135    # before checking the rest of the PATH.
33136    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33137    # step, this should not be necessary.
33138    if test -n "$TOOLCHAIN_PATH"; then
33139      PATH_save="$PATH"
33140      PATH="$TOOLCHAIN_PATH"
33141      if test -n "$ac_tool_prefix"; then
33142  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33143set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33145$as_echo_n "checking for $ac_word... " >&6; }
33146if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33147  $as_echo_n "(cached) " >&6
33148else
33149  case $TOOLCHAIN_PATH_CC in
33150  [\\/]* | ?:[\\/]*)
33151  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33152  ;;
33153  *)
33154  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33155for as_dir in $PATH
33156do
33157  IFS=$as_save_IFS
33158  test -z "$as_dir" && as_dir=.
33159    for ac_exec_ext in '' $ac_executable_extensions; do
33160  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33161    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33162    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33163    break 2
33164  fi
33165done
33166  done
33167IFS=$as_save_IFS
33168
33169  ;;
33170esac
33171fi
33172TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33173if test -n "$TOOLCHAIN_PATH_CC"; then
33174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33175$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33176else
33177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33178$as_echo "no" >&6; }
33179fi
33180
33181
33182fi
33183if test -z "$ac_cv_path_TOOLCHAIN_PATH_CC"; then
33184  ac_pt_TOOLCHAIN_PATH_CC=$TOOLCHAIN_PATH_CC
33185  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33186set dummy $SEARCH_LIST; ac_word=$2
33187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33188$as_echo_n "checking for $ac_word... " >&6; }
33189if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC+:} false; then :
33190  $as_echo_n "(cached) " >&6
33191else
33192  case $ac_pt_TOOLCHAIN_PATH_CC in
33193  [\\/]* | ?:[\\/]*)
33194  ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$ac_pt_TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33195  ;;
33196  *)
33197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33198for as_dir in $PATH
33199do
33200  IFS=$as_save_IFS
33201  test -z "$as_dir" && as_dir=.
33202    for ac_exec_ext in '' $ac_executable_extensions; do
33203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33204    ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33206    break 2
33207  fi
33208done
33209  done
33210IFS=$as_save_IFS
33211
33212  ;;
33213esac
33214fi
33215ac_pt_TOOLCHAIN_PATH_CC=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC
33216if test -n "$ac_pt_TOOLCHAIN_PATH_CC"; then
33217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CC" >&5
33218$as_echo "$ac_pt_TOOLCHAIN_PATH_CC" >&6; }
33219else
33220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33221$as_echo "no" >&6; }
33222fi
33223
33224  if test "x$ac_pt_TOOLCHAIN_PATH_CC" = x; then
33225    TOOLCHAIN_PATH_CC=""
33226  else
33227    case $cross_compiling:$ac_tool_warned in
33228yes:)
33229{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33230$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33231ac_tool_warned=yes ;;
33232esac
33233    TOOLCHAIN_PATH_CC=$ac_pt_TOOLCHAIN_PATH_CC
33234  fi
33235else
33236  TOOLCHAIN_PATH_CC="$ac_cv_path_TOOLCHAIN_PATH_CC"
33237fi
33238
33239      CC=$TOOLCHAIN_PATH_CC
33240      PATH="$PATH_save"
33241    fi
33242
33243    # AC_PATH_TOOL can't be run multiple times with the same variable,
33244    # so create a new name for this run.
33245    if test "x$CC" = x; then
33246      if test -n "$ac_tool_prefix"; then
33247  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33248set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33250$as_echo_n "checking for $ac_word... " >&6; }
33251if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33252  $as_echo_n "(cached) " >&6
33253else
33254  case $POTENTIAL_CC in
33255  [\\/]* | ?:[\\/]*)
33256  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33257  ;;
33258  *)
33259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33260for as_dir in $PATH
33261do
33262  IFS=$as_save_IFS
33263  test -z "$as_dir" && as_dir=.
33264    for ac_exec_ext in '' $ac_executable_extensions; do
33265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33266    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33268    break 2
33269  fi
33270done
33271  done
33272IFS=$as_save_IFS
33273
33274  ;;
33275esac
33276fi
33277POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33278if test -n "$POTENTIAL_CC"; then
33279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33280$as_echo "$POTENTIAL_CC" >&6; }
33281else
33282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33283$as_echo "no" >&6; }
33284fi
33285
33286
33287fi
33288if test -z "$ac_cv_path_POTENTIAL_CC"; then
33289  ac_pt_POTENTIAL_CC=$POTENTIAL_CC
33290  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33291set dummy $SEARCH_LIST; ac_word=$2
33292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33293$as_echo_n "checking for $ac_word... " >&6; }
33294if ${ac_cv_path_ac_pt_POTENTIAL_CC+:} false; then :
33295  $as_echo_n "(cached) " >&6
33296else
33297  case $ac_pt_POTENTIAL_CC in
33298  [\\/]* | ?:[\\/]*)
33299  ac_cv_path_ac_pt_POTENTIAL_CC="$ac_pt_POTENTIAL_CC" # Let the user override the test with a path.
33300  ;;
33301  *)
33302  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33303for as_dir in $PATH
33304do
33305  IFS=$as_save_IFS
33306  test -z "$as_dir" && as_dir=.
33307    for ac_exec_ext in '' $ac_executable_extensions; do
33308  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33309    ac_cv_path_ac_pt_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33311    break 2
33312  fi
33313done
33314  done
33315IFS=$as_save_IFS
33316
33317  ;;
33318esac
33319fi
33320ac_pt_POTENTIAL_CC=$ac_cv_path_ac_pt_POTENTIAL_CC
33321if test -n "$ac_pt_POTENTIAL_CC"; then
33322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CC" >&5
33323$as_echo "$ac_pt_POTENTIAL_CC" >&6; }
33324else
33325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33326$as_echo "no" >&6; }
33327fi
33328
33329  if test "x$ac_pt_POTENTIAL_CC" = x; then
33330    POTENTIAL_CC=""
33331  else
33332    case $cross_compiling:$ac_tool_warned in
33333yes:)
33334{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33335$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33336ac_tool_warned=yes ;;
33337esac
33338    POTENTIAL_CC=$ac_pt_POTENTIAL_CC
33339  fi
33340else
33341  POTENTIAL_CC="$ac_cv_path_POTENTIAL_CC"
33342fi
33343
33344      CC=$POTENTIAL_CC
33345    fi
33346
33347    if test "x$CC" = x; then
33348
33349  # Print a helpful message on how to acquire the necessary build dependency.
33350  # devkit is the help tag: freetype, cups, alsa etc
33351  MISSING_DEPENDENCY=devkit
33352
33353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33354    cygwin_help $MISSING_DEPENDENCY
33355  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33356    msys_help $MISSING_DEPENDENCY
33357  else
33358    PKGHANDLER_COMMAND=
33359
33360    case $PKGHANDLER in
33361      apt-get)
33362        apt_help     $MISSING_DEPENDENCY ;;
33363      yum)
33364        yum_help     $MISSING_DEPENDENCY ;;
33365      brew)
33366        brew_help    $MISSING_DEPENDENCY ;;
33367      port)
33368        port_help    $MISSING_DEPENDENCY ;;
33369      pkgutil)
33370        pkgutil_help $MISSING_DEPENDENCY ;;
33371      pkgadd)
33372        pkgadd_help  $MISSING_DEPENDENCY ;;
33373    esac
33374
33375    if test "x$PKGHANDLER_COMMAND" != x; then
33376      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33377    fi
33378  fi
33379
33380      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33381    fi
33382  fi
33383
33384  # Now we have a compiler binary in CC. Make sure it's okay.
33385
33386  # Only process if variable expands to non-empty
33387
33388  if test "x$CC" != x; then
33389    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33390
33391  # First separate the path from the arguments. This will split at the first
33392  # space.
33393  complete="$CC"
33394  path="${complete%% *}"
33395  tmp="$complete EOL"
33396  arguments="${tmp#* }"
33397
33398  # Input might be given as Windows format, start by converting to
33399  # unix format.
33400  new_path=`$CYGPATH -u "$path"`
33401
33402  # Now try to locate executable using which
33403  new_path=`$WHICH "$new_path" 2> /dev/null`
33404  # bat and cmd files are not always considered executable in cygwin causing which
33405  # to not find them
33406  if test "x$new_path" = x \
33407      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33408      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33409    new_path=`$CYGPATH -u "$path"`
33410  fi
33411  if test "x$new_path" = x; then
33412    # Oops. Which didn't find the executable.
33413    # The splitting of arguments from the executable at a space might have been incorrect,
33414    # since paths with space are more likely in Windows. Give it another try with the whole
33415    # argument.
33416    path="$complete"
33417    arguments="EOL"
33418    new_path=`$CYGPATH -u "$path"`
33419    new_path=`$WHICH "$new_path" 2> /dev/null`
33420    # bat and cmd files are not always considered executable in cygwin causing which
33421    # to not find them
33422    if test "x$new_path" = x \
33423        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33424        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33425      new_path=`$CYGPATH -u "$path"`
33426    fi
33427    if test "x$new_path" = x; then
33428      # It's still not found. Now this is an unrecoverable error.
33429      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33430$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33431      has_space=`$ECHO "$complete" | $GREP " "`
33432      if test "x$has_space" != x; then
33433        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33434$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33435      fi
33436      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33437    fi
33438  fi
33439
33440  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33441  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33442  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33443  # "foo.exe" is OK but "foo" is an error.
33444  #
33445  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33446  # It is also a way to make sure we got the proper file name for the real test later on.
33447  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33448  if test "x$test_shortpath" = x; then
33449    # Short path failed, file does not exist as specified.
33450    # Try adding .exe or .cmd
33451    if test -f "${new_path}.exe"; then
33452      input_to_shortpath="${new_path}.exe"
33453    elif test -f "${new_path}.cmd"; then
33454      input_to_shortpath="${new_path}.cmd"
33455    else
33456      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33457$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33458      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33459$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33460      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33461    fi
33462  else
33463    input_to_shortpath="$new_path"
33464  fi
33465
33466  # Call helper function which possibly converts this using DOS-style short mode.
33467  # If so, the updated path is stored in $new_path.
33468  new_path="$input_to_shortpath"
33469
33470  input_path="$input_to_shortpath"
33471  # Check if we need to convert this using DOS-style short mode. If the path
33472  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33473  # take no chances and rewrite it.
33474  # Note: m4 eats our [], so we need to use [ and ] instead.
33475  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33476  if test "x$has_forbidden_chars" != x; then
33477    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33478    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33479    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33480    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33481      # Going to short mode and back again did indeed matter. Since short mode is
33482      # case insensitive, let's make it lowercase to improve readability.
33483      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33484      # Now convert it back to Unix-style (cygpath)
33485      input_path=`$CYGPATH -u "$shortmode_path"`
33486      new_path="$input_path"
33487    fi
33488  fi
33489
33490  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33491  if test "x$test_cygdrive_prefix" = x; then
33492    # As a simple fix, exclude /usr/bin since it's not a real path.
33493    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33494      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33495      # a path prefixed by /cygdrive for fixpath to work.
33496      new_path="$CYGWIN_ROOT_PATH$input_path"
33497    fi
33498  fi
33499
33500  # remove trailing .exe if any
33501  new_path="${new_path/%.exe/}"
33502
33503    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33504
33505  # First separate the path from the arguments. This will split at the first
33506  # space.
33507  complete="$CC"
33508  path="${complete%% *}"
33509  tmp="$complete EOL"
33510  arguments="${tmp#* }"
33511
33512  # Input might be given as Windows format, start by converting to
33513  # unix format.
33514  new_path="$path"
33515
33516  windows_path="$new_path"
33517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33518    unix_path=`$CYGPATH -u "$windows_path"`
33519    new_path="$unix_path"
33520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33521    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33522    new_path="$unix_path"
33523  fi
33524
33525
33526  # Now try to locate executable using which
33527  new_path=`$WHICH "$new_path" 2> /dev/null`
33528
33529  if test "x$new_path" = x; then
33530    # Oops. Which didn't find the executable.
33531    # The splitting of arguments from the executable at a space might have been incorrect,
33532    # since paths with space are more likely in Windows. Give it another try with the whole
33533    # argument.
33534    path="$complete"
33535    arguments="EOL"
33536    new_path="$path"
33537
33538  windows_path="$new_path"
33539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33540    unix_path=`$CYGPATH -u "$windows_path"`
33541    new_path="$unix_path"
33542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33544    new_path="$unix_path"
33545  fi
33546
33547
33548    new_path=`$WHICH "$new_path" 2> /dev/null`
33549    # bat and cmd files are not always considered executable in MSYS causing which
33550    # to not find them
33551    if test "x$new_path" = x \
33552        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33553        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33554      new_path="$path"
33555
33556  windows_path="$new_path"
33557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33558    unix_path=`$CYGPATH -u "$windows_path"`
33559    new_path="$unix_path"
33560  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33561    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33562    new_path="$unix_path"
33563  fi
33564
33565    fi
33566
33567    if test "x$new_path" = x; then
33568      # It's still not found. Now this is an unrecoverable error.
33569      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33570$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33571      has_space=`$ECHO "$complete" | $GREP " "`
33572      if test "x$has_space" != x; then
33573        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33574$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33575      fi
33576      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33577    fi
33578  fi
33579
33580  # Now new_path has a complete unix path to the binary
33581  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33582    # Keep paths in /bin as-is, but remove trailing .exe if any
33583    new_path="${new_path/%.exe/}"
33584    # Do not save /bin paths to all_fixpath_prefixes!
33585  else
33586    # Not in mixed or Windows style, start by that.
33587    new_path=`cmd //c echo $new_path`
33588
33589  input_path="$new_path"
33590  # Check if we need to convert this using DOS-style short mode. If the path
33591  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33592  # take no chances and rewrite it.
33593  # Note: m4 eats our [], so we need to use [ and ] instead.
33594  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33595  if test "x$has_forbidden_chars" != x; then
33596    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33597    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33598  fi
33599
33600    # Output is in $new_path
33601
33602  windows_path="$new_path"
33603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33604    unix_path=`$CYGPATH -u "$windows_path"`
33605    new_path="$unix_path"
33606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33607    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33608    new_path="$unix_path"
33609  fi
33610
33611    # remove trailing .exe if any
33612    new_path="${new_path/%.exe/}"
33613
33614    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33615    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33616  fi
33617
33618    else
33619      # We're on a unix platform. Hooray! :)
33620      # First separate the path from the arguments. This will split at the first
33621      # space.
33622      complete="$CC"
33623      path="${complete%% *}"
33624      tmp="$complete EOL"
33625      arguments="${tmp#* }"
33626
33627      # Cannot rely on the command "which" here since it doesn't always work.
33628      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33629      if test -z "$is_absolute_path"; then
33630        # Path to executable is not absolute. Find it.
33631        IFS_save="$IFS"
33632        IFS=:
33633        for p in $PATH; do
33634          if test -f "$p/$path" && test -x "$p/$path"; then
33635            new_path="$p/$path"
33636            break
33637          fi
33638        done
33639        IFS="$IFS_save"
33640      else
33641        # This is an absolute path, we can use it without further modifications.
33642        new_path="$path"
33643      fi
33644
33645      if test "x$new_path" = x; then
33646        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33647$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33648        has_space=`$ECHO "$complete" | $GREP " "`
33649        if test "x$has_space" != x; then
33650          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33651$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33652        fi
33653        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33654      fi
33655    fi
33656
33657    # Now join together the path and the arguments once again
33658    if test "x$arguments" != xEOL; then
33659      new_complete="$new_path ${arguments% *}"
33660    else
33661      new_complete="$new_path"
33662    fi
33663
33664    if test "x$complete" != "x$new_complete"; then
33665      CC="$new_complete"
33666      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33667$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33668    fi
33669  fi
33670
33671  TEST_COMPILER="$CC"
33672
33673  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33674$as_echo_n "checking resolved symbolic links for CC... " >&6; }
33675  SYMLINK_ORIGINAL="$TEST_COMPILER"
33676
33677  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33678    # Follow a chain of symbolic links. Use readlink
33679    # where it exists, else fall back to horribly
33680    # complicated shell code.
33681    if test "x$READLINK_TESTED" != yes; then
33682      # On MacOSX there is a readlink tool with a different
33683      # purpose than the GNU readlink tool. Check the found readlink.
33684      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33685      if test "x$ISGNU" = x; then
33686        # A readlink that we do not know how to use.
33687        # Are there other non-GNU readlinks out there?
33688        READLINK_TESTED=yes
33689        READLINK=
33690      fi
33691    fi
33692
33693    if test "x$READLINK" != x; then
33694      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33695    else
33696      # Save the current directory for restoring afterwards
33697      STARTDIR=$PWD
33698      COUNTER=0
33699      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33700      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33701      cd $sym_link_dir
33702      # Use -P flag to resolve symlinks in directories.
33703      cd `$THEPWDCMD -P`
33704      sym_link_dir=`$THEPWDCMD -P`
33705      # Resolve file symlinks
33706      while test $COUNTER -lt 20; do
33707        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33708        if test "x$ISLINK" == x; then
33709          # This is not a symbolic link! We are done!
33710          break
33711        fi
33712        # Again resolve directory symlinks since the target of the just found
33713        # link could be in a different directory
33714        cd `$DIRNAME $ISLINK`
33715        sym_link_dir=`$THEPWDCMD -P`
33716        sym_link_file=`$BASENAME $ISLINK`
33717        let COUNTER=COUNTER+1
33718      done
33719      cd $STARTDIR
33720      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33721    fi
33722  fi
33723
33724  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33725    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33726$as_echo "no symlink" >&6; }
33727  else
33728    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33729$as_echo "$SYMLINK_ORIGINAL" >&6; }
33730
33731    # We can't handle ccache by gcc wrappers, since we need to know if we're
33732    # using ccache. Instead ccache usage must be controlled by a configure option.
33733    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33734    if test "x$COMPILER_BASENAME" = "xccache"; then
33735      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33736$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33737      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33738    fi
33739  fi
33740
33741
33742  COMPILER=$CC
33743  COMPILER_NAME=$COMPILER_NAME
33744
33745  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33746    # cc -V output typically looks like
33747    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33748    # or
33749    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
33750    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33751    # Check that this is likely to be the Solaris Studio cc.
33752    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
33753    if test $? -ne 0; then
33754      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33755      { $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
33756$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33757      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33758$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33759      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33760$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33761      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33762    fi
33763    # Remove usage instructions (if present), and
33764    # collapse compiler output into a single line
33765    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33766        $SED -e 's/ *[Uu]sage:.*//'`
33767    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33768        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33769  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33770    # xlc -qversion output typically looks like
33771    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33772    #     Version: 11.01.0000.0015
33773    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33774    # Check that this is likely to be the IBM XL C compiler.
33775    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33776    if test $? -ne 0; then
33777      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33778      { $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
33779$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33780      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33781$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33782      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33783$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33784      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33785    fi
33786    # Collapse compiler output into a single line
33787    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33788    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33789        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33790  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33791    # There is no specific version flag, but all output starts with a version string.
33792    # First line typically looks something like:
33793    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33794    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33795    # Check that this is likely to be Microsoft CL.EXE.
33796    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33797    if test $? -ne 0; then
33798      { $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
33799$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33800      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33801$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33802      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33803    fi
33804    # Collapse compiler output into a single line
33805    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33806    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33807        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33808  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33809    # gcc --version output typically looks like
33810    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33811    #     Copyright (C) 2013 Free Software Foundation, Inc.
33812    #     This is free software; see the source for copying conditions.  There is NO
33813    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33814    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33815    # Check that this is likely to be GCC.
33816    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33817    if test $? -ne 0; then
33818      { $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
33819$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33820      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33821$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33822      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33823    fi
33824    # Remove Copyright and legalese from version string, and
33825    # collapse into a single line
33826    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33827        $SED -e 's/ *Copyright .*//'`
33828    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33829        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33830  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33831    # clang --version output typically looks like
33832    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33833    #    clang version 3.3 (tags/RELEASE_33/final)
33834    # or
33835    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33836    #    Target: x86_64-pc-linux-gnu
33837    #    Thread model: posix
33838    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33839    # Check that this is likely to be clang
33840    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33841    if test $? -ne 0; then
33842      { $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
33843$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33844      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33845$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33846      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33847    fi
33848    # Collapse compiler output into a single line
33849    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33850    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33851        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33852  else
33853      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33854  fi
33855  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33856  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33857  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33858  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33859
33860  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33861$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33862
33863
33864  # Now that we have resolved CC ourself, let autoconf have its go at it
33865  ac_ext=c
33866ac_cpp='$CPP $CPPFLAGS'
33867ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33868ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33869ac_compiler_gnu=$ac_cv_c_compiler_gnu
33870if test -n "$ac_tool_prefix"; then
33871  for ac_prog in $CC
33872  do
33873    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33874set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33876$as_echo_n "checking for $ac_word... " >&6; }
33877if ${ac_cv_prog_CC+:} false; then :
33878  $as_echo_n "(cached) " >&6
33879else
33880  if test -n "$CC"; then
33881  ac_cv_prog_CC="$CC" # Let the user override the test.
33882else
33883as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33884for as_dir in $PATH
33885do
33886  IFS=$as_save_IFS
33887  test -z "$as_dir" && as_dir=.
33888    for ac_exec_ext in '' $ac_executable_extensions; do
33889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33890    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33892    break 2
33893  fi
33894done
33895  done
33896IFS=$as_save_IFS
33897
33898fi
33899fi
33900CC=$ac_cv_prog_CC
33901if test -n "$CC"; then
33902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33903$as_echo "$CC" >&6; }
33904else
33905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33906$as_echo "no" >&6; }
33907fi
33908
33909
33910    test -n "$CC" && break
33911  done
33912fi
33913if test -z "$CC"; then
33914  ac_ct_CC=$CC
33915  for ac_prog in $CC
33916do
33917  # Extract the first word of "$ac_prog", so it can be a program name with args.
33918set dummy $ac_prog; ac_word=$2
33919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33920$as_echo_n "checking for $ac_word... " >&6; }
33921if ${ac_cv_prog_ac_ct_CC+:} false; then :
33922  $as_echo_n "(cached) " >&6
33923else
33924  if test -n "$ac_ct_CC"; then
33925  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33926else
33927as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33928for as_dir in $PATH
33929do
33930  IFS=$as_save_IFS
33931  test -z "$as_dir" && as_dir=.
33932    for ac_exec_ext in '' $ac_executable_extensions; do
33933  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33934    ac_cv_prog_ac_ct_CC="$ac_prog"
33935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33936    break 2
33937  fi
33938done
33939  done
33940IFS=$as_save_IFS
33941
33942fi
33943fi
33944ac_ct_CC=$ac_cv_prog_ac_ct_CC
33945if test -n "$ac_ct_CC"; then
33946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33947$as_echo "$ac_ct_CC" >&6; }
33948else
33949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33950$as_echo "no" >&6; }
33951fi
33952
33953
33954  test -n "$ac_ct_CC" && break
33955done
33956
33957  if test "x$ac_ct_CC" = x; then
33958    CC=""
33959  else
33960    case $cross_compiling:$ac_tool_warned in
33961yes:)
33962{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33963$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33964ac_tool_warned=yes ;;
33965esac
33966    CC=$ac_ct_CC
33967  fi
33968fi
33969
33970
33971test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33972$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33973as_fn_error $? "no acceptable C compiler found in \$PATH
33974See \`config.log' for more details" "$LINENO" 5; }
33975
33976# Provide some information about the compiler.
33977$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33978set X $ac_compile
33979ac_compiler=$2
33980for ac_option in --version -v -V -qversion; do
33981  { { ac_try="$ac_compiler $ac_option >&5"
33982case "(($ac_try" in
33983  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33984  *) ac_try_echo=$ac_try;;
33985esac
33986eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33987$as_echo "$ac_try_echo"; } >&5
33988  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33989  ac_status=$?
33990  if test -s conftest.err; then
33991    sed '10a\
33992... rest of stderr output deleted ...
33993         10q' conftest.err >conftest.er1
33994    cat conftest.er1 >&5
33995  fi
33996  rm -f conftest.er1 conftest.err
33997  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33998  test $ac_status = 0; }
33999done
34000
34001cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34002/* end confdefs.h.  */
34003
34004int
34005main ()
34006{
34007
34008  ;
34009  return 0;
34010}
34011_ACEOF
34012ac_clean_files_save=$ac_clean_files
34013ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
34014# Try to create an executable without -o first, disregard a.out.
34015# It will help us diagnose broken compilers, and finding out an intuition
34016# of exeext.
34017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
34018$as_echo_n "checking whether the C compiler works... " >&6; }
34019ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
34020
34021# The possible output files:
34022ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
34023
34024ac_rmfiles=
34025for ac_file in $ac_files
34026do
34027  case $ac_file in
34028    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34029    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
34030  esac
34031done
34032rm -f $ac_rmfiles
34033
34034if { { ac_try="$ac_link_default"
34035case "(($ac_try" in
34036  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34037  *) ac_try_echo=$ac_try;;
34038esac
34039eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34040$as_echo "$ac_try_echo"; } >&5
34041  (eval "$ac_link_default") 2>&5
34042  ac_status=$?
34043  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34044  test $ac_status = 0; }; then :
34045  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
34046# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
34047# in a Makefile.  We should not override ac_cv_exeext if it was cached,
34048# so that the user can short-circuit this test for compilers unknown to
34049# Autoconf.
34050for ac_file in $ac_files ''
34051do
34052  test -f "$ac_file" || continue
34053  case $ac_file in
34054    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
34055	;;
34056    [ab].out )
34057	# We found the default executable, but exeext='' is most
34058	# certainly right.
34059	break;;
34060    *.* )
34061	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
34062	then :; else
34063	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34064	fi
34065	# We set ac_cv_exeext here because the later test for it is not
34066	# safe: cross compilers may not add the suffix if given an `-o'
34067	# argument, so we may need to know it at that point already.
34068	# Even if this section looks crufty: it has the advantage of
34069	# actually working.
34070	break;;
34071    * )
34072	break;;
34073  esac
34074done
34075test "$ac_cv_exeext" = no && ac_cv_exeext=
34076
34077else
34078  ac_file=''
34079fi
34080if test -z "$ac_file"; then :
34081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34082$as_echo "no" >&6; }
34083$as_echo "$as_me: failed program was:" >&5
34084sed 's/^/| /' conftest.$ac_ext >&5
34085
34086{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34087$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34088as_fn_error 77 "C compiler cannot create executables
34089See \`config.log' for more details" "$LINENO" 5; }
34090else
34091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34092$as_echo "yes" >&6; }
34093fi
34094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
34095$as_echo_n "checking for C compiler default output file name... " >&6; }
34096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
34097$as_echo "$ac_file" >&6; }
34098ac_exeext=$ac_cv_exeext
34099
34100rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
34101ac_clean_files=$ac_clean_files_save
34102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
34103$as_echo_n "checking for suffix of executables... " >&6; }
34104if { { ac_try="$ac_link"
34105case "(($ac_try" in
34106  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34107  *) ac_try_echo=$ac_try;;
34108esac
34109eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34110$as_echo "$ac_try_echo"; } >&5
34111  (eval "$ac_link") 2>&5
34112  ac_status=$?
34113  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34114  test $ac_status = 0; }; then :
34115  # If both `conftest.exe' and `conftest' are `present' (well, observable)
34116# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
34117# work properly (i.e., refer to `conftest.exe'), while it won't with
34118# `rm'.
34119for ac_file in conftest.exe conftest conftest.*; do
34120  test -f "$ac_file" || continue
34121  case $ac_file in
34122    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34123    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34124	  break;;
34125    * ) break;;
34126  esac
34127done
34128else
34129  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34130$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34131as_fn_error $? "cannot compute suffix of executables: cannot compile and link
34132See \`config.log' for more details" "$LINENO" 5; }
34133fi
34134rm -f conftest conftest$ac_cv_exeext
34135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
34136$as_echo "$ac_cv_exeext" >&6; }
34137
34138rm -f conftest.$ac_ext
34139EXEEXT=$ac_cv_exeext
34140ac_exeext=$EXEEXT
34141cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34142/* end confdefs.h.  */
34143#include <stdio.h>
34144int
34145main ()
34146{
34147FILE *f = fopen ("conftest.out", "w");
34148 return ferror (f) || fclose (f) != 0;
34149
34150  ;
34151  return 0;
34152}
34153_ACEOF
34154ac_clean_files="$ac_clean_files conftest.out"
34155# Check that the compiler produces executables we can run.  If not, either
34156# the compiler is broken, or we cross compile.
34157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34158$as_echo_n "checking whether we are cross compiling... " >&6; }
34159if test "$cross_compiling" != yes; then
34160  { { ac_try="$ac_link"
34161case "(($ac_try" in
34162  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34163  *) ac_try_echo=$ac_try;;
34164esac
34165eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34166$as_echo "$ac_try_echo"; } >&5
34167  (eval "$ac_link") 2>&5
34168  ac_status=$?
34169  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34170  test $ac_status = 0; }
34171  if { ac_try='./conftest$ac_cv_exeext'
34172  { { case "(($ac_try" in
34173  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34174  *) ac_try_echo=$ac_try;;
34175esac
34176eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34177$as_echo "$ac_try_echo"; } >&5
34178  (eval "$ac_try") 2>&5
34179  ac_status=$?
34180  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34181  test $ac_status = 0; }; }; then
34182    cross_compiling=no
34183  else
34184    if test "$cross_compiling" = maybe; then
34185	cross_compiling=yes
34186    else
34187	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34188$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34189as_fn_error $? "cannot run C compiled programs.
34190If you meant to cross compile, use \`--host'.
34191See \`config.log' for more details" "$LINENO" 5; }
34192    fi
34193  fi
34194fi
34195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34196$as_echo "$cross_compiling" >&6; }
34197
34198rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34199ac_clean_files=$ac_clean_files_save
34200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34201$as_echo_n "checking for suffix of object files... " >&6; }
34202if ${ac_cv_objext+:} false; then :
34203  $as_echo_n "(cached) " >&6
34204else
34205  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34206/* end confdefs.h.  */
34207
34208int
34209main ()
34210{
34211
34212  ;
34213  return 0;
34214}
34215_ACEOF
34216rm -f conftest.o conftest.obj
34217if { { ac_try="$ac_compile"
34218case "(($ac_try" in
34219  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34220  *) ac_try_echo=$ac_try;;
34221esac
34222eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34223$as_echo "$ac_try_echo"; } >&5
34224  (eval "$ac_compile") 2>&5
34225  ac_status=$?
34226  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34227  test $ac_status = 0; }; then :
34228  for ac_file in conftest.o conftest.obj conftest.*; do
34229  test -f "$ac_file" || continue;
34230  case $ac_file in
34231    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34232    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34233       break;;
34234  esac
34235done
34236else
34237  $as_echo "$as_me: failed program was:" >&5
34238sed 's/^/| /' conftest.$ac_ext >&5
34239
34240{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34241$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34242as_fn_error $? "cannot compute suffix of object files: cannot compile
34243See \`config.log' for more details" "$LINENO" 5; }
34244fi
34245rm -f conftest.$ac_cv_objext conftest.$ac_ext
34246fi
34247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34248$as_echo "$ac_cv_objext" >&6; }
34249OBJEXT=$ac_cv_objext
34250ac_objext=$OBJEXT
34251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34252$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34253if ${ac_cv_c_compiler_gnu+:} false; then :
34254  $as_echo_n "(cached) " >&6
34255else
34256  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34257/* end confdefs.h.  */
34258
34259int
34260main ()
34261{
34262#ifndef __GNUC__
34263       choke me
34264#endif
34265
34266  ;
34267  return 0;
34268}
34269_ACEOF
34270if ac_fn_c_try_compile "$LINENO"; then :
34271  ac_compiler_gnu=yes
34272else
34273  ac_compiler_gnu=no
34274fi
34275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34276ac_cv_c_compiler_gnu=$ac_compiler_gnu
34277
34278fi
34279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34280$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34281if test $ac_compiler_gnu = yes; then
34282  GCC=yes
34283else
34284  GCC=
34285fi
34286ac_test_CFLAGS=${CFLAGS+set}
34287ac_save_CFLAGS=$CFLAGS
34288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34289$as_echo_n "checking whether $CC accepts -g... " >&6; }
34290if ${ac_cv_prog_cc_g+:} false; then :
34291  $as_echo_n "(cached) " >&6
34292else
34293  ac_save_c_werror_flag=$ac_c_werror_flag
34294   ac_c_werror_flag=yes
34295   ac_cv_prog_cc_g=no
34296   CFLAGS="-g"
34297   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34298/* end confdefs.h.  */
34299
34300int
34301main ()
34302{
34303
34304  ;
34305  return 0;
34306}
34307_ACEOF
34308if ac_fn_c_try_compile "$LINENO"; then :
34309  ac_cv_prog_cc_g=yes
34310else
34311  CFLAGS=""
34312      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34313/* end confdefs.h.  */
34314
34315int
34316main ()
34317{
34318
34319  ;
34320  return 0;
34321}
34322_ACEOF
34323if ac_fn_c_try_compile "$LINENO"; then :
34324
34325else
34326  ac_c_werror_flag=$ac_save_c_werror_flag
34327	 CFLAGS="-g"
34328	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34329/* end confdefs.h.  */
34330
34331int
34332main ()
34333{
34334
34335  ;
34336  return 0;
34337}
34338_ACEOF
34339if ac_fn_c_try_compile "$LINENO"; then :
34340  ac_cv_prog_cc_g=yes
34341fi
34342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34343fi
34344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34345fi
34346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34347   ac_c_werror_flag=$ac_save_c_werror_flag
34348fi
34349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34350$as_echo "$ac_cv_prog_cc_g" >&6; }
34351if test "$ac_test_CFLAGS" = set; then
34352  CFLAGS=$ac_save_CFLAGS
34353elif test $ac_cv_prog_cc_g = yes; then
34354  if test "$GCC" = yes; then
34355    CFLAGS="-g -O2"
34356  else
34357    CFLAGS="-g"
34358  fi
34359else
34360  if test "$GCC" = yes; then
34361    CFLAGS="-O2"
34362  else
34363    CFLAGS=
34364  fi
34365fi
34366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34367$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34368if ${ac_cv_prog_cc_c89+:} false; then :
34369  $as_echo_n "(cached) " >&6
34370else
34371  ac_cv_prog_cc_c89=no
34372ac_save_CC=$CC
34373cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34374/* end confdefs.h.  */
34375#include <stdarg.h>
34376#include <stdio.h>
34377struct stat;
34378/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34379struct buf { int x; };
34380FILE * (*rcsopen) (struct buf *, struct stat *, int);
34381static char *e (p, i)
34382     char **p;
34383     int i;
34384{
34385  return p[i];
34386}
34387static char *f (char * (*g) (char **, int), char **p, ...)
34388{
34389  char *s;
34390  va_list v;
34391  va_start (v,p);
34392  s = g (p, va_arg (v,int));
34393  va_end (v);
34394  return s;
34395}
34396
34397/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34398   function prototypes and stuff, but not '\xHH' hex character constants.
34399   These don't provoke an error unfortunately, instead are silently treated
34400   as 'x'.  The following induces an error, until -std is added to get
34401   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34402   array size at least.  It's necessary to write '\x00'==0 to get something
34403   that's true only with -std.  */
34404int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34405
34406/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34407   inside strings and character constants.  */
34408#define FOO(x) 'x'
34409int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34410
34411int test (int i, double x);
34412struct s1 {int (*f) (int a);};
34413struct s2 {int (*f) (double a);};
34414int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34415int argc;
34416char **argv;
34417int
34418main ()
34419{
34420return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34421  ;
34422  return 0;
34423}
34424_ACEOF
34425for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34426	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34427do
34428  CC="$ac_save_CC $ac_arg"
34429  if ac_fn_c_try_compile "$LINENO"; then :
34430  ac_cv_prog_cc_c89=$ac_arg
34431fi
34432rm -f core conftest.err conftest.$ac_objext
34433  test "x$ac_cv_prog_cc_c89" != "xno" && break
34434done
34435rm -f conftest.$ac_ext
34436CC=$ac_save_CC
34437
34438fi
34439# AC_CACHE_VAL
34440case "x$ac_cv_prog_cc_c89" in
34441  x)
34442    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34443$as_echo "none needed" >&6; } ;;
34444  xno)
34445    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34446$as_echo "unsupported" >&6; } ;;
34447  *)
34448    CC="$CC $ac_cv_prog_cc_c89"
34449    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34450$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34451esac
34452if test "x$ac_cv_prog_cc_c89" != xno; then :
34453
34454fi
34455
34456ac_ext=cpp
34457ac_cpp='$CXXCPP $CPPFLAGS'
34458ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34459ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34460ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34461
34462
34463
34464  COMPILER_NAME=C++
34465  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34466
34467  if test "x$CXX" != x; then
34468    # User has supplied compiler name already, always let that override.
34469    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34470$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34471    if test "x`basename $CXX`" = "x$CXX"; then
34472      # A command without a complete path is provided, search $PATH.
34473
34474      for ac_prog in $CXX
34475do
34476  # Extract the first word of "$ac_prog", so it can be a program name with args.
34477set dummy $ac_prog; ac_word=$2
34478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34479$as_echo_n "checking for $ac_word... " >&6; }
34480if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34481  $as_echo_n "(cached) " >&6
34482else
34483  case $POTENTIAL_CXX in
34484  [\\/]* | ?:[\\/]*)
34485  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34486  ;;
34487  *)
34488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34489for as_dir in $PATH
34490do
34491  IFS=$as_save_IFS
34492  test -z "$as_dir" && as_dir=.
34493    for ac_exec_ext in '' $ac_executable_extensions; do
34494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34495    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34497    break 2
34498  fi
34499done
34500  done
34501IFS=$as_save_IFS
34502
34503  ;;
34504esac
34505fi
34506POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34507if test -n "$POTENTIAL_CXX"; then
34508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34509$as_echo "$POTENTIAL_CXX" >&6; }
34510else
34511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34512$as_echo "no" >&6; }
34513fi
34514
34515
34516  test -n "$POTENTIAL_CXX" && break
34517done
34518
34519      if test "x$POTENTIAL_CXX" != x; then
34520        CXX=$POTENTIAL_CXX
34521      else
34522        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
34523      fi
34524    else
34525      # Otherwise it might already be a complete path
34526      if test ! -x "$CXX"; then
34527        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
34528      fi
34529    fi
34530  else
34531    # No user supplied value. Locate compiler ourselves.
34532
34533    # If we are cross compiling, assume cross compilation tools follows the
34534    # cross compilation standard where they are prefixed with the autoconf
34535    # standard name for the target. For example the binary
34536    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
34537    # If we are not cross compiling, then the default compiler name will be
34538    # used.
34539
34540    CXX=
34541    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
34542    # before checking the rest of the PATH.
34543    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
34544    # step, this should not be necessary.
34545    if test -n "$TOOLCHAIN_PATH"; then
34546      PATH_save="$PATH"
34547      PATH="$TOOLCHAIN_PATH"
34548      if test -n "$ac_tool_prefix"; then
34549  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
34550set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
34551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34552$as_echo_n "checking for $ac_word... " >&6; }
34553if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
34554  $as_echo_n "(cached) " >&6
34555else
34556  case $TOOLCHAIN_PATH_CXX in
34557  [\\/]* | ?:[\\/]*)
34558  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34559  ;;
34560  *)
34561  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34562for as_dir in $PATH
34563do
34564  IFS=$as_save_IFS
34565  test -z "$as_dir" && as_dir=.
34566    for ac_exec_ext in '' $ac_executable_extensions; do
34567  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34568    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34569    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34570    break 2
34571  fi
34572done
34573  done
34574IFS=$as_save_IFS
34575
34576  ;;
34577esac
34578fi
34579TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
34580if test -n "$TOOLCHAIN_PATH_CXX"; then
34581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
34582$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
34583else
34584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34585$as_echo "no" >&6; }
34586fi
34587
34588
34589fi
34590if test -z "$ac_cv_path_TOOLCHAIN_PATH_CXX"; then
34591  ac_pt_TOOLCHAIN_PATH_CXX=$TOOLCHAIN_PATH_CXX
34592  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
34593set dummy $SEARCH_LIST; ac_word=$2
34594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34595$as_echo_n "checking for $ac_word... " >&6; }
34596if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX+:} false; then :
34597  $as_echo_n "(cached) " >&6
34598else
34599  case $ac_pt_TOOLCHAIN_PATH_CXX in
34600  [\\/]* | ?:[\\/]*)
34601  ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$ac_pt_TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34602  ;;
34603  *)
34604  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34605for as_dir in $PATH
34606do
34607  IFS=$as_save_IFS
34608  test -z "$as_dir" && as_dir=.
34609    for ac_exec_ext in '' $ac_executable_extensions; do
34610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34611    ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34613    break 2
34614  fi
34615done
34616  done
34617IFS=$as_save_IFS
34618
34619  ;;
34620esac
34621fi
34622ac_pt_TOOLCHAIN_PATH_CXX=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX
34623if test -n "$ac_pt_TOOLCHAIN_PATH_CXX"; then
34624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CXX" >&5
34625$as_echo "$ac_pt_TOOLCHAIN_PATH_CXX" >&6; }
34626else
34627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34628$as_echo "no" >&6; }
34629fi
34630
34631  if test "x$ac_pt_TOOLCHAIN_PATH_CXX" = x; then
34632    TOOLCHAIN_PATH_CXX=""
34633  else
34634    case $cross_compiling:$ac_tool_warned in
34635yes:)
34636{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34637$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34638ac_tool_warned=yes ;;
34639esac
34640    TOOLCHAIN_PATH_CXX=$ac_pt_TOOLCHAIN_PATH_CXX
34641  fi
34642else
34643  TOOLCHAIN_PATH_CXX="$ac_cv_path_TOOLCHAIN_PATH_CXX"
34644fi
34645
34646      CXX=$TOOLCHAIN_PATH_CXX
34647      PATH="$PATH_save"
34648    fi
34649
34650    # AC_PATH_TOOL can't be run multiple times with the same variable,
34651    # so create a new name for this run.
34652    if test "x$CXX" = x; then
34653      if test -n "$ac_tool_prefix"; then
34654  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
34655set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
34656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34657$as_echo_n "checking for $ac_word... " >&6; }
34658if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34659  $as_echo_n "(cached) " >&6
34660else
34661  case $POTENTIAL_CXX in
34662  [\\/]* | ?:[\\/]*)
34663  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34664  ;;
34665  *)
34666  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34667for as_dir in $PATH
34668do
34669  IFS=$as_save_IFS
34670  test -z "$as_dir" && as_dir=.
34671    for ac_exec_ext in '' $ac_executable_extensions; do
34672  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34673    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34674    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34675    break 2
34676  fi
34677done
34678  done
34679IFS=$as_save_IFS
34680
34681  ;;
34682esac
34683fi
34684POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34685if test -n "$POTENTIAL_CXX"; then
34686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34687$as_echo "$POTENTIAL_CXX" >&6; }
34688else
34689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34690$as_echo "no" >&6; }
34691fi
34692
34693
34694fi
34695if test -z "$ac_cv_path_POTENTIAL_CXX"; then
34696  ac_pt_POTENTIAL_CXX=$POTENTIAL_CXX
34697  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
34698set dummy $SEARCH_LIST; ac_word=$2
34699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34700$as_echo_n "checking for $ac_word... " >&6; }
34701if ${ac_cv_path_ac_pt_POTENTIAL_CXX+:} false; then :
34702  $as_echo_n "(cached) " >&6
34703else
34704  case $ac_pt_POTENTIAL_CXX in
34705  [\\/]* | ?:[\\/]*)
34706  ac_cv_path_ac_pt_POTENTIAL_CXX="$ac_pt_POTENTIAL_CXX" # Let the user override the test with a path.
34707  ;;
34708  *)
34709  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34710for as_dir in $PATH
34711do
34712  IFS=$as_save_IFS
34713  test -z "$as_dir" && as_dir=.
34714    for ac_exec_ext in '' $ac_executable_extensions; do
34715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34716    ac_cv_path_ac_pt_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34718    break 2
34719  fi
34720done
34721  done
34722IFS=$as_save_IFS
34723
34724  ;;
34725esac
34726fi
34727ac_pt_POTENTIAL_CXX=$ac_cv_path_ac_pt_POTENTIAL_CXX
34728if test -n "$ac_pt_POTENTIAL_CXX"; then
34729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CXX" >&5
34730$as_echo "$ac_pt_POTENTIAL_CXX" >&6; }
34731else
34732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34733$as_echo "no" >&6; }
34734fi
34735
34736  if test "x$ac_pt_POTENTIAL_CXX" = x; then
34737    POTENTIAL_CXX=""
34738  else
34739    case $cross_compiling:$ac_tool_warned in
34740yes:)
34741{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34742$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34743ac_tool_warned=yes ;;
34744esac
34745    POTENTIAL_CXX=$ac_pt_POTENTIAL_CXX
34746  fi
34747else
34748  POTENTIAL_CXX="$ac_cv_path_POTENTIAL_CXX"
34749fi
34750
34751      CXX=$POTENTIAL_CXX
34752    fi
34753
34754    if test "x$CXX" = x; then
34755
34756  # Print a helpful message on how to acquire the necessary build dependency.
34757  # devkit is the help tag: freetype, cups, alsa etc
34758  MISSING_DEPENDENCY=devkit
34759
34760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34761    cygwin_help $MISSING_DEPENDENCY
34762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34763    msys_help $MISSING_DEPENDENCY
34764  else
34765    PKGHANDLER_COMMAND=
34766
34767    case $PKGHANDLER in
34768      apt-get)
34769        apt_help     $MISSING_DEPENDENCY ;;
34770      yum)
34771        yum_help     $MISSING_DEPENDENCY ;;
34772      brew)
34773        brew_help    $MISSING_DEPENDENCY ;;
34774      port)
34775        port_help    $MISSING_DEPENDENCY ;;
34776      pkgutil)
34777        pkgutil_help $MISSING_DEPENDENCY ;;
34778      pkgadd)
34779        pkgadd_help  $MISSING_DEPENDENCY ;;
34780    esac
34781
34782    if test "x$PKGHANDLER_COMMAND" != x; then
34783      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34784    fi
34785  fi
34786
34787      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34788    fi
34789  fi
34790
34791  # Now we have a compiler binary in CXX. Make sure it's okay.
34792
34793  # Only process if variable expands to non-empty
34794
34795  if test "x$CXX" != x; then
34796    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34797
34798  # First separate the path from the arguments. This will split at the first
34799  # space.
34800  complete="$CXX"
34801  path="${complete%% *}"
34802  tmp="$complete EOL"
34803  arguments="${tmp#* }"
34804
34805  # Input might be given as Windows format, start by converting to
34806  # unix format.
34807  new_path=`$CYGPATH -u "$path"`
34808
34809  # Now try to locate executable using which
34810  new_path=`$WHICH "$new_path" 2> /dev/null`
34811  # bat and cmd files are not always considered executable in cygwin causing which
34812  # to not find them
34813  if test "x$new_path" = x \
34814      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34815      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34816    new_path=`$CYGPATH -u "$path"`
34817  fi
34818  if test "x$new_path" = x; then
34819    # Oops. Which didn't find the executable.
34820    # The splitting of arguments from the executable at a space might have been incorrect,
34821    # since paths with space are more likely in Windows. Give it another try with the whole
34822    # argument.
34823    path="$complete"
34824    arguments="EOL"
34825    new_path=`$CYGPATH -u "$path"`
34826    new_path=`$WHICH "$new_path" 2> /dev/null`
34827    # bat and cmd files are not always considered executable in cygwin causing which
34828    # to not find them
34829    if test "x$new_path" = x \
34830        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34831        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34832      new_path=`$CYGPATH -u "$path"`
34833    fi
34834    if test "x$new_path" = x; then
34835      # It's still not found. Now this is an unrecoverable error.
34836      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34837$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34838      has_space=`$ECHO "$complete" | $GREP " "`
34839      if test "x$has_space" != x; then
34840        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34841$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34842      fi
34843      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34844    fi
34845  fi
34846
34847  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34848  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34849  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34850  # "foo.exe" is OK but "foo" is an error.
34851  #
34852  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34853  # It is also a way to make sure we got the proper file name for the real test later on.
34854  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34855  if test "x$test_shortpath" = x; then
34856    # Short path failed, file does not exist as specified.
34857    # Try adding .exe or .cmd
34858    if test -f "${new_path}.exe"; then
34859      input_to_shortpath="${new_path}.exe"
34860    elif test -f "${new_path}.cmd"; then
34861      input_to_shortpath="${new_path}.cmd"
34862    else
34863      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34864$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34865      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34866$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34867      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34868    fi
34869  else
34870    input_to_shortpath="$new_path"
34871  fi
34872
34873  # Call helper function which possibly converts this using DOS-style short mode.
34874  # If so, the updated path is stored in $new_path.
34875  new_path="$input_to_shortpath"
34876
34877  input_path="$input_to_shortpath"
34878  # Check if we need to convert this using DOS-style short mode. If the path
34879  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34880  # take no chances and rewrite it.
34881  # Note: m4 eats our [], so we need to use [ and ] instead.
34882  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34883  if test "x$has_forbidden_chars" != x; then
34884    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34885    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34886    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34887    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34888      # Going to short mode and back again did indeed matter. Since short mode is
34889      # case insensitive, let's make it lowercase to improve readability.
34890      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34891      # Now convert it back to Unix-style (cygpath)
34892      input_path=`$CYGPATH -u "$shortmode_path"`
34893      new_path="$input_path"
34894    fi
34895  fi
34896
34897  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34898  if test "x$test_cygdrive_prefix" = x; then
34899    # As a simple fix, exclude /usr/bin since it's not a real path.
34900    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34901      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34902      # a path prefixed by /cygdrive for fixpath to work.
34903      new_path="$CYGWIN_ROOT_PATH$input_path"
34904    fi
34905  fi
34906
34907  # remove trailing .exe if any
34908  new_path="${new_path/%.exe/}"
34909
34910    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34911
34912  # First separate the path from the arguments. This will split at the first
34913  # space.
34914  complete="$CXX"
34915  path="${complete%% *}"
34916  tmp="$complete EOL"
34917  arguments="${tmp#* }"
34918
34919  # Input might be given as Windows format, start by converting to
34920  # unix format.
34921  new_path="$path"
34922
34923  windows_path="$new_path"
34924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34925    unix_path=`$CYGPATH -u "$windows_path"`
34926    new_path="$unix_path"
34927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34929    new_path="$unix_path"
34930  fi
34931
34932
34933  # Now try to locate executable using which
34934  new_path=`$WHICH "$new_path" 2> /dev/null`
34935
34936  if test "x$new_path" = x; then
34937    # Oops. Which didn't find the executable.
34938    # The splitting of arguments from the executable at a space might have been incorrect,
34939    # since paths with space are more likely in Windows. Give it another try with the whole
34940    # argument.
34941    path="$complete"
34942    arguments="EOL"
34943    new_path="$path"
34944
34945  windows_path="$new_path"
34946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34947    unix_path=`$CYGPATH -u "$windows_path"`
34948    new_path="$unix_path"
34949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34951    new_path="$unix_path"
34952  fi
34953
34954
34955    new_path=`$WHICH "$new_path" 2> /dev/null`
34956    # bat and cmd files are not always considered executable in MSYS causing which
34957    # to not find them
34958    if test "x$new_path" = x \
34959        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34960        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34961      new_path="$path"
34962
34963  windows_path="$new_path"
34964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34965    unix_path=`$CYGPATH -u "$windows_path"`
34966    new_path="$unix_path"
34967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34968    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34969    new_path="$unix_path"
34970  fi
34971
34972    fi
34973
34974    if test "x$new_path" = x; then
34975      # It's still not found. Now this is an unrecoverable error.
34976      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34977$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34978      has_space=`$ECHO "$complete" | $GREP " "`
34979      if test "x$has_space" != x; then
34980        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34981$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34982      fi
34983      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34984    fi
34985  fi
34986
34987  # Now new_path has a complete unix path to the binary
34988  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34989    # Keep paths in /bin as-is, but remove trailing .exe if any
34990    new_path="${new_path/%.exe/}"
34991    # Do not save /bin paths to all_fixpath_prefixes!
34992  else
34993    # Not in mixed or Windows style, start by that.
34994    new_path=`cmd //c echo $new_path`
34995
34996  input_path="$new_path"
34997  # Check if we need to convert this using DOS-style short mode. If the path
34998  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34999  # take no chances and rewrite it.
35000  # Note: m4 eats our [], so we need to use [ and ] instead.
35001  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35002  if test "x$has_forbidden_chars" != x; then
35003    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35004    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35005  fi
35006
35007    # Output is in $new_path
35008
35009  windows_path="$new_path"
35010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35011    unix_path=`$CYGPATH -u "$windows_path"`
35012    new_path="$unix_path"
35013  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35014    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35015    new_path="$unix_path"
35016  fi
35017
35018    # remove trailing .exe if any
35019    new_path="${new_path/%.exe/}"
35020
35021    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35022    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35023  fi
35024
35025    else
35026      # We're on a unix platform. Hooray! :)
35027      # First separate the path from the arguments. This will split at the first
35028      # space.
35029      complete="$CXX"
35030      path="${complete%% *}"
35031      tmp="$complete EOL"
35032      arguments="${tmp#* }"
35033
35034      # Cannot rely on the command "which" here since it doesn't always work.
35035      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35036      if test -z "$is_absolute_path"; then
35037        # Path to executable is not absolute. Find it.
35038        IFS_save="$IFS"
35039        IFS=:
35040        for p in $PATH; do
35041          if test -f "$p/$path" && test -x "$p/$path"; then
35042            new_path="$p/$path"
35043            break
35044          fi
35045        done
35046        IFS="$IFS_save"
35047      else
35048        # This is an absolute path, we can use it without further modifications.
35049        new_path="$path"
35050      fi
35051
35052      if test "x$new_path" = x; then
35053        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35054$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35055        has_space=`$ECHO "$complete" | $GREP " "`
35056        if test "x$has_space" != x; then
35057          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35058$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35059        fi
35060        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35061      fi
35062    fi
35063
35064    # Now join together the path and the arguments once again
35065    if test "x$arguments" != xEOL; then
35066      new_complete="$new_path ${arguments% *}"
35067    else
35068      new_complete="$new_path"
35069    fi
35070
35071    if test "x$complete" != "x$new_complete"; then
35072      CXX="$new_complete"
35073      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
35074$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
35075    fi
35076  fi
35077
35078  TEST_COMPILER="$CXX"
35079
35080  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
35081$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
35082  SYMLINK_ORIGINAL="$TEST_COMPILER"
35083
35084  if test "x$OPENJDK_BUILD_OS" != xwindows; then
35085    # Follow a chain of symbolic links. Use readlink
35086    # where it exists, else fall back to horribly
35087    # complicated shell code.
35088    if test "x$READLINK_TESTED" != yes; then
35089      # On MacOSX there is a readlink tool with a different
35090      # purpose than the GNU readlink tool. Check the found readlink.
35091      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
35092      if test "x$ISGNU" = x; then
35093        # A readlink that we do not know how to use.
35094        # Are there other non-GNU readlinks out there?
35095        READLINK_TESTED=yes
35096        READLINK=
35097      fi
35098    fi
35099
35100    if test "x$READLINK" != x; then
35101      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
35102    else
35103      # Save the current directory for restoring afterwards
35104      STARTDIR=$PWD
35105      COUNTER=0
35106      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
35107      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
35108      cd $sym_link_dir
35109      # Use -P flag to resolve symlinks in directories.
35110      cd `$THEPWDCMD -P`
35111      sym_link_dir=`$THEPWDCMD -P`
35112      # Resolve file symlinks
35113      while test $COUNTER -lt 20; do
35114        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
35115        if test "x$ISLINK" == x; then
35116          # This is not a symbolic link! We are done!
35117          break
35118        fi
35119        # Again resolve directory symlinks since the target of the just found
35120        # link could be in a different directory
35121        cd `$DIRNAME $ISLINK`
35122        sym_link_dir=`$THEPWDCMD -P`
35123        sym_link_file=`$BASENAME $ISLINK`
35124        let COUNTER=COUNTER+1
35125      done
35126      cd $STARTDIR
35127      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
35128    fi
35129  fi
35130
35131  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
35132    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
35133$as_echo "no symlink" >&6; }
35134  else
35135    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
35136$as_echo "$SYMLINK_ORIGINAL" >&6; }
35137
35138    # We can't handle ccache by gcc wrappers, since we need to know if we're
35139    # using ccache. Instead ccache usage must be controlled by a configure option.
35140    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
35141    if test "x$COMPILER_BASENAME" = "xccache"; then
35142      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
35143$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
35144      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
35145    fi
35146  fi
35147
35148
35149  COMPILER=$CXX
35150  COMPILER_NAME=$COMPILER_NAME
35151
35152  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
35153    # cc -V output typically looks like
35154    #     cc: Sun C 5.12 Linux_i386 2011/11/16
35155    # or
35156    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
35157    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
35158    # Check that this is likely to be the Solaris Studio cc.
35159    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
35160    if test $? -ne 0; then
35161      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35162      { $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
35163$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35164      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35165$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35166      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35167$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35168      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35169    fi
35170    # Remove usage instructions (if present), and
35171    # collapse compiler output into a single line
35172    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35173        $SED -e 's/ *[Uu]sage:.*//'`
35174    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35175        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
35176  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
35177    # xlc -qversion output typically looks like
35178    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
35179    #     Version: 11.01.0000.0015
35180    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
35181    # Check that this is likely to be the IBM XL C compiler.
35182    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
35183    if test $? -ne 0; then
35184      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35185      { $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
35186$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35187      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35188$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35189      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35190$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35191      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35192    fi
35193    # Collapse compiler output into a single line
35194    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35195    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35196        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
35197  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35198    # There is no specific version flag, but all output starts with a version string.
35199    # First line typically looks something like:
35200    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
35201    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
35202    # Check that this is likely to be Microsoft CL.EXE.
35203    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
35204    if test $? -ne 0; then
35205      { $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
35206$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35207      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35208$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35209      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35210    fi
35211    # Collapse compiler output into a single line
35212    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35213    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35214        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
35215  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
35216    # gcc --version output typically looks like
35217    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
35218    #     Copyright (C) 2013 Free Software Foundation, Inc.
35219    #     This is free software; see the source for copying conditions.  There is NO
35220    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
35221    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35222    # Check that this is likely to be GCC.
35223    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
35224    if test $? -ne 0; then
35225      { $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
35226$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35227      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
35228$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
35229      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35230    fi
35231    # Remove Copyright and legalese from version string, and
35232    # collapse into a single line
35233    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35234        $SED -e 's/ *Copyright .*//'`
35235    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35236        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
35237  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
35238    # clang --version output typically looks like
35239    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
35240    #    clang version 3.3 (tags/RELEASE_33/final)
35241    # or
35242    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
35243    #    Target: x86_64-pc-linux-gnu
35244    #    Thread model: posix
35245    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35246    # Check that this is likely to be clang
35247    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
35248    if test $? -ne 0; then
35249      { $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
35250$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35251      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35252$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35253      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35254    fi
35255    # Collapse compiler output into a single line
35256    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35257    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35258        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
35259  else
35260      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
35261  fi
35262  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
35263  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
35264  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
35265  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
35266
35267  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
35268$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
35269
35270
35271  # Now that we have resolved CXX ourself, let autoconf have its go at it
35272  ac_ext=cpp
35273ac_cpp='$CXXCPP $CPPFLAGS'
35274ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35275ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35276ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35277if test -z "$CXX"; then
35278  if test -n "$CCC"; then
35279    CXX=$CCC
35280  else
35281    if test -n "$ac_tool_prefix"; then
35282  for ac_prog in $CXX
35283  do
35284    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35285set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35287$as_echo_n "checking for $ac_word... " >&6; }
35288if ${ac_cv_prog_CXX+:} false; then :
35289  $as_echo_n "(cached) " >&6
35290else
35291  if test -n "$CXX"; then
35292  ac_cv_prog_CXX="$CXX" # Let the user override the test.
35293else
35294as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35295for as_dir in $PATH
35296do
35297  IFS=$as_save_IFS
35298  test -z "$as_dir" && as_dir=.
35299    for ac_exec_ext in '' $ac_executable_extensions; do
35300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35301    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35303    break 2
35304  fi
35305done
35306  done
35307IFS=$as_save_IFS
35308
35309fi
35310fi
35311CXX=$ac_cv_prog_CXX
35312if test -n "$CXX"; then
35313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35314$as_echo "$CXX" >&6; }
35315else
35316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35317$as_echo "no" >&6; }
35318fi
35319
35320
35321    test -n "$CXX" && break
35322  done
35323fi
35324if test -z "$CXX"; then
35325  ac_ct_CXX=$CXX
35326  for ac_prog in $CXX
35327do
35328  # Extract the first word of "$ac_prog", so it can be a program name with args.
35329set dummy $ac_prog; ac_word=$2
35330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35331$as_echo_n "checking for $ac_word... " >&6; }
35332if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35333  $as_echo_n "(cached) " >&6
35334else
35335  if test -n "$ac_ct_CXX"; then
35336  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35337else
35338as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35339for as_dir in $PATH
35340do
35341  IFS=$as_save_IFS
35342  test -z "$as_dir" && as_dir=.
35343    for ac_exec_ext in '' $ac_executable_extensions; do
35344  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35345    ac_cv_prog_ac_ct_CXX="$ac_prog"
35346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35347    break 2
35348  fi
35349done
35350  done
35351IFS=$as_save_IFS
35352
35353fi
35354fi
35355ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35356if test -n "$ac_ct_CXX"; then
35357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35358$as_echo "$ac_ct_CXX" >&6; }
35359else
35360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35361$as_echo "no" >&6; }
35362fi
35363
35364
35365  test -n "$ac_ct_CXX" && break
35366done
35367
35368  if test "x$ac_ct_CXX" = x; then
35369    CXX="g++"
35370  else
35371    case $cross_compiling:$ac_tool_warned in
35372yes:)
35373{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35374$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35375ac_tool_warned=yes ;;
35376esac
35377    CXX=$ac_ct_CXX
35378  fi
35379fi
35380
35381  fi
35382fi
35383# Provide some information about the compiler.
35384$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35385set X $ac_compile
35386ac_compiler=$2
35387for ac_option in --version -v -V -qversion; do
35388  { { ac_try="$ac_compiler $ac_option >&5"
35389case "(($ac_try" in
35390  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35391  *) ac_try_echo=$ac_try;;
35392esac
35393eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35394$as_echo "$ac_try_echo"; } >&5
35395  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35396  ac_status=$?
35397  if test -s conftest.err; then
35398    sed '10a\
35399... rest of stderr output deleted ...
35400         10q' conftest.err >conftest.er1
35401    cat conftest.er1 >&5
35402  fi
35403  rm -f conftest.er1 conftest.err
35404  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35405  test $ac_status = 0; }
35406done
35407
35408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35409$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35410if ${ac_cv_cxx_compiler_gnu+:} false; then :
35411  $as_echo_n "(cached) " >&6
35412else
35413  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35414/* end confdefs.h.  */
35415
35416int
35417main ()
35418{
35419#ifndef __GNUC__
35420       choke me
35421#endif
35422
35423  ;
35424  return 0;
35425}
35426_ACEOF
35427if ac_fn_cxx_try_compile "$LINENO"; then :
35428  ac_compiler_gnu=yes
35429else
35430  ac_compiler_gnu=no
35431fi
35432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35433ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35434
35435fi
35436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35437$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35438if test $ac_compiler_gnu = yes; then
35439  GXX=yes
35440else
35441  GXX=
35442fi
35443ac_test_CXXFLAGS=${CXXFLAGS+set}
35444ac_save_CXXFLAGS=$CXXFLAGS
35445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35446$as_echo_n "checking whether $CXX accepts -g... " >&6; }
35447if ${ac_cv_prog_cxx_g+:} false; then :
35448  $as_echo_n "(cached) " >&6
35449else
35450  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35451   ac_cxx_werror_flag=yes
35452   ac_cv_prog_cxx_g=no
35453   CXXFLAGS="-g"
35454   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35455/* end confdefs.h.  */
35456
35457int
35458main ()
35459{
35460
35461  ;
35462  return 0;
35463}
35464_ACEOF
35465if ac_fn_cxx_try_compile "$LINENO"; then :
35466  ac_cv_prog_cxx_g=yes
35467else
35468  CXXFLAGS=""
35469      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35470/* end confdefs.h.  */
35471
35472int
35473main ()
35474{
35475
35476  ;
35477  return 0;
35478}
35479_ACEOF
35480if ac_fn_cxx_try_compile "$LINENO"; then :
35481
35482else
35483  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35484	 CXXFLAGS="-g"
35485	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35486/* end confdefs.h.  */
35487
35488int
35489main ()
35490{
35491
35492  ;
35493  return 0;
35494}
35495_ACEOF
35496if ac_fn_cxx_try_compile "$LINENO"; then :
35497  ac_cv_prog_cxx_g=yes
35498fi
35499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35500fi
35501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35502fi
35503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35504   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35505fi
35506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
35507$as_echo "$ac_cv_prog_cxx_g" >&6; }
35508if test "$ac_test_CXXFLAGS" = set; then
35509  CXXFLAGS=$ac_save_CXXFLAGS
35510elif test $ac_cv_prog_cxx_g = yes; then
35511  if test "$GXX" = yes; then
35512    CXXFLAGS="-g -O2"
35513  else
35514    CXXFLAGS="-g"
35515  fi
35516else
35517  if test "$GXX" = yes; then
35518    CXXFLAGS="-O2"
35519  else
35520    CXXFLAGS=
35521  fi
35522fi
35523ac_ext=cpp
35524ac_cpp='$CXXCPP $CPPFLAGS'
35525ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35526ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35527ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35528
35529
35530  # This is the compiler version number on the form X.Y[.Z]
35531
35532
35533
35534
35535  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
35536    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
35537$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
35538    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
35539$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
35540  fi
35541
35542  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
35543  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
35544    { $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
35545$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;}
35546  fi
35547
35548  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
35549    { $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
35550$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35551  fi
35552
35553  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
35554
35555
35556  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
35557
35558
35559
35560
35561
35562
35563
35564
35565
35566
35567
35568
35569
35570
35571
35572
35573
35574
35575
35576
35577
35578
35579
35580
35581
35582
35583
35584
35585
35586
35587
35588
35589
35590
35591
35592
35593
35594
35595
35596
35597
35598
35599
35600
35601
35602
35603
35604
35605
35606    # Execute function body
35607
35608  # Need to assign to a variable since m4 is blocked from modifying parts in [].
35609  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
35610
35611  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
35612    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
35613  fi
35614
35615  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
35616    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
35617  fi
35618
35619  # Version comparison method inspired by http://stackoverflow.com/a/24067243
35620  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
35621
35622  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
35623    :
35624
35625  else
35626    :
35627
35628          { $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
35629$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
35630
35631
35632  fi
35633
35634
35635
35636
35637
35638
35639
35640
35641
35642
35643
35644
35645
35646
35647  fi
35648
35649  #
35650  # Setup the preprocessor (CPP and CXXCPP)
35651  #
35652  ac_ext=c
35653ac_cpp='$CPP $CPPFLAGS'
35654ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35655ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35656ac_compiler_gnu=$ac_cv_c_compiler_gnu
35657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
35658$as_echo_n "checking how to run the C preprocessor... " >&6; }
35659# On Suns, sometimes $CPP names a directory.
35660if test -n "$CPP" && test -d "$CPP"; then
35661  CPP=
35662fi
35663if test -z "$CPP"; then
35664  if ${ac_cv_prog_CPP+:} false; then :
35665  $as_echo_n "(cached) " >&6
35666else
35667      # Double quotes because CPP needs to be expanded
35668    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
35669    do
35670      ac_preproc_ok=false
35671for ac_c_preproc_warn_flag in '' yes
35672do
35673  # Use a header file that comes with gcc, so configuring glibc
35674  # with a fresh cross-compiler works.
35675  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35676  # <limits.h> exists even on freestanding compilers.
35677  # On the NeXT, cc -E runs the code through the compiler's parser,
35678  # not just through cpp. "Syntax error" is here to catch this case.
35679  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35680/* end confdefs.h.  */
35681#ifdef __STDC__
35682# include <limits.h>
35683#else
35684# include <assert.h>
35685#endif
35686		     Syntax error
35687_ACEOF
35688if ac_fn_c_try_cpp "$LINENO"; then :
35689
35690else
35691  # Broken: fails on valid input.
35692continue
35693fi
35694rm -f conftest.err conftest.i conftest.$ac_ext
35695
35696  # OK, works on sane cases.  Now check whether nonexistent headers
35697  # can be detected and how.
35698  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35699/* end confdefs.h.  */
35700#include <ac_nonexistent.h>
35701_ACEOF
35702if ac_fn_c_try_cpp "$LINENO"; then :
35703  # Broken: success on invalid input.
35704continue
35705else
35706  # Passes both tests.
35707ac_preproc_ok=:
35708break
35709fi
35710rm -f conftest.err conftest.i conftest.$ac_ext
35711
35712done
35713# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35714rm -f conftest.i conftest.err conftest.$ac_ext
35715if $ac_preproc_ok; then :
35716  break
35717fi
35718
35719    done
35720    ac_cv_prog_CPP=$CPP
35721
35722fi
35723  CPP=$ac_cv_prog_CPP
35724else
35725  ac_cv_prog_CPP=$CPP
35726fi
35727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
35728$as_echo "$CPP" >&6; }
35729ac_preproc_ok=false
35730for ac_c_preproc_warn_flag in '' yes
35731do
35732  # Use a header file that comes with gcc, so configuring glibc
35733  # with a fresh cross-compiler works.
35734  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35735  # <limits.h> exists even on freestanding compilers.
35736  # On the NeXT, cc -E runs the code through the compiler's parser,
35737  # not just through cpp. "Syntax error" is here to catch this case.
35738  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35739/* end confdefs.h.  */
35740#ifdef __STDC__
35741# include <limits.h>
35742#else
35743# include <assert.h>
35744#endif
35745		     Syntax error
35746_ACEOF
35747if ac_fn_c_try_cpp "$LINENO"; then :
35748
35749else
35750  # Broken: fails on valid input.
35751continue
35752fi
35753rm -f conftest.err conftest.i conftest.$ac_ext
35754
35755  # OK, works on sane cases.  Now check whether nonexistent headers
35756  # can be detected and how.
35757  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35758/* end confdefs.h.  */
35759#include <ac_nonexistent.h>
35760_ACEOF
35761if ac_fn_c_try_cpp "$LINENO"; then :
35762  # Broken: success on invalid input.
35763continue
35764else
35765  # Passes both tests.
35766ac_preproc_ok=:
35767break
35768fi
35769rm -f conftest.err conftest.i conftest.$ac_ext
35770
35771done
35772# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35773rm -f conftest.i conftest.err conftest.$ac_ext
35774if $ac_preproc_ok; then :
35775
35776else
35777  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35778$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35779as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35780See \`config.log' for more details" "$LINENO" 5; }
35781fi
35782
35783ac_ext=cpp
35784ac_cpp='$CXXCPP $CPPFLAGS'
35785ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35786ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35787ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35788
35789
35790  # Only process if variable expands to non-empty
35791
35792  if test "x$CPP" != x; then
35793    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35794
35795  # First separate the path from the arguments. This will split at the first
35796  # space.
35797  complete="$CPP"
35798  path="${complete%% *}"
35799  tmp="$complete EOL"
35800  arguments="${tmp#* }"
35801
35802  # Input might be given as Windows format, start by converting to
35803  # unix format.
35804  new_path=`$CYGPATH -u "$path"`
35805
35806  # Now try to locate executable using which
35807  new_path=`$WHICH "$new_path" 2> /dev/null`
35808  # bat and cmd files are not always considered executable in cygwin causing which
35809  # to not find them
35810  if test "x$new_path" = x \
35811      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35812      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35813    new_path=`$CYGPATH -u "$path"`
35814  fi
35815  if test "x$new_path" = x; then
35816    # Oops. Which didn't find the executable.
35817    # The splitting of arguments from the executable at a space might have been incorrect,
35818    # since paths with space are more likely in Windows. Give it another try with the whole
35819    # argument.
35820    path="$complete"
35821    arguments="EOL"
35822    new_path=`$CYGPATH -u "$path"`
35823    new_path=`$WHICH "$new_path" 2> /dev/null`
35824    # bat and cmd files are not always considered executable in cygwin causing which
35825    # to not find them
35826    if test "x$new_path" = x \
35827        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35828        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35829      new_path=`$CYGPATH -u "$path"`
35830    fi
35831    if test "x$new_path" = x; then
35832      # It's still not found. Now this is an unrecoverable error.
35833      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35834$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35835      has_space=`$ECHO "$complete" | $GREP " "`
35836      if test "x$has_space" != x; then
35837        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35838$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35839      fi
35840      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35841    fi
35842  fi
35843
35844  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35845  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35846  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35847  # "foo.exe" is OK but "foo" is an error.
35848  #
35849  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35850  # It is also a way to make sure we got the proper file name for the real test later on.
35851  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35852  if test "x$test_shortpath" = x; then
35853    # Short path failed, file does not exist as specified.
35854    # Try adding .exe or .cmd
35855    if test -f "${new_path}.exe"; then
35856      input_to_shortpath="${new_path}.exe"
35857    elif test -f "${new_path}.cmd"; then
35858      input_to_shortpath="${new_path}.cmd"
35859    else
35860      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35861$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35862      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35863$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35864      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35865    fi
35866  else
35867    input_to_shortpath="$new_path"
35868  fi
35869
35870  # Call helper function which possibly converts this using DOS-style short mode.
35871  # If so, the updated path is stored in $new_path.
35872  new_path="$input_to_shortpath"
35873
35874  input_path="$input_to_shortpath"
35875  # Check if we need to convert this using DOS-style short mode. If the path
35876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35877  # take no chances and rewrite it.
35878  # Note: m4 eats our [], so we need to use [ and ] instead.
35879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35880  if test "x$has_forbidden_chars" != x; then
35881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35882    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35883    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35884    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35885      # Going to short mode and back again did indeed matter. Since short mode is
35886      # case insensitive, let's make it lowercase to improve readability.
35887      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35888      # Now convert it back to Unix-style (cygpath)
35889      input_path=`$CYGPATH -u "$shortmode_path"`
35890      new_path="$input_path"
35891    fi
35892  fi
35893
35894  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35895  if test "x$test_cygdrive_prefix" = x; then
35896    # As a simple fix, exclude /usr/bin since it's not a real path.
35897    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35898      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35899      # a path prefixed by /cygdrive for fixpath to work.
35900      new_path="$CYGWIN_ROOT_PATH$input_path"
35901    fi
35902  fi
35903
35904  # remove trailing .exe if any
35905  new_path="${new_path/%.exe/}"
35906
35907    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35908
35909  # First separate the path from the arguments. This will split at the first
35910  # space.
35911  complete="$CPP"
35912  path="${complete%% *}"
35913  tmp="$complete EOL"
35914  arguments="${tmp#* }"
35915
35916  # Input might be given as Windows format, start by converting to
35917  # unix format.
35918  new_path="$path"
35919
35920  windows_path="$new_path"
35921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35922    unix_path=`$CYGPATH -u "$windows_path"`
35923    new_path="$unix_path"
35924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35926    new_path="$unix_path"
35927  fi
35928
35929
35930  # Now try to locate executable using which
35931  new_path=`$WHICH "$new_path" 2> /dev/null`
35932
35933  if test "x$new_path" = x; then
35934    # Oops. Which didn't find the executable.
35935    # The splitting of arguments from the executable at a space might have been incorrect,
35936    # since paths with space are more likely in Windows. Give it another try with the whole
35937    # argument.
35938    path="$complete"
35939    arguments="EOL"
35940    new_path="$path"
35941
35942  windows_path="$new_path"
35943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35944    unix_path=`$CYGPATH -u "$windows_path"`
35945    new_path="$unix_path"
35946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35947    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35948    new_path="$unix_path"
35949  fi
35950
35951
35952    new_path=`$WHICH "$new_path" 2> /dev/null`
35953    # bat and cmd files are not always considered executable in MSYS causing which
35954    # to not find them
35955    if test "x$new_path" = x \
35956        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35957        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35958      new_path="$path"
35959
35960  windows_path="$new_path"
35961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35962    unix_path=`$CYGPATH -u "$windows_path"`
35963    new_path="$unix_path"
35964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35965    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35966    new_path="$unix_path"
35967  fi
35968
35969    fi
35970
35971    if test "x$new_path" = x; then
35972      # It's still not found. Now this is an unrecoverable error.
35973      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35974$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35975      has_space=`$ECHO "$complete" | $GREP " "`
35976      if test "x$has_space" != x; then
35977        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35978$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35979      fi
35980      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35981    fi
35982  fi
35983
35984  # Now new_path has a complete unix path to the binary
35985  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35986    # Keep paths in /bin as-is, but remove trailing .exe if any
35987    new_path="${new_path/%.exe/}"
35988    # Do not save /bin paths to all_fixpath_prefixes!
35989  else
35990    # Not in mixed or Windows style, start by that.
35991    new_path=`cmd //c echo $new_path`
35992
35993  input_path="$new_path"
35994  # Check if we need to convert this using DOS-style short mode. If the path
35995  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35996  # take no chances and rewrite it.
35997  # Note: m4 eats our [], so we need to use [ and ] instead.
35998  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35999  if test "x$has_forbidden_chars" != x; then
36000    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36001    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36002  fi
36003
36004    # Output is in $new_path
36005
36006  windows_path="$new_path"
36007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36008    unix_path=`$CYGPATH -u "$windows_path"`
36009    new_path="$unix_path"
36010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36012    new_path="$unix_path"
36013  fi
36014
36015    # remove trailing .exe if any
36016    new_path="${new_path/%.exe/}"
36017
36018    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36019    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36020  fi
36021
36022    else
36023      # We're on a unix platform. Hooray! :)
36024      # First separate the path from the arguments. This will split at the first
36025      # space.
36026      complete="$CPP"
36027      path="${complete%% *}"
36028      tmp="$complete EOL"
36029      arguments="${tmp#* }"
36030
36031      # Cannot rely on the command "which" here since it doesn't always work.
36032      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36033      if test -z "$is_absolute_path"; then
36034        # Path to executable is not absolute. Find it.
36035        IFS_save="$IFS"
36036        IFS=:
36037        for p in $PATH; do
36038          if test -f "$p/$path" && test -x "$p/$path"; then
36039            new_path="$p/$path"
36040            break
36041          fi
36042        done
36043        IFS="$IFS_save"
36044      else
36045        # This is an absolute path, we can use it without further modifications.
36046        new_path="$path"
36047      fi
36048
36049      if test "x$new_path" = x; then
36050        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36051$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36052        has_space=`$ECHO "$complete" | $GREP " "`
36053        if test "x$has_space" != x; then
36054          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36055$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36056        fi
36057        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36058      fi
36059    fi
36060
36061    # Now join together the path and the arguments once again
36062    if test "x$arguments" != xEOL; then
36063      new_complete="$new_path ${arguments% *}"
36064    else
36065      new_complete="$new_path"
36066    fi
36067
36068    if test "x$complete" != "x$new_complete"; then
36069      CPP="$new_complete"
36070      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
36071$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
36072    fi
36073  fi
36074
36075  ac_ext=cpp
36076ac_cpp='$CXXCPP $CPPFLAGS'
36077ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36078ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36079ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
36081$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
36082if test -z "$CXXCPP"; then
36083  if ${ac_cv_prog_CXXCPP+:} false; then :
36084  $as_echo_n "(cached) " >&6
36085else
36086      # Double quotes because CXXCPP needs to be expanded
36087    for CXXCPP in "$CXX -E" "/lib/cpp"
36088    do
36089      ac_preproc_ok=false
36090for ac_cxx_preproc_warn_flag in '' yes
36091do
36092  # Use a header file that comes with gcc, so configuring glibc
36093  # with a fresh cross-compiler works.
36094  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36095  # <limits.h> exists even on freestanding compilers.
36096  # On the NeXT, cc -E runs the code through the compiler's parser,
36097  # not just through cpp. "Syntax error" is here to catch this case.
36098  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36099/* end confdefs.h.  */
36100#ifdef __STDC__
36101# include <limits.h>
36102#else
36103# include <assert.h>
36104#endif
36105		     Syntax error
36106_ACEOF
36107if ac_fn_cxx_try_cpp "$LINENO"; then :
36108
36109else
36110  # Broken: fails on valid input.
36111continue
36112fi
36113rm -f conftest.err conftest.i conftest.$ac_ext
36114
36115  # OK, works on sane cases.  Now check whether nonexistent headers
36116  # can be detected and how.
36117  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36118/* end confdefs.h.  */
36119#include <ac_nonexistent.h>
36120_ACEOF
36121if ac_fn_cxx_try_cpp "$LINENO"; then :
36122  # Broken: success on invalid input.
36123continue
36124else
36125  # Passes both tests.
36126ac_preproc_ok=:
36127break
36128fi
36129rm -f conftest.err conftest.i conftest.$ac_ext
36130
36131done
36132# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36133rm -f conftest.i conftest.err conftest.$ac_ext
36134if $ac_preproc_ok; then :
36135  break
36136fi
36137
36138    done
36139    ac_cv_prog_CXXCPP=$CXXCPP
36140
36141fi
36142  CXXCPP=$ac_cv_prog_CXXCPP
36143else
36144  ac_cv_prog_CXXCPP=$CXXCPP
36145fi
36146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
36147$as_echo "$CXXCPP" >&6; }
36148ac_preproc_ok=false
36149for ac_cxx_preproc_warn_flag in '' yes
36150do
36151  # Use a header file that comes with gcc, so configuring glibc
36152  # with a fresh cross-compiler works.
36153  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36154  # <limits.h> exists even on freestanding compilers.
36155  # On the NeXT, cc -E runs the code through the compiler's parser,
36156  # not just through cpp. "Syntax error" is here to catch this case.
36157  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36158/* end confdefs.h.  */
36159#ifdef __STDC__
36160# include <limits.h>
36161#else
36162# include <assert.h>
36163#endif
36164		     Syntax error
36165_ACEOF
36166if ac_fn_cxx_try_cpp "$LINENO"; then :
36167
36168else
36169  # Broken: fails on valid input.
36170continue
36171fi
36172rm -f conftest.err conftest.i conftest.$ac_ext
36173
36174  # OK, works on sane cases.  Now check whether nonexistent headers
36175  # can be detected and how.
36176  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36177/* end confdefs.h.  */
36178#include <ac_nonexistent.h>
36179_ACEOF
36180if ac_fn_cxx_try_cpp "$LINENO"; then :
36181  # Broken: success on invalid input.
36182continue
36183else
36184  # Passes both tests.
36185ac_preproc_ok=:
36186break
36187fi
36188rm -f conftest.err conftest.i conftest.$ac_ext
36189
36190done
36191# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36192rm -f conftest.i conftest.err conftest.$ac_ext
36193if $ac_preproc_ok; then :
36194
36195else
36196  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36197$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36198as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
36199See \`config.log' for more details" "$LINENO" 5; }
36200fi
36201
36202ac_ext=cpp
36203ac_cpp='$CXXCPP $CPPFLAGS'
36204ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36205ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36206ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36207
36208
36209  # Only process if variable expands to non-empty
36210
36211  if test "x$CXXCPP" != x; then
36212    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36213
36214  # First separate the path from the arguments. This will split at the first
36215  # space.
36216  complete="$CXXCPP"
36217  path="${complete%% *}"
36218  tmp="$complete EOL"
36219  arguments="${tmp#* }"
36220
36221  # Input might be given as Windows format, start by converting to
36222  # unix format.
36223  new_path=`$CYGPATH -u "$path"`
36224
36225  # Now try to locate executable using which
36226  new_path=`$WHICH "$new_path" 2> /dev/null`
36227  # bat and cmd files are not always considered executable in cygwin causing which
36228  # to not find them
36229  if test "x$new_path" = x \
36230      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36231      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36232    new_path=`$CYGPATH -u "$path"`
36233  fi
36234  if test "x$new_path" = x; then
36235    # Oops. Which didn't find the executable.
36236    # The splitting of arguments from the executable at a space might have been incorrect,
36237    # since paths with space are more likely in Windows. Give it another try with the whole
36238    # argument.
36239    path="$complete"
36240    arguments="EOL"
36241    new_path=`$CYGPATH -u "$path"`
36242    new_path=`$WHICH "$new_path" 2> /dev/null`
36243    # bat and cmd files are not always considered executable in cygwin causing which
36244    # to not find them
36245    if test "x$new_path" = x \
36246        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36247        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36248      new_path=`$CYGPATH -u "$path"`
36249    fi
36250    if test "x$new_path" = x; then
36251      # It's still not found. Now this is an unrecoverable error.
36252      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36253$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36254      has_space=`$ECHO "$complete" | $GREP " "`
36255      if test "x$has_space" != x; then
36256        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36257$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36258      fi
36259      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36260    fi
36261  fi
36262
36263  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36264  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36265  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36266  # "foo.exe" is OK but "foo" is an error.
36267  #
36268  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36269  # It is also a way to make sure we got the proper file name for the real test later on.
36270  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36271  if test "x$test_shortpath" = x; then
36272    # Short path failed, file does not exist as specified.
36273    # Try adding .exe or .cmd
36274    if test -f "${new_path}.exe"; then
36275      input_to_shortpath="${new_path}.exe"
36276    elif test -f "${new_path}.cmd"; then
36277      input_to_shortpath="${new_path}.cmd"
36278    else
36279      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36280$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36281      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36282$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36283      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36284    fi
36285  else
36286    input_to_shortpath="$new_path"
36287  fi
36288
36289  # Call helper function which possibly converts this using DOS-style short mode.
36290  # If so, the updated path is stored in $new_path.
36291  new_path="$input_to_shortpath"
36292
36293  input_path="$input_to_shortpath"
36294  # Check if we need to convert this using DOS-style short mode. If the path
36295  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36296  # take no chances and rewrite it.
36297  # Note: m4 eats our [], so we need to use [ and ] instead.
36298  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36299  if test "x$has_forbidden_chars" != x; then
36300    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36301    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36302    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36303    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36304      # Going to short mode and back again did indeed matter. Since short mode is
36305      # case insensitive, let's make it lowercase to improve readability.
36306      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36307      # Now convert it back to Unix-style (cygpath)
36308      input_path=`$CYGPATH -u "$shortmode_path"`
36309      new_path="$input_path"
36310    fi
36311  fi
36312
36313  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36314  if test "x$test_cygdrive_prefix" = x; then
36315    # As a simple fix, exclude /usr/bin since it's not a real path.
36316    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36317      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36318      # a path prefixed by /cygdrive for fixpath to work.
36319      new_path="$CYGWIN_ROOT_PATH$input_path"
36320    fi
36321  fi
36322
36323  # remove trailing .exe if any
36324  new_path="${new_path/%.exe/}"
36325
36326    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36327
36328  # First separate the path from the arguments. This will split at the first
36329  # space.
36330  complete="$CXXCPP"
36331  path="${complete%% *}"
36332  tmp="$complete EOL"
36333  arguments="${tmp#* }"
36334
36335  # Input might be given as Windows format, start by converting to
36336  # unix format.
36337  new_path="$path"
36338
36339  windows_path="$new_path"
36340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36341    unix_path=`$CYGPATH -u "$windows_path"`
36342    new_path="$unix_path"
36343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36344    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36345    new_path="$unix_path"
36346  fi
36347
36348
36349  # Now try to locate executable using which
36350  new_path=`$WHICH "$new_path" 2> /dev/null`
36351
36352  if test "x$new_path" = x; then
36353    # Oops. Which didn't find the executable.
36354    # The splitting of arguments from the executable at a space might have been incorrect,
36355    # since paths with space are more likely in Windows. Give it another try with the whole
36356    # argument.
36357    path="$complete"
36358    arguments="EOL"
36359    new_path="$path"
36360
36361  windows_path="$new_path"
36362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36363    unix_path=`$CYGPATH -u "$windows_path"`
36364    new_path="$unix_path"
36365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36366    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36367    new_path="$unix_path"
36368  fi
36369
36370
36371    new_path=`$WHICH "$new_path" 2> /dev/null`
36372    # bat and cmd files are not always considered executable in MSYS causing which
36373    # to not find them
36374    if test "x$new_path" = x \
36375        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36376        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36377      new_path="$path"
36378
36379  windows_path="$new_path"
36380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36381    unix_path=`$CYGPATH -u "$windows_path"`
36382    new_path="$unix_path"
36383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36385    new_path="$unix_path"
36386  fi
36387
36388    fi
36389
36390    if test "x$new_path" = x; then
36391      # It's still not found. Now this is an unrecoverable error.
36392      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36393$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36394      has_space=`$ECHO "$complete" | $GREP " "`
36395      if test "x$has_space" != x; then
36396        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36397$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36398      fi
36399      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36400    fi
36401  fi
36402
36403  # Now new_path has a complete unix path to the binary
36404  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36405    # Keep paths in /bin as-is, but remove trailing .exe if any
36406    new_path="${new_path/%.exe/}"
36407    # Do not save /bin paths to all_fixpath_prefixes!
36408  else
36409    # Not in mixed or Windows style, start by that.
36410    new_path=`cmd //c echo $new_path`
36411
36412  input_path="$new_path"
36413  # Check if we need to convert this using DOS-style short mode. If the path
36414  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36415  # take no chances and rewrite it.
36416  # Note: m4 eats our [], so we need to use [ and ] instead.
36417  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36418  if test "x$has_forbidden_chars" != x; then
36419    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36420    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36421  fi
36422
36423    # Output is in $new_path
36424
36425  windows_path="$new_path"
36426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36427    unix_path=`$CYGPATH -u "$windows_path"`
36428    new_path="$unix_path"
36429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36431    new_path="$unix_path"
36432  fi
36433
36434    # remove trailing .exe if any
36435    new_path="${new_path/%.exe/}"
36436
36437    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36438    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36439  fi
36440
36441    else
36442      # We're on a unix platform. Hooray! :)
36443      # First separate the path from the arguments. This will split at the first
36444      # space.
36445      complete="$CXXCPP"
36446      path="${complete%% *}"
36447      tmp="$complete EOL"
36448      arguments="${tmp#* }"
36449
36450      # Cannot rely on the command "which" here since it doesn't always work.
36451      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36452      if test -z "$is_absolute_path"; then
36453        # Path to executable is not absolute. Find it.
36454        IFS_save="$IFS"
36455        IFS=:
36456        for p in $PATH; do
36457          if test -f "$p/$path" && test -x "$p/$path"; then
36458            new_path="$p/$path"
36459            break
36460          fi
36461        done
36462        IFS="$IFS_save"
36463      else
36464        # This is an absolute path, we can use it without further modifications.
36465        new_path="$path"
36466      fi
36467
36468      if test "x$new_path" = x; then
36469        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36470$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36471        has_space=`$ECHO "$complete" | $GREP " "`
36472        if test "x$has_space" != x; then
36473          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36474$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36475        fi
36476        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36477      fi
36478    fi
36479
36480    # Now join together the path and the arguments once again
36481    if test "x$arguments" != xEOL; then
36482      new_complete="$new_path ${arguments% *}"
36483    else
36484      new_complete="$new_path"
36485    fi
36486
36487    if test "x$complete" != "x$new_complete"; then
36488      CXXCPP="$new_complete"
36489      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
36490$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
36491    fi
36492  fi
36493
36494
36495  #
36496  # Setup the linker (LD)
36497  #
36498  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36499    # In the Microsoft toolchain we have a separate LD command "link".
36500    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
36501    # a cygwin program for something completely different.
36502    # Extract the first word of "link", so it can be a program name with args.
36503set dummy link; ac_word=$2
36504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36505$as_echo_n "checking for $ac_word... " >&6; }
36506if ${ac_cv_prog_LD+:} false; then :
36507  $as_echo_n "(cached) " >&6
36508else
36509  if test -n "$LD"; then
36510  ac_cv_prog_LD="$LD" # Let the user override the test.
36511else
36512  ac_prog_rejected=no
36513as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36514for as_dir in $PATH
36515do
36516  IFS=$as_save_IFS
36517  test -z "$as_dir" && as_dir=.
36518    for ac_exec_ext in '' $ac_executable_extensions; do
36519  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36520    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
36521       ac_prog_rejected=yes
36522       continue
36523     fi
36524    ac_cv_prog_LD="link"
36525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36526    break 2
36527  fi
36528done
36529  done
36530IFS=$as_save_IFS
36531
36532if test $ac_prog_rejected = yes; then
36533  # We found a bogon in the path, so make sure we never use it.
36534  set dummy $ac_cv_prog_LD
36535  shift
36536  if test $# != 0; then
36537    # We chose a different compiler from the bogus one.
36538    # However, it has the same basename, so the bogon will be chosen
36539    # first if we set LD to just the basename; use the full file name.
36540    shift
36541    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
36542  fi
36543fi
36544fi
36545fi
36546LD=$ac_cv_prog_LD
36547if test -n "$LD"; then
36548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
36549$as_echo "$LD" >&6; }
36550else
36551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36552$as_echo "no" >&6; }
36553fi
36554
36555
36556
36557  # Only process if variable expands to non-empty
36558
36559  if test "x$LD" != x; then
36560    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36561
36562  # First separate the path from the arguments. This will split at the first
36563  # space.
36564  complete="$LD"
36565  path="${complete%% *}"
36566  tmp="$complete EOL"
36567  arguments="${tmp#* }"
36568
36569  # Input might be given as Windows format, start by converting to
36570  # unix format.
36571  new_path=`$CYGPATH -u "$path"`
36572
36573  # Now try to locate executable using which
36574  new_path=`$WHICH "$new_path" 2> /dev/null`
36575  # bat and cmd files are not always considered executable in cygwin causing which
36576  # to not find them
36577  if test "x$new_path" = x \
36578      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36579      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36580    new_path=`$CYGPATH -u "$path"`
36581  fi
36582  if test "x$new_path" = x; then
36583    # Oops. Which didn't find the executable.
36584    # The splitting of arguments from the executable at a space might have been incorrect,
36585    # since paths with space are more likely in Windows. Give it another try with the whole
36586    # argument.
36587    path="$complete"
36588    arguments="EOL"
36589    new_path=`$CYGPATH -u "$path"`
36590    new_path=`$WHICH "$new_path" 2> /dev/null`
36591    # bat and cmd files are not always considered executable in cygwin causing which
36592    # to not find them
36593    if test "x$new_path" = x \
36594        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36595        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36596      new_path=`$CYGPATH -u "$path"`
36597    fi
36598    if test "x$new_path" = x; then
36599      # It's still not found. Now this is an unrecoverable error.
36600      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36601$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36602      has_space=`$ECHO "$complete" | $GREP " "`
36603      if test "x$has_space" != x; then
36604        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36605$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36606      fi
36607      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36608    fi
36609  fi
36610
36611  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36612  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36613  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36614  # "foo.exe" is OK but "foo" is an error.
36615  #
36616  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36617  # It is also a way to make sure we got the proper file name for the real test later on.
36618  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36619  if test "x$test_shortpath" = x; then
36620    # Short path failed, file does not exist as specified.
36621    # Try adding .exe or .cmd
36622    if test -f "${new_path}.exe"; then
36623      input_to_shortpath="${new_path}.exe"
36624    elif test -f "${new_path}.cmd"; then
36625      input_to_shortpath="${new_path}.cmd"
36626    else
36627      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
36628$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
36629      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36630$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36631      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36632    fi
36633  else
36634    input_to_shortpath="$new_path"
36635  fi
36636
36637  # Call helper function which possibly converts this using DOS-style short mode.
36638  # If so, the updated path is stored in $new_path.
36639  new_path="$input_to_shortpath"
36640
36641  input_path="$input_to_shortpath"
36642  # Check if we need to convert this using DOS-style short mode. If the path
36643  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36644  # take no chances and rewrite it.
36645  # Note: m4 eats our [], so we need to use [ and ] instead.
36646  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36647  if test "x$has_forbidden_chars" != x; then
36648    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36649    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36650    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36651    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36652      # Going to short mode and back again did indeed matter. Since short mode is
36653      # case insensitive, let's make it lowercase to improve readability.
36654      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36655      # Now convert it back to Unix-style (cygpath)
36656      input_path=`$CYGPATH -u "$shortmode_path"`
36657      new_path="$input_path"
36658    fi
36659  fi
36660
36661  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36662  if test "x$test_cygdrive_prefix" = x; then
36663    # As a simple fix, exclude /usr/bin since it's not a real path.
36664    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36665      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36666      # a path prefixed by /cygdrive for fixpath to work.
36667      new_path="$CYGWIN_ROOT_PATH$input_path"
36668    fi
36669  fi
36670
36671  # remove trailing .exe if any
36672  new_path="${new_path/%.exe/}"
36673
36674    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36675
36676  # First separate the path from the arguments. This will split at the first
36677  # space.
36678  complete="$LD"
36679  path="${complete%% *}"
36680  tmp="$complete EOL"
36681  arguments="${tmp#* }"
36682
36683  # Input might be given as Windows format, start by converting to
36684  # unix format.
36685  new_path="$path"
36686
36687  windows_path="$new_path"
36688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36689    unix_path=`$CYGPATH -u "$windows_path"`
36690    new_path="$unix_path"
36691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36692    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36693    new_path="$unix_path"
36694  fi
36695
36696
36697  # Now try to locate executable using which
36698  new_path=`$WHICH "$new_path" 2> /dev/null`
36699
36700  if test "x$new_path" = x; then
36701    # Oops. Which didn't find the executable.
36702    # The splitting of arguments from the executable at a space might have been incorrect,
36703    # since paths with space are more likely in Windows. Give it another try with the whole
36704    # argument.
36705    path="$complete"
36706    arguments="EOL"
36707    new_path="$path"
36708
36709  windows_path="$new_path"
36710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36711    unix_path=`$CYGPATH -u "$windows_path"`
36712    new_path="$unix_path"
36713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36714    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36715    new_path="$unix_path"
36716  fi
36717
36718
36719    new_path=`$WHICH "$new_path" 2> /dev/null`
36720    # bat and cmd files are not always considered executable in MSYS causing which
36721    # to not find them
36722    if test "x$new_path" = x \
36723        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36724        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36725      new_path="$path"
36726
36727  windows_path="$new_path"
36728  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36729    unix_path=`$CYGPATH -u "$windows_path"`
36730    new_path="$unix_path"
36731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36732    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36733    new_path="$unix_path"
36734  fi
36735
36736    fi
36737
36738    if test "x$new_path" = x; then
36739      # It's still not found. Now this is an unrecoverable error.
36740      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36741$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36742      has_space=`$ECHO "$complete" | $GREP " "`
36743      if test "x$has_space" != x; then
36744        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36745$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36746      fi
36747      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36748    fi
36749  fi
36750
36751  # Now new_path has a complete unix path to the binary
36752  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36753    # Keep paths in /bin as-is, but remove trailing .exe if any
36754    new_path="${new_path/%.exe/}"
36755    # Do not save /bin paths to all_fixpath_prefixes!
36756  else
36757    # Not in mixed or Windows style, start by that.
36758    new_path=`cmd //c echo $new_path`
36759
36760  input_path="$new_path"
36761  # Check if we need to convert this using DOS-style short mode. If the path
36762  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36763  # take no chances and rewrite it.
36764  # Note: m4 eats our [], so we need to use [ and ] instead.
36765  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36766  if test "x$has_forbidden_chars" != x; then
36767    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36768    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36769  fi
36770
36771    # Output is in $new_path
36772
36773  windows_path="$new_path"
36774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36775    unix_path=`$CYGPATH -u "$windows_path"`
36776    new_path="$unix_path"
36777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36778    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36779    new_path="$unix_path"
36780  fi
36781
36782    # remove trailing .exe if any
36783    new_path="${new_path/%.exe/}"
36784
36785    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36786    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36787  fi
36788
36789    else
36790      # We're on a unix platform. Hooray! :)
36791      # First separate the path from the arguments. This will split at the first
36792      # space.
36793      complete="$LD"
36794      path="${complete%% *}"
36795      tmp="$complete EOL"
36796      arguments="${tmp#* }"
36797
36798      # Cannot rely on the command "which" here since it doesn't always work.
36799      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36800      if test -z "$is_absolute_path"; then
36801        # Path to executable is not absolute. Find it.
36802        IFS_save="$IFS"
36803        IFS=:
36804        for p in $PATH; do
36805          if test -f "$p/$path" && test -x "$p/$path"; then
36806            new_path="$p/$path"
36807            break
36808          fi
36809        done
36810        IFS="$IFS_save"
36811      else
36812        # This is an absolute path, we can use it without further modifications.
36813        new_path="$path"
36814      fi
36815
36816      if test "x$new_path" = x; then
36817        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36818$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36819        has_space=`$ECHO "$complete" | $GREP " "`
36820        if test "x$has_space" != x; then
36821          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36822$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36823        fi
36824        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36825      fi
36826    fi
36827
36828    # Now join together the path and the arguments once again
36829    if test "x$arguments" != xEOL; then
36830      new_complete="$new_path ${arguments% *}"
36831    else
36832      new_complete="$new_path"
36833    fi
36834
36835    if test "x$complete" != "x$new_complete"; then
36836      LD="$new_complete"
36837      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36838$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36839    fi
36840  fi
36841
36842    # Verify that we indeed succeeded with this trick.
36843    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36844$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36845    "$LD" --version > /dev/null
36846    if test $? -eq 0 ; then
36847      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36848$as_echo "no" >&6; }
36849      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36850    else
36851      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36852$as_echo "yes" >&6; }
36853    fi
36854    LDCXX="$LD"
36855  else
36856    # All other toolchains use the compiler to link.
36857    LD="$CC"
36858    LDCXX="$CXX"
36859  fi
36860
36861  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36862
36863
36864  #
36865  # Setup the assembler (AS)
36866  #
36867  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36868
36869
36870  # Publish this variable in the help.
36871
36872
36873  if [ -z "${AS+x}" ]; then
36874    # The variable is not set by user, try to locate tool using the code snippet
36875    for ac_prog in as
36876do
36877  # Extract the first word of "$ac_prog", so it can be a program name with args.
36878set dummy $ac_prog; ac_word=$2
36879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36880$as_echo_n "checking for $ac_word... " >&6; }
36881if ${ac_cv_path_AS+:} false; then :
36882  $as_echo_n "(cached) " >&6
36883else
36884  case $AS in
36885  [\\/]* | ?:[\\/]*)
36886  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36887  ;;
36888  *)
36889  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36890for as_dir in $PATH
36891do
36892  IFS=$as_save_IFS
36893  test -z "$as_dir" && as_dir=.
36894    for ac_exec_ext in '' $ac_executable_extensions; do
36895  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36896    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36897    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36898    break 2
36899  fi
36900done
36901  done
36902IFS=$as_save_IFS
36903
36904  ;;
36905esac
36906fi
36907AS=$ac_cv_path_AS
36908if test -n "$AS"; then
36909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36910$as_echo "$AS" >&6; }
36911else
36912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36913$as_echo "no" >&6; }
36914fi
36915
36916
36917  test -n "$AS" && break
36918done
36919
36920  else
36921    # The variable is set, but is it from the command line or the environment?
36922
36923    # Try to remove the string !AS! from our list.
36924    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36925    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36926      # If it failed, the variable was not from the command line. Ignore it,
36927      # but warn the user (except for BASH, which is always set by the calling BASH).
36928      if test "xAS" != xBASH; then
36929        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36930$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36931      fi
36932      # Try to locate tool using the code snippet
36933      for ac_prog in as
36934do
36935  # Extract the first word of "$ac_prog", so it can be a program name with args.
36936set dummy $ac_prog; ac_word=$2
36937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36938$as_echo_n "checking for $ac_word... " >&6; }
36939if ${ac_cv_path_AS+:} false; then :
36940  $as_echo_n "(cached) " >&6
36941else
36942  case $AS in
36943  [\\/]* | ?:[\\/]*)
36944  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36945  ;;
36946  *)
36947  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36948for as_dir in $PATH
36949do
36950  IFS=$as_save_IFS
36951  test -z "$as_dir" && as_dir=.
36952    for ac_exec_ext in '' $ac_executable_extensions; do
36953  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36954    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36955    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36956    break 2
36957  fi
36958done
36959  done
36960IFS=$as_save_IFS
36961
36962  ;;
36963esac
36964fi
36965AS=$ac_cv_path_AS
36966if test -n "$AS"; then
36967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36968$as_echo "$AS" >&6; }
36969else
36970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36971$as_echo "no" >&6; }
36972fi
36973
36974
36975  test -n "$AS" && break
36976done
36977
36978    else
36979      # If it succeeded, then it was overridden by the user. We will use it
36980      # for the tool.
36981
36982      # First remove it from the list of overridden variables, so we can test
36983      # for unknown variables in the end.
36984      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36985
36986      # Check if we try to supply an empty value
36987      if test "x$AS" = x; then
36988        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36989$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36990        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36991$as_echo_n "checking for AS... " >&6; }
36992        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36993$as_echo "disabled" >&6; }
36994      else
36995        # Check if the provided tool contains a complete path.
36996        tool_specified="$AS"
36997        tool_basename="${tool_specified##*/}"
36998        if test "x$tool_basename" = "x$tool_specified"; then
36999          # A command without a complete path is provided, search $PATH.
37000          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
37001$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
37002          # Extract the first word of "$tool_basename", so it can be a program name with args.
37003set dummy $tool_basename; ac_word=$2
37004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37005$as_echo_n "checking for $ac_word... " >&6; }
37006if ${ac_cv_path_AS+:} false; then :
37007  $as_echo_n "(cached) " >&6
37008else
37009  case $AS in
37010  [\\/]* | ?:[\\/]*)
37011  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37012  ;;
37013  *)
37014  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37015for as_dir in $PATH
37016do
37017  IFS=$as_save_IFS
37018  test -z "$as_dir" && as_dir=.
37019    for ac_exec_ext in '' $ac_executable_extensions; do
37020  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37021    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37022    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37023    break 2
37024  fi
37025done
37026  done
37027IFS=$as_save_IFS
37028
37029  ;;
37030esac
37031fi
37032AS=$ac_cv_path_AS
37033if test -n "$AS"; then
37034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37035$as_echo "$AS" >&6; }
37036else
37037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37038$as_echo "no" >&6; }
37039fi
37040
37041
37042          if test "x$AS" = x; then
37043            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37044          fi
37045        else
37046          # Otherwise we believe it is a complete path. Use it as it is.
37047          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
37048$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
37049          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37050$as_echo_n "checking for AS... " >&6; }
37051          if test ! -x "$tool_specified"; then
37052            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37053$as_echo "not found" >&6; }
37054            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
37055          fi
37056          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37057$as_echo "$tool_specified" >&6; }
37058        fi
37059      fi
37060    fi
37061
37062  fi
37063
37064
37065
37066  # Only process if variable expands to non-empty
37067
37068  if test "x$AS" != x; then
37069    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37070
37071  # First separate the path from the arguments. This will split at the first
37072  # space.
37073  complete="$AS"
37074  path="${complete%% *}"
37075  tmp="$complete EOL"
37076  arguments="${tmp#* }"
37077
37078  # Input might be given as Windows format, start by converting to
37079  # unix format.
37080  new_path=`$CYGPATH -u "$path"`
37081
37082  # Now try to locate executable using which
37083  new_path=`$WHICH "$new_path" 2> /dev/null`
37084  # bat and cmd files are not always considered executable in cygwin causing which
37085  # to not find them
37086  if test "x$new_path" = x \
37087      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37088      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37089    new_path=`$CYGPATH -u "$path"`
37090  fi
37091  if test "x$new_path" = x; then
37092    # Oops. Which didn't find the executable.
37093    # The splitting of arguments from the executable at a space might have been incorrect,
37094    # since paths with space are more likely in Windows. Give it another try with the whole
37095    # argument.
37096    path="$complete"
37097    arguments="EOL"
37098    new_path=`$CYGPATH -u "$path"`
37099    new_path=`$WHICH "$new_path" 2> /dev/null`
37100    # bat and cmd files are not always considered executable in cygwin causing which
37101    # to not find them
37102    if test "x$new_path" = x \
37103        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37104        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37105      new_path=`$CYGPATH -u "$path"`
37106    fi
37107    if test "x$new_path" = x; then
37108      # It's still not found. Now this is an unrecoverable error.
37109      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37110$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37111      has_space=`$ECHO "$complete" | $GREP " "`
37112      if test "x$has_space" != x; then
37113        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37114$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37115      fi
37116      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37117    fi
37118  fi
37119
37120  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37121  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37122  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37123  # "foo.exe" is OK but "foo" is an error.
37124  #
37125  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37126  # It is also a way to make sure we got the proper file name for the real test later on.
37127  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37128  if test "x$test_shortpath" = x; then
37129    # Short path failed, file does not exist as specified.
37130    # Try adding .exe or .cmd
37131    if test -f "${new_path}.exe"; then
37132      input_to_shortpath="${new_path}.exe"
37133    elif test -f "${new_path}.cmd"; then
37134      input_to_shortpath="${new_path}.cmd"
37135    else
37136      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
37137$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
37138      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37139$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37140      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37141    fi
37142  else
37143    input_to_shortpath="$new_path"
37144  fi
37145
37146  # Call helper function which possibly converts this using DOS-style short mode.
37147  # If so, the updated path is stored in $new_path.
37148  new_path="$input_to_shortpath"
37149
37150  input_path="$input_to_shortpath"
37151  # Check if we need to convert this using DOS-style short mode. If the path
37152  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37153  # take no chances and rewrite it.
37154  # Note: m4 eats our [], so we need to use [ and ] instead.
37155  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37156  if test "x$has_forbidden_chars" != x; then
37157    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37158    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37159    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37160    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37161      # Going to short mode and back again did indeed matter. Since short mode is
37162      # case insensitive, let's make it lowercase to improve readability.
37163      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37164      # Now convert it back to Unix-style (cygpath)
37165      input_path=`$CYGPATH -u "$shortmode_path"`
37166      new_path="$input_path"
37167    fi
37168  fi
37169
37170  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37171  if test "x$test_cygdrive_prefix" = x; then
37172    # As a simple fix, exclude /usr/bin since it's not a real path.
37173    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37174      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37175      # a path prefixed by /cygdrive for fixpath to work.
37176      new_path="$CYGWIN_ROOT_PATH$input_path"
37177    fi
37178  fi
37179
37180  # remove trailing .exe if any
37181  new_path="${new_path/%.exe/}"
37182
37183    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37184
37185  # First separate the path from the arguments. This will split at the first
37186  # space.
37187  complete="$AS"
37188  path="${complete%% *}"
37189  tmp="$complete EOL"
37190  arguments="${tmp#* }"
37191
37192  # Input might be given as Windows format, start by converting to
37193  # unix format.
37194  new_path="$path"
37195
37196  windows_path="$new_path"
37197  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37198    unix_path=`$CYGPATH -u "$windows_path"`
37199    new_path="$unix_path"
37200  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37201    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37202    new_path="$unix_path"
37203  fi
37204
37205
37206  # Now try to locate executable using which
37207  new_path=`$WHICH "$new_path" 2> /dev/null`
37208
37209  if test "x$new_path" = x; then
37210    # Oops. Which didn't find the executable.
37211    # The splitting of arguments from the executable at a space might have been incorrect,
37212    # since paths with space are more likely in Windows. Give it another try with the whole
37213    # argument.
37214    path="$complete"
37215    arguments="EOL"
37216    new_path="$path"
37217
37218  windows_path="$new_path"
37219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37220    unix_path=`$CYGPATH -u "$windows_path"`
37221    new_path="$unix_path"
37222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37223    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37224    new_path="$unix_path"
37225  fi
37226
37227
37228    new_path=`$WHICH "$new_path" 2> /dev/null`
37229    # bat and cmd files are not always considered executable in MSYS causing which
37230    # to not find them
37231    if test "x$new_path" = x \
37232        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37233        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37234      new_path="$path"
37235
37236  windows_path="$new_path"
37237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37238    unix_path=`$CYGPATH -u "$windows_path"`
37239    new_path="$unix_path"
37240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37241    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37242    new_path="$unix_path"
37243  fi
37244
37245    fi
37246
37247    if test "x$new_path" = x; then
37248      # It's still not found. Now this is an unrecoverable error.
37249      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37250$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37251      has_space=`$ECHO "$complete" | $GREP " "`
37252      if test "x$has_space" != x; then
37253        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37254$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37255      fi
37256      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37257    fi
37258  fi
37259
37260  # Now new_path has a complete unix path to the binary
37261  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37262    # Keep paths in /bin as-is, but remove trailing .exe if any
37263    new_path="${new_path/%.exe/}"
37264    # Do not save /bin paths to all_fixpath_prefixes!
37265  else
37266    # Not in mixed or Windows style, start by that.
37267    new_path=`cmd //c echo $new_path`
37268
37269  input_path="$new_path"
37270  # Check if we need to convert this using DOS-style short mode. If the path
37271  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37272  # take no chances and rewrite it.
37273  # Note: m4 eats our [], so we need to use [ and ] instead.
37274  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37275  if test "x$has_forbidden_chars" != x; then
37276    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37277    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37278  fi
37279
37280    # Output is in $new_path
37281
37282  windows_path="$new_path"
37283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37284    unix_path=`$CYGPATH -u "$windows_path"`
37285    new_path="$unix_path"
37286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37287    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37288    new_path="$unix_path"
37289  fi
37290
37291    # remove trailing .exe if any
37292    new_path="${new_path/%.exe/}"
37293
37294    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37295    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37296  fi
37297
37298    else
37299      # We're on a unix platform. Hooray! :)
37300      # First separate the path from the arguments. This will split at the first
37301      # space.
37302      complete="$AS"
37303      path="${complete%% *}"
37304      tmp="$complete EOL"
37305      arguments="${tmp#* }"
37306
37307      # Cannot rely on the command "which" here since it doesn't always work.
37308      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37309      if test -z "$is_absolute_path"; then
37310        # Path to executable is not absolute. Find it.
37311        IFS_save="$IFS"
37312        IFS=:
37313        for p in $PATH; do
37314          if test -f "$p/$path" && test -x "$p/$path"; then
37315            new_path="$p/$path"
37316            break
37317          fi
37318        done
37319        IFS="$IFS_save"
37320      else
37321        # This is an absolute path, we can use it without further modifications.
37322        new_path="$path"
37323      fi
37324
37325      if test "x$new_path" = x; then
37326        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37327$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37328        has_space=`$ECHO "$complete" | $GREP " "`
37329        if test "x$has_space" != x; then
37330          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37331$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37332        fi
37333        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37334      fi
37335    fi
37336
37337    # Now join together the path and the arguments once again
37338    if test "x$arguments" != xEOL; then
37339      new_complete="$new_path ${arguments% *}"
37340    else
37341      new_complete="$new_path"
37342    fi
37343
37344    if test "x$complete" != "x$new_complete"; then
37345      AS="$new_complete"
37346      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37347$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37348    fi
37349  fi
37350
37351    if test "x$AS" = x; then
37352      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37353    fi
37354  else
37355    # FIXME: is this correct for microsoft?
37356    AS="$CC -c"
37357  fi
37358
37359
37360  #
37361  # Setup the archiver (AR)
37362  #
37363  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37364    # The corresponding ar tool is lib.exe (used to create static libraries)
37365    # Extract the first word of "lib", so it can be a program name with args.
37366set dummy lib; ac_word=$2
37367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37368$as_echo_n "checking for $ac_word... " >&6; }
37369if ${ac_cv_prog_AR+:} false; then :
37370  $as_echo_n "(cached) " >&6
37371else
37372  if test -n "$AR"; then
37373  ac_cv_prog_AR="$AR" # Let the user override the test.
37374else
37375as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37376for as_dir in $PATH
37377do
37378  IFS=$as_save_IFS
37379  test -z "$as_dir" && as_dir=.
37380    for ac_exec_ext in '' $ac_executable_extensions; do
37381  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37382    ac_cv_prog_AR="lib"
37383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37384    break 2
37385  fi
37386done
37387  done
37388IFS=$as_save_IFS
37389
37390fi
37391fi
37392AR=$ac_cv_prog_AR
37393if test -n "$AR"; then
37394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37395$as_echo "$AR" >&6; }
37396else
37397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37398$as_echo "no" >&6; }
37399fi
37400
37401
37402  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37403
37404
37405  # Publish this variable in the help.
37406
37407
37408  if [ -z "${AR+x}" ]; then
37409    # The variable is not set by user, try to locate tool using the code snippet
37410    if test -n "$ac_tool_prefix"; then
37411  for ac_prog in ar gcc-ar
37412  do
37413    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37414set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37416$as_echo_n "checking for $ac_word... " >&6; }
37417if ${ac_cv_prog_AR+:} false; then :
37418  $as_echo_n "(cached) " >&6
37419else
37420  if test -n "$AR"; then
37421  ac_cv_prog_AR="$AR" # Let the user override the test.
37422else
37423as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37424for as_dir in $PATH
37425do
37426  IFS=$as_save_IFS
37427  test -z "$as_dir" && as_dir=.
37428    for ac_exec_ext in '' $ac_executable_extensions; do
37429  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37430    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37431    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37432    break 2
37433  fi
37434done
37435  done
37436IFS=$as_save_IFS
37437
37438fi
37439fi
37440AR=$ac_cv_prog_AR
37441if test -n "$AR"; then
37442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37443$as_echo "$AR" >&6; }
37444else
37445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37446$as_echo "no" >&6; }
37447fi
37448
37449
37450    test -n "$AR" && break
37451  done
37452fi
37453if test -z "$AR"; then
37454  ac_ct_AR=$AR
37455  for ac_prog in ar gcc-ar
37456do
37457  # Extract the first word of "$ac_prog", so it can be a program name with args.
37458set dummy $ac_prog; ac_word=$2
37459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37460$as_echo_n "checking for $ac_word... " >&6; }
37461if ${ac_cv_prog_ac_ct_AR+:} false; then :
37462  $as_echo_n "(cached) " >&6
37463else
37464  if test -n "$ac_ct_AR"; then
37465  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37466else
37467as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37468for as_dir in $PATH
37469do
37470  IFS=$as_save_IFS
37471  test -z "$as_dir" && as_dir=.
37472    for ac_exec_ext in '' $ac_executable_extensions; do
37473  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37474    ac_cv_prog_ac_ct_AR="$ac_prog"
37475    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37476    break 2
37477  fi
37478done
37479  done
37480IFS=$as_save_IFS
37481
37482fi
37483fi
37484ac_ct_AR=$ac_cv_prog_ac_ct_AR
37485if test -n "$ac_ct_AR"; then
37486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37487$as_echo "$ac_ct_AR" >&6; }
37488else
37489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37490$as_echo "no" >&6; }
37491fi
37492
37493
37494  test -n "$ac_ct_AR" && break
37495done
37496
37497  if test "x$ac_ct_AR" = x; then
37498    AR=""
37499  else
37500    case $cross_compiling:$ac_tool_warned in
37501yes:)
37502{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37503$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37504ac_tool_warned=yes ;;
37505esac
37506    AR=$ac_ct_AR
37507  fi
37508fi
37509
37510  else
37511    # The variable is set, but is it from the command line or the environment?
37512
37513    # Try to remove the string !AR! from our list.
37514    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37515    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37516      # If it failed, the variable was not from the command line. Ignore it,
37517      # but warn the user (except for BASH, which is always set by the calling BASH).
37518      if test "xAR" != xBASH; then
37519        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37520$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37521      fi
37522      # Try to locate tool using the code snippet
37523      if test -n "$ac_tool_prefix"; then
37524  for ac_prog in ar gcc-ar
37525  do
37526    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37527set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37529$as_echo_n "checking for $ac_word... " >&6; }
37530if ${ac_cv_prog_AR+:} false; then :
37531  $as_echo_n "(cached) " >&6
37532else
37533  if test -n "$AR"; then
37534  ac_cv_prog_AR="$AR" # Let the user override the test.
37535else
37536as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37537for as_dir in $PATH
37538do
37539  IFS=$as_save_IFS
37540  test -z "$as_dir" && as_dir=.
37541    for ac_exec_ext in '' $ac_executable_extensions; do
37542  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37543    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37545    break 2
37546  fi
37547done
37548  done
37549IFS=$as_save_IFS
37550
37551fi
37552fi
37553AR=$ac_cv_prog_AR
37554if test -n "$AR"; then
37555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37556$as_echo "$AR" >&6; }
37557else
37558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37559$as_echo "no" >&6; }
37560fi
37561
37562
37563    test -n "$AR" && break
37564  done
37565fi
37566if test -z "$AR"; then
37567  ac_ct_AR=$AR
37568  for ac_prog in ar gcc-ar
37569do
37570  # Extract the first word of "$ac_prog", so it can be a program name with args.
37571set dummy $ac_prog; ac_word=$2
37572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37573$as_echo_n "checking for $ac_word... " >&6; }
37574if ${ac_cv_prog_ac_ct_AR+:} false; then :
37575  $as_echo_n "(cached) " >&6
37576else
37577  if test -n "$ac_ct_AR"; then
37578  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37579else
37580as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37581for as_dir in $PATH
37582do
37583  IFS=$as_save_IFS
37584  test -z "$as_dir" && as_dir=.
37585    for ac_exec_ext in '' $ac_executable_extensions; do
37586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37587    ac_cv_prog_ac_ct_AR="$ac_prog"
37588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37589    break 2
37590  fi
37591done
37592  done
37593IFS=$as_save_IFS
37594
37595fi
37596fi
37597ac_ct_AR=$ac_cv_prog_ac_ct_AR
37598if test -n "$ac_ct_AR"; then
37599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37600$as_echo "$ac_ct_AR" >&6; }
37601else
37602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37603$as_echo "no" >&6; }
37604fi
37605
37606
37607  test -n "$ac_ct_AR" && break
37608done
37609
37610  if test "x$ac_ct_AR" = x; then
37611    AR=""
37612  else
37613    case $cross_compiling:$ac_tool_warned in
37614yes:)
37615{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37616$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37617ac_tool_warned=yes ;;
37618esac
37619    AR=$ac_ct_AR
37620  fi
37621fi
37622
37623    else
37624      # If it succeeded, then it was overridden by the user. We will use it
37625      # for the tool.
37626
37627      # First remove it from the list of overridden variables, so we can test
37628      # for unknown variables in the end.
37629      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37630
37631      # Check if we try to supply an empty value
37632      if test "x$AR" = x; then
37633        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37634$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37635        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37636$as_echo_n "checking for AR... " >&6; }
37637        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37638$as_echo "disabled" >&6; }
37639      else
37640        # Check if the provided tool contains a complete path.
37641        tool_specified="$AR"
37642        tool_basename="${tool_specified##*/}"
37643        if test "x$tool_basename" = "x$tool_specified"; then
37644          # A command without a complete path is provided, search $PATH.
37645          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37646$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37647          # Extract the first word of "$tool_basename", so it can be a program name with args.
37648set dummy $tool_basename; ac_word=$2
37649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37650$as_echo_n "checking for $ac_word... " >&6; }
37651if ${ac_cv_path_AR+:} false; then :
37652  $as_echo_n "(cached) " >&6
37653else
37654  case $AR in
37655  [\\/]* | ?:[\\/]*)
37656  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37657  ;;
37658  *)
37659  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37660for as_dir in $PATH
37661do
37662  IFS=$as_save_IFS
37663  test -z "$as_dir" && as_dir=.
37664    for ac_exec_ext in '' $ac_executable_extensions; do
37665  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37666    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37667    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37668    break 2
37669  fi
37670done
37671  done
37672IFS=$as_save_IFS
37673
37674  ;;
37675esac
37676fi
37677AR=$ac_cv_path_AR
37678if test -n "$AR"; then
37679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37680$as_echo "$AR" >&6; }
37681else
37682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37683$as_echo "no" >&6; }
37684fi
37685
37686
37687          if test "x$AR" = x; then
37688            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37689          fi
37690        else
37691          # Otherwise we believe it is a complete path. Use it as it is.
37692          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37693$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37694          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37695$as_echo_n "checking for AR... " >&6; }
37696          if test ! -x "$tool_specified"; then
37697            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37698$as_echo "not found" >&6; }
37699            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37700          fi
37701          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37702$as_echo "$tool_specified" >&6; }
37703        fi
37704      fi
37705    fi
37706
37707  fi
37708
37709
37710  else
37711
37712
37713  # Publish this variable in the help.
37714
37715
37716  if [ -z "${AR+x}" ]; then
37717    # The variable is not set by user, try to locate tool using the code snippet
37718    if test -n "$ac_tool_prefix"; then
37719  for ac_prog in ar
37720  do
37721    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37722set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37724$as_echo_n "checking for $ac_word... " >&6; }
37725if ${ac_cv_prog_AR+:} false; then :
37726  $as_echo_n "(cached) " >&6
37727else
37728  if test -n "$AR"; then
37729  ac_cv_prog_AR="$AR" # Let the user override the test.
37730else
37731as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37732for as_dir in $PATH
37733do
37734  IFS=$as_save_IFS
37735  test -z "$as_dir" && as_dir=.
37736    for ac_exec_ext in '' $ac_executable_extensions; do
37737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37738    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37740    break 2
37741  fi
37742done
37743  done
37744IFS=$as_save_IFS
37745
37746fi
37747fi
37748AR=$ac_cv_prog_AR
37749if test -n "$AR"; then
37750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37751$as_echo "$AR" >&6; }
37752else
37753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37754$as_echo "no" >&6; }
37755fi
37756
37757
37758    test -n "$AR" && break
37759  done
37760fi
37761if test -z "$AR"; then
37762  ac_ct_AR=$AR
37763  for ac_prog in ar
37764do
37765  # Extract the first word of "$ac_prog", so it can be a program name with args.
37766set dummy $ac_prog; ac_word=$2
37767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37768$as_echo_n "checking for $ac_word... " >&6; }
37769if ${ac_cv_prog_ac_ct_AR+:} false; then :
37770  $as_echo_n "(cached) " >&6
37771else
37772  if test -n "$ac_ct_AR"; then
37773  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37774else
37775as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37776for as_dir in $PATH
37777do
37778  IFS=$as_save_IFS
37779  test -z "$as_dir" && as_dir=.
37780    for ac_exec_ext in '' $ac_executable_extensions; do
37781  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37782    ac_cv_prog_ac_ct_AR="$ac_prog"
37783    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37784    break 2
37785  fi
37786done
37787  done
37788IFS=$as_save_IFS
37789
37790fi
37791fi
37792ac_ct_AR=$ac_cv_prog_ac_ct_AR
37793if test -n "$ac_ct_AR"; then
37794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37795$as_echo "$ac_ct_AR" >&6; }
37796else
37797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37798$as_echo "no" >&6; }
37799fi
37800
37801
37802  test -n "$ac_ct_AR" && break
37803done
37804
37805  if test "x$ac_ct_AR" = x; then
37806    AR=""
37807  else
37808    case $cross_compiling:$ac_tool_warned in
37809yes:)
37810{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37811$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37812ac_tool_warned=yes ;;
37813esac
37814    AR=$ac_ct_AR
37815  fi
37816fi
37817
37818  else
37819    # The variable is set, but is it from the command line or the environment?
37820
37821    # Try to remove the string !AR! from our list.
37822    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37823    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37824      # If it failed, the variable was not from the command line. Ignore it,
37825      # but warn the user (except for BASH, which is always set by the calling BASH).
37826      if test "xAR" != xBASH; then
37827        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37828$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37829      fi
37830      # Try to locate tool using the code snippet
37831      if test -n "$ac_tool_prefix"; then
37832  for ac_prog in ar
37833  do
37834    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37835set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37837$as_echo_n "checking for $ac_word... " >&6; }
37838if ${ac_cv_prog_AR+:} false; then :
37839  $as_echo_n "(cached) " >&6
37840else
37841  if test -n "$AR"; then
37842  ac_cv_prog_AR="$AR" # Let the user override the test.
37843else
37844as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37845for as_dir in $PATH
37846do
37847  IFS=$as_save_IFS
37848  test -z "$as_dir" && as_dir=.
37849    for ac_exec_ext in '' $ac_executable_extensions; do
37850  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37851    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37852    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37853    break 2
37854  fi
37855done
37856  done
37857IFS=$as_save_IFS
37858
37859fi
37860fi
37861AR=$ac_cv_prog_AR
37862if test -n "$AR"; then
37863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37864$as_echo "$AR" >&6; }
37865else
37866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37867$as_echo "no" >&6; }
37868fi
37869
37870
37871    test -n "$AR" && break
37872  done
37873fi
37874if test -z "$AR"; then
37875  ac_ct_AR=$AR
37876  for ac_prog in ar
37877do
37878  # Extract the first word of "$ac_prog", so it can be a program name with args.
37879set dummy $ac_prog; ac_word=$2
37880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37881$as_echo_n "checking for $ac_word... " >&6; }
37882if ${ac_cv_prog_ac_ct_AR+:} false; then :
37883  $as_echo_n "(cached) " >&6
37884else
37885  if test -n "$ac_ct_AR"; then
37886  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37887else
37888as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37889for as_dir in $PATH
37890do
37891  IFS=$as_save_IFS
37892  test -z "$as_dir" && as_dir=.
37893    for ac_exec_ext in '' $ac_executable_extensions; do
37894  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37895    ac_cv_prog_ac_ct_AR="$ac_prog"
37896    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37897    break 2
37898  fi
37899done
37900  done
37901IFS=$as_save_IFS
37902
37903fi
37904fi
37905ac_ct_AR=$ac_cv_prog_ac_ct_AR
37906if test -n "$ac_ct_AR"; then
37907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37908$as_echo "$ac_ct_AR" >&6; }
37909else
37910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37911$as_echo "no" >&6; }
37912fi
37913
37914
37915  test -n "$ac_ct_AR" && break
37916done
37917
37918  if test "x$ac_ct_AR" = x; then
37919    AR=""
37920  else
37921    case $cross_compiling:$ac_tool_warned in
37922yes:)
37923{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37924$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37925ac_tool_warned=yes ;;
37926esac
37927    AR=$ac_ct_AR
37928  fi
37929fi
37930
37931    else
37932      # If it succeeded, then it was overridden by the user. We will use it
37933      # for the tool.
37934
37935      # First remove it from the list of overridden variables, so we can test
37936      # for unknown variables in the end.
37937      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37938
37939      # Check if we try to supply an empty value
37940      if test "x$AR" = x; then
37941        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37942$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37943        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37944$as_echo_n "checking for AR... " >&6; }
37945        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37946$as_echo "disabled" >&6; }
37947      else
37948        # Check if the provided tool contains a complete path.
37949        tool_specified="$AR"
37950        tool_basename="${tool_specified##*/}"
37951        if test "x$tool_basename" = "x$tool_specified"; then
37952          # A command without a complete path is provided, search $PATH.
37953          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37954$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37955          # Extract the first word of "$tool_basename", so it can be a program name with args.
37956set dummy $tool_basename; ac_word=$2
37957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37958$as_echo_n "checking for $ac_word... " >&6; }
37959if ${ac_cv_path_AR+:} false; then :
37960  $as_echo_n "(cached) " >&6
37961else
37962  case $AR in
37963  [\\/]* | ?:[\\/]*)
37964  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37965  ;;
37966  *)
37967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37968for as_dir in $PATH
37969do
37970  IFS=$as_save_IFS
37971  test -z "$as_dir" && as_dir=.
37972    for ac_exec_ext in '' $ac_executable_extensions; do
37973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37974    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37976    break 2
37977  fi
37978done
37979  done
37980IFS=$as_save_IFS
37981
37982  ;;
37983esac
37984fi
37985AR=$ac_cv_path_AR
37986if test -n "$AR"; then
37987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37988$as_echo "$AR" >&6; }
37989else
37990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37991$as_echo "no" >&6; }
37992fi
37993
37994
37995          if test "x$AR" = x; then
37996            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37997          fi
37998        else
37999          # Otherwise we believe it is a complete path. Use it as it is.
38000          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38001$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38002          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38003$as_echo_n "checking for AR... " >&6; }
38004          if test ! -x "$tool_specified"; then
38005            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38006$as_echo "not found" >&6; }
38007            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38008          fi
38009          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38010$as_echo "$tool_specified" >&6; }
38011        fi
38012      fi
38013    fi
38014
38015  fi
38016
38017
38018  fi
38019
38020  # Only process if variable expands to non-empty
38021
38022  if test "x$AR" != x; then
38023    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38024
38025  # First separate the path from the arguments. This will split at the first
38026  # space.
38027  complete="$AR"
38028  path="${complete%% *}"
38029  tmp="$complete EOL"
38030  arguments="${tmp#* }"
38031
38032  # Input might be given as Windows format, start by converting to
38033  # unix format.
38034  new_path=`$CYGPATH -u "$path"`
38035
38036  # Now try to locate executable using which
38037  new_path=`$WHICH "$new_path" 2> /dev/null`
38038  # bat and cmd files are not always considered executable in cygwin causing which
38039  # to not find them
38040  if test "x$new_path" = x \
38041      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38042      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38043    new_path=`$CYGPATH -u "$path"`
38044  fi
38045  if test "x$new_path" = x; then
38046    # Oops. Which didn't find the executable.
38047    # The splitting of arguments from the executable at a space might have been incorrect,
38048    # since paths with space are more likely in Windows. Give it another try with the whole
38049    # argument.
38050    path="$complete"
38051    arguments="EOL"
38052    new_path=`$CYGPATH -u "$path"`
38053    new_path=`$WHICH "$new_path" 2> /dev/null`
38054    # bat and cmd files are not always considered executable in cygwin causing which
38055    # to not find them
38056    if test "x$new_path" = x \
38057        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38058        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38059      new_path=`$CYGPATH -u "$path"`
38060    fi
38061    if test "x$new_path" = x; then
38062      # It's still not found. Now this is an unrecoverable error.
38063      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38064$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38065      has_space=`$ECHO "$complete" | $GREP " "`
38066      if test "x$has_space" != x; then
38067        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38068$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38069      fi
38070      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38071    fi
38072  fi
38073
38074  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38075  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38076  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38077  # "foo.exe" is OK but "foo" is an error.
38078  #
38079  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38080  # It is also a way to make sure we got the proper file name for the real test later on.
38081  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38082  if test "x$test_shortpath" = x; then
38083    # Short path failed, file does not exist as specified.
38084    # Try adding .exe or .cmd
38085    if test -f "${new_path}.exe"; then
38086      input_to_shortpath="${new_path}.exe"
38087    elif test -f "${new_path}.cmd"; then
38088      input_to_shortpath="${new_path}.cmd"
38089    else
38090      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
38091$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
38092      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38093$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38094      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38095    fi
38096  else
38097    input_to_shortpath="$new_path"
38098  fi
38099
38100  # Call helper function which possibly converts this using DOS-style short mode.
38101  # If so, the updated path is stored in $new_path.
38102  new_path="$input_to_shortpath"
38103
38104  input_path="$input_to_shortpath"
38105  # Check if we need to convert this using DOS-style short mode. If the path
38106  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38107  # take no chances and rewrite it.
38108  # Note: m4 eats our [], so we need to use [ and ] instead.
38109  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38110  if test "x$has_forbidden_chars" != x; then
38111    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38112    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38113    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38114    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38115      # Going to short mode and back again did indeed matter. Since short mode is
38116      # case insensitive, let's make it lowercase to improve readability.
38117      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38118      # Now convert it back to Unix-style (cygpath)
38119      input_path=`$CYGPATH -u "$shortmode_path"`
38120      new_path="$input_path"
38121    fi
38122  fi
38123
38124  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38125  if test "x$test_cygdrive_prefix" = x; then
38126    # As a simple fix, exclude /usr/bin since it's not a real path.
38127    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38128      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38129      # a path prefixed by /cygdrive for fixpath to work.
38130      new_path="$CYGWIN_ROOT_PATH$input_path"
38131    fi
38132  fi
38133
38134  # remove trailing .exe if any
38135  new_path="${new_path/%.exe/}"
38136
38137    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38138
38139  # First separate the path from the arguments. This will split at the first
38140  # space.
38141  complete="$AR"
38142  path="${complete%% *}"
38143  tmp="$complete EOL"
38144  arguments="${tmp#* }"
38145
38146  # Input might be given as Windows format, start by converting to
38147  # unix format.
38148  new_path="$path"
38149
38150  windows_path="$new_path"
38151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38152    unix_path=`$CYGPATH -u "$windows_path"`
38153    new_path="$unix_path"
38154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38156    new_path="$unix_path"
38157  fi
38158
38159
38160  # Now try to locate executable using which
38161  new_path=`$WHICH "$new_path" 2> /dev/null`
38162
38163  if test "x$new_path" = x; then
38164    # Oops. Which didn't find the executable.
38165    # The splitting of arguments from the executable at a space might have been incorrect,
38166    # since paths with space are more likely in Windows. Give it another try with the whole
38167    # argument.
38168    path="$complete"
38169    arguments="EOL"
38170    new_path="$path"
38171
38172  windows_path="$new_path"
38173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38174    unix_path=`$CYGPATH -u "$windows_path"`
38175    new_path="$unix_path"
38176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38178    new_path="$unix_path"
38179  fi
38180
38181
38182    new_path=`$WHICH "$new_path" 2> /dev/null`
38183    # bat and cmd files are not always considered executable in MSYS causing which
38184    # to not find them
38185    if test "x$new_path" = x \
38186        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38187        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38188      new_path="$path"
38189
38190  windows_path="$new_path"
38191  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38192    unix_path=`$CYGPATH -u "$windows_path"`
38193    new_path="$unix_path"
38194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38195    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38196    new_path="$unix_path"
38197  fi
38198
38199    fi
38200
38201    if test "x$new_path" = x; then
38202      # It's still not found. Now this is an unrecoverable error.
38203      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38204$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38205      has_space=`$ECHO "$complete" | $GREP " "`
38206      if test "x$has_space" != x; then
38207        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38208$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38209      fi
38210      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38211    fi
38212  fi
38213
38214  # Now new_path has a complete unix path to the binary
38215  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38216    # Keep paths in /bin as-is, but remove trailing .exe if any
38217    new_path="${new_path/%.exe/}"
38218    # Do not save /bin paths to all_fixpath_prefixes!
38219  else
38220    # Not in mixed or Windows style, start by that.
38221    new_path=`cmd //c echo $new_path`
38222
38223  input_path="$new_path"
38224  # Check if we need to convert this using DOS-style short mode. If the path
38225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38226  # take no chances and rewrite it.
38227  # Note: m4 eats our [], so we need to use [ and ] instead.
38228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38229  if test "x$has_forbidden_chars" != x; then
38230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38231    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38232  fi
38233
38234    # Output is in $new_path
38235
38236  windows_path="$new_path"
38237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38238    unix_path=`$CYGPATH -u "$windows_path"`
38239    new_path="$unix_path"
38240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38241    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38242    new_path="$unix_path"
38243  fi
38244
38245    # remove trailing .exe if any
38246    new_path="${new_path/%.exe/}"
38247
38248    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38249    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38250  fi
38251
38252    else
38253      # We're on a unix platform. Hooray! :)
38254      # First separate the path from the arguments. This will split at the first
38255      # space.
38256      complete="$AR"
38257      path="${complete%% *}"
38258      tmp="$complete EOL"
38259      arguments="${tmp#* }"
38260
38261      # Cannot rely on the command "which" here since it doesn't always work.
38262      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38263      if test -z "$is_absolute_path"; then
38264        # Path to executable is not absolute. Find it.
38265        IFS_save="$IFS"
38266        IFS=:
38267        for p in $PATH; do
38268          if test -f "$p/$path" && test -x "$p/$path"; then
38269            new_path="$p/$path"
38270            break
38271          fi
38272        done
38273        IFS="$IFS_save"
38274      else
38275        # This is an absolute path, we can use it without further modifications.
38276        new_path="$path"
38277      fi
38278
38279      if test "x$new_path" = x; then
38280        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38281$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38282        has_space=`$ECHO "$complete" | $GREP " "`
38283        if test "x$has_space" != x; then
38284          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38285$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38286        fi
38287        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38288      fi
38289    fi
38290
38291    # Now join together the path and the arguments once again
38292    if test "x$arguments" != xEOL; then
38293      new_complete="$new_path ${arguments% *}"
38294    else
38295      new_complete="$new_path"
38296    fi
38297
38298    if test "x$complete" != "x$new_complete"; then
38299      AR="$new_complete"
38300      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38301$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38302    fi
38303  fi
38304
38305
38306
38307  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38308
38309
38310  # Publish this variable in the help.
38311
38312
38313  if [ -z "${LIPO+x}" ]; then
38314    # The variable is not set by user, try to locate tool using the code snippet
38315    for ac_prog in lipo
38316do
38317  # Extract the first word of "$ac_prog", so it can be a program name with args.
38318set dummy $ac_prog; ac_word=$2
38319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38320$as_echo_n "checking for $ac_word... " >&6; }
38321if ${ac_cv_path_LIPO+:} false; then :
38322  $as_echo_n "(cached) " >&6
38323else
38324  case $LIPO in
38325  [\\/]* | ?:[\\/]*)
38326  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38327  ;;
38328  *)
38329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38330for as_dir in $PATH
38331do
38332  IFS=$as_save_IFS
38333  test -z "$as_dir" && as_dir=.
38334    for ac_exec_ext in '' $ac_executable_extensions; do
38335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38336    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38338    break 2
38339  fi
38340done
38341  done
38342IFS=$as_save_IFS
38343
38344  ;;
38345esac
38346fi
38347LIPO=$ac_cv_path_LIPO
38348if test -n "$LIPO"; then
38349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38350$as_echo "$LIPO" >&6; }
38351else
38352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38353$as_echo "no" >&6; }
38354fi
38355
38356
38357  test -n "$LIPO" && break
38358done
38359
38360  else
38361    # The variable is set, but is it from the command line or the environment?
38362
38363    # Try to remove the string !LIPO! from our list.
38364    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38365    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38366      # If it failed, the variable was not from the command line. Ignore it,
38367      # but warn the user (except for BASH, which is always set by the calling BASH).
38368      if test "xLIPO" != xBASH; then
38369        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38370$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38371      fi
38372      # Try to locate tool using the code snippet
38373      for ac_prog in lipo
38374do
38375  # Extract the first word of "$ac_prog", so it can be a program name with args.
38376set dummy $ac_prog; ac_word=$2
38377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38378$as_echo_n "checking for $ac_word... " >&6; }
38379if ${ac_cv_path_LIPO+:} false; then :
38380  $as_echo_n "(cached) " >&6
38381else
38382  case $LIPO in
38383  [\\/]* | ?:[\\/]*)
38384  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38385  ;;
38386  *)
38387  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38388for as_dir in $PATH
38389do
38390  IFS=$as_save_IFS
38391  test -z "$as_dir" && as_dir=.
38392    for ac_exec_ext in '' $ac_executable_extensions; do
38393  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38394    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38396    break 2
38397  fi
38398done
38399  done
38400IFS=$as_save_IFS
38401
38402  ;;
38403esac
38404fi
38405LIPO=$ac_cv_path_LIPO
38406if test -n "$LIPO"; then
38407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38408$as_echo "$LIPO" >&6; }
38409else
38410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38411$as_echo "no" >&6; }
38412fi
38413
38414
38415  test -n "$LIPO" && break
38416done
38417
38418    else
38419      # If it succeeded, then it was overridden by the user. We will use it
38420      # for the tool.
38421
38422      # First remove it from the list of overridden variables, so we can test
38423      # for unknown variables in the end.
38424      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38425
38426      # Check if we try to supply an empty value
38427      if test "x$LIPO" = x; then
38428        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38429$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38430        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38431$as_echo_n "checking for LIPO... " >&6; }
38432        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38433$as_echo "disabled" >&6; }
38434      else
38435        # Check if the provided tool contains a complete path.
38436        tool_specified="$LIPO"
38437        tool_basename="${tool_specified##*/}"
38438        if test "x$tool_basename" = "x$tool_specified"; then
38439          # A command without a complete path is provided, search $PATH.
38440          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38441$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38442          # Extract the first word of "$tool_basename", so it can be a program name with args.
38443set dummy $tool_basename; ac_word=$2
38444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38445$as_echo_n "checking for $ac_word... " >&6; }
38446if ${ac_cv_path_LIPO+:} false; then :
38447  $as_echo_n "(cached) " >&6
38448else
38449  case $LIPO in
38450  [\\/]* | ?:[\\/]*)
38451  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38452  ;;
38453  *)
38454  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38455for as_dir in $PATH
38456do
38457  IFS=$as_save_IFS
38458  test -z "$as_dir" && as_dir=.
38459    for ac_exec_ext in '' $ac_executable_extensions; do
38460  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38461    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38462    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38463    break 2
38464  fi
38465done
38466  done
38467IFS=$as_save_IFS
38468
38469  ;;
38470esac
38471fi
38472LIPO=$ac_cv_path_LIPO
38473if test -n "$LIPO"; then
38474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38475$as_echo "$LIPO" >&6; }
38476else
38477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38478$as_echo "no" >&6; }
38479fi
38480
38481
38482          if test "x$LIPO" = x; then
38483            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38484          fi
38485        else
38486          # Otherwise we believe it is a complete path. Use it as it is.
38487          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38488$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38489          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38490$as_echo_n "checking for LIPO... " >&6; }
38491          if test ! -x "$tool_specified"; then
38492            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38493$as_echo "not found" >&6; }
38494            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
38495          fi
38496          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38497$as_echo "$tool_specified" >&6; }
38498        fi
38499      fi
38500    fi
38501
38502  fi
38503
38504
38505
38506  # Only process if variable expands to non-empty
38507
38508  if test "x$LIPO" != x; then
38509    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38510
38511  # First separate the path from the arguments. This will split at the first
38512  # space.
38513  complete="$LIPO"
38514  path="${complete%% *}"
38515  tmp="$complete EOL"
38516  arguments="${tmp#* }"
38517
38518  # Input might be given as Windows format, start by converting to
38519  # unix format.
38520  new_path=`$CYGPATH -u "$path"`
38521
38522  # Now try to locate executable using which
38523  new_path=`$WHICH "$new_path" 2> /dev/null`
38524  # bat and cmd files are not always considered executable in cygwin causing which
38525  # to not find them
38526  if test "x$new_path" = x \
38527      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38528      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38529    new_path=`$CYGPATH -u "$path"`
38530  fi
38531  if test "x$new_path" = x; then
38532    # Oops. Which didn't find the executable.
38533    # The splitting of arguments from the executable at a space might have been incorrect,
38534    # since paths with space are more likely in Windows. Give it another try with the whole
38535    # argument.
38536    path="$complete"
38537    arguments="EOL"
38538    new_path=`$CYGPATH -u "$path"`
38539    new_path=`$WHICH "$new_path" 2> /dev/null`
38540    # bat and cmd files are not always considered executable in cygwin causing which
38541    # to not find them
38542    if test "x$new_path" = x \
38543        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38544        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38545      new_path=`$CYGPATH -u "$path"`
38546    fi
38547    if test "x$new_path" = x; then
38548      # It's still not found. Now this is an unrecoverable error.
38549      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38550$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38551      has_space=`$ECHO "$complete" | $GREP " "`
38552      if test "x$has_space" != x; then
38553        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38554$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38555      fi
38556      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38557    fi
38558  fi
38559
38560  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38561  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38562  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38563  # "foo.exe" is OK but "foo" is an error.
38564  #
38565  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38566  # It is also a way to make sure we got the proper file name for the real test later on.
38567  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38568  if test "x$test_shortpath" = x; then
38569    # Short path failed, file does not exist as specified.
38570    # Try adding .exe or .cmd
38571    if test -f "${new_path}.exe"; then
38572      input_to_shortpath="${new_path}.exe"
38573    elif test -f "${new_path}.cmd"; then
38574      input_to_shortpath="${new_path}.cmd"
38575    else
38576      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
38577$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
38578      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38579$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38580      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38581    fi
38582  else
38583    input_to_shortpath="$new_path"
38584  fi
38585
38586  # Call helper function which possibly converts this using DOS-style short mode.
38587  # If so, the updated path is stored in $new_path.
38588  new_path="$input_to_shortpath"
38589
38590  input_path="$input_to_shortpath"
38591  # Check if we need to convert this using DOS-style short mode. If the path
38592  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38593  # take no chances and rewrite it.
38594  # Note: m4 eats our [], so we need to use [ and ] instead.
38595  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38596  if test "x$has_forbidden_chars" != x; then
38597    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38598    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38599    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38600    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38601      # Going to short mode and back again did indeed matter. Since short mode is
38602      # case insensitive, let's make it lowercase to improve readability.
38603      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38604      # Now convert it back to Unix-style (cygpath)
38605      input_path=`$CYGPATH -u "$shortmode_path"`
38606      new_path="$input_path"
38607    fi
38608  fi
38609
38610  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38611  if test "x$test_cygdrive_prefix" = x; then
38612    # As a simple fix, exclude /usr/bin since it's not a real path.
38613    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38614      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38615      # a path prefixed by /cygdrive for fixpath to work.
38616      new_path="$CYGWIN_ROOT_PATH$input_path"
38617    fi
38618  fi
38619
38620  # remove trailing .exe if any
38621  new_path="${new_path/%.exe/}"
38622
38623    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38624
38625  # First separate the path from the arguments. This will split at the first
38626  # space.
38627  complete="$LIPO"
38628  path="${complete%% *}"
38629  tmp="$complete EOL"
38630  arguments="${tmp#* }"
38631
38632  # Input might be given as Windows format, start by converting to
38633  # unix format.
38634  new_path="$path"
38635
38636  windows_path="$new_path"
38637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38638    unix_path=`$CYGPATH -u "$windows_path"`
38639    new_path="$unix_path"
38640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38641    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38642    new_path="$unix_path"
38643  fi
38644
38645
38646  # Now try to locate executable using which
38647  new_path=`$WHICH "$new_path" 2> /dev/null`
38648
38649  if test "x$new_path" = x; then
38650    # Oops. Which didn't find the executable.
38651    # The splitting of arguments from the executable at a space might have been incorrect,
38652    # since paths with space are more likely in Windows. Give it another try with the whole
38653    # argument.
38654    path="$complete"
38655    arguments="EOL"
38656    new_path="$path"
38657
38658  windows_path="$new_path"
38659  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38660    unix_path=`$CYGPATH -u "$windows_path"`
38661    new_path="$unix_path"
38662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38663    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38664    new_path="$unix_path"
38665  fi
38666
38667
38668    new_path=`$WHICH "$new_path" 2> /dev/null`
38669    # bat and cmd files are not always considered executable in MSYS causing which
38670    # to not find them
38671    if test "x$new_path" = x \
38672        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38673        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38674      new_path="$path"
38675
38676  windows_path="$new_path"
38677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38678    unix_path=`$CYGPATH -u "$windows_path"`
38679    new_path="$unix_path"
38680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38682    new_path="$unix_path"
38683  fi
38684
38685    fi
38686
38687    if test "x$new_path" = x; then
38688      # It's still not found. Now this is an unrecoverable error.
38689      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38690$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38691      has_space=`$ECHO "$complete" | $GREP " "`
38692      if test "x$has_space" != x; then
38693        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38694$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38695      fi
38696      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38697    fi
38698  fi
38699
38700  # Now new_path has a complete unix path to the binary
38701  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38702    # Keep paths in /bin as-is, but remove trailing .exe if any
38703    new_path="${new_path/%.exe/}"
38704    # Do not save /bin paths to all_fixpath_prefixes!
38705  else
38706    # Not in mixed or Windows style, start by that.
38707    new_path=`cmd //c echo $new_path`
38708
38709  input_path="$new_path"
38710  # Check if we need to convert this using DOS-style short mode. If the path
38711  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38712  # take no chances and rewrite it.
38713  # Note: m4 eats our [], so we need to use [ and ] instead.
38714  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38715  if test "x$has_forbidden_chars" != x; then
38716    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38717    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38718  fi
38719
38720    # Output is in $new_path
38721
38722  windows_path="$new_path"
38723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38724    unix_path=`$CYGPATH -u "$windows_path"`
38725    new_path="$unix_path"
38726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38727    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38728    new_path="$unix_path"
38729  fi
38730
38731    # remove trailing .exe if any
38732    new_path="${new_path/%.exe/}"
38733
38734    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38735    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38736  fi
38737
38738    else
38739      # We're on a unix platform. Hooray! :)
38740      # First separate the path from the arguments. This will split at the first
38741      # space.
38742      complete="$LIPO"
38743      path="${complete%% *}"
38744      tmp="$complete EOL"
38745      arguments="${tmp#* }"
38746
38747      # Cannot rely on the command "which" here since it doesn't always work.
38748      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38749      if test -z "$is_absolute_path"; then
38750        # Path to executable is not absolute. Find it.
38751        IFS_save="$IFS"
38752        IFS=:
38753        for p in $PATH; do
38754          if test -f "$p/$path" && test -x "$p/$path"; then
38755            new_path="$p/$path"
38756            break
38757          fi
38758        done
38759        IFS="$IFS_save"
38760      else
38761        # This is an absolute path, we can use it without further modifications.
38762        new_path="$path"
38763      fi
38764
38765      if test "x$new_path" = x; then
38766        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38767$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38768        has_space=`$ECHO "$complete" | $GREP " "`
38769        if test "x$has_space" != x; then
38770          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38771$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38772        fi
38773        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38774      fi
38775    fi
38776
38777    # Now join together the path and the arguments once again
38778    if test "x$arguments" != xEOL; then
38779      new_complete="$new_path ${arguments% *}"
38780    else
38781      new_complete="$new_path"
38782    fi
38783
38784    if test "x$complete" != "x$new_complete"; then
38785      LIPO="$new_complete"
38786      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38787$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38788    fi
38789  fi
38790
38791  fi
38792
38793  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38794    # Extract the first word of "mt", so it can be a program name with args.
38795set dummy mt; ac_word=$2
38796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38797$as_echo_n "checking for $ac_word... " >&6; }
38798if ${ac_cv_prog_MT+:} false; then :
38799  $as_echo_n "(cached) " >&6
38800else
38801  if test -n "$MT"; then
38802  ac_cv_prog_MT="$MT" # Let the user override the test.
38803else
38804  ac_prog_rejected=no
38805as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38806for as_dir in $PATH
38807do
38808  IFS=$as_save_IFS
38809  test -z "$as_dir" && as_dir=.
38810    for ac_exec_ext in '' $ac_executable_extensions; do
38811  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38812    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38813       ac_prog_rejected=yes
38814       continue
38815     fi
38816    ac_cv_prog_MT="mt"
38817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38818    break 2
38819  fi
38820done
38821  done
38822IFS=$as_save_IFS
38823
38824if test $ac_prog_rejected = yes; then
38825  # We found a bogon in the path, so make sure we never use it.
38826  set dummy $ac_cv_prog_MT
38827  shift
38828  if test $# != 0; then
38829    # We chose a different compiler from the bogus one.
38830    # However, it has the same basename, so the bogon will be chosen
38831    # first if we set MT to just the basename; use the full file name.
38832    shift
38833    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38834  fi
38835fi
38836fi
38837fi
38838MT=$ac_cv_prog_MT
38839if test -n "$MT"; then
38840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38841$as_echo "$MT" >&6; }
38842else
38843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38844$as_echo "no" >&6; }
38845fi
38846
38847
38848
38849  # Only process if variable expands to non-empty
38850
38851  if test "x$MT" != x; then
38852    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38853
38854  # First separate the path from the arguments. This will split at the first
38855  # space.
38856  complete="$MT"
38857  path="${complete%% *}"
38858  tmp="$complete EOL"
38859  arguments="${tmp#* }"
38860
38861  # Input might be given as Windows format, start by converting to
38862  # unix format.
38863  new_path=`$CYGPATH -u "$path"`
38864
38865  # Now try to locate executable using which
38866  new_path=`$WHICH "$new_path" 2> /dev/null`
38867  # bat and cmd files are not always considered executable in cygwin causing which
38868  # to not find them
38869  if test "x$new_path" = x \
38870      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38871      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38872    new_path=`$CYGPATH -u "$path"`
38873  fi
38874  if test "x$new_path" = x; then
38875    # Oops. Which didn't find the executable.
38876    # The splitting of arguments from the executable at a space might have been incorrect,
38877    # since paths with space are more likely in Windows. Give it another try with the whole
38878    # argument.
38879    path="$complete"
38880    arguments="EOL"
38881    new_path=`$CYGPATH -u "$path"`
38882    new_path=`$WHICH "$new_path" 2> /dev/null`
38883    # bat and cmd files are not always considered executable in cygwin causing which
38884    # to not find them
38885    if test "x$new_path" = x \
38886        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38887        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38888      new_path=`$CYGPATH -u "$path"`
38889    fi
38890    if test "x$new_path" = x; then
38891      # It's still not found. Now this is an unrecoverable error.
38892      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38893$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38894      has_space=`$ECHO "$complete" | $GREP " "`
38895      if test "x$has_space" != x; then
38896        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38897$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38898      fi
38899      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38900    fi
38901  fi
38902
38903  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38904  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38905  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38906  # "foo.exe" is OK but "foo" is an error.
38907  #
38908  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38909  # It is also a way to make sure we got the proper file name for the real test later on.
38910  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38911  if test "x$test_shortpath" = x; then
38912    # Short path failed, file does not exist as specified.
38913    # Try adding .exe or .cmd
38914    if test -f "${new_path}.exe"; then
38915      input_to_shortpath="${new_path}.exe"
38916    elif test -f "${new_path}.cmd"; then
38917      input_to_shortpath="${new_path}.cmd"
38918    else
38919      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38920$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38921      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38922$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38923      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38924    fi
38925  else
38926    input_to_shortpath="$new_path"
38927  fi
38928
38929  # Call helper function which possibly converts this using DOS-style short mode.
38930  # If so, the updated path is stored in $new_path.
38931  new_path="$input_to_shortpath"
38932
38933  input_path="$input_to_shortpath"
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38942    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38943    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38944      # Going to short mode and back again did indeed matter. Since short mode is
38945      # case insensitive, let's make it lowercase to improve readability.
38946      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38947      # Now convert it back to Unix-style (cygpath)
38948      input_path=`$CYGPATH -u "$shortmode_path"`
38949      new_path="$input_path"
38950    fi
38951  fi
38952
38953  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38954  if test "x$test_cygdrive_prefix" = x; then
38955    # As a simple fix, exclude /usr/bin since it's not a real path.
38956    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38957      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38958      # a path prefixed by /cygdrive for fixpath to work.
38959      new_path="$CYGWIN_ROOT_PATH$input_path"
38960    fi
38961  fi
38962
38963  # remove trailing .exe if any
38964  new_path="${new_path/%.exe/}"
38965
38966    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38967
38968  # First separate the path from the arguments. This will split at the first
38969  # space.
38970  complete="$MT"
38971  path="${complete%% *}"
38972  tmp="$complete EOL"
38973  arguments="${tmp#* }"
38974
38975  # Input might be given as Windows format, start by converting to
38976  # unix format.
38977  new_path="$path"
38978
38979  windows_path="$new_path"
38980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38981    unix_path=`$CYGPATH -u "$windows_path"`
38982    new_path="$unix_path"
38983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38985    new_path="$unix_path"
38986  fi
38987
38988
38989  # Now try to locate executable using which
38990  new_path=`$WHICH "$new_path" 2> /dev/null`
38991
38992  if test "x$new_path" = x; then
38993    # Oops. Which didn't find the executable.
38994    # The splitting of arguments from the executable at a space might have been incorrect,
38995    # since paths with space are more likely in Windows. Give it another try with the whole
38996    # argument.
38997    path="$complete"
38998    arguments="EOL"
38999    new_path="$path"
39000
39001  windows_path="$new_path"
39002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39003    unix_path=`$CYGPATH -u "$windows_path"`
39004    new_path="$unix_path"
39005  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39006    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39007    new_path="$unix_path"
39008  fi
39009
39010
39011    new_path=`$WHICH "$new_path" 2> /dev/null`
39012    # bat and cmd files are not always considered executable in MSYS causing which
39013    # to not find them
39014    if test "x$new_path" = x \
39015        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39016        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39017      new_path="$path"
39018
39019  windows_path="$new_path"
39020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39021    unix_path=`$CYGPATH -u "$windows_path"`
39022    new_path="$unix_path"
39023  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39024    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39025    new_path="$unix_path"
39026  fi
39027
39028    fi
39029
39030    if test "x$new_path" = x; then
39031      # It's still not found. Now this is an unrecoverable error.
39032      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39033$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39034      has_space=`$ECHO "$complete" | $GREP " "`
39035      if test "x$has_space" != x; then
39036        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39037$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39038      fi
39039      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39040    fi
39041  fi
39042
39043  # Now new_path has a complete unix path to the binary
39044  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39045    # Keep paths in /bin as-is, but remove trailing .exe if any
39046    new_path="${new_path/%.exe/}"
39047    # Do not save /bin paths to all_fixpath_prefixes!
39048  else
39049    # Not in mixed or Windows style, start by that.
39050    new_path=`cmd //c echo $new_path`
39051
39052  input_path="$new_path"
39053  # Check if we need to convert this using DOS-style short mode. If the path
39054  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39055  # take no chances and rewrite it.
39056  # Note: m4 eats our [], so we need to use [ and ] instead.
39057  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39058  if test "x$has_forbidden_chars" != x; then
39059    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39060    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39061  fi
39062
39063    # Output is in $new_path
39064
39065  windows_path="$new_path"
39066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39067    unix_path=`$CYGPATH -u "$windows_path"`
39068    new_path="$unix_path"
39069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39070    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39071    new_path="$unix_path"
39072  fi
39073
39074    # remove trailing .exe if any
39075    new_path="${new_path/%.exe/}"
39076
39077    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39078    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39079  fi
39080
39081    else
39082      # We're on a unix platform. Hooray! :)
39083      # First separate the path from the arguments. This will split at the first
39084      # space.
39085      complete="$MT"
39086      path="${complete%% *}"
39087      tmp="$complete EOL"
39088      arguments="${tmp#* }"
39089
39090      # Cannot rely on the command "which" here since it doesn't always work.
39091      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39092      if test -z "$is_absolute_path"; then
39093        # Path to executable is not absolute. Find it.
39094        IFS_save="$IFS"
39095        IFS=:
39096        for p in $PATH; do
39097          if test -f "$p/$path" && test -x "$p/$path"; then
39098            new_path="$p/$path"
39099            break
39100          fi
39101        done
39102        IFS="$IFS_save"
39103      else
39104        # This is an absolute path, we can use it without further modifications.
39105        new_path="$path"
39106      fi
39107
39108      if test "x$new_path" = x; then
39109        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39110$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39111        has_space=`$ECHO "$complete" | $GREP " "`
39112        if test "x$has_space" != x; then
39113          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39114$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39115        fi
39116        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39117      fi
39118    fi
39119
39120    # Now join together the path and the arguments once again
39121    if test "x$arguments" != xEOL; then
39122      new_complete="$new_path ${arguments% *}"
39123    else
39124      new_complete="$new_path"
39125    fi
39126
39127    if test "x$complete" != "x$new_complete"; then
39128      MT="$new_complete"
39129      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
39130$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
39131    fi
39132  fi
39133
39134    # Setup the resource compiler (RC)
39135    # Extract the first word of "rc", so it can be a program name with args.
39136set dummy rc; ac_word=$2
39137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39138$as_echo_n "checking for $ac_word... " >&6; }
39139if ${ac_cv_prog_RC+:} false; then :
39140  $as_echo_n "(cached) " >&6
39141else
39142  if test -n "$RC"; then
39143  ac_cv_prog_RC="$RC" # Let the user override the test.
39144else
39145  ac_prog_rejected=no
39146as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39147for as_dir in $PATH
39148do
39149  IFS=$as_save_IFS
39150  test -z "$as_dir" && as_dir=.
39151    for ac_exec_ext in '' $ac_executable_extensions; do
39152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39153    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
39154       ac_prog_rejected=yes
39155       continue
39156     fi
39157    ac_cv_prog_RC="rc"
39158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39159    break 2
39160  fi
39161done
39162  done
39163IFS=$as_save_IFS
39164
39165if test $ac_prog_rejected = yes; then
39166  # We found a bogon in the path, so make sure we never use it.
39167  set dummy $ac_cv_prog_RC
39168  shift
39169  if test $# != 0; then
39170    # We chose a different compiler from the bogus one.
39171    # However, it has the same basename, so the bogon will be chosen
39172    # first if we set RC to just the basename; use the full file name.
39173    shift
39174    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
39175  fi
39176fi
39177fi
39178fi
39179RC=$ac_cv_prog_RC
39180if test -n "$RC"; then
39181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
39182$as_echo "$RC" >&6; }
39183else
39184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39185$as_echo "no" >&6; }
39186fi
39187
39188
39189
39190  # Only process if variable expands to non-empty
39191
39192  if test "x$RC" != x; then
39193    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39194
39195  # First separate the path from the arguments. This will split at the first
39196  # space.
39197  complete="$RC"
39198  path="${complete%% *}"
39199  tmp="$complete EOL"
39200  arguments="${tmp#* }"
39201
39202  # Input might be given as Windows format, start by converting to
39203  # unix format.
39204  new_path=`$CYGPATH -u "$path"`
39205
39206  # Now try to locate executable using which
39207  new_path=`$WHICH "$new_path" 2> /dev/null`
39208  # bat and cmd files are not always considered executable in cygwin causing which
39209  # to not find them
39210  if test "x$new_path" = x \
39211      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39212      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39213    new_path=`$CYGPATH -u "$path"`
39214  fi
39215  if test "x$new_path" = x; then
39216    # Oops. Which didn't find the executable.
39217    # The splitting of arguments from the executable at a space might have been incorrect,
39218    # since paths with space are more likely in Windows. Give it another try with the whole
39219    # argument.
39220    path="$complete"
39221    arguments="EOL"
39222    new_path=`$CYGPATH -u "$path"`
39223    new_path=`$WHICH "$new_path" 2> /dev/null`
39224    # bat and cmd files are not always considered executable in cygwin causing which
39225    # to not find them
39226    if test "x$new_path" = x \
39227        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39228        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39229      new_path=`$CYGPATH -u "$path"`
39230    fi
39231    if test "x$new_path" = x; then
39232      # It's still not found. Now this is an unrecoverable error.
39233      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39234$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39235      has_space=`$ECHO "$complete" | $GREP " "`
39236      if test "x$has_space" != x; then
39237        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39238$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39239      fi
39240      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39241    fi
39242  fi
39243
39244  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39245  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39246  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39247  # "foo.exe" is OK but "foo" is an error.
39248  #
39249  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39250  # It is also a way to make sure we got the proper file name for the real test later on.
39251  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39252  if test "x$test_shortpath" = x; then
39253    # Short path failed, file does not exist as specified.
39254    # Try adding .exe or .cmd
39255    if test -f "${new_path}.exe"; then
39256      input_to_shortpath="${new_path}.exe"
39257    elif test -f "${new_path}.cmd"; then
39258      input_to_shortpath="${new_path}.cmd"
39259    else
39260      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
39261$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
39262      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39263$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39264      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39265    fi
39266  else
39267    input_to_shortpath="$new_path"
39268  fi
39269
39270  # Call helper function which possibly converts this using DOS-style short mode.
39271  # If so, the updated path is stored in $new_path.
39272  new_path="$input_to_shortpath"
39273
39274  input_path="$input_to_shortpath"
39275  # Check if we need to convert this using DOS-style short mode. If the path
39276  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39277  # take no chances and rewrite it.
39278  # Note: m4 eats our [], so we need to use [ and ] instead.
39279  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39280  if test "x$has_forbidden_chars" != x; then
39281    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39282    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39283    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39284    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39285      # Going to short mode and back again did indeed matter. Since short mode is
39286      # case insensitive, let's make it lowercase to improve readability.
39287      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39288      # Now convert it back to Unix-style (cygpath)
39289      input_path=`$CYGPATH -u "$shortmode_path"`
39290      new_path="$input_path"
39291    fi
39292  fi
39293
39294  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39295  if test "x$test_cygdrive_prefix" = x; then
39296    # As a simple fix, exclude /usr/bin since it's not a real path.
39297    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39298      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39299      # a path prefixed by /cygdrive for fixpath to work.
39300      new_path="$CYGWIN_ROOT_PATH$input_path"
39301    fi
39302  fi
39303
39304  # remove trailing .exe if any
39305  new_path="${new_path/%.exe/}"
39306
39307    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39308
39309  # First separate the path from the arguments. This will split at the first
39310  # space.
39311  complete="$RC"
39312  path="${complete%% *}"
39313  tmp="$complete EOL"
39314  arguments="${tmp#* }"
39315
39316  # Input might be given as Windows format, start by converting to
39317  # unix format.
39318  new_path="$path"
39319
39320  windows_path="$new_path"
39321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39322    unix_path=`$CYGPATH -u "$windows_path"`
39323    new_path="$unix_path"
39324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39325    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39326    new_path="$unix_path"
39327  fi
39328
39329
39330  # Now try to locate executable using which
39331  new_path=`$WHICH "$new_path" 2> /dev/null`
39332
39333  if test "x$new_path" = x; then
39334    # Oops. Which didn't find the executable.
39335    # The splitting of arguments from the executable at a space might have been incorrect,
39336    # since paths with space are more likely in Windows. Give it another try with the whole
39337    # argument.
39338    path="$complete"
39339    arguments="EOL"
39340    new_path="$path"
39341
39342  windows_path="$new_path"
39343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39344    unix_path=`$CYGPATH -u "$windows_path"`
39345    new_path="$unix_path"
39346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39347    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39348    new_path="$unix_path"
39349  fi
39350
39351
39352    new_path=`$WHICH "$new_path" 2> /dev/null`
39353    # bat and cmd files are not always considered executable in MSYS causing which
39354    # to not find them
39355    if test "x$new_path" = x \
39356        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39357        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39358      new_path="$path"
39359
39360  windows_path="$new_path"
39361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39362    unix_path=`$CYGPATH -u "$windows_path"`
39363    new_path="$unix_path"
39364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39366    new_path="$unix_path"
39367  fi
39368
39369    fi
39370
39371    if test "x$new_path" = x; then
39372      # It's still not found. Now this is an unrecoverable error.
39373      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39374$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39375      has_space=`$ECHO "$complete" | $GREP " "`
39376      if test "x$has_space" != x; then
39377        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39378$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39379      fi
39380      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39381    fi
39382  fi
39383
39384  # Now new_path has a complete unix path to the binary
39385  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39386    # Keep paths in /bin as-is, but remove trailing .exe if any
39387    new_path="${new_path/%.exe/}"
39388    # Do not save /bin paths to all_fixpath_prefixes!
39389  else
39390    # Not in mixed or Windows style, start by that.
39391    new_path=`cmd //c echo $new_path`
39392
39393  input_path="$new_path"
39394  # Check if we need to convert this using DOS-style short mode. If the path
39395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39396  # take no chances and rewrite it.
39397  # Note: m4 eats our [], so we need to use [ and ] instead.
39398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39399  if test "x$has_forbidden_chars" != x; then
39400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39401    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39402  fi
39403
39404    # Output is in $new_path
39405
39406  windows_path="$new_path"
39407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39408    unix_path=`$CYGPATH -u "$windows_path"`
39409    new_path="$unix_path"
39410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39412    new_path="$unix_path"
39413  fi
39414
39415    # remove trailing .exe if any
39416    new_path="${new_path/%.exe/}"
39417
39418    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39419    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39420  fi
39421
39422    else
39423      # We're on a unix platform. Hooray! :)
39424      # First separate the path from the arguments. This will split at the first
39425      # space.
39426      complete="$RC"
39427      path="${complete%% *}"
39428      tmp="$complete EOL"
39429      arguments="${tmp#* }"
39430
39431      # Cannot rely on the command "which" here since it doesn't always work.
39432      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39433      if test -z "$is_absolute_path"; then
39434        # Path to executable is not absolute. Find it.
39435        IFS_save="$IFS"
39436        IFS=:
39437        for p in $PATH; do
39438          if test -f "$p/$path" && test -x "$p/$path"; then
39439            new_path="$p/$path"
39440            break
39441          fi
39442        done
39443        IFS="$IFS_save"
39444      else
39445        # This is an absolute path, we can use it without further modifications.
39446        new_path="$path"
39447      fi
39448
39449      if test "x$new_path" = x; then
39450        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39451$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39452        has_space=`$ECHO "$complete" | $GREP " "`
39453        if test "x$has_space" != x; then
39454          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39455$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39456        fi
39457        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39458      fi
39459    fi
39460
39461    # Now join together the path and the arguments once again
39462    if test "x$arguments" != xEOL; then
39463      new_complete="$new_path ${arguments% *}"
39464    else
39465      new_complete="$new_path"
39466    fi
39467
39468    if test "x$complete" != "x$new_complete"; then
39469      RC="$new_complete"
39470      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39471$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39472    fi
39473  fi
39474
39475    # Extract the first word of "dumpbin", so it can be a program name with args.
39476set dummy dumpbin; ac_word=$2
39477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39478$as_echo_n "checking for $ac_word... " >&6; }
39479if ${ac_cv_prog_DUMPBIN+:} false; then :
39480  $as_echo_n "(cached) " >&6
39481else
39482  if test -n "$DUMPBIN"; then
39483  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39484else
39485as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39486for as_dir in $PATH
39487do
39488  IFS=$as_save_IFS
39489  test -z "$as_dir" && as_dir=.
39490    for ac_exec_ext in '' $ac_executable_extensions; do
39491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39492    ac_cv_prog_DUMPBIN="dumpbin"
39493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39494    break 2
39495  fi
39496done
39497  done
39498IFS=$as_save_IFS
39499
39500fi
39501fi
39502DUMPBIN=$ac_cv_prog_DUMPBIN
39503if test -n "$DUMPBIN"; then
39504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
39505$as_echo "$DUMPBIN" >&6; }
39506else
39507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39508$as_echo "no" >&6; }
39509fi
39510
39511
39512
39513  # Only process if variable expands to non-empty
39514
39515  if test "x$DUMPBIN" != x; then
39516    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39517
39518  # First separate the path from the arguments. This will split at the first
39519  # space.
39520  complete="$DUMPBIN"
39521  path="${complete%% *}"
39522  tmp="$complete EOL"
39523  arguments="${tmp#* }"
39524
39525  # Input might be given as Windows format, start by converting to
39526  # unix format.
39527  new_path=`$CYGPATH -u "$path"`
39528
39529  # Now try to locate executable using which
39530  new_path=`$WHICH "$new_path" 2> /dev/null`
39531  # bat and cmd files are not always considered executable in cygwin causing which
39532  # to not find them
39533  if test "x$new_path" = x \
39534      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39535      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39536    new_path=`$CYGPATH -u "$path"`
39537  fi
39538  if test "x$new_path" = x; then
39539    # Oops. Which didn't find the executable.
39540    # The splitting of arguments from the executable at a space might have been incorrect,
39541    # since paths with space are more likely in Windows. Give it another try with the whole
39542    # argument.
39543    path="$complete"
39544    arguments="EOL"
39545    new_path=`$CYGPATH -u "$path"`
39546    new_path=`$WHICH "$new_path" 2> /dev/null`
39547    # bat and cmd files are not always considered executable in cygwin causing which
39548    # to not find them
39549    if test "x$new_path" = x \
39550        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39551        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39552      new_path=`$CYGPATH -u "$path"`
39553    fi
39554    if test "x$new_path" = x; then
39555      # It's still not found. Now this is an unrecoverable error.
39556      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39557$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39558      has_space=`$ECHO "$complete" | $GREP " "`
39559      if test "x$has_space" != x; then
39560        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39561$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39562      fi
39563      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39564    fi
39565  fi
39566
39567  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39568  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39569  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39570  # "foo.exe" is OK but "foo" is an error.
39571  #
39572  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39573  # It is also a way to make sure we got the proper file name for the real test later on.
39574  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39575  if test "x$test_shortpath" = x; then
39576    # Short path failed, file does not exist as specified.
39577    # Try adding .exe or .cmd
39578    if test -f "${new_path}.exe"; then
39579      input_to_shortpath="${new_path}.exe"
39580    elif test -f "${new_path}.cmd"; then
39581      input_to_shortpath="${new_path}.cmd"
39582    else
39583      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
39584$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
39585      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39586$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39587      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39588    fi
39589  else
39590    input_to_shortpath="$new_path"
39591  fi
39592
39593  # Call helper function which possibly converts this using DOS-style short mode.
39594  # If so, the updated path is stored in $new_path.
39595  new_path="$input_to_shortpath"
39596
39597  input_path="$input_to_shortpath"
39598  # Check if we need to convert this using DOS-style short mode. If the path
39599  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39600  # take no chances and rewrite it.
39601  # Note: m4 eats our [], so we need to use [ and ] instead.
39602  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39603  if test "x$has_forbidden_chars" != x; then
39604    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39605    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39606    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39607    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39608      # Going to short mode and back again did indeed matter. Since short mode is
39609      # case insensitive, let's make it lowercase to improve readability.
39610      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39611      # Now convert it back to Unix-style (cygpath)
39612      input_path=`$CYGPATH -u "$shortmode_path"`
39613      new_path="$input_path"
39614    fi
39615  fi
39616
39617  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39618  if test "x$test_cygdrive_prefix" = x; then
39619    # As a simple fix, exclude /usr/bin since it's not a real path.
39620    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39621      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39622      # a path prefixed by /cygdrive for fixpath to work.
39623      new_path="$CYGWIN_ROOT_PATH$input_path"
39624    fi
39625  fi
39626
39627  # remove trailing .exe if any
39628  new_path="${new_path/%.exe/}"
39629
39630    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39631
39632  # First separate the path from the arguments. This will split at the first
39633  # space.
39634  complete="$DUMPBIN"
39635  path="${complete%% *}"
39636  tmp="$complete EOL"
39637  arguments="${tmp#* }"
39638
39639  # Input might be given as Windows format, start by converting to
39640  # unix format.
39641  new_path="$path"
39642
39643  windows_path="$new_path"
39644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39645    unix_path=`$CYGPATH -u "$windows_path"`
39646    new_path="$unix_path"
39647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39648    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39649    new_path="$unix_path"
39650  fi
39651
39652
39653  # Now try to locate executable using which
39654  new_path=`$WHICH "$new_path" 2> /dev/null`
39655
39656  if test "x$new_path" = x; then
39657    # Oops. Which didn't find the executable.
39658    # The splitting of arguments from the executable at a space might have been incorrect,
39659    # since paths with space are more likely in Windows. Give it another try with the whole
39660    # argument.
39661    path="$complete"
39662    arguments="EOL"
39663    new_path="$path"
39664
39665  windows_path="$new_path"
39666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39667    unix_path=`$CYGPATH -u "$windows_path"`
39668    new_path="$unix_path"
39669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39670    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39671    new_path="$unix_path"
39672  fi
39673
39674
39675    new_path=`$WHICH "$new_path" 2> /dev/null`
39676    # bat and cmd files are not always considered executable in MSYS causing which
39677    # to not find them
39678    if test "x$new_path" = x \
39679        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39680        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39681      new_path="$path"
39682
39683  windows_path="$new_path"
39684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39685    unix_path=`$CYGPATH -u "$windows_path"`
39686    new_path="$unix_path"
39687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39688    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39689    new_path="$unix_path"
39690  fi
39691
39692    fi
39693
39694    if test "x$new_path" = x; then
39695      # It's still not found. Now this is an unrecoverable error.
39696      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39697$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39698      has_space=`$ECHO "$complete" | $GREP " "`
39699      if test "x$has_space" != x; then
39700        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39701$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39702      fi
39703      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39704    fi
39705  fi
39706
39707  # Now new_path has a complete unix path to the binary
39708  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39709    # Keep paths in /bin as-is, but remove trailing .exe if any
39710    new_path="${new_path/%.exe/}"
39711    # Do not save /bin paths to all_fixpath_prefixes!
39712  else
39713    # Not in mixed or Windows style, start by that.
39714    new_path=`cmd //c echo $new_path`
39715
39716  input_path="$new_path"
39717  # Check if we need to convert this using DOS-style short mode. If the path
39718  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39719  # take no chances and rewrite it.
39720  # Note: m4 eats our [], so we need to use [ and ] instead.
39721  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39722  if test "x$has_forbidden_chars" != x; then
39723    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39724    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39725  fi
39726
39727    # Output is in $new_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    # remove trailing .exe if any
39739    new_path="${new_path/%.exe/}"
39740
39741    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39742    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39743  fi
39744
39745    else
39746      # We're on a unix platform. Hooray! :)
39747      # First separate the path from the arguments. This will split at the first
39748      # space.
39749      complete="$DUMPBIN"
39750      path="${complete%% *}"
39751      tmp="$complete EOL"
39752      arguments="${tmp#* }"
39753
39754      # Cannot rely on the command "which" here since it doesn't always work.
39755      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39756      if test -z "$is_absolute_path"; then
39757        # Path to executable is not absolute. Find it.
39758        IFS_save="$IFS"
39759        IFS=:
39760        for p in $PATH; do
39761          if test -f "$p/$path" && test -x "$p/$path"; then
39762            new_path="$p/$path"
39763            break
39764          fi
39765        done
39766        IFS="$IFS_save"
39767      else
39768        # This is an absolute path, we can use it without further modifications.
39769        new_path="$path"
39770      fi
39771
39772      if test "x$new_path" = x; then
39773        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39774$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39775        has_space=`$ECHO "$complete" | $GREP " "`
39776        if test "x$has_space" != x; then
39777          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39778$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39779        fi
39780        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39781      fi
39782    fi
39783
39784    # Now join together the path and the arguments once again
39785    if test "x$arguments" != xEOL; then
39786      new_complete="$new_path ${arguments% *}"
39787    else
39788      new_complete="$new_path"
39789    fi
39790
39791    if test "x$complete" != "x$new_complete"; then
39792      DUMPBIN="$new_complete"
39793      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39794$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39795    fi
39796  fi
39797
39798    # We need to check for 'msbuild.exe' because at the place where we expect to
39799    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39800    # won't find the 'msbuild.exe' executable in that case (and the
39801    # 'ac_executable_extensions' is unusable due to performance reasons).
39802    # Notice that we intentionally don't fix up the path to MSBUILD because we
39803    # will call it in a DOS shell during freetype detection on Windows (see
39804    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39805    # Extract the first word of "msbuild.exe", so it can be a program name with args.
39806set dummy msbuild.exe; ac_word=$2
39807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39808$as_echo_n "checking for $ac_word... " >&6; }
39809if ${ac_cv_prog_MSBUILD+:} false; then :
39810  $as_echo_n "(cached) " >&6
39811else
39812  if test -n "$MSBUILD"; then
39813  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39814else
39815as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39816for as_dir in $PATH
39817do
39818  IFS=$as_save_IFS
39819  test -z "$as_dir" && as_dir=.
39820    for ac_exec_ext in '' $ac_executable_extensions; do
39821  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39822    ac_cv_prog_MSBUILD="msbuild.exe"
39823    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39824    break 2
39825  fi
39826done
39827  done
39828IFS=$as_save_IFS
39829
39830fi
39831fi
39832MSBUILD=$ac_cv_prog_MSBUILD
39833if test -n "$MSBUILD"; then
39834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39835$as_echo "$MSBUILD" >&6; }
39836else
39837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39838$as_echo "no" >&6; }
39839fi
39840
39841
39842  fi
39843
39844  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39845
39846
39847  # Publish this variable in the help.
39848
39849
39850  if [ -z "${STRIP+x}" ]; then
39851    # The variable is not set by user, try to locate tool using the code snippet
39852    for ac_prog in strip
39853do
39854  # Extract the first word of "$ac_prog", so it can be a program name with args.
39855set dummy $ac_prog; ac_word=$2
39856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39857$as_echo_n "checking for $ac_word... " >&6; }
39858if ${ac_cv_path_STRIP+:} false; then :
39859  $as_echo_n "(cached) " >&6
39860else
39861  case $STRIP in
39862  [\\/]* | ?:[\\/]*)
39863  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39864  ;;
39865  *)
39866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39867for as_dir in $PATH
39868do
39869  IFS=$as_save_IFS
39870  test -z "$as_dir" && as_dir=.
39871    for ac_exec_ext in '' $ac_executable_extensions; do
39872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39873    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39875    break 2
39876  fi
39877done
39878  done
39879IFS=$as_save_IFS
39880
39881  ;;
39882esac
39883fi
39884STRIP=$ac_cv_path_STRIP
39885if test -n "$STRIP"; then
39886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39887$as_echo "$STRIP" >&6; }
39888else
39889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39890$as_echo "no" >&6; }
39891fi
39892
39893
39894  test -n "$STRIP" && break
39895done
39896
39897  else
39898    # The variable is set, but is it from the command line or the environment?
39899
39900    # Try to remove the string !STRIP! from our list.
39901    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39902    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39903      # If it failed, the variable was not from the command line. Ignore it,
39904      # but warn the user (except for BASH, which is always set by the calling BASH).
39905      if test "xSTRIP" != xBASH; then
39906        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39907$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39908      fi
39909      # Try to locate tool using the code snippet
39910      for ac_prog in strip
39911do
39912  # Extract the first word of "$ac_prog", so it can be a program name with args.
39913set dummy $ac_prog; ac_word=$2
39914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39915$as_echo_n "checking for $ac_word... " >&6; }
39916if ${ac_cv_path_STRIP+:} false; then :
39917  $as_echo_n "(cached) " >&6
39918else
39919  case $STRIP in
39920  [\\/]* | ?:[\\/]*)
39921  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39922  ;;
39923  *)
39924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39925for as_dir in $PATH
39926do
39927  IFS=$as_save_IFS
39928  test -z "$as_dir" && as_dir=.
39929    for ac_exec_ext in '' $ac_executable_extensions; do
39930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39931    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39933    break 2
39934  fi
39935done
39936  done
39937IFS=$as_save_IFS
39938
39939  ;;
39940esac
39941fi
39942STRIP=$ac_cv_path_STRIP
39943if test -n "$STRIP"; then
39944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39945$as_echo "$STRIP" >&6; }
39946else
39947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39948$as_echo "no" >&6; }
39949fi
39950
39951
39952  test -n "$STRIP" && break
39953done
39954
39955    else
39956      # If it succeeded, then it was overridden by the user. We will use it
39957      # for the tool.
39958
39959      # First remove it from the list of overridden variables, so we can test
39960      # for unknown variables in the end.
39961      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39962
39963      # Check if we try to supply an empty value
39964      if test "x$STRIP" = x; then
39965        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39966$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39967        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39968$as_echo_n "checking for STRIP... " >&6; }
39969        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39970$as_echo "disabled" >&6; }
39971      else
39972        # Check if the provided tool contains a complete path.
39973        tool_specified="$STRIP"
39974        tool_basename="${tool_specified##*/}"
39975        if test "x$tool_basename" = "x$tool_specified"; then
39976          # A command without a complete path is provided, search $PATH.
39977          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39978$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39979          # Extract the first word of "$tool_basename", so it can be a program name with args.
39980set dummy $tool_basename; ac_word=$2
39981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39982$as_echo_n "checking for $ac_word... " >&6; }
39983if ${ac_cv_path_STRIP+:} false; then :
39984  $as_echo_n "(cached) " >&6
39985else
39986  case $STRIP in
39987  [\\/]* | ?:[\\/]*)
39988  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39989  ;;
39990  *)
39991  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39992for as_dir in $PATH
39993do
39994  IFS=$as_save_IFS
39995  test -z "$as_dir" && as_dir=.
39996    for ac_exec_ext in '' $ac_executable_extensions; do
39997  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39998    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40000    break 2
40001  fi
40002done
40003  done
40004IFS=$as_save_IFS
40005
40006  ;;
40007esac
40008fi
40009STRIP=$ac_cv_path_STRIP
40010if test -n "$STRIP"; then
40011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40012$as_echo "$STRIP" >&6; }
40013else
40014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40015$as_echo "no" >&6; }
40016fi
40017
40018
40019          if test "x$STRIP" = x; then
40020            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40021          fi
40022        else
40023          # Otherwise we believe it is a complete path. Use it as it is.
40024          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40025$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40026          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40027$as_echo_n "checking for STRIP... " >&6; }
40028          if test ! -x "$tool_specified"; then
40029            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40030$as_echo "not found" >&6; }
40031            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40032          fi
40033          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40034$as_echo "$tool_specified" >&6; }
40035        fi
40036      fi
40037    fi
40038
40039  fi
40040
40041
40042
40043  # Only process if variable expands to non-empty
40044
40045  if test "x$STRIP" != x; then
40046    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40047
40048  # First separate the path from the arguments. This will split at the first
40049  # space.
40050  complete="$STRIP"
40051  path="${complete%% *}"
40052  tmp="$complete EOL"
40053  arguments="${tmp#* }"
40054
40055  # Input might be given as Windows format, start by converting to
40056  # unix format.
40057  new_path=`$CYGPATH -u "$path"`
40058
40059  # Now try to locate executable using which
40060  new_path=`$WHICH "$new_path" 2> /dev/null`
40061  # bat and cmd files are not always considered executable in cygwin causing which
40062  # to not find them
40063  if test "x$new_path" = x \
40064      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40065      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40066    new_path=`$CYGPATH -u "$path"`
40067  fi
40068  if test "x$new_path" = x; then
40069    # Oops. Which didn't find the executable.
40070    # The splitting of arguments from the executable at a space might have been incorrect,
40071    # since paths with space are more likely in Windows. Give it another try with the whole
40072    # argument.
40073    path="$complete"
40074    arguments="EOL"
40075    new_path=`$CYGPATH -u "$path"`
40076    new_path=`$WHICH "$new_path" 2> /dev/null`
40077    # bat and cmd files are not always considered executable in cygwin causing which
40078    # to not find them
40079    if test "x$new_path" = x \
40080        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40081        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40082      new_path=`$CYGPATH -u "$path"`
40083    fi
40084    if test "x$new_path" = x; then
40085      # It's still not found. Now this is an unrecoverable error.
40086      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40087$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40088      has_space=`$ECHO "$complete" | $GREP " "`
40089      if test "x$has_space" != x; then
40090        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40091$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40092      fi
40093      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40094    fi
40095  fi
40096
40097  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40098  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40099  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40100  # "foo.exe" is OK but "foo" is an error.
40101  #
40102  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40103  # It is also a way to make sure we got the proper file name for the real test later on.
40104  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40105  if test "x$test_shortpath" = x; then
40106    # Short path failed, file does not exist as specified.
40107    # Try adding .exe or .cmd
40108    if test -f "${new_path}.exe"; then
40109      input_to_shortpath="${new_path}.exe"
40110    elif test -f "${new_path}.cmd"; then
40111      input_to_shortpath="${new_path}.cmd"
40112    else
40113      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40114$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40115      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40116$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40117      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40118    fi
40119  else
40120    input_to_shortpath="$new_path"
40121  fi
40122
40123  # Call helper function which possibly converts this using DOS-style short mode.
40124  # If so, the updated path is stored in $new_path.
40125  new_path="$input_to_shortpath"
40126
40127  input_path="$input_to_shortpath"
40128  # Check if we need to convert this using DOS-style short mode. If the path
40129  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40130  # take no chances and rewrite it.
40131  # Note: m4 eats our [], so we need to use [ and ] instead.
40132  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40133  if test "x$has_forbidden_chars" != x; then
40134    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40135    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40136    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40137    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40138      # Going to short mode and back again did indeed matter. Since short mode is
40139      # case insensitive, let's make it lowercase to improve readability.
40140      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40141      # Now convert it back to Unix-style (cygpath)
40142      input_path=`$CYGPATH -u "$shortmode_path"`
40143      new_path="$input_path"
40144    fi
40145  fi
40146
40147  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40148  if test "x$test_cygdrive_prefix" = x; then
40149    # As a simple fix, exclude /usr/bin since it's not a real path.
40150    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40151      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40152      # a path prefixed by /cygdrive for fixpath to work.
40153      new_path="$CYGWIN_ROOT_PATH$input_path"
40154    fi
40155  fi
40156
40157  # remove trailing .exe if any
40158  new_path="${new_path/%.exe/}"
40159
40160    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40161
40162  # First separate the path from the arguments. This will split at the first
40163  # space.
40164  complete="$STRIP"
40165  path="${complete%% *}"
40166  tmp="$complete EOL"
40167  arguments="${tmp#* }"
40168
40169  # Input might be given as Windows format, start by converting to
40170  # unix format.
40171  new_path="$path"
40172
40173  windows_path="$new_path"
40174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40175    unix_path=`$CYGPATH -u "$windows_path"`
40176    new_path="$unix_path"
40177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40178    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40179    new_path="$unix_path"
40180  fi
40181
40182
40183  # Now try to locate executable using which
40184  new_path=`$WHICH "$new_path" 2> /dev/null`
40185
40186  if test "x$new_path" = x; then
40187    # Oops. Which didn't find the executable.
40188    # The splitting of arguments from the executable at a space might have been incorrect,
40189    # since paths with space are more likely in Windows. Give it another try with the whole
40190    # argument.
40191    path="$complete"
40192    arguments="EOL"
40193    new_path="$path"
40194
40195  windows_path="$new_path"
40196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40197    unix_path=`$CYGPATH -u "$windows_path"`
40198    new_path="$unix_path"
40199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40201    new_path="$unix_path"
40202  fi
40203
40204
40205    new_path=`$WHICH "$new_path" 2> /dev/null`
40206    # bat and cmd files are not always considered executable in MSYS causing which
40207    # to not find them
40208    if test "x$new_path" = x \
40209        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40210        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40211      new_path="$path"
40212
40213  windows_path="$new_path"
40214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40215    unix_path=`$CYGPATH -u "$windows_path"`
40216    new_path="$unix_path"
40217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40218    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40219    new_path="$unix_path"
40220  fi
40221
40222    fi
40223
40224    if test "x$new_path" = x; then
40225      # It's still not found. Now this is an unrecoverable error.
40226      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40227$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40228      has_space=`$ECHO "$complete" | $GREP " "`
40229      if test "x$has_space" != x; then
40230        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40231$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40232      fi
40233      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40234    fi
40235  fi
40236
40237  # Now new_path has a complete unix path to the binary
40238  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40239    # Keep paths in /bin as-is, but remove trailing .exe if any
40240    new_path="${new_path/%.exe/}"
40241    # Do not save /bin paths to all_fixpath_prefixes!
40242  else
40243    # Not in mixed or Windows style, start by that.
40244    new_path=`cmd //c echo $new_path`
40245
40246  input_path="$new_path"
40247  # Check if we need to convert this using DOS-style short mode. If the path
40248  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40249  # take no chances and rewrite it.
40250  # Note: m4 eats our [], so we need to use [ and ] instead.
40251  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40252  if test "x$has_forbidden_chars" != x; then
40253    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40254    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40255  fi
40256
40257    # Output is in $new_path
40258
40259  windows_path="$new_path"
40260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40261    unix_path=`$CYGPATH -u "$windows_path"`
40262    new_path="$unix_path"
40263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40265    new_path="$unix_path"
40266  fi
40267
40268    # remove trailing .exe if any
40269    new_path="${new_path/%.exe/}"
40270
40271    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40272    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40273  fi
40274
40275    else
40276      # We're on a unix platform. Hooray! :)
40277      # First separate the path from the arguments. This will split at the first
40278      # space.
40279      complete="$STRIP"
40280      path="${complete%% *}"
40281      tmp="$complete EOL"
40282      arguments="${tmp#* }"
40283
40284      # Cannot rely on the command "which" here since it doesn't always work.
40285      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40286      if test -z "$is_absolute_path"; then
40287        # Path to executable is not absolute. Find it.
40288        IFS_save="$IFS"
40289        IFS=:
40290        for p in $PATH; do
40291          if test -f "$p/$path" && test -x "$p/$path"; then
40292            new_path="$p/$path"
40293            break
40294          fi
40295        done
40296        IFS="$IFS_save"
40297      else
40298        # This is an absolute path, we can use it without further modifications.
40299        new_path="$path"
40300      fi
40301
40302      if test "x$new_path" = x; then
40303        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40304$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40305        has_space=`$ECHO "$complete" | $GREP " "`
40306        if test "x$has_space" != x; then
40307          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40308$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40309        fi
40310        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40311      fi
40312    fi
40313
40314    # Now join together the path and the arguments once again
40315    if test "x$arguments" != xEOL; then
40316      new_complete="$new_path ${arguments% *}"
40317    else
40318      new_complete="$new_path"
40319    fi
40320
40321    if test "x$complete" != "x$new_complete"; then
40322      STRIP="$new_complete"
40323      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40324$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40325    fi
40326  fi
40327
40328
40329
40330  # Publish this variable in the help.
40331
40332
40333  if [ -z "${NM+x}" ]; then
40334    # The variable is not set by user, try to locate tool using the code snippet
40335    for ac_prog in nm
40336do
40337  # Extract the first word of "$ac_prog", so it can be a program name with args.
40338set dummy $ac_prog; ac_word=$2
40339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40340$as_echo_n "checking for $ac_word... " >&6; }
40341if ${ac_cv_path_NM+:} false; then :
40342  $as_echo_n "(cached) " >&6
40343else
40344  case $NM in
40345  [\\/]* | ?:[\\/]*)
40346  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40347  ;;
40348  *)
40349  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40350for as_dir in $PATH
40351do
40352  IFS=$as_save_IFS
40353  test -z "$as_dir" && as_dir=.
40354    for ac_exec_ext in '' $ac_executable_extensions; do
40355  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40356    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40357    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40358    break 2
40359  fi
40360done
40361  done
40362IFS=$as_save_IFS
40363
40364  ;;
40365esac
40366fi
40367NM=$ac_cv_path_NM
40368if test -n "$NM"; then
40369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40370$as_echo "$NM" >&6; }
40371else
40372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40373$as_echo "no" >&6; }
40374fi
40375
40376
40377  test -n "$NM" && break
40378done
40379
40380  else
40381    # The variable is set, but is it from the command line or the environment?
40382
40383    # Try to remove the string !NM! from our list.
40384    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40385    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40386      # If it failed, the variable was not from the command line. Ignore it,
40387      # but warn the user (except for BASH, which is always set by the calling BASH).
40388      if test "xNM" != xBASH; then
40389        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40390$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40391      fi
40392      # Try to locate tool using the code snippet
40393      for ac_prog in nm
40394do
40395  # Extract the first word of "$ac_prog", so it can be a program name with args.
40396set dummy $ac_prog; ac_word=$2
40397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40398$as_echo_n "checking for $ac_word... " >&6; }
40399if ${ac_cv_path_NM+:} false; then :
40400  $as_echo_n "(cached) " >&6
40401else
40402  case $NM in
40403  [\\/]* | ?:[\\/]*)
40404  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40405  ;;
40406  *)
40407  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40408for as_dir in $PATH
40409do
40410  IFS=$as_save_IFS
40411  test -z "$as_dir" && as_dir=.
40412    for ac_exec_ext in '' $ac_executable_extensions; do
40413  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40414    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40415    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40416    break 2
40417  fi
40418done
40419  done
40420IFS=$as_save_IFS
40421
40422  ;;
40423esac
40424fi
40425NM=$ac_cv_path_NM
40426if test -n "$NM"; then
40427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40428$as_echo "$NM" >&6; }
40429else
40430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40431$as_echo "no" >&6; }
40432fi
40433
40434
40435  test -n "$NM" && break
40436done
40437
40438    else
40439      # If it succeeded, then it was overridden by the user. We will use it
40440      # for the tool.
40441
40442      # First remove it from the list of overridden variables, so we can test
40443      # for unknown variables in the end.
40444      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40445
40446      # Check if we try to supply an empty value
40447      if test "x$NM" = x; then
40448        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40449$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40450        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40451$as_echo_n "checking for NM... " >&6; }
40452        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40453$as_echo "disabled" >&6; }
40454      else
40455        # Check if the provided tool contains a complete path.
40456        tool_specified="$NM"
40457        tool_basename="${tool_specified##*/}"
40458        if test "x$tool_basename" = "x$tool_specified"; then
40459          # A command without a complete path is provided, search $PATH.
40460          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40461$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40462          # Extract the first word of "$tool_basename", so it can be a program name with args.
40463set dummy $tool_basename; ac_word=$2
40464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40465$as_echo_n "checking for $ac_word... " >&6; }
40466if ${ac_cv_path_NM+:} false; then :
40467  $as_echo_n "(cached) " >&6
40468else
40469  case $NM in
40470  [\\/]* | ?:[\\/]*)
40471  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40472  ;;
40473  *)
40474  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40475for as_dir in $PATH
40476do
40477  IFS=$as_save_IFS
40478  test -z "$as_dir" && as_dir=.
40479    for ac_exec_ext in '' $ac_executable_extensions; do
40480  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40481    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40482    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40483    break 2
40484  fi
40485done
40486  done
40487IFS=$as_save_IFS
40488
40489  ;;
40490esac
40491fi
40492NM=$ac_cv_path_NM
40493if test -n "$NM"; then
40494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40495$as_echo "$NM" >&6; }
40496else
40497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40498$as_echo "no" >&6; }
40499fi
40500
40501
40502          if test "x$NM" = x; then
40503            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40504          fi
40505        else
40506          # Otherwise we believe it is a complete path. Use it as it is.
40507          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40508$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40509          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40510$as_echo_n "checking for NM... " >&6; }
40511          if test ! -x "$tool_specified"; then
40512            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40513$as_echo "not found" >&6; }
40514            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40515          fi
40516          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40517$as_echo "$tool_specified" >&6; }
40518        fi
40519      fi
40520    fi
40521
40522  fi
40523
40524
40525
40526  # Only process if variable expands to non-empty
40527
40528  if test "x$NM" != x; then
40529    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40530
40531  # First separate the path from the arguments. This will split at the first
40532  # space.
40533  complete="$NM"
40534  path="${complete%% *}"
40535  tmp="$complete EOL"
40536  arguments="${tmp#* }"
40537
40538  # Input might be given as Windows format, start by converting to
40539  # unix format.
40540  new_path=`$CYGPATH -u "$path"`
40541
40542  # Now try to locate executable using which
40543  new_path=`$WHICH "$new_path" 2> /dev/null`
40544  # bat and cmd files are not always considered executable in cygwin causing which
40545  # to not find them
40546  if test "x$new_path" = x \
40547      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40548      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40549    new_path=`$CYGPATH -u "$path"`
40550  fi
40551  if test "x$new_path" = x; then
40552    # Oops. Which didn't find the executable.
40553    # The splitting of arguments from the executable at a space might have been incorrect,
40554    # since paths with space are more likely in Windows. Give it another try with the whole
40555    # argument.
40556    path="$complete"
40557    arguments="EOL"
40558    new_path=`$CYGPATH -u "$path"`
40559    new_path=`$WHICH "$new_path" 2> /dev/null`
40560    # bat and cmd files are not always considered executable in cygwin causing which
40561    # to not find them
40562    if test "x$new_path" = x \
40563        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40564        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40565      new_path=`$CYGPATH -u "$path"`
40566    fi
40567    if test "x$new_path" = x; then
40568      # It's still not found. Now this is an unrecoverable error.
40569      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40570$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40571      has_space=`$ECHO "$complete" | $GREP " "`
40572      if test "x$has_space" != x; then
40573        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40574$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40575      fi
40576      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40577    fi
40578  fi
40579
40580  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40581  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40582  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40583  # "foo.exe" is OK but "foo" is an error.
40584  #
40585  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40586  # It is also a way to make sure we got the proper file name for the real test later on.
40587  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40588  if test "x$test_shortpath" = x; then
40589    # Short path failed, file does not exist as specified.
40590    # Try adding .exe or .cmd
40591    if test -f "${new_path}.exe"; then
40592      input_to_shortpath="${new_path}.exe"
40593    elif test -f "${new_path}.cmd"; then
40594      input_to_shortpath="${new_path}.cmd"
40595    else
40596      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40597$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40598      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40599$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40600      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40601    fi
40602  else
40603    input_to_shortpath="$new_path"
40604  fi
40605
40606  # Call helper function which possibly converts this using DOS-style short mode.
40607  # If so, the updated path is stored in $new_path.
40608  new_path="$input_to_shortpath"
40609
40610  input_path="$input_to_shortpath"
40611  # Check if we need to convert this using DOS-style short mode. If the path
40612  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40613  # take no chances and rewrite it.
40614  # Note: m4 eats our [], so we need to use [ and ] instead.
40615  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40616  if test "x$has_forbidden_chars" != x; then
40617    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40618    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40619    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40620    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40621      # Going to short mode and back again did indeed matter. Since short mode is
40622      # case insensitive, let's make it lowercase to improve readability.
40623      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40624      # Now convert it back to Unix-style (cygpath)
40625      input_path=`$CYGPATH -u "$shortmode_path"`
40626      new_path="$input_path"
40627    fi
40628  fi
40629
40630  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40631  if test "x$test_cygdrive_prefix" = x; then
40632    # As a simple fix, exclude /usr/bin since it's not a real path.
40633    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40634      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40635      # a path prefixed by /cygdrive for fixpath to work.
40636      new_path="$CYGWIN_ROOT_PATH$input_path"
40637    fi
40638  fi
40639
40640  # remove trailing .exe if any
40641  new_path="${new_path/%.exe/}"
40642
40643    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40644
40645  # First separate the path from the arguments. This will split at the first
40646  # space.
40647  complete="$NM"
40648  path="${complete%% *}"
40649  tmp="$complete EOL"
40650  arguments="${tmp#* }"
40651
40652  # Input might be given as Windows format, start by converting to
40653  # unix format.
40654  new_path="$path"
40655
40656  windows_path="$new_path"
40657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40658    unix_path=`$CYGPATH -u "$windows_path"`
40659    new_path="$unix_path"
40660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40661    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40662    new_path="$unix_path"
40663  fi
40664
40665
40666  # Now try to locate executable using which
40667  new_path=`$WHICH "$new_path" 2> /dev/null`
40668
40669  if test "x$new_path" = x; then
40670    # Oops. Which didn't find the executable.
40671    # The splitting of arguments from the executable at a space might have been incorrect,
40672    # since paths with space are more likely in Windows. Give it another try with the whole
40673    # argument.
40674    path="$complete"
40675    arguments="EOL"
40676    new_path="$path"
40677
40678  windows_path="$new_path"
40679  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40680    unix_path=`$CYGPATH -u "$windows_path"`
40681    new_path="$unix_path"
40682  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40683    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40684    new_path="$unix_path"
40685  fi
40686
40687
40688    new_path=`$WHICH "$new_path" 2> /dev/null`
40689    # bat and cmd files are not always considered executable in MSYS causing which
40690    # to not find them
40691    if test "x$new_path" = x \
40692        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40693        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40694      new_path="$path"
40695
40696  windows_path="$new_path"
40697  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40698    unix_path=`$CYGPATH -u "$windows_path"`
40699    new_path="$unix_path"
40700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40701    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40702    new_path="$unix_path"
40703  fi
40704
40705    fi
40706
40707    if test "x$new_path" = x; then
40708      # It's still not found. Now this is an unrecoverable error.
40709      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40710$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40711      has_space=`$ECHO "$complete" | $GREP " "`
40712      if test "x$has_space" != x; then
40713        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40714$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40715      fi
40716      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40717    fi
40718  fi
40719
40720  # Now new_path has a complete unix path to the binary
40721  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40722    # Keep paths in /bin as-is, but remove trailing .exe if any
40723    new_path="${new_path/%.exe/}"
40724    # Do not save /bin paths to all_fixpath_prefixes!
40725  else
40726    # Not in mixed or Windows style, start by that.
40727    new_path=`cmd //c echo $new_path`
40728
40729  input_path="$new_path"
40730  # Check if we need to convert this using DOS-style short mode. If the path
40731  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40732  # take no chances and rewrite it.
40733  # Note: m4 eats our [], so we need to use [ and ] instead.
40734  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40735  if test "x$has_forbidden_chars" != x; then
40736    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40737    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40738  fi
40739
40740    # Output is in $new_path
40741
40742  windows_path="$new_path"
40743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40744    unix_path=`$CYGPATH -u "$windows_path"`
40745    new_path="$unix_path"
40746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40748    new_path="$unix_path"
40749  fi
40750
40751    # remove trailing .exe if any
40752    new_path="${new_path/%.exe/}"
40753
40754    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40755    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40756  fi
40757
40758    else
40759      # We're on a unix platform. Hooray! :)
40760      # First separate the path from the arguments. This will split at the first
40761      # space.
40762      complete="$NM"
40763      path="${complete%% *}"
40764      tmp="$complete EOL"
40765      arguments="${tmp#* }"
40766
40767      # Cannot rely on the command "which" here since it doesn't always work.
40768      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40769      if test -z "$is_absolute_path"; then
40770        # Path to executable is not absolute. Find it.
40771        IFS_save="$IFS"
40772        IFS=:
40773        for p in $PATH; do
40774          if test -f "$p/$path" && test -x "$p/$path"; then
40775            new_path="$p/$path"
40776            break
40777          fi
40778        done
40779        IFS="$IFS_save"
40780      else
40781        # This is an absolute path, we can use it without further modifications.
40782        new_path="$path"
40783      fi
40784
40785      if test "x$new_path" = x; then
40786        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40787$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40788        has_space=`$ECHO "$complete" | $GREP " "`
40789        if test "x$has_space" != x; then
40790          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40791$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40792        fi
40793        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40794      fi
40795    fi
40796
40797    # Now join together the path and the arguments once again
40798    if test "x$arguments" != xEOL; then
40799      new_complete="$new_path ${arguments% *}"
40800    else
40801      new_complete="$new_path"
40802    fi
40803
40804    if test "x$complete" != "x$new_complete"; then
40805      NM="$new_complete"
40806      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40807$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40808    fi
40809  fi
40810
40811
40812
40813  # Publish this variable in the help.
40814
40815
40816  if [ -z "${GNM+x}" ]; then
40817    # The variable is not set by user, try to locate tool using the code snippet
40818    for ac_prog in gnm
40819do
40820  # Extract the first word of "$ac_prog", so it can be a program name with args.
40821set dummy $ac_prog; ac_word=$2
40822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40823$as_echo_n "checking for $ac_word... " >&6; }
40824if ${ac_cv_path_GNM+:} false; then :
40825  $as_echo_n "(cached) " >&6
40826else
40827  case $GNM in
40828  [\\/]* | ?:[\\/]*)
40829  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40830  ;;
40831  *)
40832  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40833for as_dir in $PATH
40834do
40835  IFS=$as_save_IFS
40836  test -z "$as_dir" && as_dir=.
40837    for ac_exec_ext in '' $ac_executable_extensions; do
40838  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40839    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40840    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40841    break 2
40842  fi
40843done
40844  done
40845IFS=$as_save_IFS
40846
40847  ;;
40848esac
40849fi
40850GNM=$ac_cv_path_GNM
40851if test -n "$GNM"; then
40852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40853$as_echo "$GNM" >&6; }
40854else
40855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40856$as_echo "no" >&6; }
40857fi
40858
40859
40860  test -n "$GNM" && break
40861done
40862
40863  else
40864    # The variable is set, but is it from the command line or the environment?
40865
40866    # Try to remove the string !GNM! from our list.
40867    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40868    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40869      # If it failed, the variable was not from the command line. Ignore it,
40870      # but warn the user (except for BASH, which is always set by the calling BASH).
40871      if test "xGNM" != xBASH; then
40872        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40873$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40874      fi
40875      # Try to locate tool using the code snippet
40876      for ac_prog in gnm
40877do
40878  # Extract the first word of "$ac_prog", so it can be a program name with args.
40879set dummy $ac_prog; ac_word=$2
40880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40881$as_echo_n "checking for $ac_word... " >&6; }
40882if ${ac_cv_path_GNM+:} false; then :
40883  $as_echo_n "(cached) " >&6
40884else
40885  case $GNM in
40886  [\\/]* | ?:[\\/]*)
40887  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40888  ;;
40889  *)
40890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40891for as_dir in $PATH
40892do
40893  IFS=$as_save_IFS
40894  test -z "$as_dir" && as_dir=.
40895    for ac_exec_ext in '' $ac_executable_extensions; do
40896  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40897    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40899    break 2
40900  fi
40901done
40902  done
40903IFS=$as_save_IFS
40904
40905  ;;
40906esac
40907fi
40908GNM=$ac_cv_path_GNM
40909if test -n "$GNM"; then
40910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40911$as_echo "$GNM" >&6; }
40912else
40913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40914$as_echo "no" >&6; }
40915fi
40916
40917
40918  test -n "$GNM" && break
40919done
40920
40921    else
40922      # If it succeeded, then it was overridden by the user. We will use it
40923      # for the tool.
40924
40925      # First remove it from the list of overridden variables, so we can test
40926      # for unknown variables in the end.
40927      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40928
40929      # Check if we try to supply an empty value
40930      if test "x$GNM" = x; then
40931        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40932$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40933        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40934$as_echo_n "checking for GNM... " >&6; }
40935        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40936$as_echo "disabled" >&6; }
40937      else
40938        # Check if the provided tool contains a complete path.
40939        tool_specified="$GNM"
40940        tool_basename="${tool_specified##*/}"
40941        if test "x$tool_basename" = "x$tool_specified"; then
40942          # A command without a complete path is provided, search $PATH.
40943          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40944$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40945          # Extract the first word of "$tool_basename", so it can be a program name with args.
40946set dummy $tool_basename; ac_word=$2
40947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40948$as_echo_n "checking for $ac_word... " >&6; }
40949if ${ac_cv_path_GNM+:} false; then :
40950  $as_echo_n "(cached) " >&6
40951else
40952  case $GNM in
40953  [\\/]* | ?:[\\/]*)
40954  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40955  ;;
40956  *)
40957  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40958for as_dir in $PATH
40959do
40960  IFS=$as_save_IFS
40961  test -z "$as_dir" && as_dir=.
40962    for ac_exec_ext in '' $ac_executable_extensions; do
40963  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40964    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40965    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40966    break 2
40967  fi
40968done
40969  done
40970IFS=$as_save_IFS
40971
40972  ;;
40973esac
40974fi
40975GNM=$ac_cv_path_GNM
40976if test -n "$GNM"; then
40977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40978$as_echo "$GNM" >&6; }
40979else
40980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40981$as_echo "no" >&6; }
40982fi
40983
40984
40985          if test "x$GNM" = x; then
40986            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40987          fi
40988        else
40989          # Otherwise we believe it is a complete path. Use it as it is.
40990          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40991$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40992          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40993$as_echo_n "checking for GNM... " >&6; }
40994          if test ! -x "$tool_specified"; then
40995            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40996$as_echo "not found" >&6; }
40997            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40998          fi
40999          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41000$as_echo "$tool_specified" >&6; }
41001        fi
41002      fi
41003    fi
41004
41005  fi
41006
41007
41008
41009  # Only process if variable expands to non-empty
41010
41011  if test "x$GNM" != x; then
41012    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41013
41014  # First separate the path from the arguments. This will split at the first
41015  # space.
41016  complete="$GNM"
41017  path="${complete%% *}"
41018  tmp="$complete EOL"
41019  arguments="${tmp#* }"
41020
41021  # Input might be given as Windows format, start by converting to
41022  # unix format.
41023  new_path=`$CYGPATH -u "$path"`
41024
41025  # Now try to locate executable using which
41026  new_path=`$WHICH "$new_path" 2> /dev/null`
41027  # bat and cmd files are not always considered executable in cygwin causing which
41028  # to not find them
41029  if test "x$new_path" = x \
41030      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41031      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41032    new_path=`$CYGPATH -u "$path"`
41033  fi
41034  if test "x$new_path" = x; then
41035    # Oops. Which didn't find the executable.
41036    # The splitting of arguments from the executable at a space might have been incorrect,
41037    # since paths with space are more likely in Windows. Give it another try with the whole
41038    # argument.
41039    path="$complete"
41040    arguments="EOL"
41041    new_path=`$CYGPATH -u "$path"`
41042    new_path=`$WHICH "$new_path" 2> /dev/null`
41043    # bat and cmd files are not always considered executable in cygwin causing which
41044    # to not find them
41045    if test "x$new_path" = x \
41046        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41047        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41048      new_path=`$CYGPATH -u "$path"`
41049    fi
41050    if test "x$new_path" = x; then
41051      # It's still not found. Now this is an unrecoverable error.
41052      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41053$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41054      has_space=`$ECHO "$complete" | $GREP " "`
41055      if test "x$has_space" != x; then
41056        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41057$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41058      fi
41059      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41060    fi
41061  fi
41062
41063  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41064  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41065  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41066  # "foo.exe" is OK but "foo" is an error.
41067  #
41068  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41069  # It is also a way to make sure we got the proper file name for the real test later on.
41070  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41071  if test "x$test_shortpath" = x; then
41072    # Short path failed, file does not exist as specified.
41073    # Try adding .exe or .cmd
41074    if test -f "${new_path}.exe"; then
41075      input_to_shortpath="${new_path}.exe"
41076    elif test -f "${new_path}.cmd"; then
41077      input_to_shortpath="${new_path}.cmd"
41078    else
41079      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
41080$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
41081      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41082$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41083      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41084    fi
41085  else
41086    input_to_shortpath="$new_path"
41087  fi
41088
41089  # Call helper function which possibly converts this using DOS-style short mode.
41090  # If so, the updated path is stored in $new_path.
41091  new_path="$input_to_shortpath"
41092
41093  input_path="$input_to_shortpath"
41094  # Check if we need to convert this using DOS-style short mode. If the path
41095  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41096  # take no chances and rewrite it.
41097  # Note: m4 eats our [], so we need to use [ and ] instead.
41098  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41099  if test "x$has_forbidden_chars" != x; then
41100    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41101    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41102    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41103    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41104      # Going to short mode and back again did indeed matter. Since short mode is
41105      # case insensitive, let's make it lowercase to improve readability.
41106      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41107      # Now convert it back to Unix-style (cygpath)
41108      input_path=`$CYGPATH -u "$shortmode_path"`
41109      new_path="$input_path"
41110    fi
41111  fi
41112
41113  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41114  if test "x$test_cygdrive_prefix" = x; then
41115    # As a simple fix, exclude /usr/bin since it's not a real path.
41116    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41117      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41118      # a path prefixed by /cygdrive for fixpath to work.
41119      new_path="$CYGWIN_ROOT_PATH$input_path"
41120    fi
41121  fi
41122
41123  # remove trailing .exe if any
41124  new_path="${new_path/%.exe/}"
41125
41126    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41127
41128  # First separate the path from the arguments. This will split at the first
41129  # space.
41130  complete="$GNM"
41131  path="${complete%% *}"
41132  tmp="$complete EOL"
41133  arguments="${tmp#* }"
41134
41135  # Input might be given as Windows format, start by converting to
41136  # unix format.
41137  new_path="$path"
41138
41139  windows_path="$new_path"
41140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41141    unix_path=`$CYGPATH -u "$windows_path"`
41142    new_path="$unix_path"
41143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41144    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41145    new_path="$unix_path"
41146  fi
41147
41148
41149  # Now try to locate executable using which
41150  new_path=`$WHICH "$new_path" 2> /dev/null`
41151
41152  if test "x$new_path" = x; then
41153    # Oops. Which didn't find the executable.
41154    # The splitting of arguments from the executable at a space might have been incorrect,
41155    # since paths with space are more likely in Windows. Give it another try with the whole
41156    # argument.
41157    path="$complete"
41158    arguments="EOL"
41159    new_path="$path"
41160
41161  windows_path="$new_path"
41162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41163    unix_path=`$CYGPATH -u "$windows_path"`
41164    new_path="$unix_path"
41165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41166    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41167    new_path="$unix_path"
41168  fi
41169
41170
41171    new_path=`$WHICH "$new_path" 2> /dev/null`
41172    # bat and cmd files are not always considered executable in MSYS causing which
41173    # to not find them
41174    if test "x$new_path" = x \
41175        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41176        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41177      new_path="$path"
41178
41179  windows_path="$new_path"
41180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41181    unix_path=`$CYGPATH -u "$windows_path"`
41182    new_path="$unix_path"
41183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41185    new_path="$unix_path"
41186  fi
41187
41188    fi
41189
41190    if test "x$new_path" = x; then
41191      # It's still not found. Now this is an unrecoverable error.
41192      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41193$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41194      has_space=`$ECHO "$complete" | $GREP " "`
41195      if test "x$has_space" != x; then
41196        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41197$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41198      fi
41199      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41200    fi
41201  fi
41202
41203  # Now new_path has a complete unix path to the binary
41204  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41205    # Keep paths in /bin as-is, but remove trailing .exe if any
41206    new_path="${new_path/%.exe/}"
41207    # Do not save /bin paths to all_fixpath_prefixes!
41208  else
41209    # Not in mixed or Windows style, start by that.
41210    new_path=`cmd //c echo $new_path`
41211
41212  input_path="$new_path"
41213  # Check if we need to convert this using DOS-style short mode. If the path
41214  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41215  # take no chances and rewrite it.
41216  # Note: m4 eats our [], so we need to use [ and ] instead.
41217  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41218  if test "x$has_forbidden_chars" != x; then
41219    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41220    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41221  fi
41222
41223    # Output is in $new_path
41224
41225  windows_path="$new_path"
41226  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41227    unix_path=`$CYGPATH -u "$windows_path"`
41228    new_path="$unix_path"
41229  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41230    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41231    new_path="$unix_path"
41232  fi
41233
41234    # remove trailing .exe if any
41235    new_path="${new_path/%.exe/}"
41236
41237    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41238    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41239  fi
41240
41241    else
41242      # We're on a unix platform. Hooray! :)
41243      # First separate the path from the arguments. This will split at the first
41244      # space.
41245      complete="$GNM"
41246      path="${complete%% *}"
41247      tmp="$complete EOL"
41248      arguments="${tmp#* }"
41249
41250      # Cannot rely on the command "which" here since it doesn't always work.
41251      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41252      if test -z "$is_absolute_path"; then
41253        # Path to executable is not absolute. Find it.
41254        IFS_save="$IFS"
41255        IFS=:
41256        for p in $PATH; do
41257          if test -f "$p/$path" && test -x "$p/$path"; then
41258            new_path="$p/$path"
41259            break
41260          fi
41261        done
41262        IFS="$IFS_save"
41263      else
41264        # This is an absolute path, we can use it without further modifications.
41265        new_path="$path"
41266      fi
41267
41268      if test "x$new_path" = x; then
41269        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41270$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41271        has_space=`$ECHO "$complete" | $GREP " "`
41272        if test "x$has_space" != x; then
41273          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41274$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41275        fi
41276        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41277      fi
41278    fi
41279
41280    # Now join together the path and the arguments once again
41281    if test "x$arguments" != xEOL; then
41282      new_complete="$new_path ${arguments% *}"
41283    else
41284      new_complete="$new_path"
41285    fi
41286
41287    if test "x$complete" != "x$new_complete"; then
41288      GNM="$new_complete"
41289      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41290$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41291    fi
41292  fi
41293
41294  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41295    # FIXME: we should unify this with the solaris case above.
41296
41297
41298  # Publish this variable in the help.
41299
41300
41301  if [ -z "${STRIP+x}" ]; then
41302    # The variable is not set by user, try to locate tool using the code snippet
41303    if test -n "$ac_tool_prefix"; then
41304  for ac_prog in strip
41305  do
41306    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41307set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41309$as_echo_n "checking for $ac_word... " >&6; }
41310if ${ac_cv_prog_STRIP+:} false; then :
41311  $as_echo_n "(cached) " >&6
41312else
41313  if test -n "$STRIP"; then
41314  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41315else
41316as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41317for as_dir in $PATH
41318do
41319  IFS=$as_save_IFS
41320  test -z "$as_dir" && as_dir=.
41321    for ac_exec_ext in '' $ac_executable_extensions; do
41322  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41323    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41324    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41325    break 2
41326  fi
41327done
41328  done
41329IFS=$as_save_IFS
41330
41331fi
41332fi
41333STRIP=$ac_cv_prog_STRIP
41334if test -n "$STRIP"; then
41335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41336$as_echo "$STRIP" >&6; }
41337else
41338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41339$as_echo "no" >&6; }
41340fi
41341
41342
41343    test -n "$STRIP" && break
41344  done
41345fi
41346if test -z "$STRIP"; then
41347  ac_ct_STRIP=$STRIP
41348  for ac_prog in strip
41349do
41350  # Extract the first word of "$ac_prog", so it can be a program name with args.
41351set dummy $ac_prog; ac_word=$2
41352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41353$as_echo_n "checking for $ac_word... " >&6; }
41354if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41355  $as_echo_n "(cached) " >&6
41356else
41357  if test -n "$ac_ct_STRIP"; then
41358  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41359else
41360as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41361for as_dir in $PATH
41362do
41363  IFS=$as_save_IFS
41364  test -z "$as_dir" && as_dir=.
41365    for ac_exec_ext in '' $ac_executable_extensions; do
41366  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41367    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41368    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41369    break 2
41370  fi
41371done
41372  done
41373IFS=$as_save_IFS
41374
41375fi
41376fi
41377ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41378if test -n "$ac_ct_STRIP"; then
41379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41380$as_echo "$ac_ct_STRIP" >&6; }
41381else
41382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41383$as_echo "no" >&6; }
41384fi
41385
41386
41387  test -n "$ac_ct_STRIP" && break
41388done
41389
41390  if test "x$ac_ct_STRIP" = x; then
41391    STRIP=""
41392  else
41393    case $cross_compiling:$ac_tool_warned in
41394yes:)
41395{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41396$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41397ac_tool_warned=yes ;;
41398esac
41399    STRIP=$ac_ct_STRIP
41400  fi
41401fi
41402
41403  else
41404    # The variable is set, but is it from the command line or the environment?
41405
41406    # Try to remove the string !STRIP! from our list.
41407    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41408    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41409      # If it failed, the variable was not from the command line. Ignore it,
41410      # but warn the user (except for BASH, which is always set by the calling BASH).
41411      if test "xSTRIP" != xBASH; then
41412        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41413$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41414      fi
41415      # Try to locate tool using the code snippet
41416      if test -n "$ac_tool_prefix"; then
41417  for ac_prog in strip
41418  do
41419    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41420set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41422$as_echo_n "checking for $ac_word... " >&6; }
41423if ${ac_cv_prog_STRIP+:} false; then :
41424  $as_echo_n "(cached) " >&6
41425else
41426  if test -n "$STRIP"; then
41427  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41428else
41429as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41430for as_dir in $PATH
41431do
41432  IFS=$as_save_IFS
41433  test -z "$as_dir" && as_dir=.
41434    for ac_exec_ext in '' $ac_executable_extensions; do
41435  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41436    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41438    break 2
41439  fi
41440done
41441  done
41442IFS=$as_save_IFS
41443
41444fi
41445fi
41446STRIP=$ac_cv_prog_STRIP
41447if test -n "$STRIP"; then
41448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41449$as_echo "$STRIP" >&6; }
41450else
41451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41452$as_echo "no" >&6; }
41453fi
41454
41455
41456    test -n "$STRIP" && break
41457  done
41458fi
41459if test -z "$STRIP"; then
41460  ac_ct_STRIP=$STRIP
41461  for ac_prog in strip
41462do
41463  # Extract the first word of "$ac_prog", so it can be a program name with args.
41464set dummy $ac_prog; ac_word=$2
41465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41466$as_echo_n "checking for $ac_word... " >&6; }
41467if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41468  $as_echo_n "(cached) " >&6
41469else
41470  if test -n "$ac_ct_STRIP"; then
41471  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41472else
41473as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41474for as_dir in $PATH
41475do
41476  IFS=$as_save_IFS
41477  test -z "$as_dir" && as_dir=.
41478    for ac_exec_ext in '' $ac_executable_extensions; do
41479  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41480    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41481    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41482    break 2
41483  fi
41484done
41485  done
41486IFS=$as_save_IFS
41487
41488fi
41489fi
41490ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41491if test -n "$ac_ct_STRIP"; then
41492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41493$as_echo "$ac_ct_STRIP" >&6; }
41494else
41495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41496$as_echo "no" >&6; }
41497fi
41498
41499
41500  test -n "$ac_ct_STRIP" && break
41501done
41502
41503  if test "x$ac_ct_STRIP" = x; then
41504    STRIP=""
41505  else
41506    case $cross_compiling:$ac_tool_warned in
41507yes:)
41508{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41509$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41510ac_tool_warned=yes ;;
41511esac
41512    STRIP=$ac_ct_STRIP
41513  fi
41514fi
41515
41516    else
41517      # If it succeeded, then it was overridden by the user. We will use it
41518      # for the tool.
41519
41520      # First remove it from the list of overridden variables, so we can test
41521      # for unknown variables in the end.
41522      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41523
41524      # Check if we try to supply an empty value
41525      if test "x$STRIP" = x; then
41526        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
41527$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
41528        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41529$as_echo_n "checking for STRIP... " >&6; }
41530        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41531$as_echo "disabled" >&6; }
41532      else
41533        # Check if the provided tool contains a complete path.
41534        tool_specified="$STRIP"
41535        tool_basename="${tool_specified##*/}"
41536        if test "x$tool_basename" = "x$tool_specified"; then
41537          # A command without a complete path is provided, search $PATH.
41538          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
41539$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
41540          # Extract the first word of "$tool_basename", so it can be a program name with args.
41541set dummy $tool_basename; ac_word=$2
41542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41543$as_echo_n "checking for $ac_word... " >&6; }
41544if ${ac_cv_path_STRIP+:} false; then :
41545  $as_echo_n "(cached) " >&6
41546else
41547  case $STRIP in
41548  [\\/]* | ?:[\\/]*)
41549  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41550  ;;
41551  *)
41552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41553for as_dir in $PATH
41554do
41555  IFS=$as_save_IFS
41556  test -z "$as_dir" && as_dir=.
41557    for ac_exec_ext in '' $ac_executable_extensions; do
41558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41559    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41561    break 2
41562  fi
41563done
41564  done
41565IFS=$as_save_IFS
41566
41567  ;;
41568esac
41569fi
41570STRIP=$ac_cv_path_STRIP
41571if test -n "$STRIP"; then
41572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41573$as_echo "$STRIP" >&6; }
41574else
41575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41576$as_echo "no" >&6; }
41577fi
41578
41579
41580          if test "x$STRIP" = x; then
41581            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41582          fi
41583        else
41584          # Otherwise we believe it is a complete path. Use it as it is.
41585          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
41586$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
41587          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41588$as_echo_n "checking for STRIP... " >&6; }
41589          if test ! -x "$tool_specified"; then
41590            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41591$as_echo "not found" >&6; }
41592            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
41593          fi
41594          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41595$as_echo "$tool_specified" >&6; }
41596        fi
41597      fi
41598    fi
41599
41600  fi
41601
41602
41603
41604  # Only process if variable expands to non-empty
41605
41606  if test "x$STRIP" != x; then
41607    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41608
41609  # First separate the path from the arguments. This will split at the first
41610  # space.
41611  complete="$STRIP"
41612  path="${complete%% *}"
41613  tmp="$complete EOL"
41614  arguments="${tmp#* }"
41615
41616  # Input might be given as Windows format, start by converting to
41617  # unix format.
41618  new_path=`$CYGPATH -u "$path"`
41619
41620  # Now try to locate executable using which
41621  new_path=`$WHICH "$new_path" 2> /dev/null`
41622  # bat and cmd files are not always considered executable in cygwin causing which
41623  # to not find them
41624  if test "x$new_path" = x \
41625      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41626      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41627    new_path=`$CYGPATH -u "$path"`
41628  fi
41629  if test "x$new_path" = x; then
41630    # Oops. Which didn't find the executable.
41631    # The splitting of arguments from the executable at a space might have been incorrect,
41632    # since paths with space are more likely in Windows. Give it another try with the whole
41633    # argument.
41634    path="$complete"
41635    arguments="EOL"
41636    new_path=`$CYGPATH -u "$path"`
41637    new_path=`$WHICH "$new_path" 2> /dev/null`
41638    # bat and cmd files are not always considered executable in cygwin causing which
41639    # to not find them
41640    if test "x$new_path" = x \
41641        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41642        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41643      new_path=`$CYGPATH -u "$path"`
41644    fi
41645    if test "x$new_path" = x; then
41646      # It's still not found. Now this is an unrecoverable error.
41647      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41648$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41649      has_space=`$ECHO "$complete" | $GREP " "`
41650      if test "x$has_space" != x; then
41651        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41652$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41653      fi
41654      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41655    fi
41656  fi
41657
41658  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41659  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41660  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41661  # "foo.exe" is OK but "foo" is an error.
41662  #
41663  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41664  # It is also a way to make sure we got the proper file name for the real test later on.
41665  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41666  if test "x$test_shortpath" = x; then
41667    # Short path failed, file does not exist as specified.
41668    # Try adding .exe or .cmd
41669    if test -f "${new_path}.exe"; then
41670      input_to_shortpath="${new_path}.exe"
41671    elif test -f "${new_path}.cmd"; then
41672      input_to_shortpath="${new_path}.cmd"
41673    else
41674      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
41675$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
41676      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41677$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41678      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41679    fi
41680  else
41681    input_to_shortpath="$new_path"
41682  fi
41683
41684  # Call helper function which possibly converts this using DOS-style short mode.
41685  # If so, the updated path is stored in $new_path.
41686  new_path="$input_to_shortpath"
41687
41688  input_path="$input_to_shortpath"
41689  # Check if we need to convert this using DOS-style short mode. If the path
41690  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41691  # take no chances and rewrite it.
41692  # Note: m4 eats our [], so we need to use [ and ] instead.
41693  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41694  if test "x$has_forbidden_chars" != x; then
41695    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41696    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41697    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41698    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41699      # Going to short mode and back again did indeed matter. Since short mode is
41700      # case insensitive, let's make it lowercase to improve readability.
41701      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41702      # Now convert it back to Unix-style (cygpath)
41703      input_path=`$CYGPATH -u "$shortmode_path"`
41704      new_path="$input_path"
41705    fi
41706  fi
41707
41708  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41709  if test "x$test_cygdrive_prefix" = x; then
41710    # As a simple fix, exclude /usr/bin since it's not a real path.
41711    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41712      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41713      # a path prefixed by /cygdrive for fixpath to work.
41714      new_path="$CYGWIN_ROOT_PATH$input_path"
41715    fi
41716  fi
41717
41718  # remove trailing .exe if any
41719  new_path="${new_path/%.exe/}"
41720
41721    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41722
41723  # First separate the path from the arguments. This will split at the first
41724  # space.
41725  complete="$STRIP"
41726  path="${complete%% *}"
41727  tmp="$complete EOL"
41728  arguments="${tmp#* }"
41729
41730  # Input might be given as Windows format, start by converting to
41731  # unix format.
41732  new_path="$path"
41733
41734  windows_path="$new_path"
41735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41736    unix_path=`$CYGPATH -u "$windows_path"`
41737    new_path="$unix_path"
41738  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41739    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41740    new_path="$unix_path"
41741  fi
41742
41743
41744  # Now try to locate executable using which
41745  new_path=`$WHICH "$new_path" 2> /dev/null`
41746
41747  if test "x$new_path" = x; then
41748    # Oops. Which didn't find the executable.
41749    # The splitting of arguments from the executable at a space might have been incorrect,
41750    # since paths with space are more likely in Windows. Give it another try with the whole
41751    # argument.
41752    path="$complete"
41753    arguments="EOL"
41754    new_path="$path"
41755
41756  windows_path="$new_path"
41757  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41758    unix_path=`$CYGPATH -u "$windows_path"`
41759    new_path="$unix_path"
41760  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41761    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41762    new_path="$unix_path"
41763  fi
41764
41765
41766    new_path=`$WHICH "$new_path" 2> /dev/null`
41767    # bat and cmd files are not always considered executable in MSYS causing which
41768    # to not find them
41769    if test "x$new_path" = x \
41770        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41771        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41772      new_path="$path"
41773
41774  windows_path="$new_path"
41775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41776    unix_path=`$CYGPATH -u "$windows_path"`
41777    new_path="$unix_path"
41778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41779    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41780    new_path="$unix_path"
41781  fi
41782
41783    fi
41784
41785    if test "x$new_path" = x; then
41786      # It's still not found. Now this is an unrecoverable error.
41787      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41788$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41789      has_space=`$ECHO "$complete" | $GREP " "`
41790      if test "x$has_space" != x; then
41791        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41792$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41793      fi
41794      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41795    fi
41796  fi
41797
41798  # Now new_path has a complete unix path to the binary
41799  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41800    # Keep paths in /bin as-is, but remove trailing .exe if any
41801    new_path="${new_path/%.exe/}"
41802    # Do not save /bin paths to all_fixpath_prefixes!
41803  else
41804    # Not in mixed or Windows style, start by that.
41805    new_path=`cmd //c echo $new_path`
41806
41807  input_path="$new_path"
41808  # Check if we need to convert this using DOS-style short mode. If the path
41809  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41810  # take no chances and rewrite it.
41811  # Note: m4 eats our [], so we need to use [ and ] instead.
41812  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41813  if test "x$has_forbidden_chars" != x; then
41814    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41815    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41816  fi
41817
41818    # Output is in $new_path
41819
41820  windows_path="$new_path"
41821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41822    unix_path=`$CYGPATH -u "$windows_path"`
41823    new_path="$unix_path"
41824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41825    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41826    new_path="$unix_path"
41827  fi
41828
41829    # remove trailing .exe if any
41830    new_path="${new_path/%.exe/}"
41831
41832    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41833    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41834  fi
41835
41836    else
41837      # We're on a unix platform. Hooray! :)
41838      # First separate the path from the arguments. This will split at the first
41839      # space.
41840      complete="$STRIP"
41841      path="${complete%% *}"
41842      tmp="$complete EOL"
41843      arguments="${tmp#* }"
41844
41845      # Cannot rely on the command "which" here since it doesn't always work.
41846      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41847      if test -z "$is_absolute_path"; then
41848        # Path to executable is not absolute. Find it.
41849        IFS_save="$IFS"
41850        IFS=:
41851        for p in $PATH; do
41852          if test -f "$p/$path" && test -x "$p/$path"; then
41853            new_path="$p/$path"
41854            break
41855          fi
41856        done
41857        IFS="$IFS_save"
41858      else
41859        # This is an absolute path, we can use it without further modifications.
41860        new_path="$path"
41861      fi
41862
41863      if test "x$new_path" = x; then
41864        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41865$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41866        has_space=`$ECHO "$complete" | $GREP " "`
41867        if test "x$has_space" != x; then
41868          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41869$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41870        fi
41871        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41872      fi
41873    fi
41874
41875    # Now join together the path and the arguments once again
41876    if test "x$arguments" != xEOL; then
41877      new_complete="$new_path ${arguments% *}"
41878    else
41879      new_complete="$new_path"
41880    fi
41881
41882    if test "x$complete" != "x$new_complete"; then
41883      STRIP="$new_complete"
41884      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41885$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41886    fi
41887  fi
41888
41889    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41890
41891
41892  # Publish this variable in the help.
41893
41894
41895  if [ -z "${NM+x}" ]; then
41896    # The variable is not set by user, try to locate tool using the code snippet
41897    if test -n "$ac_tool_prefix"; then
41898  for ac_prog in nm gcc-nm
41899  do
41900    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41901set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41903$as_echo_n "checking for $ac_word... " >&6; }
41904if ${ac_cv_prog_NM+:} false; then :
41905  $as_echo_n "(cached) " >&6
41906else
41907  if test -n "$NM"; then
41908  ac_cv_prog_NM="$NM" # Let the user override the test.
41909else
41910as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41911for as_dir in $PATH
41912do
41913  IFS=$as_save_IFS
41914  test -z "$as_dir" && as_dir=.
41915    for ac_exec_ext in '' $ac_executable_extensions; do
41916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41917    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41919    break 2
41920  fi
41921done
41922  done
41923IFS=$as_save_IFS
41924
41925fi
41926fi
41927NM=$ac_cv_prog_NM
41928if test -n "$NM"; then
41929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41930$as_echo "$NM" >&6; }
41931else
41932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41933$as_echo "no" >&6; }
41934fi
41935
41936
41937    test -n "$NM" && break
41938  done
41939fi
41940if test -z "$NM"; then
41941  ac_ct_NM=$NM
41942  for ac_prog in nm gcc-nm
41943do
41944  # Extract the first word of "$ac_prog", so it can be a program name with args.
41945set dummy $ac_prog; ac_word=$2
41946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41947$as_echo_n "checking for $ac_word... " >&6; }
41948if ${ac_cv_prog_ac_ct_NM+:} false; then :
41949  $as_echo_n "(cached) " >&6
41950else
41951  if test -n "$ac_ct_NM"; then
41952  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41953else
41954as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41955for as_dir in $PATH
41956do
41957  IFS=$as_save_IFS
41958  test -z "$as_dir" && as_dir=.
41959    for ac_exec_ext in '' $ac_executable_extensions; do
41960  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41961    ac_cv_prog_ac_ct_NM="$ac_prog"
41962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41963    break 2
41964  fi
41965done
41966  done
41967IFS=$as_save_IFS
41968
41969fi
41970fi
41971ac_ct_NM=$ac_cv_prog_ac_ct_NM
41972if test -n "$ac_ct_NM"; then
41973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41974$as_echo "$ac_ct_NM" >&6; }
41975else
41976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41977$as_echo "no" >&6; }
41978fi
41979
41980
41981  test -n "$ac_ct_NM" && break
41982done
41983
41984  if test "x$ac_ct_NM" = x; then
41985    NM=""
41986  else
41987    case $cross_compiling:$ac_tool_warned in
41988yes:)
41989{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41990$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41991ac_tool_warned=yes ;;
41992esac
41993    NM=$ac_ct_NM
41994  fi
41995fi
41996
41997  else
41998    # The variable is set, but is it from the command line or the environment?
41999
42000    # Try to remove the string !NM! from our list.
42001    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42002    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42003      # If it failed, the variable was not from the command line. Ignore it,
42004      # but warn the user (except for BASH, which is always set by the calling BASH).
42005      if test "xNM" != xBASH; then
42006        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42007$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42008      fi
42009      # Try to locate tool using the code snippet
42010      if test -n "$ac_tool_prefix"; then
42011  for ac_prog in nm gcc-nm
42012  do
42013    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42014set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42016$as_echo_n "checking for $ac_word... " >&6; }
42017if ${ac_cv_prog_NM+:} false; then :
42018  $as_echo_n "(cached) " >&6
42019else
42020  if test -n "$NM"; then
42021  ac_cv_prog_NM="$NM" # Let the user override the test.
42022else
42023as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42024for as_dir in $PATH
42025do
42026  IFS=$as_save_IFS
42027  test -z "$as_dir" && as_dir=.
42028    for ac_exec_ext in '' $ac_executable_extensions; do
42029  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42030    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42032    break 2
42033  fi
42034done
42035  done
42036IFS=$as_save_IFS
42037
42038fi
42039fi
42040NM=$ac_cv_prog_NM
42041if test -n "$NM"; then
42042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42043$as_echo "$NM" >&6; }
42044else
42045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42046$as_echo "no" >&6; }
42047fi
42048
42049
42050    test -n "$NM" && break
42051  done
42052fi
42053if test -z "$NM"; then
42054  ac_ct_NM=$NM
42055  for ac_prog in nm gcc-nm
42056do
42057  # Extract the first word of "$ac_prog", so it can be a program name with args.
42058set dummy $ac_prog; ac_word=$2
42059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42060$as_echo_n "checking for $ac_word... " >&6; }
42061if ${ac_cv_prog_ac_ct_NM+:} false; then :
42062  $as_echo_n "(cached) " >&6
42063else
42064  if test -n "$ac_ct_NM"; then
42065  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42066else
42067as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42068for as_dir in $PATH
42069do
42070  IFS=$as_save_IFS
42071  test -z "$as_dir" && as_dir=.
42072    for ac_exec_ext in '' $ac_executable_extensions; do
42073  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42074    ac_cv_prog_ac_ct_NM="$ac_prog"
42075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42076    break 2
42077  fi
42078done
42079  done
42080IFS=$as_save_IFS
42081
42082fi
42083fi
42084ac_ct_NM=$ac_cv_prog_ac_ct_NM
42085if test -n "$ac_ct_NM"; then
42086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42087$as_echo "$ac_ct_NM" >&6; }
42088else
42089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42090$as_echo "no" >&6; }
42091fi
42092
42093
42094  test -n "$ac_ct_NM" && break
42095done
42096
42097  if test "x$ac_ct_NM" = x; then
42098    NM=""
42099  else
42100    case $cross_compiling:$ac_tool_warned in
42101yes:)
42102{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42103$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42104ac_tool_warned=yes ;;
42105esac
42106    NM=$ac_ct_NM
42107  fi
42108fi
42109
42110    else
42111      # If it succeeded, then it was overridden by the user. We will use it
42112      # for the tool.
42113
42114      # First remove it from the list of overridden variables, so we can test
42115      # for unknown variables in the end.
42116      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42117
42118      # Check if we try to supply an empty value
42119      if test "x$NM" = x; then
42120        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42121$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42122        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42123$as_echo_n "checking for NM... " >&6; }
42124        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42125$as_echo "disabled" >&6; }
42126      else
42127        # Check if the provided tool contains a complete path.
42128        tool_specified="$NM"
42129        tool_basename="${tool_specified##*/}"
42130        if test "x$tool_basename" = "x$tool_specified"; then
42131          # A command without a complete path is provided, search $PATH.
42132          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42133$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42134          # Extract the first word of "$tool_basename", so it can be a program name with args.
42135set dummy $tool_basename; ac_word=$2
42136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42137$as_echo_n "checking for $ac_word... " >&6; }
42138if ${ac_cv_path_NM+:} false; then :
42139  $as_echo_n "(cached) " >&6
42140else
42141  case $NM in
42142  [\\/]* | ?:[\\/]*)
42143  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42144  ;;
42145  *)
42146  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42147for as_dir in $PATH
42148do
42149  IFS=$as_save_IFS
42150  test -z "$as_dir" && as_dir=.
42151    for ac_exec_ext in '' $ac_executable_extensions; do
42152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42153    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42155    break 2
42156  fi
42157done
42158  done
42159IFS=$as_save_IFS
42160
42161  ;;
42162esac
42163fi
42164NM=$ac_cv_path_NM
42165if test -n "$NM"; then
42166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42167$as_echo "$NM" >&6; }
42168else
42169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42170$as_echo "no" >&6; }
42171fi
42172
42173
42174          if test "x$NM" = x; then
42175            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42176          fi
42177        else
42178          # Otherwise we believe it is a complete path. Use it as it is.
42179          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42180$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42181          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42182$as_echo_n "checking for NM... " >&6; }
42183          if test ! -x "$tool_specified"; then
42184            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42185$as_echo "not found" >&6; }
42186            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42187          fi
42188          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42189$as_echo "$tool_specified" >&6; }
42190        fi
42191      fi
42192    fi
42193
42194  fi
42195
42196
42197    else
42198
42199
42200  # Publish this variable in the help.
42201
42202
42203  if [ -z "${NM+x}" ]; then
42204    # The variable is not set by user, try to locate tool using the code snippet
42205    if test -n "$ac_tool_prefix"; then
42206  for ac_prog in nm
42207  do
42208    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42209set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42211$as_echo_n "checking for $ac_word... " >&6; }
42212if ${ac_cv_prog_NM+:} false; then :
42213  $as_echo_n "(cached) " >&6
42214else
42215  if test -n "$NM"; then
42216  ac_cv_prog_NM="$NM" # Let the user override the test.
42217else
42218as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42219for as_dir in $PATH
42220do
42221  IFS=$as_save_IFS
42222  test -z "$as_dir" && as_dir=.
42223    for ac_exec_ext in '' $ac_executable_extensions; do
42224  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42225    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42227    break 2
42228  fi
42229done
42230  done
42231IFS=$as_save_IFS
42232
42233fi
42234fi
42235NM=$ac_cv_prog_NM
42236if test -n "$NM"; then
42237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42238$as_echo "$NM" >&6; }
42239else
42240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42241$as_echo "no" >&6; }
42242fi
42243
42244
42245    test -n "$NM" && break
42246  done
42247fi
42248if test -z "$NM"; then
42249  ac_ct_NM=$NM
42250  for ac_prog in nm
42251do
42252  # Extract the first word of "$ac_prog", so it can be a program name with args.
42253set dummy $ac_prog; ac_word=$2
42254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42255$as_echo_n "checking for $ac_word... " >&6; }
42256if ${ac_cv_prog_ac_ct_NM+:} false; then :
42257  $as_echo_n "(cached) " >&6
42258else
42259  if test -n "$ac_ct_NM"; then
42260  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42261else
42262as_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_prog_ac_ct_NM="$ac_prog"
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
42277fi
42278fi
42279ac_ct_NM=$ac_cv_prog_ac_ct_NM
42280if test -n "$ac_ct_NM"; then
42281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42282$as_echo "$ac_ct_NM" >&6; }
42283else
42284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42285$as_echo "no" >&6; }
42286fi
42287
42288
42289  test -n "$ac_ct_NM" && break
42290done
42291
42292  if test "x$ac_ct_NM" = x; then
42293    NM=""
42294  else
42295    case $cross_compiling:$ac_tool_warned in
42296yes:)
42297{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42298$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42299ac_tool_warned=yes ;;
42300esac
42301    NM=$ac_ct_NM
42302  fi
42303fi
42304
42305  else
42306    # The variable is set, but is it from the command line or the environment?
42307
42308    # Try to remove the string !NM! from our list.
42309    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42310    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42311      # If it failed, the variable was not from the command line. Ignore it,
42312      # but warn the user (except for BASH, which is always set by the calling BASH).
42313      if test "xNM" != xBASH; then
42314        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42315$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42316      fi
42317      # Try to locate tool using the code snippet
42318      if test -n "$ac_tool_prefix"; then
42319  for ac_prog in nm
42320  do
42321    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42322set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42324$as_echo_n "checking for $ac_word... " >&6; }
42325if ${ac_cv_prog_NM+:} false; then :
42326  $as_echo_n "(cached) " >&6
42327else
42328  if test -n "$NM"; then
42329  ac_cv_prog_NM="$NM" # Let the user override the test.
42330else
42331as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42332for as_dir in $PATH
42333do
42334  IFS=$as_save_IFS
42335  test -z "$as_dir" && as_dir=.
42336    for ac_exec_ext in '' $ac_executable_extensions; do
42337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42338    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42340    break 2
42341  fi
42342done
42343  done
42344IFS=$as_save_IFS
42345
42346fi
42347fi
42348NM=$ac_cv_prog_NM
42349if test -n "$NM"; then
42350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42351$as_echo "$NM" >&6; }
42352else
42353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42354$as_echo "no" >&6; }
42355fi
42356
42357
42358    test -n "$NM" && break
42359  done
42360fi
42361if test -z "$NM"; then
42362  ac_ct_NM=$NM
42363  for ac_prog in nm
42364do
42365  # Extract the first word of "$ac_prog", so it can be a program name with args.
42366set dummy $ac_prog; ac_word=$2
42367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42368$as_echo_n "checking for $ac_word... " >&6; }
42369if ${ac_cv_prog_ac_ct_NM+:} false; then :
42370  $as_echo_n "(cached) " >&6
42371else
42372  if test -n "$ac_ct_NM"; then
42373  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42374else
42375as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42376for as_dir in $PATH
42377do
42378  IFS=$as_save_IFS
42379  test -z "$as_dir" && as_dir=.
42380    for ac_exec_ext in '' $ac_executable_extensions; do
42381  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42382    ac_cv_prog_ac_ct_NM="$ac_prog"
42383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42384    break 2
42385  fi
42386done
42387  done
42388IFS=$as_save_IFS
42389
42390fi
42391fi
42392ac_ct_NM=$ac_cv_prog_ac_ct_NM
42393if test -n "$ac_ct_NM"; then
42394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42395$as_echo "$ac_ct_NM" >&6; }
42396else
42397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42398$as_echo "no" >&6; }
42399fi
42400
42401
42402  test -n "$ac_ct_NM" && break
42403done
42404
42405  if test "x$ac_ct_NM" = x; then
42406    NM=""
42407  else
42408    case $cross_compiling:$ac_tool_warned in
42409yes:)
42410{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42411$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42412ac_tool_warned=yes ;;
42413esac
42414    NM=$ac_ct_NM
42415  fi
42416fi
42417
42418    else
42419      # If it succeeded, then it was overridden by the user. We will use it
42420      # for the tool.
42421
42422      # First remove it from the list of overridden variables, so we can test
42423      # for unknown variables in the end.
42424      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42425
42426      # Check if we try to supply an empty value
42427      if test "x$NM" = x; then
42428        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42429$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42430        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42431$as_echo_n "checking for NM... " >&6; }
42432        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42433$as_echo "disabled" >&6; }
42434      else
42435        # Check if the provided tool contains a complete path.
42436        tool_specified="$NM"
42437        tool_basename="${tool_specified##*/}"
42438        if test "x$tool_basename" = "x$tool_specified"; then
42439          # A command without a complete path is provided, search $PATH.
42440          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42441$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42442          # Extract the first word of "$tool_basename", so it can be a program name with args.
42443set dummy $tool_basename; ac_word=$2
42444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42445$as_echo_n "checking for $ac_word... " >&6; }
42446if ${ac_cv_path_NM+:} false; then :
42447  $as_echo_n "(cached) " >&6
42448else
42449  case $NM in
42450  [\\/]* | ?:[\\/]*)
42451  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42452  ;;
42453  *)
42454  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42455for as_dir in $PATH
42456do
42457  IFS=$as_save_IFS
42458  test -z "$as_dir" && as_dir=.
42459    for ac_exec_ext in '' $ac_executable_extensions; do
42460  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42461    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42462    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42463    break 2
42464  fi
42465done
42466  done
42467IFS=$as_save_IFS
42468
42469  ;;
42470esac
42471fi
42472NM=$ac_cv_path_NM
42473if test -n "$NM"; then
42474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42475$as_echo "$NM" >&6; }
42476else
42477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42478$as_echo "no" >&6; }
42479fi
42480
42481
42482          if test "x$NM" = x; then
42483            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42484          fi
42485        else
42486          # Otherwise we believe it is a complete path. Use it as it is.
42487          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42488$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42489          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42490$as_echo_n "checking for NM... " >&6; }
42491          if test ! -x "$tool_specified"; then
42492            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42493$as_echo "not found" >&6; }
42494            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42495          fi
42496          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42497$as_echo "$tool_specified" >&6; }
42498        fi
42499      fi
42500    fi
42501
42502  fi
42503
42504
42505    fi
42506
42507  # Only process if variable expands to non-empty
42508
42509  if test "x$NM" != x; then
42510    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42511
42512  # First separate the path from the arguments. This will split at the first
42513  # space.
42514  complete="$NM"
42515  path="${complete%% *}"
42516  tmp="$complete EOL"
42517  arguments="${tmp#* }"
42518
42519  # Input might be given as Windows format, start by converting to
42520  # unix format.
42521  new_path=`$CYGPATH -u "$path"`
42522
42523  # Now try to locate executable using which
42524  new_path=`$WHICH "$new_path" 2> /dev/null`
42525  # bat and cmd files are not always considered executable in cygwin causing which
42526  # to not find them
42527  if test "x$new_path" = x \
42528      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42529      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42530    new_path=`$CYGPATH -u "$path"`
42531  fi
42532  if test "x$new_path" = x; then
42533    # Oops. Which didn't find the executable.
42534    # The splitting of arguments from the executable at a space might have been incorrect,
42535    # since paths with space are more likely in Windows. Give it another try with the whole
42536    # argument.
42537    path="$complete"
42538    arguments="EOL"
42539    new_path=`$CYGPATH -u "$path"`
42540    new_path=`$WHICH "$new_path" 2> /dev/null`
42541    # bat and cmd files are not always considered executable in cygwin causing which
42542    # to not find them
42543    if test "x$new_path" = x \
42544        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42545        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42546      new_path=`$CYGPATH -u "$path"`
42547    fi
42548    if test "x$new_path" = x; then
42549      # It's still not found. Now this is an unrecoverable error.
42550      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42551$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42552      has_space=`$ECHO "$complete" | $GREP " "`
42553      if test "x$has_space" != x; then
42554        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42555$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42556      fi
42557      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42558    fi
42559  fi
42560
42561  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42562  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42563  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42564  # "foo.exe" is OK but "foo" is an error.
42565  #
42566  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42567  # It is also a way to make sure we got the proper file name for the real test later on.
42568  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42569  if test "x$test_shortpath" = x; then
42570    # Short path failed, file does not exist as specified.
42571    # Try adding .exe or .cmd
42572    if test -f "${new_path}.exe"; then
42573      input_to_shortpath="${new_path}.exe"
42574    elif test -f "${new_path}.cmd"; then
42575      input_to_shortpath="${new_path}.cmd"
42576    else
42577      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
42578$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
42579      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42580$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42581      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42582    fi
42583  else
42584    input_to_shortpath="$new_path"
42585  fi
42586
42587  # Call helper function which possibly converts this using DOS-style short mode.
42588  # If so, the updated path is stored in $new_path.
42589  new_path="$input_to_shortpath"
42590
42591  input_path="$input_to_shortpath"
42592  # Check if we need to convert this using DOS-style short mode. If the path
42593  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42594  # take no chances and rewrite it.
42595  # Note: m4 eats our [], so we need to use [ and ] instead.
42596  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42597  if test "x$has_forbidden_chars" != x; then
42598    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42599    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42600    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42601    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42602      # Going to short mode and back again did indeed matter. Since short mode is
42603      # case insensitive, let's make it lowercase to improve readability.
42604      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42605      # Now convert it back to Unix-style (cygpath)
42606      input_path=`$CYGPATH -u "$shortmode_path"`
42607      new_path="$input_path"
42608    fi
42609  fi
42610
42611  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42612  if test "x$test_cygdrive_prefix" = x; then
42613    # As a simple fix, exclude /usr/bin since it's not a real path.
42614    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42615      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42616      # a path prefixed by /cygdrive for fixpath to work.
42617      new_path="$CYGWIN_ROOT_PATH$input_path"
42618    fi
42619  fi
42620
42621  # remove trailing .exe if any
42622  new_path="${new_path/%.exe/}"
42623
42624    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42625
42626  # First separate the path from the arguments. This will split at the first
42627  # space.
42628  complete="$NM"
42629  path="${complete%% *}"
42630  tmp="$complete EOL"
42631  arguments="${tmp#* }"
42632
42633  # Input might be given as Windows format, start by converting to
42634  # unix format.
42635  new_path="$path"
42636
42637  windows_path="$new_path"
42638  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42639    unix_path=`$CYGPATH -u "$windows_path"`
42640    new_path="$unix_path"
42641  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42642    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42643    new_path="$unix_path"
42644  fi
42645
42646
42647  # Now try to locate executable using which
42648  new_path=`$WHICH "$new_path" 2> /dev/null`
42649
42650  if test "x$new_path" = x; then
42651    # Oops. Which didn't find the executable.
42652    # The splitting of arguments from the executable at a space might have been incorrect,
42653    # since paths with space are more likely in Windows. Give it another try with the whole
42654    # argument.
42655    path="$complete"
42656    arguments="EOL"
42657    new_path="$path"
42658
42659  windows_path="$new_path"
42660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42661    unix_path=`$CYGPATH -u "$windows_path"`
42662    new_path="$unix_path"
42663  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42664    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42665    new_path="$unix_path"
42666  fi
42667
42668
42669    new_path=`$WHICH "$new_path" 2> /dev/null`
42670    # bat and cmd files are not always considered executable in MSYS causing which
42671    # to not find them
42672    if test "x$new_path" = x \
42673        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42674        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42675      new_path="$path"
42676
42677  windows_path="$new_path"
42678  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42679    unix_path=`$CYGPATH -u "$windows_path"`
42680    new_path="$unix_path"
42681  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42682    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42683    new_path="$unix_path"
42684  fi
42685
42686    fi
42687
42688    if test "x$new_path" = x; then
42689      # It's still not found. Now this is an unrecoverable error.
42690      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42691$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42692      has_space=`$ECHO "$complete" | $GREP " "`
42693      if test "x$has_space" != x; then
42694        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42695$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42696      fi
42697      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42698    fi
42699  fi
42700
42701  # Now new_path has a complete unix path to the binary
42702  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42703    # Keep paths in /bin as-is, but remove trailing .exe if any
42704    new_path="${new_path/%.exe/}"
42705    # Do not save /bin paths to all_fixpath_prefixes!
42706  else
42707    # Not in mixed or Windows style, start by that.
42708    new_path=`cmd //c echo $new_path`
42709
42710  input_path="$new_path"
42711  # Check if we need to convert this using DOS-style short mode. If the path
42712  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42713  # take no chances and rewrite it.
42714  # Note: m4 eats our [], so we need to use [ and ] instead.
42715  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42716  if test "x$has_forbidden_chars" != x; then
42717    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42718    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42719  fi
42720
42721    # Output is in $new_path
42722
42723  windows_path="$new_path"
42724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42725    unix_path=`$CYGPATH -u "$windows_path"`
42726    new_path="$unix_path"
42727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42728    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42729    new_path="$unix_path"
42730  fi
42731
42732    # remove trailing .exe if any
42733    new_path="${new_path/%.exe/}"
42734
42735    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42736    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42737  fi
42738
42739    else
42740      # We're on a unix platform. Hooray! :)
42741      # First separate the path from the arguments. This will split at the first
42742      # space.
42743      complete="$NM"
42744      path="${complete%% *}"
42745      tmp="$complete EOL"
42746      arguments="${tmp#* }"
42747
42748      # Cannot rely on the command "which" here since it doesn't always work.
42749      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42750      if test -z "$is_absolute_path"; then
42751        # Path to executable is not absolute. Find it.
42752        IFS_save="$IFS"
42753        IFS=:
42754        for p in $PATH; do
42755          if test -f "$p/$path" && test -x "$p/$path"; then
42756            new_path="$p/$path"
42757            break
42758          fi
42759        done
42760        IFS="$IFS_save"
42761      else
42762        # This is an absolute path, we can use it without further modifications.
42763        new_path="$path"
42764      fi
42765
42766      if test "x$new_path" = x; then
42767        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42768$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42769        has_space=`$ECHO "$complete" | $GREP " "`
42770        if test "x$has_space" != x; then
42771          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42772$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42773        fi
42774        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42775      fi
42776    fi
42777
42778    # Now join together the path and the arguments once again
42779    if test "x$arguments" != xEOL; then
42780      new_complete="$new_path ${arguments% *}"
42781    else
42782      new_complete="$new_path"
42783    fi
42784
42785    if test "x$complete" != "x$new_complete"; then
42786      NM="$new_complete"
42787      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42788$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42789    fi
42790  fi
42791
42792    GNM="$NM"
42793
42794  fi
42795
42796  # objcopy is used for moving debug symbols to separate files when
42797  # full debug symbols are enabled.
42798  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42799
42800
42801  # Publish this variable in the help.
42802
42803
42804  if [ -z "${OBJCOPY+x}" ]; then
42805    # The variable is not set by user, try to locate tool using the code snippet
42806    if test -n "$ac_tool_prefix"; then
42807  for ac_prog in gobjcopy objcopy
42808  do
42809    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42810set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42812$as_echo_n "checking for $ac_word... " >&6; }
42813if ${ac_cv_prog_OBJCOPY+:} false; then :
42814  $as_echo_n "(cached) " >&6
42815else
42816  if test -n "$OBJCOPY"; then
42817  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42818else
42819as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42820for as_dir in $PATH
42821do
42822  IFS=$as_save_IFS
42823  test -z "$as_dir" && as_dir=.
42824    for ac_exec_ext in '' $ac_executable_extensions; do
42825  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42826    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42828    break 2
42829  fi
42830done
42831  done
42832IFS=$as_save_IFS
42833
42834fi
42835fi
42836OBJCOPY=$ac_cv_prog_OBJCOPY
42837if test -n "$OBJCOPY"; then
42838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42839$as_echo "$OBJCOPY" >&6; }
42840else
42841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42842$as_echo "no" >&6; }
42843fi
42844
42845
42846    test -n "$OBJCOPY" && break
42847  done
42848fi
42849if test -z "$OBJCOPY"; then
42850  ac_ct_OBJCOPY=$OBJCOPY
42851  for ac_prog in gobjcopy objcopy
42852do
42853  # Extract the first word of "$ac_prog", so it can be a program name with args.
42854set dummy $ac_prog; ac_word=$2
42855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42856$as_echo_n "checking for $ac_word... " >&6; }
42857if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42858  $as_echo_n "(cached) " >&6
42859else
42860  if test -n "$ac_ct_OBJCOPY"; then
42861  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42862else
42863as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42864for as_dir in $PATH
42865do
42866  IFS=$as_save_IFS
42867  test -z "$as_dir" && as_dir=.
42868    for ac_exec_ext in '' $ac_executable_extensions; do
42869  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42870    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42871    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42872    break 2
42873  fi
42874done
42875  done
42876IFS=$as_save_IFS
42877
42878fi
42879fi
42880ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42881if test -n "$ac_ct_OBJCOPY"; then
42882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42883$as_echo "$ac_ct_OBJCOPY" >&6; }
42884else
42885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42886$as_echo "no" >&6; }
42887fi
42888
42889
42890  test -n "$ac_ct_OBJCOPY" && break
42891done
42892
42893  if test "x$ac_ct_OBJCOPY" = x; then
42894    OBJCOPY=""
42895  else
42896    case $cross_compiling:$ac_tool_warned in
42897yes:)
42898{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42899$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42900ac_tool_warned=yes ;;
42901esac
42902    OBJCOPY=$ac_ct_OBJCOPY
42903  fi
42904fi
42905
42906  else
42907    # The variable is set, but is it from the command line or the environment?
42908
42909    # Try to remove the string !OBJCOPY! from our list.
42910    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42911    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42912      # If it failed, the variable was not from the command line. Ignore it,
42913      # but warn the user (except for BASH, which is always set by the calling BASH).
42914      if test "xOBJCOPY" != xBASH; then
42915        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42916$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42917      fi
42918      # Try to locate tool using the code snippet
42919      if test -n "$ac_tool_prefix"; then
42920  for ac_prog in gobjcopy objcopy
42921  do
42922    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42923set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42925$as_echo_n "checking for $ac_word... " >&6; }
42926if ${ac_cv_prog_OBJCOPY+:} false; then :
42927  $as_echo_n "(cached) " >&6
42928else
42929  if test -n "$OBJCOPY"; then
42930  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42931else
42932as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42933for as_dir in $PATH
42934do
42935  IFS=$as_save_IFS
42936  test -z "$as_dir" && as_dir=.
42937    for ac_exec_ext in '' $ac_executable_extensions; do
42938  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42939    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42940    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42941    break 2
42942  fi
42943done
42944  done
42945IFS=$as_save_IFS
42946
42947fi
42948fi
42949OBJCOPY=$ac_cv_prog_OBJCOPY
42950if test -n "$OBJCOPY"; then
42951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42952$as_echo "$OBJCOPY" >&6; }
42953else
42954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42955$as_echo "no" >&6; }
42956fi
42957
42958
42959    test -n "$OBJCOPY" && break
42960  done
42961fi
42962if test -z "$OBJCOPY"; then
42963  ac_ct_OBJCOPY=$OBJCOPY
42964  for ac_prog in gobjcopy objcopy
42965do
42966  # Extract the first word of "$ac_prog", so it can be a program name with args.
42967set dummy $ac_prog; ac_word=$2
42968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42969$as_echo_n "checking for $ac_word... " >&6; }
42970if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42971  $as_echo_n "(cached) " >&6
42972else
42973  if test -n "$ac_ct_OBJCOPY"; then
42974  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42975else
42976as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42977for as_dir in $PATH
42978do
42979  IFS=$as_save_IFS
42980  test -z "$as_dir" && as_dir=.
42981    for ac_exec_ext in '' $ac_executable_extensions; do
42982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42983    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42985    break 2
42986  fi
42987done
42988  done
42989IFS=$as_save_IFS
42990
42991fi
42992fi
42993ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42994if test -n "$ac_ct_OBJCOPY"; then
42995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42996$as_echo "$ac_ct_OBJCOPY" >&6; }
42997else
42998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42999$as_echo "no" >&6; }
43000fi
43001
43002
43003  test -n "$ac_ct_OBJCOPY" && break
43004done
43005
43006  if test "x$ac_ct_OBJCOPY" = x; then
43007    OBJCOPY=""
43008  else
43009    case $cross_compiling:$ac_tool_warned in
43010yes:)
43011{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43012$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43013ac_tool_warned=yes ;;
43014esac
43015    OBJCOPY=$ac_ct_OBJCOPY
43016  fi
43017fi
43018
43019    else
43020      # If it succeeded, then it was overridden by the user. We will use it
43021      # for the tool.
43022
43023      # First remove it from the list of overridden variables, so we can test
43024      # for unknown variables in the end.
43025      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43026
43027      # Check if we try to supply an empty value
43028      if test "x$OBJCOPY" = x; then
43029        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
43030$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
43031        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43032$as_echo_n "checking for OBJCOPY... " >&6; }
43033        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43034$as_echo "disabled" >&6; }
43035      else
43036        # Check if the provided tool contains a complete path.
43037        tool_specified="$OBJCOPY"
43038        tool_basename="${tool_specified##*/}"
43039        if test "x$tool_basename" = "x$tool_specified"; then
43040          # A command without a complete path is provided, search $PATH.
43041          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
43042$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
43043          # Extract the first word of "$tool_basename", so it can be a program name with args.
43044set dummy $tool_basename; ac_word=$2
43045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43046$as_echo_n "checking for $ac_word... " >&6; }
43047if ${ac_cv_path_OBJCOPY+:} false; then :
43048  $as_echo_n "(cached) " >&6
43049else
43050  case $OBJCOPY in
43051  [\\/]* | ?:[\\/]*)
43052  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
43053  ;;
43054  *)
43055  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43056for as_dir in $PATH
43057do
43058  IFS=$as_save_IFS
43059  test -z "$as_dir" && as_dir=.
43060    for ac_exec_ext in '' $ac_executable_extensions; do
43061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43062    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
43063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43064    break 2
43065  fi
43066done
43067  done
43068IFS=$as_save_IFS
43069
43070  ;;
43071esac
43072fi
43073OBJCOPY=$ac_cv_path_OBJCOPY
43074if test -n "$OBJCOPY"; then
43075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43076$as_echo "$OBJCOPY" >&6; }
43077else
43078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43079$as_echo "no" >&6; }
43080fi
43081
43082
43083          if test "x$OBJCOPY" = x; then
43084            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43085          fi
43086        else
43087          # Otherwise we believe it is a complete path. Use it as it is.
43088          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
43089$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
43090          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43091$as_echo_n "checking for OBJCOPY... " >&6; }
43092          if test ! -x "$tool_specified"; then
43093            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43094$as_echo "not found" >&6; }
43095            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
43096          fi
43097          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43098$as_echo "$tool_specified" >&6; }
43099        fi
43100      fi
43101    fi
43102
43103  fi
43104
43105
43106    # Only call fixup if objcopy was found.
43107    if test -n "$OBJCOPY"; then
43108
43109  # Only process if variable expands to non-empty
43110
43111  if test "x$OBJCOPY" != x; then
43112    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43113
43114  # First separate the path from the arguments. This will split at the first
43115  # space.
43116  complete="$OBJCOPY"
43117  path="${complete%% *}"
43118  tmp="$complete EOL"
43119  arguments="${tmp#* }"
43120
43121  # Input might be given as Windows format, start by converting to
43122  # unix format.
43123  new_path=`$CYGPATH -u "$path"`
43124
43125  # Now try to locate executable using which
43126  new_path=`$WHICH "$new_path" 2> /dev/null`
43127  # bat and cmd files are not always considered executable in cygwin causing which
43128  # to not find them
43129  if test "x$new_path" = x \
43130      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43131      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43132    new_path=`$CYGPATH -u "$path"`
43133  fi
43134  if test "x$new_path" = x; then
43135    # Oops. Which didn't find the executable.
43136    # The splitting of arguments from the executable at a space might have been incorrect,
43137    # since paths with space are more likely in Windows. Give it another try with the whole
43138    # argument.
43139    path="$complete"
43140    arguments="EOL"
43141    new_path=`$CYGPATH -u "$path"`
43142    new_path=`$WHICH "$new_path" 2> /dev/null`
43143    # bat and cmd files are not always considered executable in cygwin causing which
43144    # to not find them
43145    if test "x$new_path" = x \
43146        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43147        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43148      new_path=`$CYGPATH -u "$path"`
43149    fi
43150    if test "x$new_path" = x; then
43151      # It's still not found. Now this is an unrecoverable error.
43152      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43153$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43154      has_space=`$ECHO "$complete" | $GREP " "`
43155      if test "x$has_space" != x; then
43156        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43157$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43158      fi
43159      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43160    fi
43161  fi
43162
43163  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43164  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43165  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43166  # "foo.exe" is OK but "foo" is an error.
43167  #
43168  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43169  # It is also a way to make sure we got the proper file name for the real test later on.
43170  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43171  if test "x$test_shortpath" = x; then
43172    # Short path failed, file does not exist as specified.
43173    # Try adding .exe or .cmd
43174    if test -f "${new_path}.exe"; then
43175      input_to_shortpath="${new_path}.exe"
43176    elif test -f "${new_path}.cmd"; then
43177      input_to_shortpath="${new_path}.cmd"
43178    else
43179      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
43180$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
43181      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43182$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43183      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43184    fi
43185  else
43186    input_to_shortpath="$new_path"
43187  fi
43188
43189  # Call helper function which possibly converts this using DOS-style short mode.
43190  # If so, the updated path is stored in $new_path.
43191  new_path="$input_to_shortpath"
43192
43193  input_path="$input_to_shortpath"
43194  # Check if we need to convert this using DOS-style short mode. If the path
43195  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43196  # take no chances and rewrite it.
43197  # Note: m4 eats our [], so we need to use [ and ] instead.
43198  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43199  if test "x$has_forbidden_chars" != x; then
43200    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43201    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43202    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43203    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43204      # Going to short mode and back again did indeed matter. Since short mode is
43205      # case insensitive, let's make it lowercase to improve readability.
43206      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43207      # Now convert it back to Unix-style (cygpath)
43208      input_path=`$CYGPATH -u "$shortmode_path"`
43209      new_path="$input_path"
43210    fi
43211  fi
43212
43213  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43214  if test "x$test_cygdrive_prefix" = x; then
43215    # As a simple fix, exclude /usr/bin since it's not a real path.
43216    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43217      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43218      # a path prefixed by /cygdrive for fixpath to work.
43219      new_path="$CYGWIN_ROOT_PATH$input_path"
43220    fi
43221  fi
43222
43223  # remove trailing .exe if any
43224  new_path="${new_path/%.exe/}"
43225
43226    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43227
43228  # First separate the path from the arguments. This will split at the first
43229  # space.
43230  complete="$OBJCOPY"
43231  path="${complete%% *}"
43232  tmp="$complete EOL"
43233  arguments="${tmp#* }"
43234
43235  # Input might be given as Windows format, start by converting to
43236  # unix format.
43237  new_path="$path"
43238
43239  windows_path="$new_path"
43240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43241    unix_path=`$CYGPATH -u "$windows_path"`
43242    new_path="$unix_path"
43243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43244    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43245    new_path="$unix_path"
43246  fi
43247
43248
43249  # Now try to locate executable using which
43250  new_path=`$WHICH "$new_path" 2> /dev/null`
43251
43252  if test "x$new_path" = x; then
43253    # Oops. Which didn't find the executable.
43254    # The splitting of arguments from the executable at a space might have been incorrect,
43255    # since paths with space are more likely in Windows. Give it another try with the whole
43256    # argument.
43257    path="$complete"
43258    arguments="EOL"
43259    new_path="$path"
43260
43261  windows_path="$new_path"
43262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43263    unix_path=`$CYGPATH -u "$windows_path"`
43264    new_path="$unix_path"
43265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43266    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43267    new_path="$unix_path"
43268  fi
43269
43270
43271    new_path=`$WHICH "$new_path" 2> /dev/null`
43272    # bat and cmd files are not always considered executable in MSYS causing which
43273    # to not find them
43274    if test "x$new_path" = x \
43275        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43276        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43277      new_path="$path"
43278
43279  windows_path="$new_path"
43280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43281    unix_path=`$CYGPATH -u "$windows_path"`
43282    new_path="$unix_path"
43283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43284    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43285    new_path="$unix_path"
43286  fi
43287
43288    fi
43289
43290    if test "x$new_path" = x; then
43291      # It's still not found. Now this is an unrecoverable error.
43292      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43293$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43294      has_space=`$ECHO "$complete" | $GREP " "`
43295      if test "x$has_space" != x; then
43296        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43297$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43298      fi
43299      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43300    fi
43301  fi
43302
43303  # Now new_path has a complete unix path to the binary
43304  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43305    # Keep paths in /bin as-is, but remove trailing .exe if any
43306    new_path="${new_path/%.exe/}"
43307    # Do not save /bin paths to all_fixpath_prefixes!
43308  else
43309    # Not in mixed or Windows style, start by that.
43310    new_path=`cmd //c echo $new_path`
43311
43312  input_path="$new_path"
43313  # Check if we need to convert this using DOS-style short mode. If the path
43314  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43315  # take no chances and rewrite it.
43316  # Note: m4 eats our [], so we need to use [ and ] instead.
43317  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43318  if test "x$has_forbidden_chars" != x; then
43319    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43320    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43321  fi
43322
43323    # Output is in $new_path
43324
43325  windows_path="$new_path"
43326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43327    unix_path=`$CYGPATH -u "$windows_path"`
43328    new_path="$unix_path"
43329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43330    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43331    new_path="$unix_path"
43332  fi
43333
43334    # remove trailing .exe if any
43335    new_path="${new_path/%.exe/}"
43336
43337    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43338    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43339  fi
43340
43341    else
43342      # We're on a unix platform. Hooray! :)
43343      # First separate the path from the arguments. This will split at the first
43344      # space.
43345      complete="$OBJCOPY"
43346      path="${complete%% *}"
43347      tmp="$complete EOL"
43348      arguments="${tmp#* }"
43349
43350      # Cannot rely on the command "which" here since it doesn't always work.
43351      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43352      if test -z "$is_absolute_path"; then
43353        # Path to executable is not absolute. Find it.
43354        IFS_save="$IFS"
43355        IFS=:
43356        for p in $PATH; do
43357          if test -f "$p/$path" && test -x "$p/$path"; then
43358            new_path="$p/$path"
43359            break
43360          fi
43361        done
43362        IFS="$IFS_save"
43363      else
43364        # This is an absolute path, we can use it without further modifications.
43365        new_path="$path"
43366      fi
43367
43368      if test "x$new_path" = x; then
43369        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43370$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43371        has_space=`$ECHO "$complete" | $GREP " "`
43372        if test "x$has_space" != x; then
43373          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43374$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43375        fi
43376        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43377      fi
43378    fi
43379
43380    # Now join together the path and the arguments once again
43381    if test "x$arguments" != xEOL; then
43382      new_complete="$new_path ${arguments% *}"
43383    else
43384      new_complete="$new_path"
43385    fi
43386
43387    if test "x$complete" != "x$new_complete"; then
43388      OBJCOPY="$new_complete"
43389      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43390$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43391    fi
43392  fi
43393
43394      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43395        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43396        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43397        # - version number is last blank separate word on first line
43398        # - version number formats that have been seen:
43399        #   - <major>.<minor>
43400        #   - <major>.<minor>.<micro>
43401        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43402        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43403         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43404              -e 's/.* //' \
43405              -e '/^[01]\./b bad' \
43406              -e '/^2\./{' \
43407              -e '  s/^2\.//' \
43408              -e '  /^[0-9]$/b bad' \
43409              -e '  /^[0-9]\./b bad' \
43410              -e '  /^1[0-9]$/b bad' \
43411              -e '  /^1[0-9]\./b bad' \
43412              -e '  /^20\./b bad' \
43413              -e '  /^21\.0$/b bad' \
43414              -e '  /^21\.0\./b bad' \
43415              -e '}' \
43416              -e ':good' \
43417              -e 's/.*/VALID_VERSION/p' \
43418              -e 'q' \
43419              -e ':bad' \
43420              -e 's/.*/BAD_VERSION/p' \
43421              -e 'q'`
43422        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43423          OBJCOPY=
43424          { $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
43425$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43426          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43427$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43428          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43429$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43430          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43431$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43432          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43433$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43434        fi
43435      fi
43436    fi
43437  fi
43438
43439
43440
43441  # Publish this variable in the help.
43442
43443
43444  if [ -z "${OBJDUMP+x}" ]; then
43445    # The variable is not set by user, try to locate tool using the code snippet
43446    if test -n "$ac_tool_prefix"; then
43447  for ac_prog in gobjdump objdump
43448  do
43449    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43450set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43452$as_echo_n "checking for $ac_word... " >&6; }
43453if ${ac_cv_prog_OBJDUMP+:} false; then :
43454  $as_echo_n "(cached) " >&6
43455else
43456  if test -n "$OBJDUMP"; then
43457  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43458else
43459as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43460for as_dir in $PATH
43461do
43462  IFS=$as_save_IFS
43463  test -z "$as_dir" && as_dir=.
43464    for ac_exec_ext in '' $ac_executable_extensions; do
43465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43466    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43468    break 2
43469  fi
43470done
43471  done
43472IFS=$as_save_IFS
43473
43474fi
43475fi
43476OBJDUMP=$ac_cv_prog_OBJDUMP
43477if test -n "$OBJDUMP"; then
43478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43479$as_echo "$OBJDUMP" >&6; }
43480else
43481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43482$as_echo "no" >&6; }
43483fi
43484
43485
43486    test -n "$OBJDUMP" && break
43487  done
43488fi
43489if test -z "$OBJDUMP"; then
43490  ac_ct_OBJDUMP=$OBJDUMP
43491  for ac_prog in gobjdump objdump
43492do
43493  # Extract the first word of "$ac_prog", so it can be a program name with args.
43494set dummy $ac_prog; ac_word=$2
43495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43496$as_echo_n "checking for $ac_word... " >&6; }
43497if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43498  $as_echo_n "(cached) " >&6
43499else
43500  if test -n "$ac_ct_OBJDUMP"; then
43501  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43502else
43503as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43504for as_dir in $PATH
43505do
43506  IFS=$as_save_IFS
43507  test -z "$as_dir" && as_dir=.
43508    for ac_exec_ext in '' $ac_executable_extensions; do
43509  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43510    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43511    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43512    break 2
43513  fi
43514done
43515  done
43516IFS=$as_save_IFS
43517
43518fi
43519fi
43520ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43521if test -n "$ac_ct_OBJDUMP"; then
43522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43523$as_echo "$ac_ct_OBJDUMP" >&6; }
43524else
43525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43526$as_echo "no" >&6; }
43527fi
43528
43529
43530  test -n "$ac_ct_OBJDUMP" && break
43531done
43532
43533  if test "x$ac_ct_OBJDUMP" = x; then
43534    OBJDUMP=""
43535  else
43536    case $cross_compiling:$ac_tool_warned in
43537yes:)
43538{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43539$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43540ac_tool_warned=yes ;;
43541esac
43542    OBJDUMP=$ac_ct_OBJDUMP
43543  fi
43544fi
43545
43546  else
43547    # The variable is set, but is it from the command line or the environment?
43548
43549    # Try to remove the string !OBJDUMP! from our list.
43550    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
43551    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43552      # If it failed, the variable was not from the command line. Ignore it,
43553      # but warn the user (except for BASH, which is always set by the calling BASH).
43554      if test "xOBJDUMP" != xBASH; then
43555        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
43556$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
43557      fi
43558      # Try to locate tool using the code snippet
43559      if test -n "$ac_tool_prefix"; then
43560  for ac_prog in gobjdump objdump
43561  do
43562    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43563set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43565$as_echo_n "checking for $ac_word... " >&6; }
43566if ${ac_cv_prog_OBJDUMP+:} false; then :
43567  $as_echo_n "(cached) " >&6
43568else
43569  if test -n "$OBJDUMP"; then
43570  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43571else
43572as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43573for as_dir in $PATH
43574do
43575  IFS=$as_save_IFS
43576  test -z "$as_dir" && as_dir=.
43577    for ac_exec_ext in '' $ac_executable_extensions; do
43578  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43579    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43580    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43581    break 2
43582  fi
43583done
43584  done
43585IFS=$as_save_IFS
43586
43587fi
43588fi
43589OBJDUMP=$ac_cv_prog_OBJDUMP
43590if test -n "$OBJDUMP"; then
43591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43592$as_echo "$OBJDUMP" >&6; }
43593else
43594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43595$as_echo "no" >&6; }
43596fi
43597
43598
43599    test -n "$OBJDUMP" && break
43600  done
43601fi
43602if test -z "$OBJDUMP"; then
43603  ac_ct_OBJDUMP=$OBJDUMP
43604  for ac_prog in gobjdump objdump
43605do
43606  # Extract the first word of "$ac_prog", so it can be a program name with args.
43607set dummy $ac_prog; ac_word=$2
43608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43609$as_echo_n "checking for $ac_word... " >&6; }
43610if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43611  $as_echo_n "(cached) " >&6
43612else
43613  if test -n "$ac_ct_OBJDUMP"; then
43614  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43615else
43616as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43617for as_dir in $PATH
43618do
43619  IFS=$as_save_IFS
43620  test -z "$as_dir" && as_dir=.
43621    for ac_exec_ext in '' $ac_executable_extensions; do
43622  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43623    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43624    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43625    break 2
43626  fi
43627done
43628  done
43629IFS=$as_save_IFS
43630
43631fi
43632fi
43633ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43634if test -n "$ac_ct_OBJDUMP"; then
43635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43636$as_echo "$ac_ct_OBJDUMP" >&6; }
43637else
43638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43639$as_echo "no" >&6; }
43640fi
43641
43642
43643  test -n "$ac_ct_OBJDUMP" && break
43644done
43645
43646  if test "x$ac_ct_OBJDUMP" = x; then
43647    OBJDUMP=""
43648  else
43649    case $cross_compiling:$ac_tool_warned in
43650yes:)
43651{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43652$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43653ac_tool_warned=yes ;;
43654esac
43655    OBJDUMP=$ac_ct_OBJDUMP
43656  fi
43657fi
43658
43659    else
43660      # If it succeeded, then it was overridden by the user. We will use it
43661      # for the tool.
43662
43663      # First remove it from the list of overridden variables, so we can test
43664      # for unknown variables in the end.
43665      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43666
43667      # Check if we try to supply an empty value
43668      if test "x$OBJDUMP" = x; then
43669        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
43670$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
43671        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43672$as_echo_n "checking for OBJDUMP... " >&6; }
43673        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43674$as_echo "disabled" >&6; }
43675      else
43676        # Check if the provided tool contains a complete path.
43677        tool_specified="$OBJDUMP"
43678        tool_basename="${tool_specified##*/}"
43679        if test "x$tool_basename" = "x$tool_specified"; then
43680          # A command without a complete path is provided, search $PATH.
43681          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
43682$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
43683          # Extract the first word of "$tool_basename", so it can be a program name with args.
43684set dummy $tool_basename; ac_word=$2
43685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43686$as_echo_n "checking for $ac_word... " >&6; }
43687if ${ac_cv_path_OBJDUMP+:} false; then :
43688  $as_echo_n "(cached) " >&6
43689else
43690  case $OBJDUMP in
43691  [\\/]* | ?:[\\/]*)
43692  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
43693  ;;
43694  *)
43695  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43696for as_dir in $PATH
43697do
43698  IFS=$as_save_IFS
43699  test -z "$as_dir" && as_dir=.
43700    for ac_exec_ext in '' $ac_executable_extensions; do
43701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43702    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
43703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43704    break 2
43705  fi
43706done
43707  done
43708IFS=$as_save_IFS
43709
43710  ;;
43711esac
43712fi
43713OBJDUMP=$ac_cv_path_OBJDUMP
43714if test -n "$OBJDUMP"; then
43715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43716$as_echo "$OBJDUMP" >&6; }
43717else
43718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43719$as_echo "no" >&6; }
43720fi
43721
43722
43723          if test "x$OBJDUMP" = x; then
43724            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43725          fi
43726        else
43727          # Otherwise we believe it is a complete path. Use it as it is.
43728          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
43729$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
43730          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43731$as_echo_n "checking for OBJDUMP... " >&6; }
43732          if test ! -x "$tool_specified"; then
43733            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43734$as_echo "not found" >&6; }
43735            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
43736          fi
43737          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43738$as_echo "$tool_specified" >&6; }
43739        fi
43740      fi
43741    fi
43742
43743  fi
43744
43745
43746  if test "x$OBJDUMP" != x; then
43747    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
43748    # bails if argument is missing.
43749
43750  # Only process if variable expands to non-empty
43751
43752  if test "x$OBJDUMP" != x; then
43753    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43754
43755  # First separate the path from the arguments. This will split at the first
43756  # space.
43757  complete="$OBJDUMP"
43758  path="${complete%% *}"
43759  tmp="$complete EOL"
43760  arguments="${tmp#* }"
43761
43762  # Input might be given as Windows format, start by converting to
43763  # unix format.
43764  new_path=`$CYGPATH -u "$path"`
43765
43766  # Now try to locate executable using which
43767  new_path=`$WHICH "$new_path" 2> /dev/null`
43768  # bat and cmd files are not always considered executable in cygwin causing which
43769  # to not find them
43770  if test "x$new_path" = x \
43771      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43772      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43773    new_path=`$CYGPATH -u "$path"`
43774  fi
43775  if test "x$new_path" = x; then
43776    # Oops. Which didn't find the executable.
43777    # The splitting of arguments from the executable at a space might have been incorrect,
43778    # since paths with space are more likely in Windows. Give it another try with the whole
43779    # argument.
43780    path="$complete"
43781    arguments="EOL"
43782    new_path=`$CYGPATH -u "$path"`
43783    new_path=`$WHICH "$new_path" 2> /dev/null`
43784    # bat and cmd files are not always considered executable in cygwin causing which
43785    # to not find them
43786    if test "x$new_path" = x \
43787        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43788        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43789      new_path=`$CYGPATH -u "$path"`
43790    fi
43791    if test "x$new_path" = x; then
43792      # It's still not found. Now this is an unrecoverable error.
43793      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43794$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43795      has_space=`$ECHO "$complete" | $GREP " "`
43796      if test "x$has_space" != x; then
43797        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43798$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43799      fi
43800      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43801    fi
43802  fi
43803
43804  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43805  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43806  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43807  # "foo.exe" is OK but "foo" is an error.
43808  #
43809  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43810  # It is also a way to make sure we got the proper file name for the real test later on.
43811  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43812  if test "x$test_shortpath" = x; then
43813    # Short path failed, file does not exist as specified.
43814    # Try adding .exe or .cmd
43815    if test -f "${new_path}.exe"; then
43816      input_to_shortpath="${new_path}.exe"
43817    elif test -f "${new_path}.cmd"; then
43818      input_to_shortpath="${new_path}.cmd"
43819    else
43820      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43821$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43822      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43823$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43824      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43825    fi
43826  else
43827    input_to_shortpath="$new_path"
43828  fi
43829
43830  # Call helper function which possibly converts this using DOS-style short mode.
43831  # If so, the updated path is stored in $new_path.
43832  new_path="$input_to_shortpath"
43833
43834  input_path="$input_to_shortpath"
43835  # Check if we need to convert this using DOS-style short mode. If the path
43836  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43837  # take no chances and rewrite it.
43838  # Note: m4 eats our [], so we need to use [ and ] instead.
43839  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43840  if test "x$has_forbidden_chars" != x; then
43841    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43842    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43843    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43844    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43845      # Going to short mode and back again did indeed matter. Since short mode is
43846      # case insensitive, let's make it lowercase to improve readability.
43847      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43848      # Now convert it back to Unix-style (cygpath)
43849      input_path=`$CYGPATH -u "$shortmode_path"`
43850      new_path="$input_path"
43851    fi
43852  fi
43853
43854  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43855  if test "x$test_cygdrive_prefix" = x; then
43856    # As a simple fix, exclude /usr/bin since it's not a real path.
43857    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43858      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43859      # a path prefixed by /cygdrive for fixpath to work.
43860      new_path="$CYGWIN_ROOT_PATH$input_path"
43861    fi
43862  fi
43863
43864  # remove trailing .exe if any
43865  new_path="${new_path/%.exe/}"
43866
43867    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43868
43869  # First separate the path from the arguments. This will split at the first
43870  # space.
43871  complete="$OBJDUMP"
43872  path="${complete%% *}"
43873  tmp="$complete EOL"
43874  arguments="${tmp#* }"
43875
43876  # Input might be given as Windows format, start by converting to
43877  # unix format.
43878  new_path="$path"
43879
43880  windows_path="$new_path"
43881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43882    unix_path=`$CYGPATH -u "$windows_path"`
43883    new_path="$unix_path"
43884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43885    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43886    new_path="$unix_path"
43887  fi
43888
43889
43890  # Now try to locate executable using which
43891  new_path=`$WHICH "$new_path" 2> /dev/null`
43892
43893  if test "x$new_path" = x; then
43894    # Oops. Which didn't find the executable.
43895    # The splitting of arguments from the executable at a space might have been incorrect,
43896    # since paths with space are more likely in Windows. Give it another try with the whole
43897    # argument.
43898    path="$complete"
43899    arguments="EOL"
43900    new_path="$path"
43901
43902  windows_path="$new_path"
43903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43904    unix_path=`$CYGPATH -u "$windows_path"`
43905    new_path="$unix_path"
43906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43908    new_path="$unix_path"
43909  fi
43910
43911
43912    new_path=`$WHICH "$new_path" 2> /dev/null`
43913    # bat and cmd files are not always considered executable in MSYS causing which
43914    # to not find them
43915    if test "x$new_path" = x \
43916        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43917        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43918      new_path="$path"
43919
43920  windows_path="$new_path"
43921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43922    unix_path=`$CYGPATH -u "$windows_path"`
43923    new_path="$unix_path"
43924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43926    new_path="$unix_path"
43927  fi
43928
43929    fi
43930
43931    if test "x$new_path" = x; then
43932      # It's still not found. Now this is an unrecoverable error.
43933      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43934$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43935      has_space=`$ECHO "$complete" | $GREP " "`
43936      if test "x$has_space" != x; then
43937        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43938$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43939      fi
43940      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43941    fi
43942  fi
43943
43944  # Now new_path has a complete unix path to the binary
43945  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43946    # Keep paths in /bin as-is, but remove trailing .exe if any
43947    new_path="${new_path/%.exe/}"
43948    # Do not save /bin paths to all_fixpath_prefixes!
43949  else
43950    # Not in mixed or Windows style, start by that.
43951    new_path=`cmd //c echo $new_path`
43952
43953  input_path="$new_path"
43954  # Check if we need to convert this using DOS-style short mode. If the path
43955  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43956  # take no chances and rewrite it.
43957  # Note: m4 eats our [], so we need to use [ and ] instead.
43958  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43959  if test "x$has_forbidden_chars" != x; then
43960    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43961    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43962  fi
43963
43964    # Output is in $new_path
43965
43966  windows_path="$new_path"
43967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43968    unix_path=`$CYGPATH -u "$windows_path"`
43969    new_path="$unix_path"
43970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43971    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43972    new_path="$unix_path"
43973  fi
43974
43975    # remove trailing .exe if any
43976    new_path="${new_path/%.exe/}"
43977
43978    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43979    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43980  fi
43981
43982    else
43983      # We're on a unix platform. Hooray! :)
43984      # First separate the path from the arguments. This will split at the first
43985      # space.
43986      complete="$OBJDUMP"
43987      path="${complete%% *}"
43988      tmp="$complete EOL"
43989      arguments="${tmp#* }"
43990
43991      # Cannot rely on the command "which" here since it doesn't always work.
43992      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43993      if test -z "$is_absolute_path"; then
43994        # Path to executable is not absolute. Find it.
43995        IFS_save="$IFS"
43996        IFS=:
43997        for p in $PATH; do
43998          if test -f "$p/$path" && test -x "$p/$path"; then
43999            new_path="$p/$path"
44000            break
44001          fi
44002        done
44003        IFS="$IFS_save"
44004      else
44005        # This is an absolute path, we can use it without further modifications.
44006        new_path="$path"
44007      fi
44008
44009      if test "x$new_path" = x; then
44010        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44011$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44012        has_space=`$ECHO "$complete" | $GREP " "`
44013        if test "x$has_space" != x; then
44014          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44015$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44016        fi
44017        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44018      fi
44019    fi
44020
44021    # Now join together the path and the arguments once again
44022    if test "x$arguments" != xEOL; then
44023      new_complete="$new_path ${arguments% *}"
44024    else
44025      new_complete="$new_path"
44026    fi
44027
44028    if test "x$complete" != "x$new_complete"; then
44029      OBJDUMP="$new_complete"
44030      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
44031$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
44032    fi
44033  fi
44034
44035  fi
44036
44037
44038  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
44039  # to remain in place. Otherwise the compiler will not work in some siutations
44040  # in later configure checks.
44041  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
44042    PATH="$OLD_PATH"
44043  fi
44044
44045  # Restore the flags to the user specified values.
44046  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
44047  CFLAGS="$ORG_CFLAGS"
44048  CXXFLAGS="$ORG_CXXFLAGS"
44049
44050
44051# Finally do some processing after the detection phase
44052
44053  if test "x$COMPILE_TYPE" = "xcross"; then
44054    # Now we need to find a C/C++ compiler that can build executables for the
44055    # build platform. We can't use the AC_PROG_CC macro, since it can only be
44056    # used once. Also, we need to do this without adding a tools dir to the
44057    # path, otherwise we might pick up cross-compilers which don't use standard
44058    # naming.
44059
44060    OLDPATH="$PATH"
44061
44062
44063# Check whether --with-build-devkit was given.
44064if test "${with_build_devkit+set}" = set; then :
44065  withval=$with_build_devkit;
44066fi
44067
44068    if test "x$with_build_devkit" = "xyes"; then
44069      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
44070    elif test -n "$with_build_devkit"; then
44071      if test ! -d "$with_build_devkit"; then
44072        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
44073      else
44074
44075  # Only process if variable expands to non-empty
44076
44077  if test "x$with_build_devkit" != x; then
44078    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44079
44080  # Input might be given as Windows format, start by converting to
44081  # unix format.
44082  path="$with_build_devkit"
44083  new_path=`$CYGPATH -u "$path"`
44084
44085  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44086  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44087  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44088  # "foo.exe" is OK but "foo" is an error.
44089  #
44090  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44091  # It is also a way to make sure we got the proper file name for the real test later on.
44092  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44093  if test "x$test_shortpath" = x; then
44094    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44095$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44096    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
44097  fi
44098
44099  # Call helper function which possibly converts this using DOS-style short mode.
44100  # If so, the updated path is stored in $new_path.
44101
44102  input_path="$new_path"
44103  # Check if we need to convert this using DOS-style short mode. If the path
44104  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44105  # take no chances and rewrite it.
44106  # Note: m4 eats our [], so we need to use [ and ] instead.
44107  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44108  if test "x$has_forbidden_chars" != x; then
44109    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44110    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44111    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44112    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44113      # Going to short mode and back again did indeed matter. Since short mode is
44114      # case insensitive, let's make it lowercase to improve readability.
44115      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44116      # Now convert it back to Unix-style (cygpath)
44117      input_path=`$CYGPATH -u "$shortmode_path"`
44118      new_path="$input_path"
44119    fi
44120  fi
44121
44122  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44123  if test "x$test_cygdrive_prefix" = x; then
44124    # As a simple fix, exclude /usr/bin since it's not a real path.
44125    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44126      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44127      # a path prefixed by /cygdrive for fixpath to work.
44128      new_path="$CYGWIN_ROOT_PATH$input_path"
44129    fi
44130  fi
44131
44132
44133  if test "x$path" != "x$new_path"; then
44134    with_build_devkit="$new_path"
44135    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44136$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44137  fi
44138
44139    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44140
44141  path="$with_build_devkit"
44142  has_colon=`$ECHO $path | $GREP ^.:`
44143  new_path="$path"
44144  if test "x$has_colon" = x; then
44145    # Not in mixed or Windows style, start by that.
44146    new_path=`cmd //c echo $path`
44147  fi
44148
44149
44150  input_path="$new_path"
44151  # Check if we need to convert this using DOS-style short mode. If the path
44152  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44153  # take no chances and rewrite it.
44154  # Note: m4 eats our [], so we need to use [ and ] instead.
44155  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44156  if test "x$has_forbidden_chars" != x; then
44157    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44158    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44159  fi
44160
44161
44162  windows_path="$new_path"
44163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44164    unix_path=`$CYGPATH -u "$windows_path"`
44165    new_path="$unix_path"
44166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44167    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44168    new_path="$unix_path"
44169  fi
44170
44171  if test "x$path" != "x$new_path"; then
44172    with_build_devkit="$new_path"
44173    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44174$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44175  fi
44176
44177  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44178  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44179
44180    else
44181      # We're on a unix platform. Hooray! :)
44182      path="$with_build_devkit"
44183      has_space=`$ECHO "$path" | $GREP " "`
44184      if test "x$has_space" != x; then
44185        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44186$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44187        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44188      fi
44189
44190      # Use eval to expand a potential ~
44191      eval path="$path"
44192      if test ! -f "$path" && test ! -d "$path"; then
44193        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
44194      fi
44195
44196      if test -d "$path"; then
44197        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
44198      else
44199        dir="`$DIRNAME "$path"`"
44200        base="`$BASENAME "$path"`"
44201        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
44202      fi
44203    fi
44204  fi
44205
44206        BUILD_DEVKIT_ROOT="$with_build_devkit"
44207        # Check for a meta data info file in the root of the devkit
44208        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
44209          # Process devkit.info so that existing devkit variables are not
44210          # modified by this
44211          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
44212              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
44213              -e "s/\$host/\$build/g" \
44214              $BUILD_DEVKIT_ROOT/devkit.info \
44215              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44216          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44217          # This potentially sets the following:
44218          # A descriptive name of the devkit
44219
44220  if test "x$BUILD_DEVKIT_NAME" = x; then
44221    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
44222  fi
44223
44224          # Corresponds to --with-extra-path
44225
44226  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
44227    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
44228  fi
44229
44230          # Corresponds to --with-toolchain-path
44231
44232  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44233    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
44234  fi
44235
44236          # Corresponds to --with-sysroot
44237
44238  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
44239    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
44240  fi
44241
44242          # Skip the Window specific parts
44243        fi
44244
44245        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
44246$as_echo_n "checking for build platform devkit... " >&6; }
44247        if test "x$BUILD_DEVKIT_NAME" != x; then
44248          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
44249$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
44250        else
44251          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
44252$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
44253        fi
44254
44255        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
44256
44257  if test "x$BUILD_SYSROOT" != "x"; then
44258    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44259      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44260        # Solaris Studio does not have a concept of sysroot. Instead we must
44261        # make sure the default include and lib dirs are appended to each
44262        # compile and link command line. Must also add -I-xbuiltin to enable
44263        # inlining of system functions and intrinsics.
44264        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
44265        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
44266            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
44267      fi
44268    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
44269      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
44270      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
44271    elif test "x$TOOLCHAIN_TYPE" = xclang; then
44272      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
44273      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
44274    fi
44275    # The global CFLAGS and LDFLAGS variables need these for configure to function
44276    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44277    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44278    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44279    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44280  fi
44281
44282  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44283    # We also need -iframework<path>/System/Library/Frameworks
44284    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44285    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44286    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44287    # set this here so it doesn't have to be peppered throughout the forest
44288    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44289    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44290  fi
44291
44292
44293
44294
44295
44296         # Fallback default of just /bin if DEVKIT_PATH is not defined
44297        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44298          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44299        fi
44300        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44301      fi
44302    fi
44303
44304    # FIXME: we should list the discovered compilers as an exclude pattern!
44305    # If we do that, we can do this detection before POST_DETECTION, and still
44306    # find the build compilers in the tools dir, if needed.
44307
44308
44309
44310  # Publish this variable in the help.
44311
44312
44313  if [ -z "${BUILD_CC+x}" ]; then
44314    # The variable is not set by user, try to locate tool using the code snippet
44315    for ac_prog in cl cc gcc
44316do
44317  # Extract the first word of "$ac_prog", so it can be a program name with args.
44318set dummy $ac_prog; ac_word=$2
44319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44320$as_echo_n "checking for $ac_word... " >&6; }
44321if ${ac_cv_path_BUILD_CC+:} false; then :
44322  $as_echo_n "(cached) " >&6
44323else
44324  case $BUILD_CC in
44325  [\\/]* | ?:[\\/]*)
44326  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44327  ;;
44328  *)
44329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44330for as_dir in $PATH
44331do
44332  IFS=$as_save_IFS
44333  test -z "$as_dir" && as_dir=.
44334    for ac_exec_ext in '' $ac_executable_extensions; do
44335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44336    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44338    break 2
44339  fi
44340done
44341  done
44342IFS=$as_save_IFS
44343
44344  ;;
44345esac
44346fi
44347BUILD_CC=$ac_cv_path_BUILD_CC
44348if test -n "$BUILD_CC"; then
44349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44350$as_echo "$BUILD_CC" >&6; }
44351else
44352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44353$as_echo "no" >&6; }
44354fi
44355
44356
44357  test -n "$BUILD_CC" && break
44358done
44359
44360  else
44361    # The variable is set, but is it from the command line or the environment?
44362
44363    # Try to remove the string !BUILD_CC! from our list.
44364    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44365    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44366      # If it failed, the variable was not from the command line. Ignore it,
44367      # but warn the user (except for BASH, which is always set by the calling BASH).
44368      if test "xBUILD_CC" != xBASH; then
44369        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44370$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44371      fi
44372      # Try to locate tool using the code snippet
44373      for ac_prog in cl cc gcc
44374do
44375  # Extract the first word of "$ac_prog", so it can be a program name with args.
44376set dummy $ac_prog; ac_word=$2
44377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44378$as_echo_n "checking for $ac_word... " >&6; }
44379if ${ac_cv_path_BUILD_CC+:} false; then :
44380  $as_echo_n "(cached) " >&6
44381else
44382  case $BUILD_CC in
44383  [\\/]* | ?:[\\/]*)
44384  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44385  ;;
44386  *)
44387  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44388for as_dir in $PATH
44389do
44390  IFS=$as_save_IFS
44391  test -z "$as_dir" && as_dir=.
44392    for ac_exec_ext in '' $ac_executable_extensions; do
44393  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44394    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44396    break 2
44397  fi
44398done
44399  done
44400IFS=$as_save_IFS
44401
44402  ;;
44403esac
44404fi
44405BUILD_CC=$ac_cv_path_BUILD_CC
44406if test -n "$BUILD_CC"; then
44407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44408$as_echo "$BUILD_CC" >&6; }
44409else
44410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44411$as_echo "no" >&6; }
44412fi
44413
44414
44415  test -n "$BUILD_CC" && break
44416done
44417
44418    else
44419      # If it succeeded, then it was overridden by the user. We will use it
44420      # for the tool.
44421
44422      # First remove it from the list of overridden variables, so we can test
44423      # for unknown variables in the end.
44424      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44425
44426      # Check if we try to supply an empty value
44427      if test "x$BUILD_CC" = x; then
44428        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44429$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44430        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44431$as_echo_n "checking for BUILD_CC... " >&6; }
44432        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44433$as_echo "disabled" >&6; }
44434      else
44435        # Check if the provided tool contains a complete path.
44436        tool_specified="$BUILD_CC"
44437        tool_basename="${tool_specified##*/}"
44438        if test "x$tool_basename" = "x$tool_specified"; then
44439          # A command without a complete path is provided, search $PATH.
44440          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44441$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44442          # Extract the first word of "$tool_basename", so it can be a program name with args.
44443set dummy $tool_basename; ac_word=$2
44444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44445$as_echo_n "checking for $ac_word... " >&6; }
44446if ${ac_cv_path_BUILD_CC+:} false; then :
44447  $as_echo_n "(cached) " >&6
44448else
44449  case $BUILD_CC in
44450  [\\/]* | ?:[\\/]*)
44451  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44452  ;;
44453  *)
44454  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44455for as_dir in $PATH
44456do
44457  IFS=$as_save_IFS
44458  test -z "$as_dir" && as_dir=.
44459    for ac_exec_ext in '' $ac_executable_extensions; do
44460  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44461    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44462    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44463    break 2
44464  fi
44465done
44466  done
44467IFS=$as_save_IFS
44468
44469  ;;
44470esac
44471fi
44472BUILD_CC=$ac_cv_path_BUILD_CC
44473if test -n "$BUILD_CC"; then
44474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44475$as_echo "$BUILD_CC" >&6; }
44476else
44477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44478$as_echo "no" >&6; }
44479fi
44480
44481
44482          if test "x$BUILD_CC" = x; then
44483            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44484          fi
44485        else
44486          # Otherwise we believe it is a complete path. Use it as it is.
44487          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44488$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44489          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44490$as_echo_n "checking for BUILD_CC... " >&6; }
44491          if test ! -x "$tool_specified"; then
44492            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44493$as_echo "not found" >&6; }
44494            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
44495          fi
44496          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44497$as_echo "$tool_specified" >&6; }
44498        fi
44499      fi
44500    fi
44501
44502  fi
44503
44504
44505
44506  if test "x$BUILD_CC" = x; then
44507    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
44508  fi
44509
44510
44511
44512  # Only process if variable expands to non-empty
44513
44514  if test "x$BUILD_CC" != x; then
44515    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44516
44517  # First separate the path from the arguments. This will split at the first
44518  # space.
44519  complete="$BUILD_CC"
44520  path="${complete%% *}"
44521  tmp="$complete EOL"
44522  arguments="${tmp#* }"
44523
44524  # Input might be given as Windows format, start by converting to
44525  # unix format.
44526  new_path=`$CYGPATH -u "$path"`
44527
44528  # Now try to locate executable using which
44529  new_path=`$WHICH "$new_path" 2> /dev/null`
44530  # bat and cmd files are not always considered executable in cygwin causing which
44531  # to not find them
44532  if test "x$new_path" = x \
44533      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44534      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44535    new_path=`$CYGPATH -u "$path"`
44536  fi
44537  if test "x$new_path" = x; then
44538    # Oops. Which didn't find the executable.
44539    # The splitting of arguments from the executable at a space might have been incorrect,
44540    # since paths with space are more likely in Windows. Give it another try with the whole
44541    # argument.
44542    path="$complete"
44543    arguments="EOL"
44544    new_path=`$CYGPATH -u "$path"`
44545    new_path=`$WHICH "$new_path" 2> /dev/null`
44546    # bat and cmd files are not always considered executable in cygwin causing which
44547    # to not find them
44548    if test "x$new_path" = x \
44549        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44550        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44551      new_path=`$CYGPATH -u "$path"`
44552    fi
44553    if test "x$new_path" = x; then
44554      # It's still not found. Now this is an unrecoverable error.
44555      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44556$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44557      has_space=`$ECHO "$complete" | $GREP " "`
44558      if test "x$has_space" != x; then
44559        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44560$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44561      fi
44562      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44563    fi
44564  fi
44565
44566  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44567  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44568  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44569  # "foo.exe" is OK but "foo" is an error.
44570  #
44571  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44572  # It is also a way to make sure we got the proper file name for the real test later on.
44573  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44574  if test "x$test_shortpath" = x; then
44575    # Short path failed, file does not exist as specified.
44576    # Try adding .exe or .cmd
44577    if test -f "${new_path}.exe"; then
44578      input_to_shortpath="${new_path}.exe"
44579    elif test -f "${new_path}.cmd"; then
44580      input_to_shortpath="${new_path}.cmd"
44581    else
44582      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
44583$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
44584      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44585$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44586      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44587    fi
44588  else
44589    input_to_shortpath="$new_path"
44590  fi
44591
44592  # Call helper function which possibly converts this using DOS-style short mode.
44593  # If so, the updated path is stored in $new_path.
44594  new_path="$input_to_shortpath"
44595
44596  input_path="$input_to_shortpath"
44597  # Check if we need to convert this using DOS-style short mode. If the path
44598  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44599  # take no chances and rewrite it.
44600  # Note: m4 eats our [], so we need to use [ and ] instead.
44601  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44602  if test "x$has_forbidden_chars" != x; then
44603    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44604    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44605    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44606    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44607      # Going to short mode and back again did indeed matter. Since short mode is
44608      # case insensitive, let's make it lowercase to improve readability.
44609      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44610      # Now convert it back to Unix-style (cygpath)
44611      input_path=`$CYGPATH -u "$shortmode_path"`
44612      new_path="$input_path"
44613    fi
44614  fi
44615
44616  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44617  if test "x$test_cygdrive_prefix" = x; then
44618    # As a simple fix, exclude /usr/bin since it's not a real path.
44619    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44620      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44621      # a path prefixed by /cygdrive for fixpath to work.
44622      new_path="$CYGWIN_ROOT_PATH$input_path"
44623    fi
44624  fi
44625
44626  # remove trailing .exe if any
44627  new_path="${new_path/%.exe/}"
44628
44629    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44630
44631  # First separate the path from the arguments. This will split at the first
44632  # space.
44633  complete="$BUILD_CC"
44634  path="${complete%% *}"
44635  tmp="$complete EOL"
44636  arguments="${tmp#* }"
44637
44638  # Input might be given as Windows format, start by converting to
44639  # unix format.
44640  new_path="$path"
44641
44642  windows_path="$new_path"
44643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44644    unix_path=`$CYGPATH -u "$windows_path"`
44645    new_path="$unix_path"
44646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44648    new_path="$unix_path"
44649  fi
44650
44651
44652  # Now try to locate executable using which
44653  new_path=`$WHICH "$new_path" 2> /dev/null`
44654
44655  if test "x$new_path" = x; then
44656    # Oops. Which didn't find the executable.
44657    # The splitting of arguments from the executable at a space might have been incorrect,
44658    # since paths with space are more likely in Windows. Give it another try with the whole
44659    # argument.
44660    path="$complete"
44661    arguments="EOL"
44662    new_path="$path"
44663
44664  windows_path="$new_path"
44665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44666    unix_path=`$CYGPATH -u "$windows_path"`
44667    new_path="$unix_path"
44668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44669    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44670    new_path="$unix_path"
44671  fi
44672
44673
44674    new_path=`$WHICH "$new_path" 2> /dev/null`
44675    # bat and cmd files are not always considered executable in MSYS causing which
44676    # to not find them
44677    if test "x$new_path" = x \
44678        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44679        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44680      new_path="$path"
44681
44682  windows_path="$new_path"
44683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44684    unix_path=`$CYGPATH -u "$windows_path"`
44685    new_path="$unix_path"
44686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44688    new_path="$unix_path"
44689  fi
44690
44691    fi
44692
44693    if test "x$new_path" = x; then
44694      # It's still not found. Now this is an unrecoverable error.
44695      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44696$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44697      has_space=`$ECHO "$complete" | $GREP " "`
44698      if test "x$has_space" != x; then
44699        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44700$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44701      fi
44702      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44703    fi
44704  fi
44705
44706  # Now new_path has a complete unix path to the binary
44707  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44708    # Keep paths in /bin as-is, but remove trailing .exe if any
44709    new_path="${new_path/%.exe/}"
44710    # Do not save /bin paths to all_fixpath_prefixes!
44711  else
44712    # Not in mixed or Windows style, start by that.
44713    new_path=`cmd //c echo $new_path`
44714
44715  input_path="$new_path"
44716  # Check if we need to convert this using DOS-style short mode. If the path
44717  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44718  # take no chances and rewrite it.
44719  # Note: m4 eats our [], so we need to use [ and ] instead.
44720  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44721  if test "x$has_forbidden_chars" != x; then
44722    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44723    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44724  fi
44725
44726    # Output is in $new_path
44727
44728  windows_path="$new_path"
44729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44730    unix_path=`$CYGPATH -u "$windows_path"`
44731    new_path="$unix_path"
44732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44734    new_path="$unix_path"
44735  fi
44736
44737    # remove trailing .exe if any
44738    new_path="${new_path/%.exe/}"
44739
44740    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44741    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44742  fi
44743
44744    else
44745      # We're on a unix platform. Hooray! :)
44746      # First separate the path from the arguments. This will split at the first
44747      # space.
44748      complete="$BUILD_CC"
44749      path="${complete%% *}"
44750      tmp="$complete EOL"
44751      arguments="${tmp#* }"
44752
44753      # Cannot rely on the command "which" here since it doesn't always work.
44754      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44755      if test -z "$is_absolute_path"; then
44756        # Path to executable is not absolute. Find it.
44757        IFS_save="$IFS"
44758        IFS=:
44759        for p in $PATH; do
44760          if test -f "$p/$path" && test -x "$p/$path"; then
44761            new_path="$p/$path"
44762            break
44763          fi
44764        done
44765        IFS="$IFS_save"
44766      else
44767        # This is an absolute path, we can use it without further modifications.
44768        new_path="$path"
44769      fi
44770
44771      if test "x$new_path" = x; then
44772        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44773$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44774        has_space=`$ECHO "$complete" | $GREP " "`
44775        if test "x$has_space" != x; then
44776          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44777$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44778        fi
44779        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44780      fi
44781    fi
44782
44783    # Now join together the path and the arguments once again
44784    if test "x$arguments" != xEOL; then
44785      new_complete="$new_path ${arguments% *}"
44786    else
44787      new_complete="$new_path"
44788    fi
44789
44790    if test "x$complete" != "x$new_complete"; then
44791      BUILD_CC="$new_complete"
44792      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44793$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44794    fi
44795  fi
44796
44797
44798
44799
44800  # Publish this variable in the help.
44801
44802
44803  if [ -z "${BUILD_CXX+x}" ]; then
44804    # The variable is not set by user, try to locate tool using the code snippet
44805    for ac_prog in cl CC g++
44806do
44807  # Extract the first word of "$ac_prog", so it can be a program name with args.
44808set dummy $ac_prog; ac_word=$2
44809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44810$as_echo_n "checking for $ac_word... " >&6; }
44811if ${ac_cv_path_BUILD_CXX+:} false; then :
44812  $as_echo_n "(cached) " >&6
44813else
44814  case $BUILD_CXX in
44815  [\\/]* | ?:[\\/]*)
44816  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44817  ;;
44818  *)
44819  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44820for as_dir in $PATH
44821do
44822  IFS=$as_save_IFS
44823  test -z "$as_dir" && as_dir=.
44824    for ac_exec_ext in '' $ac_executable_extensions; do
44825  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44826    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44828    break 2
44829  fi
44830done
44831  done
44832IFS=$as_save_IFS
44833
44834  ;;
44835esac
44836fi
44837BUILD_CXX=$ac_cv_path_BUILD_CXX
44838if test -n "$BUILD_CXX"; then
44839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44840$as_echo "$BUILD_CXX" >&6; }
44841else
44842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44843$as_echo "no" >&6; }
44844fi
44845
44846
44847  test -n "$BUILD_CXX" && break
44848done
44849
44850  else
44851    # The variable is set, but is it from the command line or the environment?
44852
44853    # Try to remove the string !BUILD_CXX! from our list.
44854    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44855    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44856      # If it failed, the variable was not from the command line. Ignore it,
44857      # but warn the user (except for BASH, which is always set by the calling BASH).
44858      if test "xBUILD_CXX" != xBASH; then
44859        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44860$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44861      fi
44862      # Try to locate tool using the code snippet
44863      for ac_prog in cl CC g++
44864do
44865  # Extract the first word of "$ac_prog", so it can be a program name with args.
44866set dummy $ac_prog; ac_word=$2
44867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44868$as_echo_n "checking for $ac_word... " >&6; }
44869if ${ac_cv_path_BUILD_CXX+:} false; then :
44870  $as_echo_n "(cached) " >&6
44871else
44872  case $BUILD_CXX in
44873  [\\/]* | ?:[\\/]*)
44874  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44875  ;;
44876  *)
44877  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44878for as_dir in $PATH
44879do
44880  IFS=$as_save_IFS
44881  test -z "$as_dir" && as_dir=.
44882    for ac_exec_ext in '' $ac_executable_extensions; do
44883  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44884    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44886    break 2
44887  fi
44888done
44889  done
44890IFS=$as_save_IFS
44891
44892  ;;
44893esac
44894fi
44895BUILD_CXX=$ac_cv_path_BUILD_CXX
44896if test -n "$BUILD_CXX"; then
44897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44898$as_echo "$BUILD_CXX" >&6; }
44899else
44900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44901$as_echo "no" >&6; }
44902fi
44903
44904
44905  test -n "$BUILD_CXX" && break
44906done
44907
44908    else
44909      # If it succeeded, then it was overridden by the user. We will use it
44910      # for the tool.
44911
44912      # First remove it from the list of overridden variables, so we can test
44913      # for unknown variables in the end.
44914      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44915
44916      # Check if we try to supply an empty value
44917      if test "x$BUILD_CXX" = x; then
44918        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44919$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44920        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44921$as_echo_n "checking for BUILD_CXX... " >&6; }
44922        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44923$as_echo "disabled" >&6; }
44924      else
44925        # Check if the provided tool contains a complete path.
44926        tool_specified="$BUILD_CXX"
44927        tool_basename="${tool_specified##*/}"
44928        if test "x$tool_basename" = "x$tool_specified"; then
44929          # A command without a complete path is provided, search $PATH.
44930          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44931$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44932          # Extract the first word of "$tool_basename", so it can be a program name with args.
44933set dummy $tool_basename; ac_word=$2
44934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44935$as_echo_n "checking for $ac_word... " >&6; }
44936if ${ac_cv_path_BUILD_CXX+:} false; then :
44937  $as_echo_n "(cached) " >&6
44938else
44939  case $BUILD_CXX in
44940  [\\/]* | ?:[\\/]*)
44941  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44942  ;;
44943  *)
44944  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44945for as_dir in $PATH
44946do
44947  IFS=$as_save_IFS
44948  test -z "$as_dir" && as_dir=.
44949    for ac_exec_ext in '' $ac_executable_extensions; do
44950  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44951    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44952    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44953    break 2
44954  fi
44955done
44956  done
44957IFS=$as_save_IFS
44958
44959  ;;
44960esac
44961fi
44962BUILD_CXX=$ac_cv_path_BUILD_CXX
44963if test -n "$BUILD_CXX"; then
44964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44965$as_echo "$BUILD_CXX" >&6; }
44966else
44967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44968$as_echo "no" >&6; }
44969fi
44970
44971
44972          if test "x$BUILD_CXX" = x; then
44973            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44974          fi
44975        else
44976          # Otherwise we believe it is a complete path. Use it as it is.
44977          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44978$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44979          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44980$as_echo_n "checking for BUILD_CXX... " >&6; }
44981          if test ! -x "$tool_specified"; then
44982            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44983$as_echo "not found" >&6; }
44984            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44985          fi
44986          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44987$as_echo "$tool_specified" >&6; }
44988        fi
44989      fi
44990    fi
44991
44992  fi
44993
44994
44995
44996  if test "x$BUILD_CXX" = x; then
44997    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44998  fi
44999
45000
45001
45002  # Only process if variable expands to non-empty
45003
45004  if test "x$BUILD_CXX" != x; then
45005    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45006
45007  # First separate the path from the arguments. This will split at the first
45008  # space.
45009  complete="$BUILD_CXX"
45010  path="${complete%% *}"
45011  tmp="$complete EOL"
45012  arguments="${tmp#* }"
45013
45014  # Input might be given as Windows format, start by converting to
45015  # unix format.
45016  new_path=`$CYGPATH -u "$path"`
45017
45018  # Now try to locate executable using which
45019  new_path=`$WHICH "$new_path" 2> /dev/null`
45020  # bat and cmd files are not always considered executable in cygwin causing which
45021  # to not find them
45022  if test "x$new_path" = x \
45023      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45024      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45025    new_path=`$CYGPATH -u "$path"`
45026  fi
45027  if test "x$new_path" = x; then
45028    # Oops. Which didn't find the executable.
45029    # The splitting of arguments from the executable at a space might have been incorrect,
45030    # since paths with space are more likely in Windows. Give it another try with the whole
45031    # argument.
45032    path="$complete"
45033    arguments="EOL"
45034    new_path=`$CYGPATH -u "$path"`
45035    new_path=`$WHICH "$new_path" 2> /dev/null`
45036    # bat and cmd files are not always considered executable in cygwin causing which
45037    # to not find them
45038    if test "x$new_path" = x \
45039        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45040        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45041      new_path=`$CYGPATH -u "$path"`
45042    fi
45043    if test "x$new_path" = x; then
45044      # It's still not found. Now this is an unrecoverable error.
45045      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45046$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45047      has_space=`$ECHO "$complete" | $GREP " "`
45048      if test "x$has_space" != x; then
45049        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45050$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45051      fi
45052      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45053    fi
45054  fi
45055
45056  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45057  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45058  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45059  # "foo.exe" is OK but "foo" is an error.
45060  #
45061  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45062  # It is also a way to make sure we got the proper file name for the real test later on.
45063  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45064  if test "x$test_shortpath" = x; then
45065    # Short path failed, file does not exist as specified.
45066    # Try adding .exe or .cmd
45067    if test -f "${new_path}.exe"; then
45068      input_to_shortpath="${new_path}.exe"
45069    elif test -f "${new_path}.cmd"; then
45070      input_to_shortpath="${new_path}.cmd"
45071    else
45072      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
45073$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
45074      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45075$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45076      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45077    fi
45078  else
45079    input_to_shortpath="$new_path"
45080  fi
45081
45082  # Call helper function which possibly converts this using DOS-style short mode.
45083  # If so, the updated path is stored in $new_path.
45084  new_path="$input_to_shortpath"
45085
45086  input_path="$input_to_shortpath"
45087  # Check if we need to convert this using DOS-style short mode. If the path
45088  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45089  # take no chances and rewrite it.
45090  # Note: m4 eats our [], so we need to use [ and ] instead.
45091  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45092  if test "x$has_forbidden_chars" != x; then
45093    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45094    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45095    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45096    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45097      # Going to short mode and back again did indeed matter. Since short mode is
45098      # case insensitive, let's make it lowercase to improve readability.
45099      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45100      # Now convert it back to Unix-style (cygpath)
45101      input_path=`$CYGPATH -u "$shortmode_path"`
45102      new_path="$input_path"
45103    fi
45104  fi
45105
45106  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45107  if test "x$test_cygdrive_prefix" = x; then
45108    # As a simple fix, exclude /usr/bin since it's not a real path.
45109    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45110      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45111      # a path prefixed by /cygdrive for fixpath to work.
45112      new_path="$CYGWIN_ROOT_PATH$input_path"
45113    fi
45114  fi
45115
45116  # remove trailing .exe if any
45117  new_path="${new_path/%.exe/}"
45118
45119    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45120
45121  # First separate the path from the arguments. This will split at the first
45122  # space.
45123  complete="$BUILD_CXX"
45124  path="${complete%% *}"
45125  tmp="$complete EOL"
45126  arguments="${tmp#* }"
45127
45128  # Input might be given as Windows format, start by converting to
45129  # unix format.
45130  new_path="$path"
45131
45132  windows_path="$new_path"
45133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45134    unix_path=`$CYGPATH -u "$windows_path"`
45135    new_path="$unix_path"
45136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45138    new_path="$unix_path"
45139  fi
45140
45141
45142  # Now try to locate executable using which
45143  new_path=`$WHICH "$new_path" 2> /dev/null`
45144
45145  if test "x$new_path" = x; then
45146    # Oops. Which didn't find the executable.
45147    # The splitting of arguments from the executable at a space might have been incorrect,
45148    # since paths with space are more likely in Windows. Give it another try with the whole
45149    # argument.
45150    path="$complete"
45151    arguments="EOL"
45152    new_path="$path"
45153
45154  windows_path="$new_path"
45155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45156    unix_path=`$CYGPATH -u "$windows_path"`
45157    new_path="$unix_path"
45158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45159    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45160    new_path="$unix_path"
45161  fi
45162
45163
45164    new_path=`$WHICH "$new_path" 2> /dev/null`
45165    # bat and cmd files are not always considered executable in MSYS causing which
45166    # to not find them
45167    if test "x$new_path" = x \
45168        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45169        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45170      new_path="$path"
45171
45172  windows_path="$new_path"
45173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45174    unix_path=`$CYGPATH -u "$windows_path"`
45175    new_path="$unix_path"
45176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45178    new_path="$unix_path"
45179  fi
45180
45181    fi
45182
45183    if test "x$new_path" = x; then
45184      # It's still not found. Now this is an unrecoverable error.
45185      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45186$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45187      has_space=`$ECHO "$complete" | $GREP " "`
45188      if test "x$has_space" != x; then
45189        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45190$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45191      fi
45192      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45193    fi
45194  fi
45195
45196  # Now new_path has a complete unix path to the binary
45197  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45198    # Keep paths in /bin as-is, but remove trailing .exe if any
45199    new_path="${new_path/%.exe/}"
45200    # Do not save /bin paths to all_fixpath_prefixes!
45201  else
45202    # Not in mixed or Windows style, start by that.
45203    new_path=`cmd //c echo $new_path`
45204
45205  input_path="$new_path"
45206  # Check if we need to convert this using DOS-style short mode. If the path
45207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45208  # take no chances and rewrite it.
45209  # Note: m4 eats our [], so we need to use [ and ] instead.
45210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45211  if test "x$has_forbidden_chars" != x; then
45212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45213    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45214  fi
45215
45216    # Output is in $new_path
45217
45218  windows_path="$new_path"
45219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45220    unix_path=`$CYGPATH -u "$windows_path"`
45221    new_path="$unix_path"
45222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45223    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45224    new_path="$unix_path"
45225  fi
45226
45227    # remove trailing .exe if any
45228    new_path="${new_path/%.exe/}"
45229
45230    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45231    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45232  fi
45233
45234    else
45235      # We're on a unix platform. Hooray! :)
45236      # First separate the path from the arguments. This will split at the first
45237      # space.
45238      complete="$BUILD_CXX"
45239      path="${complete%% *}"
45240      tmp="$complete EOL"
45241      arguments="${tmp#* }"
45242
45243      # Cannot rely on the command "which" here since it doesn't always work.
45244      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45245      if test -z "$is_absolute_path"; then
45246        # Path to executable is not absolute. Find it.
45247        IFS_save="$IFS"
45248        IFS=:
45249        for p in $PATH; do
45250          if test -f "$p/$path" && test -x "$p/$path"; then
45251            new_path="$p/$path"
45252            break
45253          fi
45254        done
45255        IFS="$IFS_save"
45256      else
45257        # This is an absolute path, we can use it without further modifications.
45258        new_path="$path"
45259      fi
45260
45261      if test "x$new_path" = x; then
45262        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45263$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45264        has_space=`$ECHO "$complete" | $GREP " "`
45265        if test "x$has_space" != x; then
45266          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45267$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45268        fi
45269        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45270      fi
45271    fi
45272
45273    # Now join together the path and the arguments once again
45274    if test "x$arguments" != xEOL; then
45275      new_complete="$new_path ${arguments% *}"
45276    else
45277      new_complete="$new_path"
45278    fi
45279
45280    if test "x$complete" != "x$new_complete"; then
45281      BUILD_CXX="$new_complete"
45282      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45283$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45284    fi
45285  fi
45286
45287
45288
45289  # Publish this variable in the help.
45290
45291
45292  if [ -z "${BUILD_NM+x}" ]; then
45293    # The variable is not set by user, try to locate tool using the code snippet
45294    for ac_prog in nm gcc-nm
45295do
45296  # Extract the first word of "$ac_prog", so it can be a program name with args.
45297set dummy $ac_prog; ac_word=$2
45298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45299$as_echo_n "checking for $ac_word... " >&6; }
45300if ${ac_cv_path_BUILD_NM+:} false; then :
45301  $as_echo_n "(cached) " >&6
45302else
45303  case $BUILD_NM in
45304  [\\/]* | ?:[\\/]*)
45305  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45306  ;;
45307  *)
45308  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45309for as_dir in $PATH
45310do
45311  IFS=$as_save_IFS
45312  test -z "$as_dir" && as_dir=.
45313    for ac_exec_ext in '' $ac_executable_extensions; do
45314  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45315    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45316    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45317    break 2
45318  fi
45319done
45320  done
45321IFS=$as_save_IFS
45322
45323  ;;
45324esac
45325fi
45326BUILD_NM=$ac_cv_path_BUILD_NM
45327if test -n "$BUILD_NM"; then
45328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45329$as_echo "$BUILD_NM" >&6; }
45330else
45331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45332$as_echo "no" >&6; }
45333fi
45334
45335
45336  test -n "$BUILD_NM" && break
45337done
45338
45339  else
45340    # The variable is set, but is it from the command line or the environment?
45341
45342    # Try to remove the string !BUILD_NM! from our list.
45343    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45344    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45345      # If it failed, the variable was not from the command line. Ignore it,
45346      # but warn the user (except for BASH, which is always set by the calling BASH).
45347      if test "xBUILD_NM" != xBASH; then
45348        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45349$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45350      fi
45351      # Try to locate tool using the code snippet
45352      for ac_prog in nm gcc-nm
45353do
45354  # Extract the first word of "$ac_prog", so it can be a program name with args.
45355set dummy $ac_prog; ac_word=$2
45356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45357$as_echo_n "checking for $ac_word... " >&6; }
45358if ${ac_cv_path_BUILD_NM+:} false; then :
45359  $as_echo_n "(cached) " >&6
45360else
45361  case $BUILD_NM in
45362  [\\/]* | ?:[\\/]*)
45363  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45364  ;;
45365  *)
45366  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45367for as_dir in $PATH
45368do
45369  IFS=$as_save_IFS
45370  test -z "$as_dir" && as_dir=.
45371    for ac_exec_ext in '' $ac_executable_extensions; do
45372  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45373    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45374    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45375    break 2
45376  fi
45377done
45378  done
45379IFS=$as_save_IFS
45380
45381  ;;
45382esac
45383fi
45384BUILD_NM=$ac_cv_path_BUILD_NM
45385if test -n "$BUILD_NM"; then
45386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45387$as_echo "$BUILD_NM" >&6; }
45388else
45389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45390$as_echo "no" >&6; }
45391fi
45392
45393
45394  test -n "$BUILD_NM" && break
45395done
45396
45397    else
45398      # If it succeeded, then it was overridden by the user. We will use it
45399      # for the tool.
45400
45401      # First remove it from the list of overridden variables, so we can test
45402      # for unknown variables in the end.
45403      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45404
45405      # Check if we try to supply an empty value
45406      if test "x$BUILD_NM" = x; then
45407        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45408$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45409        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45410$as_echo_n "checking for BUILD_NM... " >&6; }
45411        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45412$as_echo "disabled" >&6; }
45413      else
45414        # Check if the provided tool contains a complete path.
45415        tool_specified="$BUILD_NM"
45416        tool_basename="${tool_specified##*/}"
45417        if test "x$tool_basename" = "x$tool_specified"; then
45418          # A command without a complete path is provided, search $PATH.
45419          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45420$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45421          # Extract the first word of "$tool_basename", so it can be a program name with args.
45422set dummy $tool_basename; ac_word=$2
45423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45424$as_echo_n "checking for $ac_word... " >&6; }
45425if ${ac_cv_path_BUILD_NM+:} false; then :
45426  $as_echo_n "(cached) " >&6
45427else
45428  case $BUILD_NM in
45429  [\\/]* | ?:[\\/]*)
45430  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45431  ;;
45432  *)
45433  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45434for as_dir in $PATH
45435do
45436  IFS=$as_save_IFS
45437  test -z "$as_dir" && as_dir=.
45438    for ac_exec_ext in '' $ac_executable_extensions; do
45439  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45440    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45441    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45442    break 2
45443  fi
45444done
45445  done
45446IFS=$as_save_IFS
45447
45448  ;;
45449esac
45450fi
45451BUILD_NM=$ac_cv_path_BUILD_NM
45452if test -n "$BUILD_NM"; then
45453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45454$as_echo "$BUILD_NM" >&6; }
45455else
45456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45457$as_echo "no" >&6; }
45458fi
45459
45460
45461          if test "x$BUILD_NM" = x; then
45462            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45463          fi
45464        else
45465          # Otherwise we believe it is a complete path. Use it as it is.
45466          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45467$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45468          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45469$as_echo_n "checking for BUILD_NM... " >&6; }
45470          if test ! -x "$tool_specified"; then
45471            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45472$as_echo "not found" >&6; }
45473            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45474          fi
45475          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45476$as_echo "$tool_specified" >&6; }
45477        fi
45478      fi
45479    fi
45480
45481  fi
45482
45483
45484
45485  # Only process if variable expands to non-empty
45486
45487  if test "x$BUILD_NM" != x; then
45488    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45489
45490  # First separate the path from the arguments. This will split at the first
45491  # space.
45492  complete="$BUILD_NM"
45493  path="${complete%% *}"
45494  tmp="$complete EOL"
45495  arguments="${tmp#* }"
45496
45497  # Input might be given as Windows format, start by converting to
45498  # unix format.
45499  new_path=`$CYGPATH -u "$path"`
45500
45501  # Now try to locate executable using which
45502  new_path=`$WHICH "$new_path" 2> /dev/null`
45503  # bat and cmd files are not always considered executable in cygwin causing which
45504  # to not find them
45505  if test "x$new_path" = x \
45506      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45507      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45508    new_path=`$CYGPATH -u "$path"`
45509  fi
45510  if test "x$new_path" = x; then
45511    # Oops. Which didn't find the executable.
45512    # The splitting of arguments from the executable at a space might have been incorrect,
45513    # since paths with space are more likely in Windows. Give it another try with the whole
45514    # argument.
45515    path="$complete"
45516    arguments="EOL"
45517    new_path=`$CYGPATH -u "$path"`
45518    new_path=`$WHICH "$new_path" 2> /dev/null`
45519    # bat and cmd files are not always considered executable in cygwin causing which
45520    # to not find them
45521    if test "x$new_path" = x \
45522        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45523        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45524      new_path=`$CYGPATH -u "$path"`
45525    fi
45526    if test "x$new_path" = x; then
45527      # It's still not found. Now this is an unrecoverable error.
45528      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45529$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45530      has_space=`$ECHO "$complete" | $GREP " "`
45531      if test "x$has_space" != x; then
45532        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45533$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45534      fi
45535      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45536    fi
45537  fi
45538
45539  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45540  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45541  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45542  # "foo.exe" is OK but "foo" is an error.
45543  #
45544  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45545  # It is also a way to make sure we got the proper file name for the real test later on.
45546  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45547  if test "x$test_shortpath" = x; then
45548    # Short path failed, file does not exist as specified.
45549    # Try adding .exe or .cmd
45550    if test -f "${new_path}.exe"; then
45551      input_to_shortpath="${new_path}.exe"
45552    elif test -f "${new_path}.cmd"; then
45553      input_to_shortpath="${new_path}.cmd"
45554    else
45555      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
45556$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
45557      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45558$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45559      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45560    fi
45561  else
45562    input_to_shortpath="$new_path"
45563  fi
45564
45565  # Call helper function which possibly converts this using DOS-style short mode.
45566  # If so, the updated path is stored in $new_path.
45567  new_path="$input_to_shortpath"
45568
45569  input_path="$input_to_shortpath"
45570  # Check if we need to convert this using DOS-style short mode. If the path
45571  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45572  # take no chances and rewrite it.
45573  # Note: m4 eats our [], so we need to use [ and ] instead.
45574  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45575  if test "x$has_forbidden_chars" != x; then
45576    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45577    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45578    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45579    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45580      # Going to short mode and back again did indeed matter. Since short mode is
45581      # case insensitive, let's make it lowercase to improve readability.
45582      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45583      # Now convert it back to Unix-style (cygpath)
45584      input_path=`$CYGPATH -u "$shortmode_path"`
45585      new_path="$input_path"
45586    fi
45587  fi
45588
45589  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45590  if test "x$test_cygdrive_prefix" = x; then
45591    # As a simple fix, exclude /usr/bin since it's not a real path.
45592    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45593      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45594      # a path prefixed by /cygdrive for fixpath to work.
45595      new_path="$CYGWIN_ROOT_PATH$input_path"
45596    fi
45597  fi
45598
45599  # remove trailing .exe if any
45600  new_path="${new_path/%.exe/}"
45601
45602    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45603
45604  # First separate the path from the arguments. This will split at the first
45605  # space.
45606  complete="$BUILD_NM"
45607  path="${complete%% *}"
45608  tmp="$complete EOL"
45609  arguments="${tmp#* }"
45610
45611  # Input might be given as Windows format, start by converting to
45612  # unix format.
45613  new_path="$path"
45614
45615  windows_path="$new_path"
45616  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45617    unix_path=`$CYGPATH -u "$windows_path"`
45618    new_path="$unix_path"
45619  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45620    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45621    new_path="$unix_path"
45622  fi
45623
45624
45625  # Now try to locate executable using which
45626  new_path=`$WHICH "$new_path" 2> /dev/null`
45627
45628  if test "x$new_path" = x; then
45629    # Oops. Which didn't find the executable.
45630    # The splitting of arguments from the executable at a space might have been incorrect,
45631    # since paths with space are more likely in Windows. Give it another try with the whole
45632    # argument.
45633    path="$complete"
45634    arguments="EOL"
45635    new_path="$path"
45636
45637  windows_path="$new_path"
45638  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45639    unix_path=`$CYGPATH -u "$windows_path"`
45640    new_path="$unix_path"
45641  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45642    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45643    new_path="$unix_path"
45644  fi
45645
45646
45647    new_path=`$WHICH "$new_path" 2> /dev/null`
45648    # bat and cmd files are not always considered executable in MSYS causing which
45649    # to not find them
45650    if test "x$new_path" = x \
45651        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45652        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45653      new_path="$path"
45654
45655  windows_path="$new_path"
45656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45657    unix_path=`$CYGPATH -u "$windows_path"`
45658    new_path="$unix_path"
45659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45660    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45661    new_path="$unix_path"
45662  fi
45663
45664    fi
45665
45666    if test "x$new_path" = x; then
45667      # It's still not found. Now this is an unrecoverable error.
45668      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45669$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45670      has_space=`$ECHO "$complete" | $GREP " "`
45671      if test "x$has_space" != x; then
45672        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45673$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45674      fi
45675      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45676    fi
45677  fi
45678
45679  # Now new_path has a complete unix path to the binary
45680  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45681    # Keep paths in /bin as-is, but remove trailing .exe if any
45682    new_path="${new_path/%.exe/}"
45683    # Do not save /bin paths to all_fixpath_prefixes!
45684  else
45685    # Not in mixed or Windows style, start by that.
45686    new_path=`cmd //c echo $new_path`
45687
45688  input_path="$new_path"
45689  # Check if we need to convert this using DOS-style short mode. If the path
45690  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45691  # take no chances and rewrite it.
45692  # Note: m4 eats our [], so we need to use [ and ] instead.
45693  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45694  if test "x$has_forbidden_chars" != x; then
45695    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45696    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45697  fi
45698
45699    # Output is in $new_path
45700
45701  windows_path="$new_path"
45702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45703    unix_path=`$CYGPATH -u "$windows_path"`
45704    new_path="$unix_path"
45705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45706    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45707    new_path="$unix_path"
45708  fi
45709
45710    # remove trailing .exe if any
45711    new_path="${new_path/%.exe/}"
45712
45713    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45714    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45715  fi
45716
45717    else
45718      # We're on a unix platform. Hooray! :)
45719      # First separate the path from the arguments. This will split at the first
45720      # space.
45721      complete="$BUILD_NM"
45722      path="${complete%% *}"
45723      tmp="$complete EOL"
45724      arguments="${tmp#* }"
45725
45726      # Cannot rely on the command "which" here since it doesn't always work.
45727      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45728      if test -z "$is_absolute_path"; then
45729        # Path to executable is not absolute. Find it.
45730        IFS_save="$IFS"
45731        IFS=:
45732        for p in $PATH; do
45733          if test -f "$p/$path" && test -x "$p/$path"; then
45734            new_path="$p/$path"
45735            break
45736          fi
45737        done
45738        IFS="$IFS_save"
45739      else
45740        # This is an absolute path, we can use it without further modifications.
45741        new_path="$path"
45742      fi
45743
45744      if test "x$new_path" = x; then
45745        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45746$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45747        has_space=`$ECHO "$complete" | $GREP " "`
45748        if test "x$has_space" != x; then
45749          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45750$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45751        fi
45752        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45753      fi
45754    fi
45755
45756    # Now join together the path and the arguments once again
45757    if test "x$arguments" != xEOL; then
45758      new_complete="$new_path ${arguments% *}"
45759    else
45760      new_complete="$new_path"
45761    fi
45762
45763    if test "x$complete" != "x$new_complete"; then
45764      BUILD_NM="$new_complete"
45765      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
45766$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
45767    fi
45768  fi
45769
45770
45771
45772  # Publish this variable in the help.
45773
45774
45775  if [ -z "${BUILD_AR+x}" ]; then
45776    # The variable is not set by user, try to locate tool using the code snippet
45777    for ac_prog in ar gcc-ar
45778do
45779  # Extract the first word of "$ac_prog", so it can be a program name with args.
45780set dummy $ac_prog; ac_word=$2
45781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45782$as_echo_n "checking for $ac_word... " >&6; }
45783if ${ac_cv_path_BUILD_AR+:} false; then :
45784  $as_echo_n "(cached) " >&6
45785else
45786  case $BUILD_AR in
45787  [\\/]* | ?:[\\/]*)
45788  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45789  ;;
45790  *)
45791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45792for as_dir in $PATH
45793do
45794  IFS=$as_save_IFS
45795  test -z "$as_dir" && as_dir=.
45796    for ac_exec_ext in '' $ac_executable_extensions; do
45797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45798    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45800    break 2
45801  fi
45802done
45803  done
45804IFS=$as_save_IFS
45805
45806  ;;
45807esac
45808fi
45809BUILD_AR=$ac_cv_path_BUILD_AR
45810if test -n "$BUILD_AR"; then
45811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45812$as_echo "$BUILD_AR" >&6; }
45813else
45814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45815$as_echo "no" >&6; }
45816fi
45817
45818
45819  test -n "$BUILD_AR" && break
45820done
45821
45822  else
45823    # The variable is set, but is it from the command line or the environment?
45824
45825    # Try to remove the string !BUILD_AR! from our list.
45826    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45827    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45828      # If it failed, the variable was not from the command line. Ignore it,
45829      # but warn the user (except for BASH, which is always set by the calling BASH).
45830      if test "xBUILD_AR" != xBASH; then
45831        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45832$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45833      fi
45834      # Try to locate tool using the code snippet
45835      for ac_prog in ar gcc-ar
45836do
45837  # Extract the first word of "$ac_prog", so it can be a program name with args.
45838set dummy $ac_prog; ac_word=$2
45839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45840$as_echo_n "checking for $ac_word... " >&6; }
45841if ${ac_cv_path_BUILD_AR+:} false; then :
45842  $as_echo_n "(cached) " >&6
45843else
45844  case $BUILD_AR in
45845  [\\/]* | ?:[\\/]*)
45846  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45847  ;;
45848  *)
45849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45850for as_dir in $PATH
45851do
45852  IFS=$as_save_IFS
45853  test -z "$as_dir" && as_dir=.
45854    for ac_exec_ext in '' $ac_executable_extensions; do
45855  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45856    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45858    break 2
45859  fi
45860done
45861  done
45862IFS=$as_save_IFS
45863
45864  ;;
45865esac
45866fi
45867BUILD_AR=$ac_cv_path_BUILD_AR
45868if test -n "$BUILD_AR"; then
45869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45870$as_echo "$BUILD_AR" >&6; }
45871else
45872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45873$as_echo "no" >&6; }
45874fi
45875
45876
45877  test -n "$BUILD_AR" && break
45878done
45879
45880    else
45881      # If it succeeded, then it was overridden by the user. We will use it
45882      # for the tool.
45883
45884      # First remove it from the list of overridden variables, so we can test
45885      # for unknown variables in the end.
45886      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45887
45888      # Check if we try to supply an empty value
45889      if test "x$BUILD_AR" = x; then
45890        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45891$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45892        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45893$as_echo_n "checking for BUILD_AR... " >&6; }
45894        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45895$as_echo "disabled" >&6; }
45896      else
45897        # Check if the provided tool contains a complete path.
45898        tool_specified="$BUILD_AR"
45899        tool_basename="${tool_specified##*/}"
45900        if test "x$tool_basename" = "x$tool_specified"; then
45901          # A command without a complete path is provided, search $PATH.
45902          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45903$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45904          # Extract the first word of "$tool_basename", so it can be a program name with args.
45905set dummy $tool_basename; ac_word=$2
45906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45907$as_echo_n "checking for $ac_word... " >&6; }
45908if ${ac_cv_path_BUILD_AR+:} false; then :
45909  $as_echo_n "(cached) " >&6
45910else
45911  case $BUILD_AR in
45912  [\\/]* | ?:[\\/]*)
45913  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45914  ;;
45915  *)
45916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45917for as_dir in $PATH
45918do
45919  IFS=$as_save_IFS
45920  test -z "$as_dir" && as_dir=.
45921    for ac_exec_ext in '' $ac_executable_extensions; do
45922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45923    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45925    break 2
45926  fi
45927done
45928  done
45929IFS=$as_save_IFS
45930
45931  ;;
45932esac
45933fi
45934BUILD_AR=$ac_cv_path_BUILD_AR
45935if test -n "$BUILD_AR"; then
45936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45937$as_echo "$BUILD_AR" >&6; }
45938else
45939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45940$as_echo "no" >&6; }
45941fi
45942
45943
45944          if test "x$BUILD_AR" = x; then
45945            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45946          fi
45947        else
45948          # Otherwise we believe it is a complete path. Use it as it is.
45949          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45950$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45951          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45952$as_echo_n "checking for BUILD_AR... " >&6; }
45953          if test ! -x "$tool_specified"; then
45954            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45955$as_echo "not found" >&6; }
45956            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45957          fi
45958          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45959$as_echo "$tool_specified" >&6; }
45960        fi
45961      fi
45962    fi
45963
45964  fi
45965
45966
45967
45968  # Only process if variable expands to non-empty
45969
45970  if test "x$BUILD_AR" != x; then
45971    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45972
45973  # First separate the path from the arguments. This will split at the first
45974  # space.
45975  complete="$BUILD_AR"
45976  path="${complete%% *}"
45977  tmp="$complete EOL"
45978  arguments="${tmp#* }"
45979
45980  # Input might be given as Windows format, start by converting to
45981  # unix format.
45982  new_path=`$CYGPATH -u "$path"`
45983
45984  # Now try to locate executable using which
45985  new_path=`$WHICH "$new_path" 2> /dev/null`
45986  # bat and cmd files are not always considered executable in cygwin causing which
45987  # to not find them
45988  if test "x$new_path" = x \
45989      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45990      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45991    new_path=`$CYGPATH -u "$path"`
45992  fi
45993  if test "x$new_path" = x; then
45994    # Oops. Which didn't find the executable.
45995    # The splitting of arguments from the executable at a space might have been incorrect,
45996    # since paths with space are more likely in Windows. Give it another try with the whole
45997    # argument.
45998    path="$complete"
45999    arguments="EOL"
46000    new_path=`$CYGPATH -u "$path"`
46001    new_path=`$WHICH "$new_path" 2> /dev/null`
46002    # bat and cmd files are not always considered executable in cygwin causing which
46003    # to not find them
46004    if test "x$new_path" = x \
46005        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46006        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46007      new_path=`$CYGPATH -u "$path"`
46008    fi
46009    if test "x$new_path" = x; then
46010      # It's still not found. Now this is an unrecoverable error.
46011      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46012$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46013      has_space=`$ECHO "$complete" | $GREP " "`
46014      if test "x$has_space" != x; then
46015        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46016$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46017      fi
46018      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46019    fi
46020  fi
46021
46022  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46023  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46024  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46025  # "foo.exe" is OK but "foo" is an error.
46026  #
46027  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46028  # It is also a way to make sure we got the proper file name for the real test later on.
46029  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46030  if test "x$test_shortpath" = x; then
46031    # Short path failed, file does not exist as specified.
46032    # Try adding .exe or .cmd
46033    if test -f "${new_path}.exe"; then
46034      input_to_shortpath="${new_path}.exe"
46035    elif test -f "${new_path}.cmd"; then
46036      input_to_shortpath="${new_path}.cmd"
46037    else
46038      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
46039$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
46040      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46041$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46042      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46043    fi
46044  else
46045    input_to_shortpath="$new_path"
46046  fi
46047
46048  # Call helper function which possibly converts this using DOS-style short mode.
46049  # If so, the updated path is stored in $new_path.
46050  new_path="$input_to_shortpath"
46051
46052  input_path="$input_to_shortpath"
46053  # Check if we need to convert this using DOS-style short mode. If the path
46054  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46055  # take no chances and rewrite it.
46056  # Note: m4 eats our [], so we need to use [ and ] instead.
46057  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46058  if test "x$has_forbidden_chars" != x; then
46059    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46060    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46061    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46062    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46063      # Going to short mode and back again did indeed matter. Since short mode is
46064      # case insensitive, let's make it lowercase to improve readability.
46065      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46066      # Now convert it back to Unix-style (cygpath)
46067      input_path=`$CYGPATH -u "$shortmode_path"`
46068      new_path="$input_path"
46069    fi
46070  fi
46071
46072  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46073  if test "x$test_cygdrive_prefix" = x; then
46074    # As a simple fix, exclude /usr/bin since it's not a real path.
46075    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46076      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46077      # a path prefixed by /cygdrive for fixpath to work.
46078      new_path="$CYGWIN_ROOT_PATH$input_path"
46079    fi
46080  fi
46081
46082  # remove trailing .exe if any
46083  new_path="${new_path/%.exe/}"
46084
46085    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46086
46087  # First separate the path from the arguments. This will split at the first
46088  # space.
46089  complete="$BUILD_AR"
46090  path="${complete%% *}"
46091  tmp="$complete EOL"
46092  arguments="${tmp#* }"
46093
46094  # Input might be given as Windows format, start by converting to
46095  # unix format.
46096  new_path="$path"
46097
46098  windows_path="$new_path"
46099  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46100    unix_path=`$CYGPATH -u "$windows_path"`
46101    new_path="$unix_path"
46102  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46103    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46104    new_path="$unix_path"
46105  fi
46106
46107
46108  # Now try to locate executable using which
46109  new_path=`$WHICH "$new_path" 2> /dev/null`
46110
46111  if test "x$new_path" = x; then
46112    # Oops. Which didn't find the executable.
46113    # The splitting of arguments from the executable at a space might have been incorrect,
46114    # since paths with space are more likely in Windows. Give it another try with the whole
46115    # argument.
46116    path="$complete"
46117    arguments="EOL"
46118    new_path="$path"
46119
46120  windows_path="$new_path"
46121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46122    unix_path=`$CYGPATH -u "$windows_path"`
46123    new_path="$unix_path"
46124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46125    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46126    new_path="$unix_path"
46127  fi
46128
46129
46130    new_path=`$WHICH "$new_path" 2> /dev/null`
46131    # bat and cmd files are not always considered executable in MSYS causing which
46132    # to not find them
46133    if test "x$new_path" = x \
46134        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46135        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46136      new_path="$path"
46137
46138  windows_path="$new_path"
46139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46140    unix_path=`$CYGPATH -u "$windows_path"`
46141    new_path="$unix_path"
46142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46144    new_path="$unix_path"
46145  fi
46146
46147    fi
46148
46149    if test "x$new_path" = x; then
46150      # It's still not found. Now this is an unrecoverable error.
46151      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46152$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46153      has_space=`$ECHO "$complete" | $GREP " "`
46154      if test "x$has_space" != x; then
46155        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46156$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46157      fi
46158      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46159    fi
46160  fi
46161
46162  # Now new_path has a complete unix path to the binary
46163  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46164    # Keep paths in /bin as-is, but remove trailing .exe if any
46165    new_path="${new_path/%.exe/}"
46166    # Do not save /bin paths to all_fixpath_prefixes!
46167  else
46168    # Not in mixed or Windows style, start by that.
46169    new_path=`cmd //c echo $new_path`
46170
46171  input_path="$new_path"
46172  # Check if we need to convert this using DOS-style short mode. If the path
46173  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46174  # take no chances and rewrite it.
46175  # Note: m4 eats our [], so we need to use [ and ] instead.
46176  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46177  if test "x$has_forbidden_chars" != x; then
46178    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46179    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46180  fi
46181
46182    # Output is in $new_path
46183
46184  windows_path="$new_path"
46185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46186    unix_path=`$CYGPATH -u "$windows_path"`
46187    new_path="$unix_path"
46188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46190    new_path="$unix_path"
46191  fi
46192
46193    # remove trailing .exe if any
46194    new_path="${new_path/%.exe/}"
46195
46196    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46197    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46198  fi
46199
46200    else
46201      # We're on a unix platform. Hooray! :)
46202      # First separate the path from the arguments. This will split at the first
46203      # space.
46204      complete="$BUILD_AR"
46205      path="${complete%% *}"
46206      tmp="$complete EOL"
46207      arguments="${tmp#* }"
46208
46209      # Cannot rely on the command "which" here since it doesn't always work.
46210      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46211      if test -z "$is_absolute_path"; then
46212        # Path to executable is not absolute. Find it.
46213        IFS_save="$IFS"
46214        IFS=:
46215        for p in $PATH; do
46216          if test -f "$p/$path" && test -x "$p/$path"; then
46217            new_path="$p/$path"
46218            break
46219          fi
46220        done
46221        IFS="$IFS_save"
46222      else
46223        # This is an absolute path, we can use it without further modifications.
46224        new_path="$path"
46225      fi
46226
46227      if test "x$new_path" = x; then
46228        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46229$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46230        has_space=`$ECHO "$complete" | $GREP " "`
46231        if test "x$has_space" != x; then
46232          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46233$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46234        fi
46235        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46236      fi
46237    fi
46238
46239    # Now join together the path and the arguments once again
46240    if test "x$arguments" != xEOL; then
46241      new_complete="$new_path ${arguments% *}"
46242    else
46243      new_complete="$new_path"
46244    fi
46245
46246    if test "x$complete" != "x$new_complete"; then
46247      BUILD_AR="$new_complete"
46248      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
46249$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
46250    fi
46251  fi
46252
46253
46254
46255  # Publish this variable in the help.
46256
46257
46258  if [ -z "${BUILD_OBJCOPY+x}" ]; then
46259    # The variable is not set by user, try to locate tool using the code snippet
46260    for ac_prog in objcopy
46261do
46262  # Extract the first word of "$ac_prog", so it can be a program name with args.
46263set dummy $ac_prog; ac_word=$2
46264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46265$as_echo_n "checking for $ac_word... " >&6; }
46266if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46267  $as_echo_n "(cached) " >&6
46268else
46269  case $BUILD_OBJCOPY in
46270  [\\/]* | ?:[\\/]*)
46271  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46272  ;;
46273  *)
46274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46275for as_dir in $PATH
46276do
46277  IFS=$as_save_IFS
46278  test -z "$as_dir" && as_dir=.
46279    for ac_exec_ext in '' $ac_executable_extensions; do
46280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46281    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46283    break 2
46284  fi
46285done
46286  done
46287IFS=$as_save_IFS
46288
46289  ;;
46290esac
46291fi
46292BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46293if test -n "$BUILD_OBJCOPY"; then
46294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46295$as_echo "$BUILD_OBJCOPY" >&6; }
46296else
46297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46298$as_echo "no" >&6; }
46299fi
46300
46301
46302  test -n "$BUILD_OBJCOPY" && break
46303done
46304
46305  else
46306    # The variable is set, but is it from the command line or the environment?
46307
46308    # Try to remove the string !BUILD_OBJCOPY! from our list.
46309    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46310    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46311      # If it failed, the variable was not from the command line. Ignore it,
46312      # but warn the user (except for BASH, which is always set by the calling BASH).
46313      if test "xBUILD_OBJCOPY" != xBASH; then
46314        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46315$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46316      fi
46317      # Try to locate tool using the code snippet
46318      for ac_prog in objcopy
46319do
46320  # Extract the first word of "$ac_prog", so it can be a program name with args.
46321set dummy $ac_prog; ac_word=$2
46322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46323$as_echo_n "checking for $ac_word... " >&6; }
46324if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46325  $as_echo_n "(cached) " >&6
46326else
46327  case $BUILD_OBJCOPY in
46328  [\\/]* | ?:[\\/]*)
46329  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46330  ;;
46331  *)
46332  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46333for as_dir in $PATH
46334do
46335  IFS=$as_save_IFS
46336  test -z "$as_dir" && as_dir=.
46337    for ac_exec_ext in '' $ac_executable_extensions; do
46338  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46339    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46340    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46341    break 2
46342  fi
46343done
46344  done
46345IFS=$as_save_IFS
46346
46347  ;;
46348esac
46349fi
46350BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46351if test -n "$BUILD_OBJCOPY"; then
46352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46353$as_echo "$BUILD_OBJCOPY" >&6; }
46354else
46355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46356$as_echo "no" >&6; }
46357fi
46358
46359
46360  test -n "$BUILD_OBJCOPY" && break
46361done
46362
46363    else
46364      # If it succeeded, then it was overridden by the user. We will use it
46365      # for the tool.
46366
46367      # First remove it from the list of overridden variables, so we can test
46368      # for unknown variables in the end.
46369      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46370
46371      # Check if we try to supply an empty value
46372      if test "x$BUILD_OBJCOPY" = x; then
46373        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46374$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46375        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46376$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46377        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46378$as_echo "disabled" >&6; }
46379      else
46380        # Check if the provided tool contains a complete path.
46381        tool_specified="$BUILD_OBJCOPY"
46382        tool_basename="${tool_specified##*/}"
46383        if test "x$tool_basename" = "x$tool_specified"; then
46384          # A command without a complete path is provided, search $PATH.
46385          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46386$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46387          # Extract the first word of "$tool_basename", so it can be a program name with args.
46388set dummy $tool_basename; ac_word=$2
46389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46390$as_echo_n "checking for $ac_word... " >&6; }
46391if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46392  $as_echo_n "(cached) " >&6
46393else
46394  case $BUILD_OBJCOPY in
46395  [\\/]* | ?:[\\/]*)
46396  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46397  ;;
46398  *)
46399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46400for as_dir in $PATH
46401do
46402  IFS=$as_save_IFS
46403  test -z "$as_dir" && as_dir=.
46404    for ac_exec_ext in '' $ac_executable_extensions; do
46405  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46406    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46408    break 2
46409  fi
46410done
46411  done
46412IFS=$as_save_IFS
46413
46414  ;;
46415esac
46416fi
46417BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46418if test -n "$BUILD_OBJCOPY"; then
46419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46420$as_echo "$BUILD_OBJCOPY" >&6; }
46421else
46422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46423$as_echo "no" >&6; }
46424fi
46425
46426
46427          if test "x$BUILD_OBJCOPY" = x; then
46428            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46429          fi
46430        else
46431          # Otherwise we believe it is a complete path. Use it as it is.
46432          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46433$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46434          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46435$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46436          if test ! -x "$tool_specified"; then
46437            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46438$as_echo "not found" >&6; }
46439            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46440          fi
46441          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46442$as_echo "$tool_specified" >&6; }
46443        fi
46444      fi
46445    fi
46446
46447  fi
46448
46449
46450
46451  # Only process if variable expands to non-empty
46452
46453  if test "x$BUILD_OBJCOPY" != x; then
46454    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46455
46456  # First separate the path from the arguments. This will split at the first
46457  # space.
46458  complete="$BUILD_OBJCOPY"
46459  path="${complete%% *}"
46460  tmp="$complete EOL"
46461  arguments="${tmp#* }"
46462
46463  # Input might be given as Windows format, start by converting to
46464  # unix format.
46465  new_path=`$CYGPATH -u "$path"`
46466
46467  # Now try to locate executable using which
46468  new_path=`$WHICH "$new_path" 2> /dev/null`
46469  # bat and cmd files are not always considered executable in cygwin causing which
46470  # to not find them
46471  if test "x$new_path" = x \
46472      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46473      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46474    new_path=`$CYGPATH -u "$path"`
46475  fi
46476  if test "x$new_path" = x; then
46477    # Oops. Which didn't find the executable.
46478    # The splitting of arguments from the executable at a space might have been incorrect,
46479    # since paths with space are more likely in Windows. Give it another try with the whole
46480    # argument.
46481    path="$complete"
46482    arguments="EOL"
46483    new_path=`$CYGPATH -u "$path"`
46484    new_path=`$WHICH "$new_path" 2> /dev/null`
46485    # bat and cmd files are not always considered executable in cygwin causing which
46486    # to not find them
46487    if test "x$new_path" = x \
46488        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46489        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46490      new_path=`$CYGPATH -u "$path"`
46491    fi
46492    if test "x$new_path" = x; then
46493      # It's still not found. Now this is an unrecoverable error.
46494      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46495$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46496      has_space=`$ECHO "$complete" | $GREP " "`
46497      if test "x$has_space" != x; then
46498        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46499$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46500      fi
46501      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46502    fi
46503  fi
46504
46505  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46506  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46507  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46508  # "foo.exe" is OK but "foo" is an error.
46509  #
46510  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46511  # It is also a way to make sure we got the proper file name for the real test later on.
46512  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46513  if test "x$test_shortpath" = x; then
46514    # Short path failed, file does not exist as specified.
46515    # Try adding .exe or .cmd
46516    if test -f "${new_path}.exe"; then
46517      input_to_shortpath="${new_path}.exe"
46518    elif test -f "${new_path}.cmd"; then
46519      input_to_shortpath="${new_path}.cmd"
46520    else
46521      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
46522$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
46523      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46524$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46525      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46526    fi
46527  else
46528    input_to_shortpath="$new_path"
46529  fi
46530
46531  # Call helper function which possibly converts this using DOS-style short mode.
46532  # If so, the updated path is stored in $new_path.
46533  new_path="$input_to_shortpath"
46534
46535  input_path="$input_to_shortpath"
46536  # Check if we need to convert this using DOS-style short mode. If the path
46537  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46538  # take no chances and rewrite it.
46539  # Note: m4 eats our [], so we need to use [ and ] instead.
46540  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46541  if test "x$has_forbidden_chars" != x; then
46542    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46543    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46544    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46545    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46546      # Going to short mode and back again did indeed matter. Since short mode is
46547      # case insensitive, let's make it lowercase to improve readability.
46548      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46549      # Now convert it back to Unix-style (cygpath)
46550      input_path=`$CYGPATH -u "$shortmode_path"`
46551      new_path="$input_path"
46552    fi
46553  fi
46554
46555  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46556  if test "x$test_cygdrive_prefix" = x; then
46557    # As a simple fix, exclude /usr/bin since it's not a real path.
46558    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46559      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46560      # a path prefixed by /cygdrive for fixpath to work.
46561      new_path="$CYGWIN_ROOT_PATH$input_path"
46562    fi
46563  fi
46564
46565  # remove trailing .exe if any
46566  new_path="${new_path/%.exe/}"
46567
46568    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46569
46570  # First separate the path from the arguments. This will split at the first
46571  # space.
46572  complete="$BUILD_OBJCOPY"
46573  path="${complete%% *}"
46574  tmp="$complete EOL"
46575  arguments="${tmp#* }"
46576
46577  # Input might be given as Windows format, start by converting to
46578  # unix format.
46579  new_path="$path"
46580
46581  windows_path="$new_path"
46582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46583    unix_path=`$CYGPATH -u "$windows_path"`
46584    new_path="$unix_path"
46585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46586    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46587    new_path="$unix_path"
46588  fi
46589
46590
46591  # Now try to locate executable using which
46592  new_path=`$WHICH "$new_path" 2> /dev/null`
46593
46594  if test "x$new_path" = x; then
46595    # Oops. Which didn't find the executable.
46596    # The splitting of arguments from the executable at a space might have been incorrect,
46597    # since paths with space are more likely in Windows. Give it another try with the whole
46598    # argument.
46599    path="$complete"
46600    arguments="EOL"
46601    new_path="$path"
46602
46603  windows_path="$new_path"
46604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46605    unix_path=`$CYGPATH -u "$windows_path"`
46606    new_path="$unix_path"
46607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46608    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46609    new_path="$unix_path"
46610  fi
46611
46612
46613    new_path=`$WHICH "$new_path" 2> /dev/null`
46614    # bat and cmd files are not always considered executable in MSYS causing which
46615    # to not find them
46616    if test "x$new_path" = x \
46617        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46618        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46619      new_path="$path"
46620
46621  windows_path="$new_path"
46622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46623    unix_path=`$CYGPATH -u "$windows_path"`
46624    new_path="$unix_path"
46625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46627    new_path="$unix_path"
46628  fi
46629
46630    fi
46631
46632    if test "x$new_path" = x; then
46633      # It's still not found. Now this is an unrecoverable error.
46634      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46635$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46636      has_space=`$ECHO "$complete" | $GREP " "`
46637      if test "x$has_space" != x; then
46638        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46639$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46640      fi
46641      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46642    fi
46643  fi
46644
46645  # Now new_path has a complete unix path to the binary
46646  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46647    # Keep paths in /bin as-is, but remove trailing .exe if any
46648    new_path="${new_path/%.exe/}"
46649    # Do not save /bin paths to all_fixpath_prefixes!
46650  else
46651    # Not in mixed or Windows style, start by that.
46652    new_path=`cmd //c echo $new_path`
46653
46654  input_path="$new_path"
46655  # Check if we need to convert this using DOS-style short mode. If the path
46656  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46657  # take no chances and rewrite it.
46658  # Note: m4 eats our [], so we need to use [ and ] instead.
46659  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46660  if test "x$has_forbidden_chars" != x; then
46661    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46662    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46663  fi
46664
46665    # Output is in $new_path
46666
46667  windows_path="$new_path"
46668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46669    unix_path=`$CYGPATH -u "$windows_path"`
46670    new_path="$unix_path"
46671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46672    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46673    new_path="$unix_path"
46674  fi
46675
46676    # remove trailing .exe if any
46677    new_path="${new_path/%.exe/}"
46678
46679    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46680    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46681  fi
46682
46683    else
46684      # We're on a unix platform. Hooray! :)
46685      # First separate the path from the arguments. This will split at the first
46686      # space.
46687      complete="$BUILD_OBJCOPY"
46688      path="${complete%% *}"
46689      tmp="$complete EOL"
46690      arguments="${tmp#* }"
46691
46692      # Cannot rely on the command "which" here since it doesn't always work.
46693      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46694      if test -z "$is_absolute_path"; then
46695        # Path to executable is not absolute. Find it.
46696        IFS_save="$IFS"
46697        IFS=:
46698        for p in $PATH; do
46699          if test -f "$p/$path" && test -x "$p/$path"; then
46700            new_path="$p/$path"
46701            break
46702          fi
46703        done
46704        IFS="$IFS_save"
46705      else
46706        # This is an absolute path, we can use it without further modifications.
46707        new_path="$path"
46708      fi
46709
46710      if test "x$new_path" = x; then
46711        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46712$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46713        has_space=`$ECHO "$complete" | $GREP " "`
46714        if test "x$has_space" != x; then
46715          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46716$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46717        fi
46718        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46719      fi
46720    fi
46721
46722    # Now join together the path and the arguments once again
46723    if test "x$arguments" != xEOL; then
46724      new_complete="$new_path ${arguments% *}"
46725    else
46726      new_complete="$new_path"
46727    fi
46728
46729    if test "x$complete" != "x$new_complete"; then
46730      BUILD_OBJCOPY="$new_complete"
46731      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
46732$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
46733    fi
46734  fi
46735
46736
46737
46738  # Publish this variable in the help.
46739
46740
46741  if [ -z "${BUILD_STRIP+x}" ]; then
46742    # The variable is not set by user, try to locate tool using the code snippet
46743    for ac_prog in strip
46744do
46745  # Extract the first word of "$ac_prog", so it can be a program name with args.
46746set dummy $ac_prog; ac_word=$2
46747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46748$as_echo_n "checking for $ac_word... " >&6; }
46749if ${ac_cv_path_BUILD_STRIP+:} false; then :
46750  $as_echo_n "(cached) " >&6
46751else
46752  case $BUILD_STRIP in
46753  [\\/]* | ?:[\\/]*)
46754  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46755  ;;
46756  *)
46757  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46758for as_dir in $PATH
46759do
46760  IFS=$as_save_IFS
46761  test -z "$as_dir" && as_dir=.
46762    for ac_exec_ext in '' $ac_executable_extensions; do
46763  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46764    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46765    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46766    break 2
46767  fi
46768done
46769  done
46770IFS=$as_save_IFS
46771
46772  ;;
46773esac
46774fi
46775BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46776if test -n "$BUILD_STRIP"; then
46777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46778$as_echo "$BUILD_STRIP" >&6; }
46779else
46780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46781$as_echo "no" >&6; }
46782fi
46783
46784
46785  test -n "$BUILD_STRIP" && break
46786done
46787
46788  else
46789    # The variable is set, but is it from the command line or the environment?
46790
46791    # Try to remove the string !BUILD_STRIP! from our list.
46792    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46793    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46794      # If it failed, the variable was not from the command line. Ignore it,
46795      # but warn the user (except for BASH, which is always set by the calling BASH).
46796      if test "xBUILD_STRIP" != xBASH; then
46797        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46798$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46799      fi
46800      # Try to locate tool using the code snippet
46801      for ac_prog in strip
46802do
46803  # Extract the first word of "$ac_prog", so it can be a program name with args.
46804set dummy $ac_prog; ac_word=$2
46805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46806$as_echo_n "checking for $ac_word... " >&6; }
46807if ${ac_cv_path_BUILD_STRIP+:} false; then :
46808  $as_echo_n "(cached) " >&6
46809else
46810  case $BUILD_STRIP in
46811  [\\/]* | ?:[\\/]*)
46812  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46813  ;;
46814  *)
46815  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46816for as_dir in $PATH
46817do
46818  IFS=$as_save_IFS
46819  test -z "$as_dir" && as_dir=.
46820    for ac_exec_ext in '' $ac_executable_extensions; do
46821  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46822    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46823    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46824    break 2
46825  fi
46826done
46827  done
46828IFS=$as_save_IFS
46829
46830  ;;
46831esac
46832fi
46833BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46834if test -n "$BUILD_STRIP"; then
46835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46836$as_echo "$BUILD_STRIP" >&6; }
46837else
46838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46839$as_echo "no" >&6; }
46840fi
46841
46842
46843  test -n "$BUILD_STRIP" && break
46844done
46845
46846    else
46847      # If it succeeded, then it was overridden by the user. We will use it
46848      # for the tool.
46849
46850      # First remove it from the list of overridden variables, so we can test
46851      # for unknown variables in the end.
46852      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46853
46854      # Check if we try to supply an empty value
46855      if test "x$BUILD_STRIP" = x; then
46856        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46857$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46858        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46859$as_echo_n "checking for BUILD_STRIP... " >&6; }
46860        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46861$as_echo "disabled" >&6; }
46862      else
46863        # Check if the provided tool contains a complete path.
46864        tool_specified="$BUILD_STRIP"
46865        tool_basename="${tool_specified##*/}"
46866        if test "x$tool_basename" = "x$tool_specified"; then
46867          # A command without a complete path is provided, search $PATH.
46868          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46869$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46870          # Extract the first word of "$tool_basename", so it can be a program name with args.
46871set dummy $tool_basename; ac_word=$2
46872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46873$as_echo_n "checking for $ac_word... " >&6; }
46874if ${ac_cv_path_BUILD_STRIP+:} false; then :
46875  $as_echo_n "(cached) " >&6
46876else
46877  case $BUILD_STRIP in
46878  [\\/]* | ?:[\\/]*)
46879  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46880  ;;
46881  *)
46882  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46883for as_dir in $PATH
46884do
46885  IFS=$as_save_IFS
46886  test -z "$as_dir" && as_dir=.
46887    for ac_exec_ext in '' $ac_executable_extensions; do
46888  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46889    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46890    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46891    break 2
46892  fi
46893done
46894  done
46895IFS=$as_save_IFS
46896
46897  ;;
46898esac
46899fi
46900BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46901if test -n "$BUILD_STRIP"; then
46902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46903$as_echo "$BUILD_STRIP" >&6; }
46904else
46905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46906$as_echo "no" >&6; }
46907fi
46908
46909
46910          if test "x$BUILD_STRIP" = x; then
46911            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46912          fi
46913        else
46914          # Otherwise we believe it is a complete path. Use it as it is.
46915          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46916$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46917          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46918$as_echo_n "checking for BUILD_STRIP... " >&6; }
46919          if test ! -x "$tool_specified"; then
46920            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46921$as_echo "not found" >&6; }
46922            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46923          fi
46924          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46925$as_echo "$tool_specified" >&6; }
46926        fi
46927      fi
46928    fi
46929
46930  fi
46931
46932
46933
46934  # Only process if variable expands to non-empty
46935
46936  if test "x$BUILD_STRIP" != x; then
46937    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46938
46939  # First separate the path from the arguments. This will split at the first
46940  # space.
46941  complete="$BUILD_STRIP"
46942  path="${complete%% *}"
46943  tmp="$complete EOL"
46944  arguments="${tmp#* }"
46945
46946  # Input might be given as Windows format, start by converting to
46947  # unix format.
46948  new_path=`$CYGPATH -u "$path"`
46949
46950  # Now try to locate executable using which
46951  new_path=`$WHICH "$new_path" 2> /dev/null`
46952  # bat and cmd files are not always considered executable in cygwin causing which
46953  # to not find them
46954  if test "x$new_path" = x \
46955      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46956      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46957    new_path=`$CYGPATH -u "$path"`
46958  fi
46959  if test "x$new_path" = x; then
46960    # Oops. Which didn't find the executable.
46961    # The splitting of arguments from the executable at a space might have been incorrect,
46962    # since paths with space are more likely in Windows. Give it another try with the whole
46963    # argument.
46964    path="$complete"
46965    arguments="EOL"
46966    new_path=`$CYGPATH -u "$path"`
46967    new_path=`$WHICH "$new_path" 2> /dev/null`
46968    # bat and cmd files are not always considered executable in cygwin causing which
46969    # to not find them
46970    if test "x$new_path" = x \
46971        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46972        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46973      new_path=`$CYGPATH -u "$path"`
46974    fi
46975    if test "x$new_path" = x; then
46976      # It's still not found. Now this is an unrecoverable error.
46977      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46978$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46979      has_space=`$ECHO "$complete" | $GREP " "`
46980      if test "x$has_space" != x; then
46981        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46982$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46983      fi
46984      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46985    fi
46986  fi
46987
46988  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46989  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46990  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46991  # "foo.exe" is OK but "foo" is an error.
46992  #
46993  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46994  # It is also a way to make sure we got the proper file name for the real test later on.
46995  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46996  if test "x$test_shortpath" = x; then
46997    # Short path failed, file does not exist as specified.
46998    # Try adding .exe or .cmd
46999    if test -f "${new_path}.exe"; then
47000      input_to_shortpath="${new_path}.exe"
47001    elif test -f "${new_path}.cmd"; then
47002      input_to_shortpath="${new_path}.cmd"
47003    else
47004      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
47005$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
47006      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47007$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47008      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47009    fi
47010  else
47011    input_to_shortpath="$new_path"
47012  fi
47013
47014  # Call helper function which possibly converts this using DOS-style short mode.
47015  # If so, the updated path is stored in $new_path.
47016  new_path="$input_to_shortpath"
47017
47018  input_path="$input_to_shortpath"
47019  # Check if we need to convert this using DOS-style short mode. If the path
47020  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47021  # take no chances and rewrite it.
47022  # Note: m4 eats our [], so we need to use [ and ] instead.
47023  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47024  if test "x$has_forbidden_chars" != x; then
47025    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47026    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47027    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47028    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47029      # Going to short mode and back again did indeed matter. Since short mode is
47030      # case insensitive, let's make it lowercase to improve readability.
47031      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47032      # Now convert it back to Unix-style (cygpath)
47033      input_path=`$CYGPATH -u "$shortmode_path"`
47034      new_path="$input_path"
47035    fi
47036  fi
47037
47038  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47039  if test "x$test_cygdrive_prefix" = x; then
47040    # As a simple fix, exclude /usr/bin since it's not a real path.
47041    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47042      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47043      # a path prefixed by /cygdrive for fixpath to work.
47044      new_path="$CYGWIN_ROOT_PATH$input_path"
47045    fi
47046  fi
47047
47048  # remove trailing .exe if any
47049  new_path="${new_path/%.exe/}"
47050
47051    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47052
47053  # First separate the path from the arguments. This will split at the first
47054  # space.
47055  complete="$BUILD_STRIP"
47056  path="${complete%% *}"
47057  tmp="$complete EOL"
47058  arguments="${tmp#* }"
47059
47060  # Input might be given as Windows format, start by converting to
47061  # unix format.
47062  new_path="$path"
47063
47064  windows_path="$new_path"
47065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47066    unix_path=`$CYGPATH -u "$windows_path"`
47067    new_path="$unix_path"
47068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47069    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47070    new_path="$unix_path"
47071  fi
47072
47073
47074  # Now try to locate executable using which
47075  new_path=`$WHICH "$new_path" 2> /dev/null`
47076
47077  if test "x$new_path" = x; then
47078    # Oops. Which didn't find the executable.
47079    # The splitting of arguments from the executable at a space might have been incorrect,
47080    # since paths with space are more likely in Windows. Give it another try with the whole
47081    # argument.
47082    path="$complete"
47083    arguments="EOL"
47084    new_path="$path"
47085
47086  windows_path="$new_path"
47087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47088    unix_path=`$CYGPATH -u "$windows_path"`
47089    new_path="$unix_path"
47090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47091    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47092    new_path="$unix_path"
47093  fi
47094
47095
47096    new_path=`$WHICH "$new_path" 2> /dev/null`
47097    # bat and cmd files are not always considered executable in MSYS causing which
47098    # to not find them
47099    if test "x$new_path" = x \
47100        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47101        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47102      new_path="$path"
47103
47104  windows_path="$new_path"
47105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47106    unix_path=`$CYGPATH -u "$windows_path"`
47107    new_path="$unix_path"
47108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47109    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47110    new_path="$unix_path"
47111  fi
47112
47113    fi
47114
47115    if test "x$new_path" = x; then
47116      # It's still not found. Now this is an unrecoverable error.
47117      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47118$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47119      has_space=`$ECHO "$complete" | $GREP " "`
47120      if test "x$has_space" != x; then
47121        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47122$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47123      fi
47124      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47125    fi
47126  fi
47127
47128  # Now new_path has a complete unix path to the binary
47129  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47130    # Keep paths in /bin as-is, but remove trailing .exe if any
47131    new_path="${new_path/%.exe/}"
47132    # Do not save /bin paths to all_fixpath_prefixes!
47133  else
47134    # Not in mixed or Windows style, start by that.
47135    new_path=`cmd //c echo $new_path`
47136
47137  input_path="$new_path"
47138  # Check if we need to convert this using DOS-style short mode. If the path
47139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47140  # take no chances and rewrite it.
47141  # Note: m4 eats our [], so we need to use [ and ] instead.
47142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47143  if test "x$has_forbidden_chars" != x; then
47144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47145    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47146  fi
47147
47148    # Output is in $new_path
47149
47150  windows_path="$new_path"
47151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47152    unix_path=`$CYGPATH -u "$windows_path"`
47153    new_path="$unix_path"
47154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47156    new_path="$unix_path"
47157  fi
47158
47159    # remove trailing .exe if any
47160    new_path="${new_path/%.exe/}"
47161
47162    # Save the first 10 bytes of this path to the storage, so fixpath can work.
47163    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47164  fi
47165
47166    else
47167      # We're on a unix platform. Hooray! :)
47168      # First separate the path from the arguments. This will split at the first
47169      # space.
47170      complete="$BUILD_STRIP"
47171      path="${complete%% *}"
47172      tmp="$complete EOL"
47173      arguments="${tmp#* }"
47174
47175      # Cannot rely on the command "which" here since it doesn't always work.
47176      is_absolute_path=`$ECHO "$path" | $GREP ^/`
47177      if test -z "$is_absolute_path"; then
47178        # Path to executable is not absolute. Find it.
47179        IFS_save="$IFS"
47180        IFS=:
47181        for p in $PATH; do
47182          if test -f "$p/$path" && test -x "$p/$path"; then
47183            new_path="$p/$path"
47184            break
47185          fi
47186        done
47187        IFS="$IFS_save"
47188      else
47189        # This is an absolute path, we can use it without further modifications.
47190        new_path="$path"
47191      fi
47192
47193      if test "x$new_path" = x; then
47194        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47195$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47196        has_space=`$ECHO "$complete" | $GREP " "`
47197        if test "x$has_space" != x; then
47198          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47199$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47200        fi
47201        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47202      fi
47203    fi
47204
47205    # Now join together the path and the arguments once again
47206    if test "x$arguments" != xEOL; then
47207      new_complete="$new_path ${arguments% *}"
47208    else
47209      new_complete="$new_path"
47210    fi
47211
47212    if test "x$complete" != "x$new_complete"; then
47213      BUILD_STRIP="$new_complete"
47214      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
47215$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
47216    fi
47217  fi
47218
47219    # Assume the C compiler is the assembler
47220    BUILD_AS="$BUILD_CC -c"
47221    # Just like for the target compiler, use the compiler as linker
47222    BUILD_LD="$BUILD_CC"
47223    BUILD_LDCXX="$BUILD_CXX"
47224
47225    PATH="$OLDPATH"
47226
47227
47228  COMPILER=$BUILD_CC
47229  COMPILER_NAME=BuildC
47230
47231  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47232    # cc -V output typically looks like
47233    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47234    # or
47235    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47236    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47237    # Check that this is likely to be the Solaris Studio cc.
47238    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47239    if test $? -ne 0; then
47240      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47241      { $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
47242$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47243      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47244$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47245      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47246$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47247      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47248    fi
47249    # Remove usage instructions (if present), and
47250    # collapse compiler output into a single line
47251    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47252        $SED -e 's/ *[Uu]sage:.*//'`
47253    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47254        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47255  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47256    # xlc -qversion output typically looks like
47257    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47258    #     Version: 11.01.0000.0015
47259    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47260    # Check that this is likely to be the IBM XL C compiler.
47261    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47262    if test $? -ne 0; then
47263      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47264      { $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
47265$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47266      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47267$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47268      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47269$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47270      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47271    fi
47272    # Collapse compiler output into a single line
47273    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47274    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47275        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47276  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47277    # There is no specific version flag, but all output starts with a version string.
47278    # First line typically looks something like:
47279    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47280    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47281    # Check that this is likely to be Microsoft CL.EXE.
47282    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47283    if test $? -ne 0; then
47284      { $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
47285$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47286      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47287$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47288      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47289    fi
47290    # Collapse compiler output into a single line
47291    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47292    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47293        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47294  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47295    # gcc --version output typically looks like
47296    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47297    #     Copyright (C) 2013 Free Software Foundation, Inc.
47298    #     This is free software; see the source for copying conditions.  There is NO
47299    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47300    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47301    # Check that this is likely to be GCC.
47302    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47303    if test $? -ne 0; then
47304      { $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
47305$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47306      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47307$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47308      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47309    fi
47310    # Remove Copyright and legalese from version string, and
47311    # collapse into a single line
47312    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47313        $SED -e 's/ *Copyright .*//'`
47314    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47315        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47316  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47317    # clang --version output typically looks like
47318    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47319    #    clang version 3.3 (tags/RELEASE_33/final)
47320    # or
47321    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47322    #    Target: x86_64-pc-linux-gnu
47323    #    Thread model: posix
47324    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47325    # Check that this is likely to be clang
47326    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47327    if test $? -ne 0; then
47328      { $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
47329$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47330      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47331$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47332      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47333    fi
47334    # Collapse compiler output into a single line
47335    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47336    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47337        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47338  else
47339      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47340  fi
47341  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47342  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47343  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47344  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47345
47346  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47347$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47348
47349
47350  COMPILER=$BUILD_CXX
47351  COMPILER_NAME=BuildC++
47352
47353  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47354    # cc -V output typically looks like
47355    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47356    # or
47357    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47358    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47359    # Check that this is likely to be the Solaris Studio cc.
47360    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47361    if test $? -ne 0; then
47362      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47363      { $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
47364$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47365      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47366$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47367      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47368$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47369      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47370    fi
47371    # Remove usage instructions (if present), and
47372    # collapse compiler output into a single line
47373    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47374        $SED -e 's/ *[Uu]sage:.*//'`
47375    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47376        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47377  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47378    # xlc -qversion output typically looks like
47379    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47380    #     Version: 11.01.0000.0015
47381    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47382    # Check that this is likely to be the IBM XL C compiler.
47383    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47384    if test $? -ne 0; then
47385      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47386      { $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
47387$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47388      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47389$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47390      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47391$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47392      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47393    fi
47394    # Collapse compiler output into a single line
47395    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47396    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47397        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47398  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47399    # There is no specific version flag, but all output starts with a version string.
47400    # First line typically looks something like:
47401    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47402    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47403    # Check that this is likely to be Microsoft CL.EXE.
47404    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47405    if test $? -ne 0; then
47406      { $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
47407$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47408      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47409$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47410      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47411    fi
47412    # Collapse compiler output into a single line
47413    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47414    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47415        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47416  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47417    # gcc --version output typically looks like
47418    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47419    #     Copyright (C) 2013 Free Software Foundation, Inc.
47420    #     This is free software; see the source for copying conditions.  There is NO
47421    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47422    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47423    # Check that this is likely to be GCC.
47424    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47425    if test $? -ne 0; then
47426      { $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
47427$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47428      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47429$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47430      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47431    fi
47432    # Remove Copyright and legalese from version string, and
47433    # collapse into a single line
47434    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47435        $SED -e 's/ *Copyright .*//'`
47436    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47437        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47438  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47439    # clang --version output typically looks like
47440    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47441    #    clang version 3.3 (tags/RELEASE_33/final)
47442    # or
47443    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47444    #    Target: x86_64-pc-linux-gnu
47445    #    Thread model: posix
47446    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47447    # Check that this is likely to be clang
47448    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47449    if test $? -ne 0; then
47450      { $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
47451$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47452      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47453$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47454      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47455    fi
47456    # Collapse compiler output into a single line
47457    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47458    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47459        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47460  else
47461      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47462  fi
47463  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47464  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47465  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47466  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47467
47468  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47469$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47470
47471
47472  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47473    { $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
47474$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47475    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47476$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47477  fi
47478
47479  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47480  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47481    { $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
47482$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;}
47483  fi
47484
47485  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47486    { $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
47487$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47488  fi
47489
47490  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47491
47492  else
47493    # If we are not cross compiling, use the normal target compilers for
47494    # building the build platform executables.
47495    BUILD_CC="$CC"
47496    BUILD_CXX="$CXX"
47497    BUILD_LD="$LD"
47498    BUILD_LDCXX="$LDCXX"
47499    BUILD_NM="$NM"
47500    BUILD_AS="$AS"
47501    BUILD_OBJCOPY="$OBJCOPY"
47502    BUILD_STRIP="$STRIP"
47503    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47504    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47505    BUILD_AR="$AR"
47506
47507
47508  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
47509    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
47510$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
47511    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47512$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47513  fi
47514
47515  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47516  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47517    { $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
47518$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;}
47519  fi
47520
47521  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47522    { $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
47523$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47524  fi
47525
47526  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
47527
47528  fi
47529
47530
47531
47532
47533
47534
47535
47536
47537
47538
47539
47540
47541
47542
47543  # The package path is used only on macosx?
47544  # FIXME: clean this up, and/or move it elsewhere.
47545  PACKAGE_PATH=/opt/local
47546
47547
47548  # Check for extra potential brokenness.
47549  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47550    # On Windows, double-check that we got the right compiler.
47551    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47552    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
47553    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
47554      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
47555        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
47556      fi
47557    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
47558      if test "x$COMPILER_CPU_TEST" != "xx64"; then
47559        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
47560      fi
47561    fi
47562  fi
47563
47564  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47565    # If this is a --hash-style=gnu system, use --hash-style=both, why?
47566    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
47567    # This is later checked when setting flags.
47568
47569    # "-Og" suppported for GCC 4.8 and later
47570    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
47571
47572
47573
47574
47575
47576
47577
47578
47579
47580
47581
47582
47583
47584
47585
47586
47587
47588
47589
47590
47591
47592
47593
47594
47595
47596
47597
47598
47599
47600
47601
47602
47603
47604
47605
47606
47607
47608
47609
47610
47611
47612
47613
47614
47615
47616
47617
47618    # Execute function body
47619
47620
47621
47622
47623
47624
47625
47626
47627
47628
47629
47630
47631
47632
47633
47634
47635
47636
47637
47638
47639
47640
47641
47642
47643
47644
47645
47646
47647
47648
47649
47650
47651
47652
47653
47654
47655
47656
47657
47658
47659
47660
47661
47662
47663
47664
47665
47666
47667    # Execute function body
47668
47669  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47670$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47671  supports=yes
47672
47673  saved_cflags="$CFLAGS"
47674  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
47675  ac_ext=c
47676ac_cpp='$CPP $CPPFLAGS'
47677ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47678ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47679ac_compiler_gnu=$ac_cv_c_compiler_gnu
47680
47681  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47682/* end confdefs.h.  */
47683int i;
47684_ACEOF
47685if ac_fn_c_try_compile "$LINENO"; then :
47686
47687else
47688  supports=no
47689fi
47690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47691  ac_ext=cpp
47692ac_cpp='$CXXCPP $CPPFLAGS'
47693ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47694ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47695ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47696
47697  CFLAGS="$saved_cflags"
47698
47699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47700$as_echo "$supports" >&6; }
47701  if test "x$supports" = "xyes" ; then
47702    :
47703    C_COMP_SUPPORTS="yes"
47704  else
47705    :
47706    C_COMP_SUPPORTS="no"
47707  fi
47708
47709
47710
47711
47712
47713
47714
47715
47716
47717
47718
47719
47720
47721
47722
47723
47724
47725
47726
47727
47728
47729
47730
47731
47732
47733
47734
47735
47736
47737
47738
47739
47740
47741
47742
47743
47744
47745
47746
47747
47748
47749
47750
47751
47752
47753
47754
47755
47756
47757
47758
47759
47760
47761
47762
47763
47764
47765
47766
47767    # Execute function body
47768
47769  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47770$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47771  supports=yes
47772
47773  saved_cxxflags="$CXXFLAGS"
47774  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
47775  ac_ext=cpp
47776ac_cpp='$CXXCPP $CPPFLAGS'
47777ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47778ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47779ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47780
47781  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47782/* end confdefs.h.  */
47783int i;
47784_ACEOF
47785if ac_fn_cxx_try_compile "$LINENO"; then :
47786
47787else
47788  supports=no
47789fi
47790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47791  ac_ext=cpp
47792ac_cpp='$CXXCPP $CPPFLAGS'
47793ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47794ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47795ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47796
47797  CXXFLAGS="$saved_cxxflags"
47798
47799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47800$as_echo "$supports" >&6; }
47801  if test "x$supports" = "xyes" ; then
47802    :
47803    CXX_COMP_SUPPORTS="yes"
47804  else
47805    :
47806    CXX_COMP_SUPPORTS="no"
47807  fi
47808
47809
47810
47811
47812
47813
47814
47815
47816
47817
47818
47819
47820
47821  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47822$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47823  supports=no
47824  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
47825
47826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47827$as_echo "$supports" >&6; }
47828  if test "x$supports" = "xyes" ; then
47829    :
47830    HAS_CFLAG_OPTIMIZE_DEBUG=true
47831  else
47832    :
47833    HAS_CFLAG_OPTIMIZE_DEBUG=false
47834  fi
47835
47836
47837
47838
47839
47840
47841
47842    # "-z relro" supported in GNU binutils 2.17 and later
47843    LINKER_RELRO_FLAG="-Wl,-z,relro"
47844
47845
47846
47847
47848
47849
47850
47851
47852
47853
47854
47855
47856
47857
47858
47859
47860
47861
47862
47863
47864
47865
47866
47867
47868
47869
47870
47871
47872
47873
47874
47875
47876
47877
47878
47879
47880
47881
47882
47883
47884
47885
47886
47887
47888
47889
47890
47891    # Execute function body
47892
47893  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
47894$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
47895  supports=yes
47896
47897  saved_ldflags="$LDFLAGS"
47898  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
47899  ac_ext=c
47900ac_cpp='$CPP $CPPFLAGS'
47901ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47902ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47903ac_compiler_gnu=$ac_cv_c_compiler_gnu
47904
47905  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47906/* end confdefs.h.  */
47907
47908int
47909main ()
47910{
47911
47912  ;
47913  return 0;
47914}
47915_ACEOF
47916if ac_fn_c_try_link "$LINENO"; then :
47917
47918else
47919  supports=no
47920fi
47921rm -f core conftest.err conftest.$ac_objext \
47922    conftest$ac_exeext conftest.$ac_ext
47923  ac_ext=cpp
47924ac_cpp='$CXXCPP $CPPFLAGS'
47925ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47926ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47927ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47928
47929  LDFLAGS="$saved_ldflags"
47930
47931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47932$as_echo "$supports" >&6; }
47933  if test "x$supports" = "xyes" ; then
47934    :
47935    HAS_LINKER_RELRO=true
47936  else
47937    :
47938    HAS_LINKER_RELRO=false
47939  fi
47940
47941
47942
47943
47944
47945
47946
47947
47948
47949
47950
47951
47952
47953    # "-z now" supported in GNU binutils 2.11 and later
47954    LINKER_NOW_FLAG="-Wl,-z,now"
47955
47956
47957
47958
47959
47960
47961
47962
47963
47964
47965
47966
47967
47968
47969
47970
47971
47972
47973
47974
47975
47976
47977
47978
47979
47980
47981
47982
47983
47984
47985
47986
47987
47988
47989
47990
47991
47992
47993
47994
47995
47996
47997
47998
47999
48000
48001
48002    # Execute function body
48003
48004  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
48005$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
48006  supports=yes
48007
48008  saved_ldflags="$LDFLAGS"
48009  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
48010  ac_ext=c
48011ac_cpp='$CPP $CPPFLAGS'
48012ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48013ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48014ac_compiler_gnu=$ac_cv_c_compiler_gnu
48015
48016  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48017/* end confdefs.h.  */
48018
48019int
48020main ()
48021{
48022
48023  ;
48024  return 0;
48025}
48026_ACEOF
48027if ac_fn_c_try_link "$LINENO"; then :
48028
48029else
48030  supports=no
48031fi
48032rm -f core conftest.err conftest.$ac_objext \
48033    conftest$ac_exeext conftest.$ac_ext
48034  ac_ext=cpp
48035ac_cpp='$CXXCPP $CPPFLAGS'
48036ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48037ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48038ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48039
48040  LDFLAGS="$saved_ldflags"
48041
48042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48043$as_echo "$supports" >&6; }
48044  if test "x$supports" = "xyes" ; then
48045    :
48046    HAS_LINKER_NOW=true
48047  else
48048    :
48049    HAS_LINKER_NOW=false
48050  fi
48051
48052
48053
48054
48055
48056
48057
48058
48059
48060
48061
48062
48063  fi
48064
48065  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
48066  # in executable.'
48067  USING_BROKEN_SUSE_LD=no
48068  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
48069    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
48070$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
48071    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
48072    $ECHO "int main() { }" > main.c
48073    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
48074      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48075$as_echo "no" >&6; }
48076      USING_BROKEN_SUSE_LD=no
48077    else
48078      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48079$as_echo "yes" >&6; }
48080      USING_BROKEN_SUSE_LD=yes
48081    fi
48082    $RM version-script.map main.c a.out
48083  fi
48084
48085
48086  # Setup hotspot lecagy names for toolchains
48087  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
48088  if test "x$TOOLCHAIN_TYPE" = xclang; then
48089    HOTSPOT_TOOLCHAIN_TYPE=gcc
48090  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48091    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
48092  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48093    HOTSPOT_TOOLCHAIN_TYPE=visCPP
48094  fi
48095
48096
48097
48098# Setup the JTReg Regression Test Harness.
48099
48100
48101# Check whether --with-jtreg was given.
48102if test "${with_jtreg+set}" = set; then :
48103  withval=$with_jtreg;
48104else
48105  with_jtreg=no
48106fi
48107
48108
48109  if test "x$with_jtreg" = xno; then
48110    # jtreg disabled
48111    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
48112$as_echo_n "checking for jtreg... " >&6; }
48113    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48114$as_echo "no" >&6; }
48115  else
48116    if test "x$with_jtreg" != xyes; then
48117      # with path specified.
48118      JT_HOME="$with_jtreg"
48119    fi
48120
48121    if test "x$JT_HOME" != x; then
48122      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
48123$as_echo_n "checking for jtreg... " >&6; }
48124
48125      # use JT_HOME enviroment var.
48126
48127  # Only process if variable expands to non-empty
48128
48129  if test "x$JT_HOME" != x; then
48130    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48131
48132  # Input might be given as Windows format, start by converting to
48133  # unix format.
48134  path="$JT_HOME"
48135  new_path=`$CYGPATH -u "$path"`
48136
48137  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48138  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48139  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48140  # "foo.exe" is OK but "foo" is an error.
48141  #
48142  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48143  # It is also a way to make sure we got the proper file name for the real test later on.
48144  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48145  if test "x$test_shortpath" = x; then
48146    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48147$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48148    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
48149  fi
48150
48151  # Call helper function which possibly converts this using DOS-style short mode.
48152  # If so, the updated path is stored in $new_path.
48153
48154  input_path="$new_path"
48155  # Check if we need to convert this using DOS-style short mode. If the path
48156  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48157  # take no chances and rewrite it.
48158  # Note: m4 eats our [], so we need to use [ and ] instead.
48159  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48160  if test "x$has_forbidden_chars" != x; then
48161    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48162    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48163    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48164    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48165      # Going to short mode and back again did indeed matter. Since short mode is
48166      # case insensitive, let's make it lowercase to improve readability.
48167      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48168      # Now convert it back to Unix-style (cygpath)
48169      input_path=`$CYGPATH -u "$shortmode_path"`
48170      new_path="$input_path"
48171    fi
48172  fi
48173
48174  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48175  if test "x$test_cygdrive_prefix" = x; then
48176    # As a simple fix, exclude /usr/bin since it's not a real path.
48177    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48178      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48179      # a path prefixed by /cygdrive for fixpath to work.
48180      new_path="$CYGWIN_ROOT_PATH$input_path"
48181    fi
48182  fi
48183
48184
48185  if test "x$path" != "x$new_path"; then
48186    JT_HOME="$new_path"
48187    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48188$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48189  fi
48190
48191    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48192
48193  path="$JT_HOME"
48194  has_colon=`$ECHO $path | $GREP ^.:`
48195  new_path="$path"
48196  if test "x$has_colon" = x; then
48197    # Not in mixed or Windows style, start by that.
48198    new_path=`cmd //c echo $path`
48199  fi
48200
48201
48202  input_path="$new_path"
48203  # Check if we need to convert this using DOS-style short mode. If the path
48204  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48205  # take no chances and rewrite it.
48206  # Note: m4 eats our [], so we need to use [ and ] instead.
48207  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48208  if test "x$has_forbidden_chars" != x; then
48209    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48210    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48211  fi
48212
48213
48214  windows_path="$new_path"
48215  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48216    unix_path=`$CYGPATH -u "$windows_path"`
48217    new_path="$unix_path"
48218  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48219    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48220    new_path="$unix_path"
48221  fi
48222
48223  if test "x$path" != "x$new_path"; then
48224    JT_HOME="$new_path"
48225    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48226$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48227  fi
48228
48229  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48230  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48231
48232    else
48233      # We're on a unix platform. Hooray! :)
48234      path="$JT_HOME"
48235      has_space=`$ECHO "$path" | $GREP " "`
48236      if test "x$has_space" != x; then
48237        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48238$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48239        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48240      fi
48241
48242      # Use eval to expand a potential ~
48243      eval path="$path"
48244      if test ! -f "$path" && test ! -d "$path"; then
48245        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
48246      fi
48247
48248      if test -d "$path"; then
48249        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
48250      else
48251        dir="`$DIRNAME "$path"`"
48252        base="`$BASENAME "$path"`"
48253        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
48254      fi
48255    fi
48256  fi
48257
48258
48259      # jtreg win32 script works for everybody
48260      JTREGEXE="$JT_HOME/bin/jtreg"
48261
48262      if test ! -f "$JTREGEXE"; then
48263        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
48264      fi
48265
48266      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48267$as_echo "$JTREGEXE" >&6; }
48268    else
48269      # try to find jtreg on path
48270
48271
48272
48273  # Publish this variable in the help.
48274
48275
48276  if [ -z "${JTREGEXE+x}" ]; then
48277    # The variable is not set by user, try to locate tool using the code snippet
48278    for ac_prog in jtreg
48279do
48280  # Extract the first word of "$ac_prog", so it can be a program name with args.
48281set dummy $ac_prog; ac_word=$2
48282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48283$as_echo_n "checking for $ac_word... " >&6; }
48284if ${ac_cv_path_JTREGEXE+:} false; then :
48285  $as_echo_n "(cached) " >&6
48286else
48287  case $JTREGEXE in
48288  [\\/]* | ?:[\\/]*)
48289  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48290  ;;
48291  *)
48292  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48293for as_dir in $PATH
48294do
48295  IFS=$as_save_IFS
48296  test -z "$as_dir" && as_dir=.
48297    for ac_exec_ext in '' $ac_executable_extensions; do
48298  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48299    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48300    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48301    break 2
48302  fi
48303done
48304  done
48305IFS=$as_save_IFS
48306
48307  ;;
48308esac
48309fi
48310JTREGEXE=$ac_cv_path_JTREGEXE
48311if test -n "$JTREGEXE"; then
48312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48313$as_echo "$JTREGEXE" >&6; }
48314else
48315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48316$as_echo "no" >&6; }
48317fi
48318
48319
48320  test -n "$JTREGEXE" && break
48321done
48322
48323  else
48324    # The variable is set, but is it from the command line or the environment?
48325
48326    # Try to remove the string !JTREGEXE! from our list.
48327    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48328    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48329      # If it failed, the variable was not from the command line. Ignore it,
48330      # but warn the user (except for BASH, which is always set by the calling BASH).
48331      if test "xJTREGEXE" != xBASH; then
48332        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48333$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48334      fi
48335      # Try to locate tool using the code snippet
48336      for ac_prog in jtreg
48337do
48338  # Extract the first word of "$ac_prog", so it can be a program name with args.
48339set dummy $ac_prog; ac_word=$2
48340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48341$as_echo_n "checking for $ac_word... " >&6; }
48342if ${ac_cv_path_JTREGEXE+:} false; then :
48343  $as_echo_n "(cached) " >&6
48344else
48345  case $JTREGEXE in
48346  [\\/]* | ?:[\\/]*)
48347  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48348  ;;
48349  *)
48350  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48351for as_dir in $PATH
48352do
48353  IFS=$as_save_IFS
48354  test -z "$as_dir" && as_dir=.
48355    for ac_exec_ext in '' $ac_executable_extensions; do
48356  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48357    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48358    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48359    break 2
48360  fi
48361done
48362  done
48363IFS=$as_save_IFS
48364
48365  ;;
48366esac
48367fi
48368JTREGEXE=$ac_cv_path_JTREGEXE
48369if test -n "$JTREGEXE"; then
48370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48371$as_echo "$JTREGEXE" >&6; }
48372else
48373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48374$as_echo "no" >&6; }
48375fi
48376
48377
48378  test -n "$JTREGEXE" && break
48379done
48380
48381    else
48382      # If it succeeded, then it was overridden by the user. We will use it
48383      # for the tool.
48384
48385      # First remove it from the list of overridden variables, so we can test
48386      # for unknown variables in the end.
48387      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48388
48389      # Check if we try to supply an empty value
48390      if test "x$JTREGEXE" = x; then
48391        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48392$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48393        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48394$as_echo_n "checking for JTREGEXE... " >&6; }
48395        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48396$as_echo "disabled" >&6; }
48397      else
48398        # Check if the provided tool contains a complete path.
48399        tool_specified="$JTREGEXE"
48400        tool_basename="${tool_specified##*/}"
48401        if test "x$tool_basename" = "x$tool_specified"; then
48402          # A command without a complete path is provided, search $PATH.
48403          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48404$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48405          # Extract the first word of "$tool_basename", so it can be a program name with args.
48406set dummy $tool_basename; ac_word=$2
48407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48408$as_echo_n "checking for $ac_word... " >&6; }
48409if ${ac_cv_path_JTREGEXE+:} false; then :
48410  $as_echo_n "(cached) " >&6
48411else
48412  case $JTREGEXE in
48413  [\\/]* | ?:[\\/]*)
48414  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48415  ;;
48416  *)
48417  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48418for as_dir in $PATH
48419do
48420  IFS=$as_save_IFS
48421  test -z "$as_dir" && as_dir=.
48422    for ac_exec_ext in '' $ac_executable_extensions; do
48423  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48424    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48425    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48426    break 2
48427  fi
48428done
48429  done
48430IFS=$as_save_IFS
48431
48432  ;;
48433esac
48434fi
48435JTREGEXE=$ac_cv_path_JTREGEXE
48436if test -n "$JTREGEXE"; then
48437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48438$as_echo "$JTREGEXE" >&6; }
48439else
48440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48441$as_echo "no" >&6; }
48442fi
48443
48444
48445          if test "x$JTREGEXE" = x; then
48446            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48447          fi
48448        else
48449          # Otherwise we believe it is a complete path. Use it as it is.
48450          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48451$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48452          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48453$as_echo_n "checking for JTREGEXE... " >&6; }
48454          if test ! -x "$tool_specified"; then
48455            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48456$as_echo "not found" >&6; }
48457            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48458          fi
48459          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48460$as_echo "$tool_specified" >&6; }
48461        fi
48462      fi
48463    fi
48464
48465  fi
48466
48467
48468
48469  if test "x$JTREGEXE" = x; then
48470    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48471  fi
48472
48473
48474      JT_HOME="`$DIRNAME $JTREGEXE`"
48475    fi
48476  fi
48477
48478
48479
48480
48481
48482
48483  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48484  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48485  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48486  #                              commands produced by the link step (currently AIX only)
48487  if test "x$TOOLCHAIN_TYPE" = xxlc; then
48488    COMPILER_TARGET_BITS_FLAG="-q"
48489    COMPILER_COMMAND_FILE_FLAG="-f"
48490    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48491  else
48492    COMPILER_TARGET_BITS_FLAG="-m"
48493    COMPILER_COMMAND_FILE_FLAG="@"
48494    COMPILER_BINDCMD_FILE_FLAG=""
48495
48496    # The solstudio linker does not support @-files.
48497    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48498      COMPILER_COMMAND_FILE_FLAG=
48499    fi
48500
48501    # Check if @file is supported by gcc
48502    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48503      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48504$as_echo_n "checking if @file is supported by gcc... " >&6; }
48505      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48506      $ECHO "" "--version" > command.file
48507      if $CXX @command.file 2>&5 >&5; then
48508        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48509$as_echo "yes" >&6; }
48510        COMPILER_COMMAND_FILE_FLAG="@"
48511      else
48512        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48513$as_echo "no" >&6; }
48514        COMPILER_COMMAND_FILE_FLAG=
48515      fi
48516      $RM command.file
48517    fi
48518  fi
48519
48520
48521
48522
48523  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
48524  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48525    ARFLAGS="-r"
48526  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48527    ARFLAGS="-X64"
48528  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
48529    # lib.exe is used as AR to create static libraries.
48530    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
48531  else
48532    ARFLAGS=""
48533  fi
48534
48535
48536  ## Setup strip.
48537  # FIXME: should this really be per platform, or should it be per toolchain type?
48538  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
48539  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
48540  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48541    STRIPFLAGS="-g"
48542  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
48543    STRIPFLAGS="-x"
48544  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
48545    STRIPFLAGS="-S"
48546  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48547    STRIPFLAGS="-X32_64"
48548  fi
48549
48550
48551
48552  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48553    CC_OUT_OPTION=-Fo
48554    EXE_OUT_OPTION=-out:
48555    LD_OUT_OPTION=-out:
48556    AR_OUT_OPTION=-out:
48557  else
48558    # The option used to specify the target .o,.a or .so file.
48559    # When compiling, how to specify the to be created object file.
48560    CC_OUT_OPTION='-o$(SPACE)'
48561    # When linking, how to specify the to be created executable.
48562    EXE_OUT_OPTION='-o$(SPACE)'
48563    # When linking, how to specify the to be created dynamically linkable library.
48564    LD_OUT_OPTION='-o$(SPACE)'
48565    # When archiving, how to specify the to be create static archive for object files.
48566    AR_OUT_OPTION='rcs$(SPACE)'
48567  fi
48568
48569
48570
48571
48572
48573  # On Windows, we need to set RC flags.
48574  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48575    RC_FLAGS="-nologo -l0x409"
48576    JVM_RCFLAGS="-nologo"
48577    if test "x$DEBUG_LEVEL" = xrelease; then
48578      RC_FLAGS="$RC_FLAGS -DNDEBUG"
48579      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
48580    fi
48581
48582    # The version variables used to create RC_FLAGS may be overridden
48583    # in a custom configure script, or possibly the command line.
48584    # Let those variables be expanded at make time in spec.gmk.
48585    # The \$ are escaped to the shell, and the $(...) variables
48586    # are evaluated by make.
48587    RC_FLAGS="$RC_FLAGS \
48588        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
48589        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
48590        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
48591        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
48592        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
48593        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
48594        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
48595
48596    JVM_RCFLAGS="$JVM_RCFLAGS \
48597        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
48598        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
48599        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
48600        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
48601        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
48602        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
48603        -D\"HS_FNAME=jvm.dll\" \
48604        -D\"HS_INTERNAL_NAME=jvm\""
48605  fi
48606
48607
48608
48609  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48610    # silence copyright notice and other headers.
48611    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
48612  fi
48613
48614
48615# Now we can test some aspects on the target using configure macros.
48616
48617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
48618$as_echo_n "checking for ANSI C header files... " >&6; }
48619if ${ac_cv_header_stdc+:} false; then :
48620  $as_echo_n "(cached) " >&6
48621else
48622  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48623/* end confdefs.h.  */
48624#include <stdlib.h>
48625#include <stdarg.h>
48626#include <string.h>
48627#include <float.h>
48628
48629int
48630main ()
48631{
48632
48633  ;
48634  return 0;
48635}
48636_ACEOF
48637if ac_fn_cxx_try_compile "$LINENO"; then :
48638  ac_cv_header_stdc=yes
48639else
48640  ac_cv_header_stdc=no
48641fi
48642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48643
48644if test $ac_cv_header_stdc = yes; then
48645  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
48646  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48647/* end confdefs.h.  */
48648#include <string.h>
48649
48650_ACEOF
48651if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48652  $EGREP "memchr" >/dev/null 2>&1; then :
48653
48654else
48655  ac_cv_header_stdc=no
48656fi
48657rm -f conftest*
48658
48659fi
48660
48661if test $ac_cv_header_stdc = yes; then
48662  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
48663  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48664/* end confdefs.h.  */
48665#include <stdlib.h>
48666
48667_ACEOF
48668if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48669  $EGREP "free" >/dev/null 2>&1; then :
48670
48671else
48672  ac_cv_header_stdc=no
48673fi
48674rm -f conftest*
48675
48676fi
48677
48678if test $ac_cv_header_stdc = yes; then
48679  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
48680  if test "$cross_compiling" = yes; then :
48681  :
48682else
48683  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48684/* end confdefs.h.  */
48685#include <ctype.h>
48686#include <stdlib.h>
48687#if ((' ' & 0x0FF) == 0x020)
48688# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
48689# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
48690#else
48691# define ISLOWER(c) \
48692		   (('a' <= (c) && (c) <= 'i') \
48693		     || ('j' <= (c) && (c) <= 'r') \
48694		     || ('s' <= (c) && (c) <= 'z'))
48695# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
48696#endif
48697
48698#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
48699int
48700main ()
48701{
48702  int i;
48703  for (i = 0; i < 256; i++)
48704    if (XOR (islower (i), ISLOWER (i))
48705	|| toupper (i) != TOUPPER (i))
48706      return 2;
48707  return 0;
48708}
48709_ACEOF
48710if ac_fn_cxx_try_run "$LINENO"; then :
48711
48712else
48713  ac_cv_header_stdc=no
48714fi
48715rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48716  conftest.$ac_objext conftest.beam conftest.$ac_ext
48717fi
48718
48719fi
48720fi
48721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
48722$as_echo "$ac_cv_header_stdc" >&6; }
48723if test $ac_cv_header_stdc = yes; then
48724
48725$as_echo "#define STDC_HEADERS 1" >>confdefs.h
48726
48727fi
48728
48729# On IRIX 5.3, sys/types and inttypes.h are conflicting.
48730for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
48731		  inttypes.h stdint.h unistd.h
48732do :
48733  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
48734ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
48735"
48736if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
48737  cat >>confdefs.h <<_ACEOF
48738#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
48739_ACEOF
48740
48741fi
48742
48743done
48744
48745
48746
48747  ###############################################################################
48748  #
48749  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
48750  # (The JVM can use 32 or 64 bit Java pointers but that decision
48751  # is made at runtime.)
48752  #
48753
48754  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
48755    # Always specify -m flag on Solaris
48756    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
48757
48758  # When we add flags to the "official" CFLAGS etc, we need to
48759  # keep track of these additions in ADDED_CFLAGS etc. These
48760  # will later be checked to make sure only controlled additions
48761  # have been made to CFLAGS etc.
48762  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48763  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48764  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48765
48766  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48767  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48768  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48769
48770  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48771  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48772  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48773
48774  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48775  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48776  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48777
48778  elif test "x$COMPILE_TYPE" = xreduced; then
48779    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
48780      # Specify -m if running reduced on unix platforms
48781
48782  # When we add flags to the "official" CFLAGS etc, we need to
48783  # keep track of these additions in ADDED_CFLAGS etc. These
48784  # will later be checked to make sure only controlled additions
48785  # have been made to CFLAGS etc.
48786  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48787  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48788  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48789
48790  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48791  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48792  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48793
48794  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48795  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48796  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48797
48798  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48799  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48800  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48801
48802    fi
48803  fi
48804  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48805    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48806    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48807    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48808  fi
48809
48810  # Make compilation sanity check
48811  for ac_header in stdio.h
48812do :
48813  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
48814if test "x$ac_cv_header_stdio_h" = xyes; then :
48815  cat >>confdefs.h <<_ACEOF
48816#define HAVE_STDIO_H 1
48817_ACEOF
48818
48819else
48820
48821    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
48822$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
48823    if test "x$COMPILE_TYPE" = xreduced; then
48824
48825  # Print a helpful message on how to acquire the necessary build dependency.
48826  # reduced is the help tag: freetype, cups, alsa etc
48827  MISSING_DEPENDENCY=reduced
48828
48829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48830    cygwin_help $MISSING_DEPENDENCY
48831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48832    msys_help $MISSING_DEPENDENCY
48833  else
48834    PKGHANDLER_COMMAND=
48835
48836    case $PKGHANDLER in
48837      apt-get)
48838        apt_help     $MISSING_DEPENDENCY ;;
48839      yum)
48840        yum_help     $MISSING_DEPENDENCY ;;
48841      brew)
48842        brew_help    $MISSING_DEPENDENCY ;;
48843      port)
48844        port_help    $MISSING_DEPENDENCY ;;
48845      pkgutil)
48846        pkgutil_help $MISSING_DEPENDENCY ;;
48847      pkgadd)
48848        pkgadd_help  $MISSING_DEPENDENCY ;;
48849    esac
48850
48851    if test "x$PKGHANDLER_COMMAND" != x; then
48852      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48853    fi
48854  fi
48855
48856      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48857$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48858    elif test "x$COMPILE_TYPE" = xcross; then
48859      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48860$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48861    fi
48862    as_fn_error $? "Cannot continue." "$LINENO" 5
48863
48864fi
48865
48866done
48867
48868
48869  # The cast to long int works around a bug in the HP C Compiler
48870# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48871# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48872# This bug is HP SR number 8606223364.
48873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48874$as_echo_n "checking size of int *... " >&6; }
48875if ${ac_cv_sizeof_int_p+:} false; then :
48876  $as_echo_n "(cached) " >&6
48877else
48878  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48879
48880else
48881  if test "$ac_cv_type_int_p" = yes; then
48882     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48883$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48884as_fn_error 77 "cannot compute sizeof (int *)
48885See \`config.log' for more details" "$LINENO" 5; }
48886   else
48887     ac_cv_sizeof_int_p=0
48888   fi
48889fi
48890
48891fi
48892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48893$as_echo "$ac_cv_sizeof_int_p" >&6; }
48894
48895
48896
48897cat >>confdefs.h <<_ACEOF
48898#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48899_ACEOF
48900
48901
48902
48903  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
48904  if test "x$ac_cv_sizeof_int_p" = x; then
48905    # The test failed, lets stick to the assumed value.
48906    { $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
48907$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
48908  else
48909    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48910
48911    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48912      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
48913      # Let's try to implicitely set the compilers target architecture and retry the test
48914      { $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
48915$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;}
48916      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
48917$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
48918
48919  # When we add flags to the "official" CFLAGS etc, we need to
48920  # keep track of these additions in ADDED_CFLAGS etc. These
48921  # will later be checked to make sure only controlled additions
48922  # have been made to CFLAGS etc.
48923  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48924  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48925  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48926
48927  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48928  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48929  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48930
48931  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48932  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48933  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48934
48935  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48936  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48937  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48938
48939
48940      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
48941      unset ac_cv_sizeof_int_p
48942      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
48943      cat >>confdefs.h <<_ACEOF
48944#undef SIZEOF_INT_P
48945_ACEOF
48946
48947      # The cast to long int works around a bug in the HP C Compiler
48948# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48949# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48950# This bug is HP SR number 8606223364.
48951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48952$as_echo_n "checking size of int *... " >&6; }
48953if ${ac_cv_sizeof_int_p+:} false; then :
48954  $as_echo_n "(cached) " >&6
48955else
48956  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48957
48958else
48959  if test "$ac_cv_type_int_p" = yes; then
48960     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48961$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48962as_fn_error 77 "cannot compute sizeof (int *)
48963See \`config.log' for more details" "$LINENO" 5; }
48964   else
48965     ac_cv_sizeof_int_p=0
48966   fi
48967fi
48968
48969fi
48970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48971$as_echo "$ac_cv_sizeof_int_p" >&6; }
48972
48973
48974
48975cat >>confdefs.h <<_ACEOF
48976#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48977_ACEOF
48978
48979
48980
48981      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48982
48983      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48984        { $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
48985$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;}
48986        if test "x$COMPILE_TYPE" = xreduced; then
48987
48988  # Print a helpful message on how to acquire the necessary build dependency.
48989  # reduced is the help tag: freetype, cups, alsa etc
48990  MISSING_DEPENDENCY=reduced
48991
48992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48993    cygwin_help $MISSING_DEPENDENCY
48994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48995    msys_help $MISSING_DEPENDENCY
48996  else
48997    PKGHANDLER_COMMAND=
48998
48999    case $PKGHANDLER in
49000      apt-get)
49001        apt_help     $MISSING_DEPENDENCY ;;
49002      yum)
49003        yum_help     $MISSING_DEPENDENCY ;;
49004      brew)
49005        brew_help    $MISSING_DEPENDENCY ;;
49006      port)
49007        port_help    $MISSING_DEPENDENCY ;;
49008      pkgutil)
49009        pkgutil_help $MISSING_DEPENDENCY ;;
49010      pkgadd)
49011        pkgadd_help  $MISSING_DEPENDENCY ;;
49012    esac
49013
49014    if test "x$PKGHANDLER_COMMAND" != x; then
49015      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49016    fi
49017  fi
49018
49019          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
49020$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
49021        elif test "x$COMPILE_TYPE" = xcross; then
49022          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
49023$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
49024        fi
49025        as_fn_error $? "Cannot continue." "$LINENO" 5
49026      fi
49027    fi
49028  fi
49029
49030  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
49031$as_echo_n "checking for target address size... " >&6; }
49032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
49033$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
49034
49035
49036  ###############################################################################
49037  #
49038  # Is the target little of big endian?
49039  #
49040   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
49041$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
49042if ${ac_cv_c_bigendian+:} false; then :
49043  $as_echo_n "(cached) " >&6
49044else
49045  ac_cv_c_bigendian=unknown
49046    # See if we're dealing with a universal compiler.
49047    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49048/* end confdefs.h.  */
49049#ifndef __APPLE_CC__
49050	       not a universal capable compiler
49051	     #endif
49052	     typedef int dummy;
49053
49054_ACEOF
49055if ac_fn_cxx_try_compile "$LINENO"; then :
49056
49057	# Check for potential -arch flags.  It is not universal unless
49058	# there are at least two -arch flags with different values.
49059	ac_arch=
49060	ac_prev=
49061	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
49062	 if test -n "$ac_prev"; then
49063	   case $ac_word in
49064	     i?86 | x86_64 | ppc | ppc64)
49065	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
49066		 ac_arch=$ac_word
49067	       else
49068		 ac_cv_c_bigendian=universal
49069		 break
49070	       fi
49071	       ;;
49072	   esac
49073	   ac_prev=
49074	 elif test "x$ac_word" = "x-arch"; then
49075	   ac_prev=arch
49076	 fi
49077       done
49078fi
49079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49080    if test $ac_cv_c_bigendian = unknown; then
49081      # See if sys/param.h defines the BYTE_ORDER macro.
49082      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49083/* end confdefs.h.  */
49084#include <sys/types.h>
49085	     #include <sys/param.h>
49086
49087int
49088main ()
49089{
49090#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
49091		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
49092		     && LITTLE_ENDIAN)
49093	      bogus endian macros
49094	     #endif
49095
49096  ;
49097  return 0;
49098}
49099_ACEOF
49100if ac_fn_cxx_try_compile "$LINENO"; then :
49101  # It does; now see whether it defined to BIG_ENDIAN or not.
49102	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49103/* end confdefs.h.  */
49104#include <sys/types.h>
49105		#include <sys/param.h>
49106
49107int
49108main ()
49109{
49110#if BYTE_ORDER != BIG_ENDIAN
49111		 not big endian
49112		#endif
49113
49114  ;
49115  return 0;
49116}
49117_ACEOF
49118if ac_fn_cxx_try_compile "$LINENO"; then :
49119  ac_cv_c_bigendian=yes
49120else
49121  ac_cv_c_bigendian=no
49122fi
49123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49124fi
49125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49126    fi
49127    if test $ac_cv_c_bigendian = unknown; then
49128      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
49129      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49130/* end confdefs.h.  */
49131#include <limits.h>
49132
49133int
49134main ()
49135{
49136#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
49137	      bogus endian macros
49138	     #endif
49139
49140  ;
49141  return 0;
49142}
49143_ACEOF
49144if ac_fn_cxx_try_compile "$LINENO"; then :
49145  # It does; now see whether it defined to _BIG_ENDIAN or not.
49146	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49147/* end confdefs.h.  */
49148#include <limits.h>
49149
49150int
49151main ()
49152{
49153#ifndef _BIG_ENDIAN
49154		 not big endian
49155		#endif
49156
49157  ;
49158  return 0;
49159}
49160_ACEOF
49161if ac_fn_cxx_try_compile "$LINENO"; then :
49162  ac_cv_c_bigendian=yes
49163else
49164  ac_cv_c_bigendian=no
49165fi
49166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49167fi
49168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49169    fi
49170    if test $ac_cv_c_bigendian = unknown; then
49171      # Compile a test program.
49172      if test "$cross_compiling" = yes; then :
49173  # Try to guess by grepping values from an object file.
49174	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49175/* end confdefs.h.  */
49176short int ascii_mm[] =
49177		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
49178		short int ascii_ii[] =
49179		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
49180		int use_ascii (int i) {
49181		  return ascii_mm[i] + ascii_ii[i];
49182		}
49183		short int ebcdic_ii[] =
49184		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
49185		short int ebcdic_mm[] =
49186		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
49187		int use_ebcdic (int i) {
49188		  return ebcdic_mm[i] + ebcdic_ii[i];
49189		}
49190		extern int foo;
49191
49192int
49193main ()
49194{
49195return use_ascii (foo) == use_ebcdic (foo);
49196  ;
49197  return 0;
49198}
49199_ACEOF
49200if ac_fn_cxx_try_compile "$LINENO"; then :
49201  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
49202	      ac_cv_c_bigendian=yes
49203	    fi
49204	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
49205	      if test "$ac_cv_c_bigendian" = unknown; then
49206		ac_cv_c_bigendian=no
49207	      else
49208		# finding both strings is unlikely to happen, but who knows?
49209		ac_cv_c_bigendian=unknown
49210	      fi
49211	    fi
49212fi
49213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49214else
49215  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49216/* end confdefs.h.  */
49217$ac_includes_default
49218int
49219main ()
49220{
49221
49222	     /* Are we little or big endian?  From Harbison&Steele.  */
49223	     union
49224	     {
49225	       long int l;
49226	       char c[sizeof (long int)];
49227	     } u;
49228	     u.l = 1;
49229	     return u.c[sizeof (long int) - 1] == 1;
49230
49231  ;
49232  return 0;
49233}
49234_ACEOF
49235if ac_fn_cxx_try_run "$LINENO"; then :
49236  ac_cv_c_bigendian=no
49237else
49238  ac_cv_c_bigendian=yes
49239fi
49240rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49241  conftest.$ac_objext conftest.beam conftest.$ac_ext
49242fi
49243
49244    fi
49245fi
49246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
49247$as_echo "$ac_cv_c_bigendian" >&6; }
49248 case $ac_cv_c_bigendian in #(
49249   yes)
49250     ENDIAN="big";; #(
49251   no)
49252     ENDIAN="little" ;; #(
49253   universal)
49254     ENDIAN="universal_endianness"
49255     ;; #(
49256   *)
49257     ENDIAN="unknown" ;;
49258 esac
49259
49260
49261  if test "x$ENDIAN" = xuniversal_endianness; then
49262    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
49263  fi
49264  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
49265    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
49266  fi
49267
49268
49269# Configure flags for the tools
49270
49271  ###############################################################################
49272  #
49273  # How to compile shared libraries.
49274  #
49275
49276  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49277    PICFLAG="-fPIC"
49278    C_FLAG_REORDER=''
49279    CXX_FLAG_REORDER=''
49280
49281    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49282      # Linking is different on MacOSX
49283      if test "x$STATIC_BUILD" = xtrue; then
49284        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49285      else
49286        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49287        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49288      fi
49289      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$1'
49290      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49291      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49292      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49293    else
49294      # Default works for linux, might work on other platforms as well.
49295      SHARED_LIBRARY_FLAGS='-shared'
49296      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49297      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49298      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49299      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49300    fi
49301  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49302    C_FLAG_REORDER=''
49303    CXX_FLAG_REORDER=''
49304
49305    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49306      # Linking is different on MacOSX
49307      PICFLAG=''
49308      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49309      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$1'
49310      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49311      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49312      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49313
49314      if test "x$STATIC_BUILD" = xfalse; then
49315        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49316      fi
49317    else
49318      # Default works for linux, might work on other platforms as well.
49319      PICFLAG='-fPIC'
49320      SHARED_LIBRARY_FLAGS='-shared'
49321      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49322      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49323      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49324
49325      # arm specific settings
49326      if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
49327        # '-Wl,-z,origin' isn't used on arm.
49328        SET_SHARED_LIBRARY_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49329      else
49330        SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49331      fi
49332
49333    fi
49334  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49335    if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
49336      PICFLAG="-xcode=pic32"
49337    else
49338      PICFLAG="-KPIC"
49339    fi
49340    C_FLAG_REORDER='-xF'
49341    CXX_FLAG_REORDER='-xF'
49342    SHARED_LIBRARY_FLAGS="-G"
49343    SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
49344    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49345    SET_SHARED_LIBRARY_NAME='-h $1'
49346    SET_SHARED_LIBRARY_MAPFILE='-M$1'
49347  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49348    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49349    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49350    # will have to patch this single instruction with a call to some out-of-order code which
49351    # does the load from the TOC. This is of course slow. But in that case we also would have
49352    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49353    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49354    # can be patched directly by the linker and does not require a jump to out-of-order code.
49355    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49356    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49357    # loads for accessing a global variable). But there are rumors that this may be seen as a
49358    # 'performance feature' because of improved code locality of the symbols used in a
49359    # compilation unit.
49360    PICFLAG="-qpic"
49361    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49362    C_FLAG_REORDER=''
49363    CXX_FLAG_REORDER=''
49364    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49365    SET_EXECUTABLE_ORIGIN=""
49366    SET_SHARED_LIBRARY_ORIGIN=''
49367    SET_SHARED_LIBRARY_NAME=''
49368    SET_SHARED_LIBRARY_MAPFILE=''
49369  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49370    PICFLAG=""
49371    C_FLAG_REORDER=''
49372    CXX_FLAG_REORDER=''
49373    SHARED_LIBRARY_FLAGS="-dll"
49374    SET_EXECUTABLE_ORIGIN=''
49375    SET_SHARED_LIBRARY_ORIGIN=''
49376    SET_SHARED_LIBRARY_NAME=''
49377    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49378  fi
49379
49380
49381
49382
49383
49384
49385
49386
49387
49388  # The (cross) compiler is now configured, we can now test capabilities
49389  # of the target platform.
49390
49391
49392
49393  ###############################################################################
49394  #
49395  # Setup the opt flags for different compilers
49396  # and different operating systems.
49397  #
49398
49399  # FIXME: this was indirectly the old default, but just inherited.
49400  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49401  #   C_FLAG_DEPS="-MMD -MF"
49402  # fi
49403
49404  # Generate make dependency files
49405  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49406    C_FLAG_DEPS="-MMD -MF"
49407  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49408    C_FLAG_DEPS="-MMD -MF"
49409  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49410    C_FLAG_DEPS="-xMMD -xMF"
49411  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49412    C_FLAG_DEPS="-qmakedep=gcc -MF"
49413  fi
49414  CXX_FLAG_DEPS="$C_FLAG_DEPS"
49415
49416
49417
49418  # Debug symbols
49419  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49420    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49421      # reduce from default "-g2" option to save space
49422      CFLAGS_DEBUG_SYMBOLS="-g1"
49423      CXXFLAGS_DEBUG_SYMBOLS="-g1"
49424    else
49425      CFLAGS_DEBUG_SYMBOLS="-g"
49426      CXXFLAGS_DEBUG_SYMBOLS="-g"
49427    fi
49428  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49429    CFLAGS_DEBUG_SYMBOLS="-g"
49430    CXXFLAGS_DEBUG_SYMBOLS="-g"
49431  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49432    CFLAGS_DEBUG_SYMBOLS="-g -xs"
49433    # -g0 enables debug symbols without disabling inlining.
49434    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49435  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49436    CFLAGS_DEBUG_SYMBOLS="-g"
49437    CXXFLAGS_DEBUG_SYMBOLS="-g"
49438  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49439    CFLAGS_DEBUG_SYMBOLS="-Zi"
49440    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49441  fi
49442
49443
49444
49445  # Debug symbols for JVM_CFLAGS
49446  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49447    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49448    if test "x$DEBUG_LEVEL" = xslowdebug; then
49449      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49450    else
49451      # -g0 does not disable inlining, which -g does.
49452      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49453    fi
49454  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49455    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49456  else
49457    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49458  fi
49459
49460
49461  # bounds, memory and behavior checking options
49462  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49463    case $DEBUG_LEVEL in
49464    release )
49465      # no adjustment
49466      ;;
49467    fastdebug )
49468      # no adjustment
49469      ;;
49470    slowdebug )
49471      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49472      # get's added conditionally on whether we produce debug symbols or not.
49473      # This is most likely not really correct.
49474
49475      # Add runtime stack smashing and undefined behavior checks.
49476      # Not all versions of gcc support -fstack-protector
49477      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
49478
49479
49480
49481
49482
49483
49484
49485
49486
49487
49488
49489
49490
49491
49492
49493
49494
49495
49496
49497
49498
49499
49500
49501
49502
49503
49504
49505
49506
49507
49508
49509
49510
49511
49512
49513
49514
49515
49516
49517
49518
49519
49520    # Execute function body
49521
49522
49523
49524
49525
49526
49527
49528
49529
49530
49531
49532
49533
49534
49535
49536
49537
49538
49539
49540
49541
49542
49543
49544
49545
49546
49547
49548
49549
49550
49551
49552
49553
49554
49555
49556
49557
49558
49559
49560
49561
49562
49563
49564
49565
49566
49567
49568
49569    # Execute function body
49570
49571  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49572$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49573  supports=yes
49574
49575  saved_cflags="$CFLAGS"
49576  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
49577  ac_ext=c
49578ac_cpp='$CPP $CPPFLAGS'
49579ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49580ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49581ac_compiler_gnu=$ac_cv_c_compiler_gnu
49582
49583  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49584/* end confdefs.h.  */
49585int i;
49586_ACEOF
49587if ac_fn_c_try_compile "$LINENO"; then :
49588
49589else
49590  supports=no
49591fi
49592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49593  ac_ext=cpp
49594ac_cpp='$CXXCPP $CPPFLAGS'
49595ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49596ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49597ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49598
49599  CFLAGS="$saved_cflags"
49600
49601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49602$as_echo "$supports" >&6; }
49603  if test "x$supports" = "xyes" ; then
49604    :
49605    C_COMP_SUPPORTS="yes"
49606  else
49607    :
49608    C_COMP_SUPPORTS="no"
49609  fi
49610
49611
49612
49613
49614
49615
49616
49617
49618
49619
49620
49621
49622
49623
49624
49625
49626
49627
49628
49629
49630
49631
49632
49633
49634
49635
49636
49637
49638
49639
49640
49641
49642
49643
49644
49645
49646
49647
49648
49649
49650
49651
49652
49653
49654
49655
49656
49657
49658
49659
49660
49661
49662
49663
49664
49665
49666
49667
49668
49669    # Execute function body
49670
49671  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49672$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49673  supports=yes
49674
49675  saved_cxxflags="$CXXFLAGS"
49676  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
49677  ac_ext=cpp
49678ac_cpp='$CXXCPP $CPPFLAGS'
49679ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49680ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49681ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49682
49683  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49684/* end confdefs.h.  */
49685int i;
49686_ACEOF
49687if ac_fn_cxx_try_compile "$LINENO"; then :
49688
49689else
49690  supports=no
49691fi
49692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49693  ac_ext=cpp
49694ac_cpp='$CXXCPP $CPPFLAGS'
49695ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49696ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49697ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49698
49699  CXXFLAGS="$saved_cxxflags"
49700
49701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49702$as_echo "$supports" >&6; }
49703  if test "x$supports" = "xyes" ; then
49704    :
49705    CXX_COMP_SUPPORTS="yes"
49706  else
49707    :
49708    CXX_COMP_SUPPORTS="no"
49709  fi
49710
49711
49712
49713
49714
49715
49716
49717
49718
49719
49720
49721
49722
49723  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49724$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49725  supports=no
49726  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49727
49728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49729$as_echo "$supports" >&6; }
49730  if test "x$supports" = "xyes" ; then
49731    :
49732
49733  else
49734    :
49735    STACK_PROTECTOR_CFLAG=""
49736  fi
49737
49738
49739
49740
49741
49742
49743
49744      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49745      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49746      if test "x$STACK_PROTECTOR_CFLAG" != x; then
49747        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49748      fi
49749      ;;
49750    esac
49751  fi
49752
49753  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49754    if test "x$DEBUG_LEVEL" != xrelease; then
49755      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49756        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
49757      fi
49758    fi
49759  fi
49760
49761  # Optimization levels
49762  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49763    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
49764
49765    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
49766      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
49767      C_O_FLAG_HIGHEST_JVM="-xO4"
49768      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
49769      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
49770      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
49771      C_O_FLAG_DEBUG="-xregs=no%frameptr"
49772      C_O_FLAG_DEBUG_JVM=""
49773      C_O_FLAG_NONE="-xregs=no%frameptr"
49774      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49775      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
49776      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
49777      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
49778      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
49779      CXX_O_FLAG_DEBUG_JVM=""
49780      CXX_O_FLAG_NONE="-xregs=no%frameptr"
49781      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
49782        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
49783        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
49784      fi
49785    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49786      C_O_FLAG_HIGHEST_JVM="-xO4"
49787      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
49788      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49789      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49790      C_O_FLAG_DEBUG=""
49791      C_O_FLAG_DEBUG_JVM=""
49792      C_O_FLAG_NONE=""
49793      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49794      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
49795      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49796      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49797      CXX_O_FLAG_DEBUG=""
49798      CXX_O_FLAG_DEBUG_JVM=""
49799      CXX_O_FLAG_NONE=""
49800    fi
49801  else
49802    # The remaining toolchains share opt flags between CC and CXX;
49803    # setup for C and duplicate afterwards.
49804    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49805      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49806        # On MacOSX we optimize for size, something
49807        # we should do for all platforms?
49808        C_O_FLAG_HIGHEST_JVM="-Os"
49809        C_O_FLAG_HIGHEST="-Os"
49810        C_O_FLAG_HI="-Os"
49811        C_O_FLAG_NORM="-Os"
49812        C_O_FLAG_SIZE="-Os"
49813      else
49814        C_O_FLAG_HIGHEST_JVM="-O3"
49815        C_O_FLAG_HIGHEST="-O3"
49816        C_O_FLAG_HI="-O3"
49817        C_O_FLAG_NORM="-O2"
49818        C_O_FLAG_SIZE="-Os"
49819      fi
49820      C_O_FLAG_DEBUG="-O0"
49821      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49822        C_O_FLAG_DEBUG_JVM=""
49823      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49824        C_O_FLAG_DEBUG_JVM="-O0"
49825      fi
49826      C_O_FLAG_NONE="-O0"
49827    elif test "x$TOOLCHAIN_TYPE" = xclang; then
49828      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49829        # On MacOSX we optimize for size, something
49830        # we should do for all platforms?
49831        C_O_FLAG_HIGHEST_JVM="-Os"
49832        C_O_FLAG_HIGHEST="-Os"
49833        C_O_FLAG_HI="-Os"
49834        C_O_FLAG_NORM="-Os"
49835        C_O_FLAG_SIZE="-Os"
49836      else
49837        C_O_FLAG_HIGHEST_JVM="-O3"
49838        C_O_FLAG_HIGHEST="-O3"
49839        C_O_FLAG_HI="-O3"
49840        C_O_FLAG_NORM="-O2"
49841        C_O_FLAG_SIZE="-Os"
49842      fi
49843      C_O_FLAG_DEBUG="-O0"
49844      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49845        C_O_FLAG_DEBUG_JVM=""
49846      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49847        C_O_FLAG_DEBUG_JVM="-O0"
49848      fi
49849      C_O_FLAG_NONE="-O0"
49850    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49851      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
49852      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
49853      C_O_FLAG_HI="-O3 -qinline -qinlglue"
49854      C_O_FLAG_NORM="-O2"
49855      C_O_FLAG_DEBUG="-qnoopt"
49856      # FIXME: Value below not verified.
49857      C_O_FLAG_DEBUG_JVM=""
49858      C_O_FLAG_NONE="-qnoopt"
49859    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49860      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
49861      C_O_FLAG_HIGHEST="-O2"
49862      C_O_FLAG_HI="-O1"
49863      C_O_FLAG_NORM="-O1"
49864      C_O_FLAG_DEBUG="-Od"
49865      C_O_FLAG_DEBUG_JVM=""
49866      C_O_FLAG_NONE="-Od"
49867      C_O_FLAG_SIZE="-Os"
49868    fi
49869    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
49870    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
49871    CXX_O_FLAG_HI="$C_O_FLAG_HI"
49872    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
49873    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
49874    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
49875    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
49876    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
49877  fi
49878
49879  # Adjust optimization flags according to debug level.
49880  case $DEBUG_LEVEL in
49881    release )
49882      # no adjustment
49883      ;;
49884    fastdebug )
49885      # Not quite so much optimization
49886      C_O_FLAG_HI="$C_O_FLAG_NORM"
49887      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
49888      ;;
49889    slowdebug )
49890      # Disable optimization
49891      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
49892      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
49893      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
49894      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
49895      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
49896      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
49897      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
49898      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
49899      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
49900      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
49901      ;;
49902  esac
49903
49904
49905
49906
49907
49908
49909
49910
49911
49912
49913
49914
49915
49916
49917
49918
49919
49920
49921
49922
49923# Check whether --with-abi-profile was given.
49924if test "${with_abi_profile+set}" = set; then :
49925  withval=$with_abi_profile;
49926fi
49927
49928
49929  if test "x$with_abi_profile" != x; then
49930    if test "x$OPENJDK_TARGET_CPU" != xarm && \
49931        test "x$OPENJDK_TARGET_CPU" != xaarch64; then
49932      as_fn_error $? "--with-abi-profile only available on arm/aarch64" "$LINENO" 5
49933    fi
49934
49935    OPENJDK_TARGET_ABI_PROFILE=$with_abi_profile
49936    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI profle" >&5
49937$as_echo_n "checking for ABI profle... " >&6; }
49938    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_ABI_PROFILE" >&5
49939$as_echo "$OPENJDK_TARGET_ABI_PROFILE" >&6; }
49940
49941    if test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-sflt; then
49942      ARM_FLOAT_TYPE=vfp-sflt
49943      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
49944    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-hflt; then
49945      ARM_FLOAT_TYPE=vfp-hflt
49946      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
49947    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-sflt; then
49948      ARM_FLOAT_TYPE=sflt
49949      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
49950    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv5-vfp-sflt; then
49951      ARM_FLOAT_TYPE=vfp-sflt
49952      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
49953    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv6-vfp-hflt; then
49954      ARM_FLOAT_TYPE=vfp-hflt
49955      ARM_ARCH_TYPE_FLAGS='-march=armv6 -marm'
49956    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm64; then
49957      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
49958      ARM_FLOAT_TYPE=
49959      ARM_ARCH_TYPE_FLAGS=
49960    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xaarch64; then
49961      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
49962      ARM_FLOAT_TYPE=
49963      ARM_ARCH_TYPE_FLAGS=
49964    else
49965      as_fn_error $? "Invalid ABI profile: \"$OPENJDK_TARGET_ABI_PROFILE\"" "$LINENO" 5
49966    fi
49967
49968    if test "x$ARM_FLOAT_TYPE" = xvfp-sflt; then
49969      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=softfp -mfpu=vfp -DFLOAT_ARCH=-vfp-sflt'
49970    elif test "x$ARM_FLOAT_TYPE" = xvfp-hflt; then
49971      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=hard -mfpu=vfp -DFLOAT_ARCH=-vfp-hflt'
49972    elif test "x$ARM_FLOAT_TYPE" = xsflt; then
49973      ARM_FLOAT_TYPE_FLAGS='-msoft-float -mfpu=vfp'
49974    fi
49975    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ARM_FLOAT_TYPE floating point flags" >&5
49976$as_echo_n "checking for $ARM_FLOAT_TYPE floating point flags... " >&6; }
49977    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_FLOAT_TYPE_FLAGS" >&5
49978$as_echo "$ARM_FLOAT_TYPE_FLAGS" >&6; }
49979
49980    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arch type flags" >&5
49981$as_echo_n "checking for arch type flags... " >&6; }
49982    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_ARCH_TYPE_FLAGS" >&5
49983$as_echo "$ARM_ARCH_TYPE_FLAGS" >&6; }
49984
49985    # Now set JDK_ARCH_ABI_PROP_NAME. This is equivalent to the last part of the
49986    # autoconf target triplet.
49987     JDK_ARCH_ABI_PROP_NAME=`$ECHO $OPENJDK_TARGET_AUTOCONF_NAME | $SED -e 's/.*-\([^-]*\)$/\1/'`
49988    # Sanity check that it is a known ABI.
49989    if test "x$JDK_ARCH_ABI_PROP_NAME" != xgnu && \
49990        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabi  && \
49991        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabihf; then
49992          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&5
49993$as_echo "$as_me: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&2;}
49994    fi
49995    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI property name" >&5
49996$as_echo_n "checking for ABI property name... " >&6; }
49997    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_ARCH_ABI_PROP_NAME" >&5
49998$as_echo "$JDK_ARCH_ABI_PROP_NAME" >&6; }
49999
50000
50001    # Pass these on to the open part of configure as if they were set using
50002    # --with-extra-c[xx]flags.
50003    EXTRA_CFLAGS="$EXTRA_CFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
50004    EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
50005    # Get rid of annoying "note: the mangling of 'va_list' has changed in GCC 4.4"
50006    # FIXME: This should not really be set using extra_cflags.
50007    if test "x$OPENJDK_TARGET_CPU" = xarm; then
50008        EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-psabi"
50009        EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -Wno-psabi"
50010    fi
50011    # Also add JDK_ARCH_ABI_PROP_NAME define, but only to CFLAGS.
50012    EXTRA_CFLAGS="$EXTRA_CFLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
50013    # And pass the architecture flags to the linker as well
50014    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
50015  fi
50016
50017  # When building with an abi profile, the name of that profile is appended on the
50018  # bundle platform, which is used in bundle names.
50019  if test "x$OPENJDK_TARGET_ABI_PROFILE" != x; then
50020    OPENJDK_TARGET_BUNDLE_PLATFORM="$OPENJDK_TARGET_OS_BUNDLE-$OPENJDK_TARGET_ABI_PROFILE"
50021  fi
50022
50023
50024  # Special extras...
50025  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50026    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50027      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50028      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50029    fi
50030    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50031    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50032  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50033    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50034    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50035  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50036    CXXSTD_CXXFLAG="-std=gnu++98"
50037
50038
50039
50040
50041
50042
50043
50044
50045
50046
50047
50048
50049
50050
50051
50052
50053
50054
50055
50056
50057
50058
50059
50060
50061
50062
50063
50064
50065
50066
50067
50068
50069
50070
50071
50072
50073
50074
50075
50076
50077
50078
50079    # Execute function body
50080
50081  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
50082$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
50083  supports=yes
50084
50085  saved_cxxflags="$CXXFLAGS"
50086  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
50087  ac_ext=cpp
50088ac_cpp='$CXXCPP $CPPFLAGS'
50089ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50090ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50091ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50092
50093  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50094/* end confdefs.h.  */
50095int i;
50096_ACEOF
50097if ac_fn_cxx_try_compile "$LINENO"; then :
50098
50099else
50100  supports=no
50101fi
50102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50103  ac_ext=cpp
50104ac_cpp='$CXXCPP $CPPFLAGS'
50105ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50106ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50107ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50108
50109  CXXFLAGS="$saved_cxxflags"
50110
50111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50112$as_echo "$supports" >&6; }
50113  if test "x$supports" = "xyes" ; then
50114    :
50115
50116  else
50117    :
50118    CXXSTD_CXXFLAG=""
50119  fi
50120
50121
50122
50123
50124
50125
50126
50127
50128
50129
50130
50131
50132    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
50133    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
50134
50135  fi
50136  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50137    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
50138    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
50139  fi
50140
50141  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
50142  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
50143  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
50144
50145  ###############################################################################
50146  #
50147  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50148  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50149  #
50150
50151  # Setup compiler/platform specific flags into
50152  #    CFLAGS_JDK    - C Compiler flags
50153  #    CXXFLAGS_JDK  - C++ Compiler flags
50154  #    COMMON_CCXXFLAGS_JDK - common to C and C++
50155  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50156    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
50157    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
50158    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
50159    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50160      # Force compatibility with i586 on 32 bit intel platforms.
50161      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
50162      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
50163    fi
50164    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50165        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50166    case $OPENJDK_TARGET_CPU_ARCH in
50167      arm )
50168        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50169        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50170        COMMON_CCXXFLAGS_JDK="${COMMON_CCXXFLAGS_JDK} -fsigned-char"
50171        ;;
50172      ppc )
50173        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50174        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50175        ;;
50176      s390 )
50177        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
50178        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50179        ;;
50180      * )
50181        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50182        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50183        ;;
50184    esac
50185
50186
50187
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
50231
50232
50233
50234
50235
50236
50237
50238
50239    # Execute function body
50240
50241  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50242  REFERENCE_VERSION=6
50243
50244  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50245    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50246  fi
50247
50248  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50249    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50250  fi
50251
50252  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50253  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50254
50255  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50256    :
50257
50258  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50259  # runs afoul of the more aggressive versions of these optimisations.
50260  # Notably, value range propagation now assumes that the this pointer of C++
50261  # member functions is non-null.
50262  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50263        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50264        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50265$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50266  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50267  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50268
50269  else
50270    :
50271
50272  fi
50273
50274
50275
50276
50277
50278
50279
50280
50281
50282
50283
50284
50285
50286
50287  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50288    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
50289
50290    # Restrict the debug information created by Clang to avoid
50291    # too big object files and speed the build up a little bit
50292    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50293    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
50294    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50295      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50296        # Force compatibility with i586 on 32 bit intel platforms.
50297        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
50298        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
50299      fi
50300      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
50301      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50302          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50303      case $OPENJDK_TARGET_CPU_ARCH in
50304        ppc )
50305          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50306          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50307          ;;
50308        * )
50309          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50310          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50311          ;;
50312      esac
50313    fi
50314  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50315    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
50316    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50317    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
50318      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
50319    fi
50320
50321    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50322    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50323  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50324    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50325    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50326    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50327  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50328    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
50329        -MD -Zc:wchar_t- -W3 -wd4800 \
50330        -DWIN32_LEAN_AND_MEAN \
50331        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50332        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50333        -DWIN32 -DIAL"
50334    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50335      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50336    else
50337      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50338    fi
50339    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50340    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50341    # studio.
50342    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50343      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50344      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50345      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50346    fi
50347  fi
50348
50349  ###############################################################################
50350
50351  # Adjust flags according to debug level.
50352  case $DEBUG_LEVEL in
50353    fastdebug | slowdebug )
50354      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50355      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50356      ;;
50357    release )
50358      ;;
50359    * )
50360      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50361      ;;
50362  esac
50363
50364  # Set some common defines. These works for all compilers, but assume
50365  # -D is universally accepted.
50366
50367  # Setup endianness
50368  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50369    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50370    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50371    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50372    #   Note: -Dmacro         is the same as    #define macro 1
50373    #         -Dmacro=        is the same as    #define macro
50374    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50375      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50376    else
50377      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50378    fi
50379  else
50380    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50381    # are defined in the system?
50382    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50383      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50384    else
50385      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50386    fi
50387  fi
50388
50389  # Setup target OS define. Use OS target name but in upper case.
50390  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50391  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50392
50393  # Setup target CPU
50394  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50395      $OPENJDK_TARGET_ADD_LP64 \
50396      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50397
50398  # Setup debug/release defines
50399  if test "x$DEBUG_LEVEL" = xrelease; then
50400    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50401    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50402      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50403    fi
50404  else
50405    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50406  fi
50407
50408  # Set some additional per-OS defines.
50409  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50410    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50411    JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
50412        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50413  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50414    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50415    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50416        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
50417  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50418    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50419    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50420    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50421    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50422        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50423        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50424        -fno-omit-frame-pointer"
50425  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50426    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50427    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50428    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
50429        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50430        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50431  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50432    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50433  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50434    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50435    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50436  fi
50437
50438  # Set some additional per-CPU defines.
50439  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50440    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50441  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50442    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50443  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50444    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50445      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50446      # fixes `relocation truncated to fit' error for gcc 4.1.
50447      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50448      # Use ppc64 instructions, but schedule for power5
50449      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50450    elif test "x$OPENJDK_TARGET_OS" = xaix; then
50451      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50452    fi
50453  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50454    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50455      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50456      # Little endian machine uses ELFv2 ABI.
50457      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50458      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50459      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
50460    fi
50461  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
50462    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50463      JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
50464    fi
50465  fi
50466
50467  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50468    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50469  fi
50470
50471  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50472    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50473      # Solaris does not have _LP64=1 in the old build.
50474      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50475      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50476    fi
50477  fi
50478
50479  # Set JVM_CFLAGS warning handling
50480  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50481    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50482        -Wunused-value -Woverloaded-virtual"
50483
50484    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50485
50486
50487
50488
50489
50490
50491
50492
50493
50494
50495
50496
50497
50498
50499
50500
50501
50502
50503
50504
50505
50506
50507
50508
50509
50510
50511
50512
50513
50514
50515
50516
50517
50518
50519
50520
50521
50522
50523
50524
50525
50526
50527
50528
50529
50530
50531
50532
50533
50534
50535
50536
50537
50538
50539    # Execute function body
50540
50541  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50542  REFERENCE_VERSION=4.8
50543
50544  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50545    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50546  fi
50547
50548  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50549    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50550  fi
50551
50552  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50553  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50554
50555  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50556    :
50557
50558            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50559            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50560
50561
50562  else
50563    :
50564
50565  fi
50566
50567
50568
50569
50570
50571
50572
50573
50574
50575
50576
50577
50578
50579
50580    fi
50581    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50582      # Non-zero builds have stricter warnings
50583      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50584    else
50585      if test "x$TOOLCHAIN_TYPE" = xclang; then
50586        # Some versions of llvm do not like -Wundef
50587        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50588      fi
50589    fi
50590  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50591    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50592        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50593  fi
50594
50595  # Additional macosx handling
50596  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50597    # Setting these parameters makes it an error to link to macosx APIs that are
50598    # newer than the given OS version and makes the linked binaries compatible
50599    # even if built on a newer version of the OS.
50600    # The expected format is X.Y.Z
50601    MACOSX_VERSION_MIN=10.7.0
50602
50603
50604    # The macro takes the version with no dots, ex: 1070
50605    # Let the flags variables get resolved in make for easier override on make
50606    # command line.
50607    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50608    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50609  fi
50610
50611  # Setup some hard coded includes
50612  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50613      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
50614      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50615      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50616      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50617      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50618      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50619
50620  # The shared libraries are compiled using the picflag.
50621  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50622      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50623  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50624      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50625
50626  # Executable flags
50627  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50628  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50629
50630
50631
50632
50633
50634
50635  # Setup LDFLAGS et al.
50636  #
50637
50638  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50639    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50640    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50641    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50642    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50643      LDFLAGS_SAFESH="-safeseh"
50644      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50645      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50646      # NOTE: Old build added -machine. Probably not needed.
50647      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50648    else
50649      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50650    fi
50651  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50652      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50653      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50654        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50655        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50656    fi
50657  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50658    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50659    # We have previously set HAS_GNU_HASH if this is the case
50660    if test -n "$HAS_GNU_HASH"; then
50661      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50662      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50663      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50664    fi
50665      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50666        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50667    fi
50668    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50669      # And since we now know that the linker is gnu, then add -z defs, to forbid
50670      # undefined symbols in object files.
50671      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50672      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50673      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50674      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50675      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50676      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50677        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50678      fi
50679      case $DEBUG_LEVEL in
50680        release )
50681          # tell linker to optimize libraries.
50682          # Should this be supplied to the OSS linker as well?
50683          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50684          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50685          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50686          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50687            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50688          fi
50689          ;;
50690        slowdebug )
50691          # Hotspot always let the linker optimize
50692          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50693          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50694            # do relocations at load
50695            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50696            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50697            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50698          fi
50699          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50700            # mark relocations read only
50701            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50702            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50703            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50704          fi
50705          ;;
50706        fastdebug )
50707          # Hotspot always let the linker optimize
50708          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50709          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50710            # mark relocations read only
50711            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50712            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50713            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50714          fi
50715          ;;
50716        * )
50717          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50718          ;;
50719        esac
50720    fi
50721  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50722    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50723    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
50724    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50725    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50726    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50727    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50728      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50729    fi
50730  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50731    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50732    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50733    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50734  fi
50735
50736  # Customize LDFLAGS for executables
50737
50738  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50739
50740  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50741    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50742      LDFLAGS_STACK_SIZE=1048576
50743    else
50744      LDFLAGS_STACK_SIZE=327680
50745    fi
50746    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50747  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50748    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50749  fi
50750
50751  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50752
50753  # Customize LDFLAGS for libs
50754  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50755
50756  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50757  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50758    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50759        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50760    JDKLIB_LIBS=""
50761  else
50762    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50763        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
50764
50765    if test "xTARGET" = "xTARGET"; then
50766      # On some platforms (mac) the linker warns about non existing -L dirs.
50767      # For any of the variants server, client or minimal, the dir matches the
50768      # variant name. The "main" variant should be used for linking. For the
50769      # rest, the dir is just server.
50770      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
50771          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50772        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50773            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
50774      else
50775        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50776            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
50777      fi
50778    elif test "xTARGET" = "xBUILD"; then
50779      # When building a buildjdk, it's always only the server variant
50780      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50781          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
50782    fi
50783
50784    JDKLIB_LIBS="-ljava -ljvm"
50785    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50786      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50787    fi
50788
50789  fi
50790
50791LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
50792
50793  # Set JVM_LIBS (per os)
50794  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50795    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50796  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50797    # FIXME: This hard-coded path is not really proper.
50798    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50799      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50800    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50801      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50802    fi
50803    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50804        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50805  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50806    JVM_LIBS="$JVM_LIBS -lm"
50807  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50808    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50809  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50810    JVM_LIBS="$JVM_LIBS -lm"
50811  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50812    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50813        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50814        wsock32.lib winmm.lib version.lib psapi.lib"
50815    fi
50816
50817  # Set JVM_ASFLAGS
50818  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50819    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50820      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50821    fi
50822  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50823    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50824  fi
50825
50826  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50827
50828
50829
50830
50831
50832
50833
50834
50835
50836
50837
50838
50839
50840
50841
50842  # Special extras...
50843  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50844    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50845      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50846      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50847    fi
50848    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50849    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50850  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50851    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50852    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50853  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50854    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
50855
50856
50857
50858
50859
50860
50861
50862
50863
50864
50865
50866
50867
50868
50869
50870
50871
50872
50873
50874
50875
50876
50877
50878
50879
50880
50881
50882
50883
50884
50885
50886
50887
50888
50889
50890
50891
50892
50893
50894
50895
50896
50897    # Execute function body
50898
50899  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
50900$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
50901  supports=yes
50902
50903  saved_cxxflags="$CXXFLAGS"
50904  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
50905  ac_ext=cpp
50906ac_cpp='$CXXCPP $CPPFLAGS'
50907ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50908ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50909ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50910
50911  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50912/* end confdefs.h.  */
50913int i;
50914_ACEOF
50915if ac_fn_cxx_try_compile "$LINENO"; then :
50916
50917else
50918  supports=no
50919fi
50920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50921  ac_ext=cpp
50922ac_cpp='$CXXCPP $CPPFLAGS'
50923ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50924ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50925ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50926
50927  CXXFLAGS="$saved_cxxflags"
50928
50929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50930$as_echo "$supports" >&6; }
50931  if test "x$supports" = "xyes" ; then
50932    :
50933
50934  else
50935    :
50936    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
50937  fi
50938
50939
50940
50941
50942
50943
50944
50945
50946
50947
50948
50949
50950    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50951    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50952
50953  fi
50954  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50955    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50956    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50957  fi
50958
50959  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
50960  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
50961  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
50962
50963  ###############################################################################
50964  #
50965  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50966  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50967  #
50968
50969  # Setup compiler/platform specific flags into
50970  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
50971  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
50972  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
50973  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50974    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50975    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
50976    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
50977    if test "x$OPENJDK_BUILD_CPU" = xx86; then
50978      # Force compatibility with i586 on 32 bit intel platforms.
50979      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50980      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50981    fi
50982    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50983        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50984    case $OPENJDK_BUILD_CPU_ARCH in
50985      arm )
50986        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50987        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50988        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="${OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK} -fsigned-char"
50989        ;;
50990      ppc )
50991        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50992        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50993        ;;
50994      s390 )
50995        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
50996        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50997        ;;
50998      * )
50999        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51000        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51001        ;;
51002    esac
51003
51004
51005
51006
51007
51008
51009
51010
51011
51012
51013
51014
51015
51016
51017
51018
51019
51020
51021
51022
51023
51024
51025
51026
51027
51028
51029
51030
51031
51032
51033
51034
51035
51036
51037
51038
51039
51040
51041
51042
51043
51044
51045
51046
51047
51048
51049
51050
51051
51052
51053
51054
51055
51056
51057    # Execute function body
51058
51059  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51060  REFERENCE_VERSION=6
51061
51062  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51063    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51064  fi
51065
51066  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51067    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
51068  fi
51069
51070  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51071  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51072
51073  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51074    :
51075
51076  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
51077  # runs afoul of the more aggressive versions of these optimisations.
51078  # Notably, value range propagation now assumes that the this pointer of C++
51079  # member functions is non-null.
51080  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
51081        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
51082        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
51083$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
51084  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51085  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51086
51087  else
51088    :
51089
51090  fi
51091
51092
51093
51094
51095
51096
51097
51098
51099
51100
51101
51102
51103
51104
51105  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51106    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
51107
51108    # Restrict the debug information created by Clang to avoid
51109    # too big object files and speed the build up a little bit
51110    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
51111    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
51112    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51113      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51114        # Force compatibility with i586 on 32 bit intel platforms.
51115        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
51116        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
51117      fi
51118      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
51119      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51120          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51121      case $OPENJDK_BUILD_CPU_ARCH in
51122        ppc )
51123          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51124          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51125          ;;
51126        * )
51127          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51128          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51129          ;;
51130      esac
51131    fi
51132  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51133    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
51134    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
51135    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
51136      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
51137    fi
51138
51139    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
51140    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
51141  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51142    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
51143    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51144    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51145  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51146    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51147        -MD -Zc:wchar_t- -W3 -wd4800 \
51148        -DWIN32_LEAN_AND_MEAN \
51149        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
51150        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
51151        -DWIN32 -DIAL"
51152    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51153      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
51154    else
51155      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
51156    fi
51157    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
51158    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
51159    # studio.
51160    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
51161      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
51162      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
51163      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
51164    fi
51165  fi
51166
51167  ###############################################################################
51168
51169  # Adjust flags according to debug level.
51170  case $DEBUG_LEVEL in
51171    fastdebug | slowdebug )
51172      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
51173      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
51174      ;;
51175    release )
51176      ;;
51177    * )
51178      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51179      ;;
51180  esac
51181
51182  # Set some common defines. These works for all compilers, but assume
51183  # -D is universally accepted.
51184
51185  # Setup endianness
51186  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51187    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
51188    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
51189    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
51190    #   Note: -Dmacro         is the same as    #define macro 1
51191    #         -Dmacro=        is the same as    #define macro
51192    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51193      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
51194    else
51195      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
51196    fi
51197  else
51198    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
51199    # are defined in the system?
51200    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51201      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
51202    else
51203      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
51204    fi
51205  fi
51206
51207  # Setup target OS define. Use OS target name but in upper case.
51208  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
51209  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
51210
51211  # Setup target CPU
51212  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51213      $OPENJDK_BUILD_ADD_LP64 \
51214      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
51215
51216  # Setup debug/release defines
51217  if test "x$DEBUG_LEVEL" = xrelease; then
51218    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
51219    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51220      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
51221    fi
51222  else
51223    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
51224  fi
51225
51226  # Set some additional per-OS defines.
51227  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51228    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
51229    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
51230        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
51231  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51232    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
51233    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
51234        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
51235  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51236    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
51237    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
51238    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
51239    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
51240        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
51241        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
51242        -fno-omit-frame-pointer"
51243  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51244    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
51245    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51246    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
51247        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
51248        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
51249  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51250    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
51251  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51252    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
51253    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
51254  fi
51255
51256  # Set some additional per-CPU defines.
51257  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
51258    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
51259  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51260    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
51261  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
51262    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51263      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51264      # fixes `relocation truncated to fit' error for gcc 4.1.
51265      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
51266      # Use ppc64 instructions, but schedule for power5
51267      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
51268    elif test "x$OPENJDK_BUILD_OS" = xaix; then
51269      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
51270    fi
51271  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
51272    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51273      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51274      # Little endian machine uses ELFv2 ABI.
51275      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
51276      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
51277      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
51278    fi
51279  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
51280    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51281      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
51282    fi
51283  fi
51284
51285  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51286    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
51287  fi
51288
51289  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
51290    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
51291      # Solaris does not have _LP64=1 in the old build.
51292      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
51293      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
51294    fi
51295  fi
51296
51297  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
51298  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51299    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
51300        -Wunused-value -Woverloaded-virtual"
51301
51302    if test "x$TOOLCHAIN_TYPE" = xgcc; then
51303
51304
51305
51306
51307
51308
51309
51310
51311
51312
51313
51314
51315
51316
51317
51318
51319
51320
51321
51322
51323
51324
51325
51326
51327
51328
51329
51330
51331
51332
51333
51334
51335
51336
51337
51338
51339
51340
51341
51342
51343
51344
51345
51346
51347
51348
51349
51350
51351
51352
51353
51354
51355
51356
51357    # Execute function body
51358
51359  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51360  REFERENCE_VERSION=4.8
51361
51362  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51363    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51364  fi
51365
51366  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51367    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51368  fi
51369
51370  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51371  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51372
51373  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51374    :
51375
51376            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51377            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51378
51379
51380  else
51381    :
51382
51383  fi
51384
51385
51386
51387
51388
51389
51390
51391
51392
51393
51394
51395
51396
51397
51398    fi
51399    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51400      # Non-zero builds have stricter warnings
51401      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51402    else
51403      if test "x$TOOLCHAIN_TYPE" = xclang; then
51404        # Some versions of llvm do not like -Wundef
51405        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51406      fi
51407    fi
51408  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51409    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51410        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51411  fi
51412
51413  # Additional macosx handling
51414  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51415    # Setting these parameters makes it an error to link to macosx APIs that are
51416    # newer than the given OS version and makes the linked binaries compatible
51417    # even if built on a newer version of the OS.
51418    # The expected format is X.Y.Z
51419    MACOSX_VERSION_MIN=10.7.0
51420
51421
51422    # The macro takes the version with no dots, ex: 1070
51423    # Let the flags variables get resolved in make for easier override on make
51424    # command line.
51425    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)"
51426    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51427  fi
51428
51429  # Setup some hard coded includes
51430  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51431      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51432      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51433      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51434      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51435      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51436      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51437
51438  # The shared libraries are compiled using the picflag.
51439  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51440      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51441  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51442      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51443
51444  # Executable flags
51445  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51446  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51447
51448
51449
51450
51451
51452
51453  # Setup LDFLAGS et al.
51454  #
51455
51456  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51457    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51458    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51459    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51460    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51461      LDFLAGS_SAFESH="-safeseh"
51462      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51463      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51464      # NOTE: Old build added -machine. Probably not needed.
51465      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51466    else
51467      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51468    fi
51469  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51470      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51471      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51472        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51473        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51474    fi
51475  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51476    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51477    # We have previously set HAS_GNU_HASH if this is the case
51478    if test -n "$HAS_GNU_HASH"; then
51479      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51480      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51481      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51482    fi
51483      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51484        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51485    fi
51486    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51487      # And since we now know that the linker is gnu, then add -z defs, to forbid
51488      # undefined symbols in object files.
51489      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51490      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51491      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51492      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51493      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51494      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51495        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51496      fi
51497      case $DEBUG_LEVEL in
51498        release )
51499          # tell linker to optimize libraries.
51500          # Should this be supplied to the OSS linker as well?
51501          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51502          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51503          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51504          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51505            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51506          fi
51507          ;;
51508        slowdebug )
51509          # Hotspot always let the linker optimize
51510          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51511          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51512            # do relocations at load
51513            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51514            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51515            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51516          fi
51517          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51518            # mark relocations read only
51519            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51520            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51521            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51522          fi
51523          ;;
51524        fastdebug )
51525          # Hotspot always let the linker optimize
51526          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51527          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51528            # mark relocations read only
51529            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51530            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51531            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51532          fi
51533          ;;
51534        * )
51535          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51536          ;;
51537        esac
51538    fi
51539  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51540    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51541    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51542    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51543    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51544    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51545    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51546      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51547    fi
51548  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51549    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51550    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51551    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51552  fi
51553
51554  # Customize LDFLAGS for executables
51555
51556  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51557
51558  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51559    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51560      LDFLAGS_STACK_SIZE=1048576
51561    else
51562      LDFLAGS_STACK_SIZE=327680
51563    fi
51564    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51565  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51566    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51567  fi
51568
51569  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51570
51571  # Customize LDFLAGS for libs
51572  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51573
51574  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51575  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51576    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51577        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51578    OPENJDK_BUILD_JDKLIB_LIBS=""
51579  else
51580    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51581        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
51582
51583    if test "xBUILD" = "xTARGET"; then
51584      # On some platforms (mac) the linker warns about non existing -L dirs.
51585      # For any of the variants server, client or minimal, the dir matches the
51586      # variant name. The "main" variant should be used for linking. For the
51587      # rest, the dir is just server.
51588      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
51589          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51590        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51591            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
51592      else
51593        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51594            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51595      fi
51596    elif test "xBUILD" = "xBUILD"; then
51597      # When building a buildjdk, it's always only the server variant
51598      OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51599          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51600    fi
51601
51602    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
51603    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51604      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
51605    fi
51606
51607  fi
51608
51609OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
51610
51611  # Set OPENJDK_BUILD_JVM_LIBS (per os)
51612  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51613    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
51614  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51615    # FIXME: This hard-coded path is not really proper.
51616    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51617      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51618    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51619      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51620    fi
51621    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51622        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51623  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51624    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51625  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51626    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51627  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51628    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51629  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51630    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51631        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51632        wsock32.lib winmm.lib version.lib psapi.lib"
51633    fi
51634
51635  # Set OPENJDK_BUILD_JVM_ASFLAGS
51636  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51637    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51638      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
51639    fi
51640  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51641    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51642  fi
51643
51644  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51645
51646
51647
51648
51649
51650
51651
51652
51653
51654
51655
51656
51657
51658
51659
51660  # Tests are only ever compiled for TARGET
51661  # Flags for compiling test libraries
51662  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51663  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51664
51665  # Flags for compiling test executables
51666  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51667  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51668
51669
51670
51671
51672
51673
51674  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51675  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
51676
51677
51678
51679
51680
51681
51682  # Check that the compiler supports -mX (or -qX on AIX) flags
51683  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
51684
51685
51686
51687
51688
51689
51690
51691
51692
51693
51694
51695
51696
51697
51698
51699
51700
51701
51702
51703
51704
51705
51706
51707
51708
51709
51710
51711
51712
51713
51714
51715
51716
51717
51718
51719
51720
51721
51722
51723
51724
51725
51726
51727
51728
51729
51730
51731    # Execute function body
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
51768
51769
51770
51771
51772
51773
51774
51775
51776
51777
51778
51779
51780    # Execute function body
51781
51782  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51783$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51784  supports=yes
51785
51786  saved_cflags="$CFLAGS"
51787  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51788  ac_ext=c
51789ac_cpp='$CPP $CPPFLAGS'
51790ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51791ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51792ac_compiler_gnu=$ac_cv_c_compiler_gnu
51793
51794  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51795/* end confdefs.h.  */
51796int i;
51797_ACEOF
51798if ac_fn_c_try_compile "$LINENO"; then :
51799
51800else
51801  supports=no
51802fi
51803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51804  ac_ext=cpp
51805ac_cpp='$CXXCPP $CPPFLAGS'
51806ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51807ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51808ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51809
51810  CFLAGS="$saved_cflags"
51811
51812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51813$as_echo "$supports" >&6; }
51814  if test "x$supports" = "xyes" ; then
51815    :
51816    C_COMP_SUPPORTS="yes"
51817  else
51818    :
51819    C_COMP_SUPPORTS="no"
51820  fi
51821
51822
51823
51824
51825
51826
51827
51828
51829
51830
51831
51832
51833
51834
51835
51836
51837
51838
51839
51840
51841
51842
51843
51844
51845
51846
51847
51848
51849
51850
51851
51852
51853
51854
51855
51856
51857
51858
51859
51860
51861
51862
51863
51864
51865
51866
51867
51868
51869
51870
51871
51872
51873
51874
51875
51876
51877
51878
51879
51880    # Execute function body
51881
51882  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51883$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51884  supports=yes
51885
51886  saved_cxxflags="$CXXFLAGS"
51887  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51888  ac_ext=cpp
51889ac_cpp='$CXXCPP $CPPFLAGS'
51890ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51891ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51892ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51893
51894  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51895/* end confdefs.h.  */
51896int i;
51897_ACEOF
51898if ac_fn_cxx_try_compile "$LINENO"; then :
51899
51900else
51901  supports=no
51902fi
51903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51904  ac_ext=cpp
51905ac_cpp='$CXXCPP $CPPFLAGS'
51906ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51907ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51908ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51909
51910  CXXFLAGS="$saved_cxxflags"
51911
51912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51913$as_echo "$supports" >&6; }
51914  if test "x$supports" = "xyes" ; then
51915    :
51916    CXX_COMP_SUPPORTS="yes"
51917  else
51918    :
51919    CXX_COMP_SUPPORTS="no"
51920  fi
51921
51922
51923
51924
51925
51926
51927
51928
51929
51930
51931
51932
51933
51934  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51935$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51936  supports=no
51937  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51938
51939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51940$as_echo "$supports" >&6; }
51941  if test "x$supports" = "xyes" ; then
51942    :
51943    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
51944  else
51945    :
51946    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
51947  fi
51948
51949
51950
51951
51952
51953
51954
51955
51956  # Check whether --enable-warnings-as-errors was given.
51957if test "${enable_warnings_as_errors+set}" = set; then :
51958  enableval=$enable_warnings_as_errors;
51959fi
51960
51961
51962  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
51963$as_echo_n "checking if native warnings are errors... " >&6; }
51964  if test "x$enable_warnings_as_errors" = "xyes"; then
51965    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitly set)" >&5
51966$as_echo "yes (explicitly set)" >&6; }
51967    WARNINGS_AS_ERRORS=true
51968  elif test "x$enable_warnings_as_errors" = "xno"; then
51969    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51970$as_echo "no" >&6; }
51971    WARNINGS_AS_ERRORS=false
51972  elif test "x$enable_warnings_as_errors" = "x"; then
51973    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
51974$as_echo "yes (default)" >&6; }
51975    WARNINGS_AS_ERRORS=true
51976  else
51977    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
51978  fi
51979
51980
51981
51982  case "${TOOLCHAIN_TYPE}" in
51983    microsoft)
51984      DISABLE_WARNING_PREFIX="-wd"
51985      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
51986      ;;
51987    solstudio)
51988      DISABLE_WARNING_PREFIX="-erroff="
51989      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
51990      ;;
51991    gcc)
51992      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
51993
51994
51995
51996
51997
51998
51999
52000
52001
52002
52003
52004
52005
52006
52007
52008
52009
52010
52011
52012
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    # Execute function body
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
52068
52069
52070
52071
52072
52073
52074
52075
52076
52077
52078
52079
52080
52081
52082
52083
52084
52085
52086
52087
52088
52089    # Execute function body
52090
52091  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52092$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52093  supports=yes
52094
52095  saved_cflags="$CFLAGS"
52096  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52097  ac_ext=c
52098ac_cpp='$CPP $CPPFLAGS'
52099ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52100ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52101ac_compiler_gnu=$ac_cv_c_compiler_gnu
52102
52103  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52104/* end confdefs.h.  */
52105int i;
52106_ACEOF
52107if ac_fn_c_try_compile "$LINENO"; then :
52108
52109else
52110  supports=no
52111fi
52112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52113  ac_ext=cpp
52114ac_cpp='$CXXCPP $CPPFLAGS'
52115ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52116ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52117ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52118
52119  CFLAGS="$saved_cflags"
52120
52121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52122$as_echo "$supports" >&6; }
52123  if test "x$supports" = "xyes" ; then
52124    :
52125    C_COMP_SUPPORTS="yes"
52126  else
52127    :
52128    C_COMP_SUPPORTS="no"
52129  fi
52130
52131
52132
52133
52134
52135
52136
52137
52138
52139
52140
52141
52142
52143
52144
52145
52146
52147
52148
52149
52150
52151
52152
52153
52154
52155
52156
52157
52158
52159
52160
52161
52162
52163
52164
52165
52166
52167
52168
52169
52170
52171
52172
52173
52174
52175
52176
52177
52178
52179
52180
52181
52182
52183
52184
52185
52186
52187
52188
52189    # Execute function body
52190
52191  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52192$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52193  supports=yes
52194
52195  saved_cxxflags="$CXXFLAGS"
52196  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52197  ac_ext=cpp
52198ac_cpp='$CXXCPP $CPPFLAGS'
52199ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52200ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52201ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52202
52203  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52204/* end confdefs.h.  */
52205int i;
52206_ACEOF
52207if ac_fn_cxx_try_compile "$LINENO"; then :
52208
52209else
52210  supports=no
52211fi
52212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52213  ac_ext=cpp
52214ac_cpp='$CXXCPP $CPPFLAGS'
52215ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52216ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52217ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52218
52219  CXXFLAGS="$saved_cxxflags"
52220
52221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52222$as_echo "$supports" >&6; }
52223  if test "x$supports" = "xyes" ; then
52224    :
52225    CXX_COMP_SUPPORTS="yes"
52226  else
52227    :
52228    CXX_COMP_SUPPORTS="no"
52229  fi
52230
52231
52232
52233
52234
52235
52236
52237
52238
52239
52240
52241
52242
52243  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52244$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52245  supports=no
52246  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52247
52248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52249$as_echo "$supports" >&6; }
52250  if test "x$supports" = "xyes" ; then
52251    :
52252    GCC_CAN_DISABLE_WARNINGS=true
52253  else
52254    :
52255    GCC_CAN_DISABLE_WARNINGS=false
52256
52257  fi
52258
52259
52260
52261
52262
52263
52264      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52265        DISABLE_WARNING_PREFIX="-Wno-"
52266      else
52267        DISABLE_WARNING_PREFIX=
52268      fi
52269      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52270      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52271      # CFLAGS since any target specific flags will likely not work with the
52272      # build compiler
52273      CC_OLD="$CC"
52274      CXX_OLD="$CXX"
52275      CC="$BUILD_CC"
52276      CXX="$BUILD_CXX"
52277      CFLAGS_OLD="$CFLAGS"
52278      CFLAGS=""
52279
52280
52281
52282
52283
52284
52285
52286
52287
52288
52289
52290
52291
52292
52293
52294
52295
52296
52297
52298
52299
52300
52301
52302
52303
52304
52305
52306
52307
52308
52309
52310
52311
52312
52313
52314
52315
52316
52317
52318
52319
52320
52321
52322
52323
52324
52325
52326    # Execute function body
52327
52328
52329
52330
52331
52332
52333
52334
52335
52336
52337
52338
52339
52340
52341
52342
52343
52344
52345
52346
52347
52348
52349
52350
52351
52352
52353
52354
52355
52356
52357
52358
52359
52360
52361
52362
52363
52364
52365
52366
52367
52368
52369
52370
52371
52372
52373
52374
52375    # Execute function body
52376
52377  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52378$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52379  supports=yes
52380
52381  saved_cflags="$CFLAGS"
52382  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52383  ac_ext=c
52384ac_cpp='$CPP $CPPFLAGS'
52385ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52386ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52387ac_compiler_gnu=$ac_cv_c_compiler_gnu
52388
52389  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52390/* end confdefs.h.  */
52391int i;
52392_ACEOF
52393if ac_fn_c_try_compile "$LINENO"; then :
52394
52395else
52396  supports=no
52397fi
52398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52399  ac_ext=cpp
52400ac_cpp='$CXXCPP $CPPFLAGS'
52401ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52402ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52403ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52404
52405  CFLAGS="$saved_cflags"
52406
52407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52408$as_echo "$supports" >&6; }
52409  if test "x$supports" = "xyes" ; then
52410    :
52411    C_COMP_SUPPORTS="yes"
52412  else
52413    :
52414    C_COMP_SUPPORTS="no"
52415  fi
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
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    # Execute function body
52476
52477  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52478$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52479  supports=yes
52480
52481  saved_cxxflags="$CXXFLAGS"
52482  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52483  ac_ext=cpp
52484ac_cpp='$CXXCPP $CPPFLAGS'
52485ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52486ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52487ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52488
52489  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52490/* end confdefs.h.  */
52491int i;
52492_ACEOF
52493if ac_fn_cxx_try_compile "$LINENO"; then :
52494
52495else
52496  supports=no
52497fi
52498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52499  ac_ext=cpp
52500ac_cpp='$CXXCPP $CPPFLAGS'
52501ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52502ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52503ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52504
52505  CXXFLAGS="$saved_cxxflags"
52506
52507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52508$as_echo "$supports" >&6; }
52509  if test "x$supports" = "xyes" ; then
52510    :
52511    CXX_COMP_SUPPORTS="yes"
52512  else
52513    :
52514    CXX_COMP_SUPPORTS="no"
52515  fi
52516
52517
52518
52519
52520
52521
52522
52523
52524
52525
52526
52527
52528
52529  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52530$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52531  supports=no
52532  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52533
52534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52535$as_echo "$supports" >&6; }
52536  if test "x$supports" = "xyes" ; then
52537    :
52538    BUILD_CC_CAN_DISABLE_WARNINGS=true
52539  else
52540    :
52541    BUILD_CC_CAN_DISABLE_WARNINGS=false
52542
52543  fi
52544
52545
52546
52547
52548
52549
52550      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52551        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52552      else
52553        BUILD_CC_DISABLE_WARNING_PREFIX=
52554      fi
52555      CC="$CC_OLD"
52556      CXX="$CXX_OLD"
52557      CFLAGS="$CFLAGS_OLD"
52558      ;;
52559    clang)
52560      DISABLE_WARNING_PREFIX="-Wno-"
52561      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52562      ;;
52563    xlc)
52564      DISABLE_WARNING_PREFIX="-qsuppress="
52565      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52566      ;;
52567  esac
52568
52569
52570
52571
52572
52573# Setup debug symbols (need objcopy from the toolchain for that)
52574
52575  #
52576  # NATIVE_DEBUG_SYMBOLS
52577  # This must be done after the toolchain is setup, since we're looking at objcopy.
52578  #
52579  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52580$as_echo_n "checking what type of native debug symbols to use... " >&6; }
52581
52582# Check whether --with-native-debug-symbols was given.
52583if test "${with_native_debug_symbols+set}" = set; then :
52584  withval=$with_native_debug_symbols;
52585        if test "x$OPENJDK_TARGET_OS" = xaix; then
52586          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52587            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52588          fi
52589        fi
52590
52591else
52592
52593        if test "x$OPENJDK_TARGET_OS" = xaix; then
52594          # AIX doesn't support 'zipped' so use 'internal' as default
52595          with_native_debug_symbols="internal"
52596        else
52597          if test "x$STATIC_BUILD" = xtrue; then
52598            with_native_debug_symbols="none"
52599          else
52600            with_native_debug_symbols="zipped"
52601          fi
52602        fi
52603
52604fi
52605
52606  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
52607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
52608$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
52609
52610  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
52611
52612    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52613      if test "x$OBJCOPY" = x; then
52614        # enabling of enable-debug-symbols and can't find objcopy
52615        # this is an error
52616        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52617      fi
52618    fi
52619
52620    COMPILE_WITH_DEBUG_SYMBOLS=true
52621    COPY_DEBUG_SYMBOLS=true
52622    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
52623  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
52624    COMPILE_WITH_DEBUG_SYMBOLS=false
52625    COPY_DEBUG_SYMBOLS=false
52626    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52627  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
52628    COMPILE_WITH_DEBUG_SYMBOLS=true
52629    COPY_DEBUG_SYMBOLS=false
52630    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52631  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
52632
52633    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52634      if test "x$OBJCOPY" = x; then
52635        # enabling of enable-debug-symbols and can't find objcopy
52636        # this is an error
52637        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52638      fi
52639    fi
52640
52641    COMPILE_WITH_DEBUG_SYMBOLS=true
52642    COPY_DEBUG_SYMBOLS=true
52643    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52644  else
52645    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
52646  fi
52647
52648  # --enable-debug-symbols is deprecated.
52649  # Please use --with-native-debug-symbols=[internal,external,zipped] .
52650
52651  # Check whether --enable-debug-symbols was given.
52652if test "${enable_debug_symbols+set}" = set; then :
52653  enableval=$enable_debug_symbols;
52654fi
52655
52656  if test "x$enable_debug_symbols" != x; then
52657    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
52658$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
52659
52660    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
52661      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
52662$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
52663    fi
52664
52665  fi
52666
52667
52668  # --enable-zip-debug-info is deprecated.
52669  # Please use --with-native-debug-symbols=zipped .
52670
52671  # Check whether --enable-zip-debug-info was given.
52672if test "${enable_zip_debug_info+set}" = set; then :
52673  enableval=$enable_zip_debug_info;
52674fi
52675
52676  if test "x$enable_zip_debug_info" != x; then
52677    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
52678$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
52679
52680    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
52681      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
52682$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
52683    fi
52684
52685  fi
52686
52687
52688
52689
52690
52691
52692
52693  # Check whether --enable-native-coverage was given.
52694if test "${enable_native_coverage+set}" = set; then :
52695  enableval=$enable_native_coverage;
52696fi
52697
52698  GCOV_ENABLED="false"
52699  if test "x$enable_native_coverage" = "xyes"; then
52700    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
52701      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52702$as_echo_n "checking if native coverage is enabled... " >&6; }
52703      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52704$as_echo "yes" >&6; }
52705      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
52706      GCOV_LDFLAGS="-fprofile-arcs"
52707      JVM_CFLAGS="$JVM_CFLAGS $GCOV_CFLAGS"
52708      JVM_LDFLAGS="$JVM_LDFLAGS $GCOV_LDFLAGS"
52709      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
52710      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
52711      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
52712      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
52713      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
52714      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
52715      GCOV_ENABLED="true"
52716    else
52717      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
52718    fi
52719  elif test "x$enable_native_coverage" = "xno"; then
52720    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52721$as_echo_n "checking if native coverage is enabled... " >&6; }
52722    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52723$as_echo "no" >&6; }
52724  elif test "x$enable_native_coverage" != "x"; then
52725    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
52726  fi
52727
52728
52729
52730
52731# Need toolchain to setup dtrace
52732
52733  # Test for dtrace dependencies
52734  # Check whether --enable-dtrace was given.
52735if test "${enable_dtrace+set}" = set; then :
52736  enableval=$enable_dtrace;
52737fi
52738
52739
52740  DTRACE_DEP_MISSING=false
52741
52742  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
52743$as_echo_n "checking for dtrace tool... " >&6; }
52744  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
52745    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
52746$as_echo "$DTRACE" >&6; }
52747  else
52748    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
52749$as_echo "not found, cannot build dtrace" >&6; }
52750    DTRACE_DEP_MISSING=true
52751  fi
52752
52753  for ac_header in sys/sdt.h
52754do :
52755  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
52756if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
52757  cat >>confdefs.h <<_ACEOF
52758#define HAVE_SYS_SDT_H 1
52759_ACEOF
52760 DTRACE_HEADERS_OK=yes
52761else
52762  DTRACE_HEADERS_OK=no
52763fi
52764
52765done
52766
52767  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
52768    DTRACE_DEP_MISSING=true
52769  fi
52770
52771  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
52772$as_echo_n "checking if dtrace should be built... " >&6; }
52773  if test "x$enable_dtrace" = "xyes"; then
52774    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52775      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52776$as_echo "no, missing dependencies" >&6; }
52777
52778  # Print a helpful message on how to acquire the necessary build dependency.
52779  # dtrace is the help tag: freetype, cups, alsa etc
52780  MISSING_DEPENDENCY=dtrace
52781
52782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52783    cygwin_help $MISSING_DEPENDENCY
52784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52785    msys_help $MISSING_DEPENDENCY
52786  else
52787    PKGHANDLER_COMMAND=
52788
52789    case $PKGHANDLER in
52790      apt-get)
52791        apt_help     $MISSING_DEPENDENCY ;;
52792      yum)
52793        yum_help     $MISSING_DEPENDENCY ;;
52794      brew)
52795        brew_help    $MISSING_DEPENDENCY ;;
52796      port)
52797        port_help    $MISSING_DEPENDENCY ;;
52798      pkgutil)
52799        pkgutil_help $MISSING_DEPENDENCY ;;
52800      pkgadd)
52801        pkgadd_help  $MISSING_DEPENDENCY ;;
52802    esac
52803
52804    if test "x$PKGHANDLER_COMMAND" != x; then
52805      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52806    fi
52807  fi
52808
52809      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
52810    else
52811      INCLUDE_DTRACE=true
52812      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52813$as_echo "yes, forced" >&6; }
52814    fi
52815  elif test "x$enable_dtrace" = "xno"; then
52816    INCLUDE_DTRACE=false
52817    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52818$as_echo "no, forced" >&6; }
52819  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
52820    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52821      INCLUDE_DTRACE=false
52822      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52823$as_echo "no, missing dependencies" >&6; }
52824    else
52825      INCLUDE_DTRACE=true
52826      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
52827$as_echo "yes, dependencies present" >&6; }
52828    fi
52829  else
52830    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
52831  fi
52832
52833
52834  # Check whether --enable-aot was given.
52835if test "${enable_aot+set}" = set; then :
52836  enableval=$enable_aot;
52837fi
52838
52839
52840  if test "x$enable_aot" = "x" || test "x$enable_aot" = "xauto"; then
52841    ENABLE_AOT="true"
52842  elif test "x$enable_aot" = "xyes"; then
52843    ENABLE_AOT="true"
52844  elif test "x$enable_aot" = "xno"; then
52845    ENABLE_AOT="false"
52846    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
52847$as_echo_n "checking if aot should be enabled... " >&6; }
52848    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52849$as_echo "no, forced" >&6; }
52850  else
52851    as_fn_error $? "Invalid value for --enable-aot: $enable_aot" "$LINENO" 5
52852  fi
52853
52854  if test "x$ENABLE_AOT" = "xtrue"; then
52855    # Only enable AOT on linux-X64.
52856    if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = "xlinux-x86_64"; then
52857      if test -e "$HOTSPOT_TOPDIR/src/jdk.aot"; then
52858        if test -e "$HOTSPOT_TOPDIR/src/jdk.internal.vm.compiler"; then
52859          ENABLE_AOT="true"
52860        else
52861          ENABLE_AOT="false"
52862          if test "x$enable_aot" = "xyes"; then
52863            as_fn_error $? "Cannot build AOT without hotspot/src/jdk.internal.vm.compiler sources. Remove --enable-aot." "$LINENO" 5
52864          fi
52865        fi
52866      else
52867        ENABLE_AOT="false"
52868        if test "x$enable_aot" = "xyes"; then
52869          as_fn_error $? "Cannot build AOT without hotspot/src/jdk.aot sources. Remove --enable-aot." "$LINENO" 5
52870        fi
52871      fi
52872    else
52873      ENABLE_AOT="false"
52874      if test "x$enable_aot" = "xyes"; then
52875        as_fn_error $? "AOT is currently only supported on Linux-x86_64. Remove --enable-aot." "$LINENO" 5
52876      fi
52877    fi
52878  fi
52879
52880
52881
52882
52883  # Check whether --enable-hotspot-gtest was given.
52884if test "${enable_hotspot_gtest+set}" = set; then :
52885  enableval=$enable_hotspot_gtest;
52886fi
52887
52888
52889  if test -e "$HOTSPOT_TOPDIR/test/native"; then
52890    GTEST_DIR_EXISTS="true"
52891  else
52892    GTEST_DIR_EXISTS="false"
52893  fi
52894
52895  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
52896$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
52897  if test "x$enable_hotspot_gtest" = "xyes"; then
52898    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
52899      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52900$as_echo "yes, forced" >&6; }
52901      BUILD_GTEST="true"
52902    else
52903      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
52904    fi
52905  elif test "x$enable_hotspot_gtest" = "xno"; then
52906    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52907$as_echo "no, forced" >&6; }
52908    BUILD_GTEST="false"
52909  elif test "x$enable_hotspot_gtest" = "x"; then
52910    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
52911      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52912$as_echo "yes" >&6; }
52913      BUILD_GTEST="true"
52914    else
52915      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52916$as_echo "no" >&6; }
52917      BUILD_GTEST="false"
52918    fi
52919  else
52920    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
52921  fi
52922
52923
52924
52925
52926###############################################################################
52927#
52928# Check dependencies for external and internal libraries.
52929#
52930###############################################################################
52931
52932# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
52933
52934  # When using cygwin or msys, we need a wrapper binary that renames
52935  # /cygdrive/c/ arguments into c:/ arguments and peeks into
52936  # @files and rewrites these too! This wrapper binary is
52937  # called fixpath.
52938  FIXPATH=
52939  if test "x$OPENJDK_BUILD_OS" = xwindows; then
52940    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
52941$as_echo_n "checking if fixpath can be created... " >&6; }
52942    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
52943    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
52944    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
52945    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
52946      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
52947      FIXPATH="$FIXPATH_BIN -c"
52948    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
52949      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
52950      # @ was chosen as separator to minimize risk of other tools messing around with it
52951      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
52952          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
52953      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
52954      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
52955    fi
52956    FIXPATH_SRC_W="$FIXPATH_SRC"
52957    FIXPATH_BIN_W="$FIXPATH_BIN"
52958
52959  unix_path="$FIXPATH_SRC_W"
52960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52961    windows_path=`$CYGPATH -m "$unix_path"`
52962    FIXPATH_SRC_W="$windows_path"
52963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52964    windows_path=`cmd //c echo $unix_path`
52965    FIXPATH_SRC_W="$windows_path"
52966  fi
52967
52968
52969  unix_path="$FIXPATH_BIN_W"
52970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52971    windows_path=`$CYGPATH -m "$unix_path"`
52972    FIXPATH_BIN_W="$windows_path"
52973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52974    windows_path=`cmd //c echo $unix_path`
52975    FIXPATH_BIN_W="$windows_path"
52976  fi
52977
52978    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
52979    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
52980    cd $FIXPATH_DIR
52981    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
52982    cd $CURDIR
52983
52984    if test ! -x $FIXPATH_BIN; then
52985      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52986$as_echo "no" >&6; }
52987      cat $FIXPATH_DIR/fixpath1.log
52988      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
52989    fi
52990    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52991$as_echo "yes" >&6; }
52992    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
52993$as_echo_n "checking if fixpath.exe works... " >&6; }
52994    cd $FIXPATH_DIR
52995    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
52996        > $FIXPATH_DIR/fixpath2.log 2>&1
52997    cd $CURDIR
52998    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
52999      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53000$as_echo "no" >&6; }
53001      cat $FIXPATH_DIR/fixpath2.log
53002      as_fn_error $? "fixpath did not work!" "$LINENO" 5
53003    fi
53004    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53005$as_echo "yes" >&6; }
53006
53007    FIXPATH_DETACH_FLAG="--detach"
53008  fi
53009
53010
53011
53012
53013
53014
53015  # Check if X11 is needed
53016  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
53017    # No X11 support on windows or macosx
53018    NEEDS_LIB_X11=false
53019  else
53020    # All other instances need X11, even if building headless only, libawt still
53021    # needs X11 headers.
53022    NEEDS_LIB_X11=true
53023  fi
53024
53025  # Check if cups is needed
53026  if test "x$OPENJDK_TARGET_OS" = xwindows; then
53027    # Windows have a separate print system
53028    NEEDS_LIB_CUPS=false
53029  else
53030    NEEDS_LIB_CUPS=true
53031  fi
53032
53033  # A custom hook may have set this already
53034  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
53035    NEEDS_LIB_FREETYPE=true
53036  fi
53037
53038  # Check if alsa is needed
53039  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53040    NEEDS_LIB_ALSA=true
53041  else
53042    NEEDS_LIB_ALSA=false
53043  fi
53044
53045  # Check if ffi is needed
53046  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53047    NEEDS_LIB_FFI=true
53048  else
53049    NEEDS_LIB_FFI=false
53050  fi
53051
53052
53053  # statically link libstdc++ before C++ ABI is stablized on Linux unless
53054  # dynamic build is configured on command line.
53055
53056# Check whether --with-stdc++lib was given.
53057if test "${with_stdc__lib+set}" = set; then :
53058  withval=$with_stdc__lib;
53059        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53060                && test "x$with_stdc__lib" != xdefault; then
53061          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53062        fi
53063
53064else
53065  with_stdc__lib=default
53066
53067fi
53068
53069
53070  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53071    # Test if stdc++ can be linked statically.
53072    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53073$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53074    STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
53075    ac_ext=cpp
53076ac_cpp='$CXXCPP $CPPFLAGS'
53077ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53078ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53079ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53080
53081    OLD_LIBS="$LIBS"
53082    LIBS="$STATIC_STDCXX_FLAGS"
53083    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53084/* end confdefs.h.  */
53085
53086int
53087main ()
53088{
53089return 0;
53090  ;
53091  return 0;
53092}
53093_ACEOF
53094if ac_fn_cxx_try_link "$LINENO"; then :
53095  has_static_libstdcxx=yes
53096else
53097  has_static_libstdcxx=no
53098fi
53099rm -f core conftest.err conftest.$ac_objext \
53100    conftest$ac_exeext conftest.$ac_ext
53101    LIBS="$OLD_LIBS"
53102    ac_ext=cpp
53103ac_cpp='$CXXCPP $CPPFLAGS'
53104ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53105ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53106ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53107
53108    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53109$as_echo "$has_static_libstdcxx" >&6; }
53110
53111    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53112      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53113    fi
53114
53115    # If dynamic was requested, it's available since it would fail above otherwise.
53116    # If dynamic wasn't requested, go with static unless it isn't available.
53117    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53118$as_echo_n "checking how to link with libstdc++... " >&6; }
53119    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
53120        ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53121      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53122$as_echo "dynamic" >&6; }
53123    else
53124      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53125      JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53126      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53127      # just use the same setting as for the TARGET toolchain.
53128      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53129      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53130$as_echo "static" >&6; }
53131    fi
53132  fi
53133
53134  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53135  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53136    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53137  fi
53138
53139
53140
53141  # Setup Windows runtime dlls
53142  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53143
53144
53145# Check whether --with-msvcr-dll was given.
53146if test "${with_msvcr_dll+set}" = set; then :
53147  withval=$with_msvcr_dll;
53148fi
53149
53150
53151  if test "x$with_msvcr_dll" != x; then
53152    # If given explicitly by user, do not probe. If not present, fail directly.
53153
53154  DLL_NAME="$MSVCR_NAME"
53155  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53156  METHOD="--with-msvcr-dll"
53157  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53158    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53159$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53160
53161    # Need to check if the found msvcr is correct architecture
53162    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53163$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53164    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53165    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53166      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53167      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53168      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53169        CORRECT_MSVCR_ARCH="PE32 executable"
53170      else
53171        CORRECT_MSVCR_ARCH="PE32+ executable"
53172      fi
53173    else
53174      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53175        CORRECT_MSVCR_ARCH=386
53176      else
53177        CORRECT_MSVCR_ARCH=x86-64
53178      fi
53179    fi
53180    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53181      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53182$as_echo "ok" >&6; }
53183      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53184
53185  # Only process if variable expands to non-empty
53186
53187  if test "x$MSVC_DLL" != x; then
53188    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53189
53190  # Input might be given as Windows format, start by converting to
53191  # unix format.
53192  path="$MSVC_DLL"
53193  new_path=`$CYGPATH -u "$path"`
53194
53195  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53196  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53197  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53198  # "foo.exe" is OK but "foo" is an error.
53199  #
53200  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53201  # It is also a way to make sure we got the proper file name for the real test later on.
53202  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53203  if test "x$test_shortpath" = x; then
53204    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53205$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53206    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53207  fi
53208
53209  # Call helper function which possibly converts this using DOS-style short mode.
53210  # If so, the updated path is stored in $new_path.
53211
53212  input_path="$new_path"
53213  # Check if we need to convert this using DOS-style short mode. If the path
53214  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53215  # take no chances and rewrite it.
53216  # Note: m4 eats our [], so we need to use [ and ] instead.
53217  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53218  if test "x$has_forbidden_chars" != x; then
53219    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53220    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53221    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53222    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53223      # Going to short mode and back again did indeed matter. Since short mode is
53224      # case insensitive, let's make it lowercase to improve readability.
53225      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53226      # Now convert it back to Unix-style (cygpath)
53227      input_path=`$CYGPATH -u "$shortmode_path"`
53228      new_path="$input_path"
53229    fi
53230  fi
53231
53232  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53233  if test "x$test_cygdrive_prefix" = x; then
53234    # As a simple fix, exclude /usr/bin since it's not a real path.
53235    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53236      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53237      # a path prefixed by /cygdrive for fixpath to work.
53238      new_path="$CYGWIN_ROOT_PATH$input_path"
53239    fi
53240  fi
53241
53242
53243  if test "x$path" != "x$new_path"; then
53244    MSVC_DLL="$new_path"
53245    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53246$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53247  fi
53248
53249    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53250
53251  path="$MSVC_DLL"
53252  has_colon=`$ECHO $path | $GREP ^.:`
53253  new_path="$path"
53254  if test "x$has_colon" = x; then
53255    # Not in mixed or Windows style, start by that.
53256    new_path=`cmd //c echo $path`
53257  fi
53258
53259
53260  input_path="$new_path"
53261  # Check if we need to convert this using DOS-style short mode. If the path
53262  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53263  # take no chances and rewrite it.
53264  # Note: m4 eats our [], so we need to use [ and ] instead.
53265  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53266  if test "x$has_forbidden_chars" != x; then
53267    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53268    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53269  fi
53270
53271
53272  windows_path="$new_path"
53273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53274    unix_path=`$CYGPATH -u "$windows_path"`
53275    new_path="$unix_path"
53276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53277    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53278    new_path="$unix_path"
53279  fi
53280
53281  if test "x$path" != "x$new_path"; then
53282    MSVC_DLL="$new_path"
53283    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53284$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53285  fi
53286
53287  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53288  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53289
53290    else
53291      # We're on a unix platform. Hooray! :)
53292      path="$MSVC_DLL"
53293      has_space=`$ECHO "$path" | $GREP " "`
53294      if test "x$has_space" != x; then
53295        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53296$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53297        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53298      fi
53299
53300      # Use eval to expand a potential ~
53301      eval path="$path"
53302      if test ! -f "$path" && test ! -d "$path"; then
53303        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53304      fi
53305
53306      if test -d "$path"; then
53307        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53308      else
53309        dir="`$DIRNAME "$path"`"
53310        base="`$BASENAME "$path"`"
53311        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53312      fi
53313    fi
53314  fi
53315
53316      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53317$as_echo_n "checking for $DLL_NAME... " >&6; }
53318      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53319$as_echo "$MSVC_DLL" >&6; }
53320    else
53321      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53322$as_echo "incorrect, ignoring" >&6; }
53323      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53324$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53325    fi
53326  fi
53327
53328    if test "x$MSVC_DLL" = x; then
53329      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53330    fi
53331    MSVCR_DLL="$MSVC_DLL"
53332  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53333
53334  DLL_NAME="$MSVCR_NAME"
53335  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53336  METHOD="devkit"
53337  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53338    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53339$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53340
53341    # Need to check if the found msvcr is correct architecture
53342    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53343$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53344    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53345    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53346      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53347      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53348      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53349        CORRECT_MSVCR_ARCH="PE32 executable"
53350      else
53351        CORRECT_MSVCR_ARCH="PE32+ executable"
53352      fi
53353    else
53354      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53355        CORRECT_MSVCR_ARCH=386
53356      else
53357        CORRECT_MSVCR_ARCH=x86-64
53358      fi
53359    fi
53360    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53361      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53362$as_echo "ok" >&6; }
53363      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53364
53365  # Only process if variable expands to non-empty
53366
53367  if test "x$MSVC_DLL" != x; then
53368    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53369
53370  # Input might be given as Windows format, start by converting to
53371  # unix format.
53372  path="$MSVC_DLL"
53373  new_path=`$CYGPATH -u "$path"`
53374
53375  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53376  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53377  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53378  # "foo.exe" is OK but "foo" is an error.
53379  #
53380  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53381  # It is also a way to make sure we got the proper file name for the real test later on.
53382  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53383  if test "x$test_shortpath" = x; then
53384    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53385$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53386    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53387  fi
53388
53389  # Call helper function which possibly converts this using DOS-style short mode.
53390  # If so, the updated path is stored in $new_path.
53391
53392  input_path="$new_path"
53393  # Check if we need to convert this using DOS-style short mode. If the path
53394  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53395  # take no chances and rewrite it.
53396  # Note: m4 eats our [], so we need to use [ and ] instead.
53397  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53398  if test "x$has_forbidden_chars" != x; then
53399    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53400    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53401    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53402    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53403      # Going to short mode and back again did indeed matter. Since short mode is
53404      # case insensitive, let's make it lowercase to improve readability.
53405      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53406      # Now convert it back to Unix-style (cygpath)
53407      input_path=`$CYGPATH -u "$shortmode_path"`
53408      new_path="$input_path"
53409    fi
53410  fi
53411
53412  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53413  if test "x$test_cygdrive_prefix" = x; then
53414    # As a simple fix, exclude /usr/bin since it's not a real path.
53415    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53416      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53417      # a path prefixed by /cygdrive for fixpath to work.
53418      new_path="$CYGWIN_ROOT_PATH$input_path"
53419    fi
53420  fi
53421
53422
53423  if test "x$path" != "x$new_path"; then
53424    MSVC_DLL="$new_path"
53425    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53426$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53427  fi
53428
53429    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53430
53431  path="$MSVC_DLL"
53432  has_colon=`$ECHO $path | $GREP ^.:`
53433  new_path="$path"
53434  if test "x$has_colon" = x; then
53435    # Not in mixed or Windows style, start by that.
53436    new_path=`cmd //c echo $path`
53437  fi
53438
53439
53440  input_path="$new_path"
53441  # Check if we need to convert this using DOS-style short mode. If the path
53442  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53443  # take no chances and rewrite it.
53444  # Note: m4 eats our [], so we need to use [ and ] instead.
53445  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53446  if test "x$has_forbidden_chars" != x; then
53447    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53448    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53449  fi
53450
53451
53452  windows_path="$new_path"
53453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53454    unix_path=`$CYGPATH -u "$windows_path"`
53455    new_path="$unix_path"
53456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53458    new_path="$unix_path"
53459  fi
53460
53461  if test "x$path" != "x$new_path"; then
53462    MSVC_DLL="$new_path"
53463    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53464$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53465  fi
53466
53467  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53468  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53469
53470    else
53471      # We're on a unix platform. Hooray! :)
53472      path="$MSVC_DLL"
53473      has_space=`$ECHO "$path" | $GREP " "`
53474      if test "x$has_space" != x; then
53475        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53476$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53477        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53478      fi
53479
53480      # Use eval to expand a potential ~
53481      eval path="$path"
53482      if test ! -f "$path" && test ! -d "$path"; then
53483        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53484      fi
53485
53486      if test -d "$path"; then
53487        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53488      else
53489        dir="`$DIRNAME "$path"`"
53490        base="`$BASENAME "$path"`"
53491        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53492      fi
53493    fi
53494  fi
53495
53496      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53497$as_echo_n "checking for $DLL_NAME... " >&6; }
53498      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53499$as_echo "$MSVC_DLL" >&6; }
53500    else
53501      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53502$as_echo "incorrect, ignoring" >&6; }
53503      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53504$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53505    fi
53506  fi
53507
53508    if test "x$MSVC_DLL" = x; then
53509      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53510    fi
53511    MSVCR_DLL="$MSVC_DLL"
53512  else
53513
53514  DLL_NAME="${MSVCR_NAME}"
53515  MSVC_DLL=
53516
53517  if test "x$MSVC_DLL" = x; then
53518    # Probe: Using well-known location from Visual Studio 10.0
53519    if test "x$VCINSTALLDIR" != x; then
53520      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53521
53522  windows_path="$CYGWIN_VC_INSTALL_DIR"
53523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53524    unix_path=`$CYGPATH -u "$windows_path"`
53525    CYGWIN_VC_INSTALL_DIR="$unix_path"
53526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53527    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53528    CYGWIN_VC_INSTALL_DIR="$unix_path"
53529  fi
53530
53531      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53532        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53533      else
53534        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53535      fi
53536      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53537
53538  DLL_NAME="$DLL_NAME"
53539  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53540  METHOD="well-known location in VCINSTALLDIR"
53541  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53542    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53543$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53544
53545    # Need to check if the found msvcr is correct architecture
53546    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53547$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53548    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53549    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53550      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53551      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53552      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53553        CORRECT_MSVCR_ARCH="PE32 executable"
53554      else
53555        CORRECT_MSVCR_ARCH="PE32+ executable"
53556      fi
53557    else
53558      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53559        CORRECT_MSVCR_ARCH=386
53560      else
53561        CORRECT_MSVCR_ARCH=x86-64
53562      fi
53563    fi
53564    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53565      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53566$as_echo "ok" >&6; }
53567      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53568
53569  # Only process if variable expands to non-empty
53570
53571  if test "x$MSVC_DLL" != x; then
53572    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53573
53574  # Input might be given as Windows format, start by converting to
53575  # unix format.
53576  path="$MSVC_DLL"
53577  new_path=`$CYGPATH -u "$path"`
53578
53579  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53580  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53581  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53582  # "foo.exe" is OK but "foo" is an error.
53583  #
53584  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53585  # It is also a way to make sure we got the proper file name for the real test later on.
53586  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53587  if test "x$test_shortpath" = x; then
53588    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53589$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53590    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53591  fi
53592
53593  # Call helper function which possibly converts this using DOS-style short mode.
53594  # If so, the updated path is stored in $new_path.
53595
53596  input_path="$new_path"
53597  # Check if we need to convert this using DOS-style short mode. If the path
53598  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53599  # take no chances and rewrite it.
53600  # Note: m4 eats our [], so we need to use [ and ] instead.
53601  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53602  if test "x$has_forbidden_chars" != x; then
53603    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53604    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53605    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53606    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53607      # Going to short mode and back again did indeed matter. Since short mode is
53608      # case insensitive, let's make it lowercase to improve readability.
53609      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53610      # Now convert it back to Unix-style (cygpath)
53611      input_path=`$CYGPATH -u "$shortmode_path"`
53612      new_path="$input_path"
53613    fi
53614  fi
53615
53616  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53617  if test "x$test_cygdrive_prefix" = x; then
53618    # As a simple fix, exclude /usr/bin since it's not a real path.
53619    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53620      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53621      # a path prefixed by /cygdrive for fixpath to work.
53622      new_path="$CYGWIN_ROOT_PATH$input_path"
53623    fi
53624  fi
53625
53626
53627  if test "x$path" != "x$new_path"; then
53628    MSVC_DLL="$new_path"
53629    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53630$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53631  fi
53632
53633    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53634
53635  path="$MSVC_DLL"
53636  has_colon=`$ECHO $path | $GREP ^.:`
53637  new_path="$path"
53638  if test "x$has_colon" = x; then
53639    # Not in mixed or Windows style, start by that.
53640    new_path=`cmd //c echo $path`
53641  fi
53642
53643
53644  input_path="$new_path"
53645  # Check if we need to convert this using DOS-style short mode. If the path
53646  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53647  # take no chances and rewrite it.
53648  # Note: m4 eats our [], so we need to use [ and ] instead.
53649  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53650  if test "x$has_forbidden_chars" != x; then
53651    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53652    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53653  fi
53654
53655
53656  windows_path="$new_path"
53657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53658    unix_path=`$CYGPATH -u "$windows_path"`
53659    new_path="$unix_path"
53660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53661    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53662    new_path="$unix_path"
53663  fi
53664
53665  if test "x$path" != "x$new_path"; then
53666    MSVC_DLL="$new_path"
53667    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53668$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53669  fi
53670
53671  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53672  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53673
53674    else
53675      # We're on a unix platform. Hooray! :)
53676      path="$MSVC_DLL"
53677      has_space=`$ECHO "$path" | $GREP " "`
53678      if test "x$has_space" != x; then
53679        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53680$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53681        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53682      fi
53683
53684      # Use eval to expand a potential ~
53685      eval path="$path"
53686      if test ! -f "$path" && test ! -d "$path"; then
53687        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53688      fi
53689
53690      if test -d "$path"; then
53691        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53692      else
53693        dir="`$DIRNAME "$path"`"
53694        base="`$BASENAME "$path"`"
53695        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53696      fi
53697    fi
53698  fi
53699
53700      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53701$as_echo_n "checking for $DLL_NAME... " >&6; }
53702      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53703$as_echo "$MSVC_DLL" >&6; }
53704    else
53705      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53706$as_echo "incorrect, ignoring" >&6; }
53707      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53708$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53709    fi
53710  fi
53711
53712    fi
53713  fi
53714
53715  if test "x$MSVC_DLL" = x; then
53716    # Probe: Check in the Boot JDK directory.
53717    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53718
53719  DLL_NAME="$DLL_NAME"
53720  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53721  METHOD="well-known location in Boot JDK"
53722  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53723    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53724$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53725
53726    # Need to check if the found msvcr is correct architecture
53727    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53728$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53729    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53730    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53731      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53732      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53733      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53734        CORRECT_MSVCR_ARCH="PE32 executable"
53735      else
53736        CORRECT_MSVCR_ARCH="PE32+ executable"
53737      fi
53738    else
53739      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53740        CORRECT_MSVCR_ARCH=386
53741      else
53742        CORRECT_MSVCR_ARCH=x86-64
53743      fi
53744    fi
53745    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53746      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53747$as_echo "ok" >&6; }
53748      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53749
53750  # Only process if variable expands to non-empty
53751
53752  if test "x$MSVC_DLL" != x; then
53753    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53754
53755  # Input might be given as Windows format, start by converting to
53756  # unix format.
53757  path="$MSVC_DLL"
53758  new_path=`$CYGPATH -u "$path"`
53759
53760  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53761  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53762  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53763  # "foo.exe" is OK but "foo" is an error.
53764  #
53765  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53766  # It is also a way to make sure we got the proper file name for the real test later on.
53767  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53768  if test "x$test_shortpath" = x; then
53769    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53770$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53771    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53772  fi
53773
53774  # Call helper function which possibly converts this using DOS-style short mode.
53775  # If so, the updated path is stored in $new_path.
53776
53777  input_path="$new_path"
53778  # Check if we need to convert this using DOS-style short mode. If the path
53779  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53780  # take no chances and rewrite it.
53781  # Note: m4 eats our [], so we need to use [ and ] instead.
53782  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53783  if test "x$has_forbidden_chars" != x; then
53784    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53785    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53786    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53787    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53788      # Going to short mode and back again did indeed matter. Since short mode is
53789      # case insensitive, let's make it lowercase to improve readability.
53790      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53791      # Now convert it back to Unix-style (cygpath)
53792      input_path=`$CYGPATH -u "$shortmode_path"`
53793      new_path="$input_path"
53794    fi
53795  fi
53796
53797  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53798  if test "x$test_cygdrive_prefix" = x; then
53799    # As a simple fix, exclude /usr/bin since it's not a real path.
53800    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53801      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53802      # a path prefixed by /cygdrive for fixpath to work.
53803      new_path="$CYGWIN_ROOT_PATH$input_path"
53804    fi
53805  fi
53806
53807
53808  if test "x$path" != "x$new_path"; then
53809    MSVC_DLL="$new_path"
53810    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53811$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53812  fi
53813
53814    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53815
53816  path="$MSVC_DLL"
53817  has_colon=`$ECHO $path | $GREP ^.:`
53818  new_path="$path"
53819  if test "x$has_colon" = x; then
53820    # Not in mixed or Windows style, start by that.
53821    new_path=`cmd //c echo $path`
53822  fi
53823
53824
53825  input_path="$new_path"
53826  # Check if we need to convert this using DOS-style short mode. If the path
53827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53828  # take no chances and rewrite it.
53829  # Note: m4 eats our [], so we need to use [ and ] instead.
53830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53831  if test "x$has_forbidden_chars" != x; then
53832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53833    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53834  fi
53835
53836
53837  windows_path="$new_path"
53838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53839    unix_path=`$CYGPATH -u "$windows_path"`
53840    new_path="$unix_path"
53841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53842    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53843    new_path="$unix_path"
53844  fi
53845
53846  if test "x$path" != "x$new_path"; then
53847    MSVC_DLL="$new_path"
53848    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53849$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53850  fi
53851
53852  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53853  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53854
53855    else
53856      # We're on a unix platform. Hooray! :)
53857      path="$MSVC_DLL"
53858      has_space=`$ECHO "$path" | $GREP " "`
53859      if test "x$has_space" != x; then
53860        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53861$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53862        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53863      fi
53864
53865      # Use eval to expand a potential ~
53866      eval path="$path"
53867      if test ! -f "$path" && test ! -d "$path"; then
53868        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53869      fi
53870
53871      if test -d "$path"; then
53872        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53873      else
53874        dir="`$DIRNAME "$path"`"
53875        base="`$BASENAME "$path"`"
53876        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53877      fi
53878    fi
53879  fi
53880
53881      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53882$as_echo_n "checking for $DLL_NAME... " >&6; }
53883      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53884$as_echo "$MSVC_DLL" >&6; }
53885    else
53886      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53887$as_echo "incorrect, ignoring" >&6; }
53888      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53889$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53890    fi
53891  fi
53892
53893  fi
53894
53895  if test "x$MSVC_DLL" = x; then
53896    # Probe: Look in the Windows system32 directory
53897    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
53898
53899  windows_path="$CYGWIN_SYSTEMROOT"
53900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53901    unix_path=`$CYGPATH -u "$windows_path"`
53902    CYGWIN_SYSTEMROOT="$unix_path"
53903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53904    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53905    CYGWIN_SYSTEMROOT="$unix_path"
53906  fi
53907
53908    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
53909
53910  DLL_NAME="$DLL_NAME"
53911  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53912  METHOD="well-known location in SYSTEMROOT"
53913  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53914    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53915$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53916
53917    # Need to check if the found msvcr is correct architecture
53918    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53919$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53920    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53921    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53922      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53923      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53924      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53925        CORRECT_MSVCR_ARCH="PE32 executable"
53926      else
53927        CORRECT_MSVCR_ARCH="PE32+ executable"
53928      fi
53929    else
53930      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53931        CORRECT_MSVCR_ARCH=386
53932      else
53933        CORRECT_MSVCR_ARCH=x86-64
53934      fi
53935    fi
53936    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53937      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53938$as_echo "ok" >&6; }
53939      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53940
53941  # Only process if variable expands to non-empty
53942
53943  if test "x$MSVC_DLL" != x; then
53944    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53945
53946  # Input might be given as Windows format, start by converting to
53947  # unix format.
53948  path="$MSVC_DLL"
53949  new_path=`$CYGPATH -u "$path"`
53950
53951  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53952  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53953  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53954  # "foo.exe" is OK but "foo" is an error.
53955  #
53956  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53957  # It is also a way to make sure we got the proper file name for the real test later on.
53958  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53959  if test "x$test_shortpath" = x; then
53960    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53961$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53962    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53963  fi
53964
53965  # Call helper function which possibly converts this using DOS-style short mode.
53966  # If so, the updated path is stored in $new_path.
53967
53968  input_path="$new_path"
53969  # Check if we need to convert this using DOS-style short mode. If the path
53970  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53971  # take no chances and rewrite it.
53972  # Note: m4 eats our [], so we need to use [ and ] instead.
53973  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53974  if test "x$has_forbidden_chars" != x; then
53975    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53976    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53977    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53978    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53979      # Going to short mode and back again did indeed matter. Since short mode is
53980      # case insensitive, let's make it lowercase to improve readability.
53981      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53982      # Now convert it back to Unix-style (cygpath)
53983      input_path=`$CYGPATH -u "$shortmode_path"`
53984      new_path="$input_path"
53985    fi
53986  fi
53987
53988  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53989  if test "x$test_cygdrive_prefix" = x; then
53990    # As a simple fix, exclude /usr/bin since it's not a real path.
53991    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53992      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53993      # a path prefixed by /cygdrive for fixpath to work.
53994      new_path="$CYGWIN_ROOT_PATH$input_path"
53995    fi
53996  fi
53997
53998
53999  if test "x$path" != "x$new_path"; then
54000    MSVC_DLL="$new_path"
54001    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54002$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54003  fi
54004
54005    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54006
54007  path="$MSVC_DLL"
54008  has_colon=`$ECHO $path | $GREP ^.:`
54009  new_path="$path"
54010  if test "x$has_colon" = x; then
54011    # Not in mixed or Windows style, start by that.
54012    new_path=`cmd //c echo $path`
54013  fi
54014
54015
54016  input_path="$new_path"
54017  # Check if we need to convert this using DOS-style short mode. If the path
54018  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54019  # take no chances and rewrite it.
54020  # Note: m4 eats our [], so we need to use [ and ] instead.
54021  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54022  if test "x$has_forbidden_chars" != x; then
54023    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54024    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54025  fi
54026
54027
54028  windows_path="$new_path"
54029  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54030    unix_path=`$CYGPATH -u "$windows_path"`
54031    new_path="$unix_path"
54032  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54033    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54034    new_path="$unix_path"
54035  fi
54036
54037  if test "x$path" != "x$new_path"; then
54038    MSVC_DLL="$new_path"
54039    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54040$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54041  fi
54042
54043  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54044  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54045
54046    else
54047      # We're on a unix platform. Hooray! :)
54048      path="$MSVC_DLL"
54049      has_space=`$ECHO "$path" | $GREP " "`
54050      if test "x$has_space" != x; then
54051        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54052$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54053        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54054      fi
54055
54056      # Use eval to expand a potential ~
54057      eval path="$path"
54058      if test ! -f "$path" && test ! -d "$path"; then
54059        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54060      fi
54061
54062      if test -d "$path"; then
54063        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54064      else
54065        dir="`$DIRNAME "$path"`"
54066        base="`$BASENAME "$path"`"
54067        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54068      fi
54069    fi
54070  fi
54071
54072      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54073$as_echo_n "checking for $DLL_NAME... " >&6; }
54074      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54075$as_echo "$MSVC_DLL" >&6; }
54076    else
54077      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54078$as_echo "incorrect, ignoring" >&6; }
54079      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54080$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54081    fi
54082  fi
54083
54084  fi
54085
54086  if test "x$MSVC_DLL" = x; then
54087    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54088    if test "x$VS100COMNTOOLS" != x; then
54089      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54090
54091  windows_path="$CYGWIN_VS_TOOLS_DIR"
54092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54093    unix_path=`$CYGPATH -u "$windows_path"`
54094    CYGWIN_VS_TOOLS_DIR="$unix_path"
54095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54096    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54097    CYGWIN_VS_TOOLS_DIR="$unix_path"
54098  fi
54099
54100      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54101        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54102	    | $GREP -i /x64/ | $HEAD --lines 1`
54103      else
54104        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54105	    | $GREP -i /x86/ | $HEAD --lines 1`
54106      fi
54107
54108  DLL_NAME="$DLL_NAME"
54109  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54110  METHOD="search of VS100COMNTOOLS"
54111  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54112    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54113$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54114
54115    # Need to check if the found msvcr is correct architecture
54116    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54117$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54118    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54119    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54120      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54121      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54122      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54123        CORRECT_MSVCR_ARCH="PE32 executable"
54124      else
54125        CORRECT_MSVCR_ARCH="PE32+ executable"
54126      fi
54127    else
54128      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54129        CORRECT_MSVCR_ARCH=386
54130      else
54131        CORRECT_MSVCR_ARCH=x86-64
54132      fi
54133    fi
54134    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54135      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54136$as_echo "ok" >&6; }
54137      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54138
54139  # Only process if variable expands to non-empty
54140
54141  if test "x$MSVC_DLL" != x; then
54142    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54143
54144  # Input might be given as Windows format, start by converting to
54145  # unix format.
54146  path="$MSVC_DLL"
54147  new_path=`$CYGPATH -u "$path"`
54148
54149  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54150  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54151  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54152  # "foo.exe" is OK but "foo" is an error.
54153  #
54154  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54155  # It is also a way to make sure we got the proper file name for the real test later on.
54156  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54157  if test "x$test_shortpath" = x; then
54158    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54159$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54160    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54161  fi
54162
54163  # Call helper function which possibly converts this using DOS-style short mode.
54164  # If so, the updated path is stored in $new_path.
54165
54166  input_path="$new_path"
54167  # Check if we need to convert this using DOS-style short mode. If the path
54168  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54169  # take no chances and rewrite it.
54170  # Note: m4 eats our [], so we need to use [ and ] instead.
54171  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54172  if test "x$has_forbidden_chars" != x; then
54173    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54174    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54175    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54176    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54177      # Going to short mode and back again did indeed matter. Since short mode is
54178      # case insensitive, let's make it lowercase to improve readability.
54179      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54180      # Now convert it back to Unix-style (cygpath)
54181      input_path=`$CYGPATH -u "$shortmode_path"`
54182      new_path="$input_path"
54183    fi
54184  fi
54185
54186  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54187  if test "x$test_cygdrive_prefix" = x; then
54188    # As a simple fix, exclude /usr/bin since it's not a real path.
54189    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54190      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54191      # a path prefixed by /cygdrive for fixpath to work.
54192      new_path="$CYGWIN_ROOT_PATH$input_path"
54193    fi
54194  fi
54195
54196
54197  if test "x$path" != "x$new_path"; then
54198    MSVC_DLL="$new_path"
54199    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54200$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54201  fi
54202
54203    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54204
54205  path="$MSVC_DLL"
54206  has_colon=`$ECHO $path | $GREP ^.:`
54207  new_path="$path"
54208  if test "x$has_colon" = x; then
54209    # Not in mixed or Windows style, start by that.
54210    new_path=`cmd //c echo $path`
54211  fi
54212
54213
54214  input_path="$new_path"
54215  # Check if we need to convert this using DOS-style short mode. If the path
54216  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54217  # take no chances and rewrite it.
54218  # Note: m4 eats our [], so we need to use [ and ] instead.
54219  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54220  if test "x$has_forbidden_chars" != x; then
54221    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54222    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54223  fi
54224
54225
54226  windows_path="$new_path"
54227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54228    unix_path=`$CYGPATH -u "$windows_path"`
54229    new_path="$unix_path"
54230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54231    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54232    new_path="$unix_path"
54233  fi
54234
54235  if test "x$path" != "x$new_path"; then
54236    MSVC_DLL="$new_path"
54237    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54238$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54239  fi
54240
54241  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54242  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54243
54244    else
54245      # We're on a unix platform. Hooray! :)
54246      path="$MSVC_DLL"
54247      has_space=`$ECHO "$path" | $GREP " "`
54248      if test "x$has_space" != x; then
54249        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54250$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54251        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54252      fi
54253
54254      # Use eval to expand a potential ~
54255      eval path="$path"
54256      if test ! -f "$path" && test ! -d "$path"; then
54257        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54258      fi
54259
54260      if test -d "$path"; then
54261        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54262      else
54263        dir="`$DIRNAME "$path"`"
54264        base="`$BASENAME "$path"`"
54265        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54266      fi
54267    fi
54268  fi
54269
54270      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54271$as_echo_n "checking for $DLL_NAME... " >&6; }
54272      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54273$as_echo "$MSVC_DLL" >&6; }
54274    else
54275      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54276$as_echo "incorrect, ignoring" >&6; }
54277      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54278$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54279    fi
54280  fi
54281
54282    fi
54283  fi
54284
54285  if test "x$MSVC_DLL" = x; then
54286    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54287    # (This was the original behaviour; kept since it might turn something up)
54288    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54289      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54290        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54291	    | $GREP x64 | $HEAD --lines 1`
54292      else
54293        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54294	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54295        if test "x$POSSIBLE_MSVC_DLL" = x; then
54296          # We're grasping at straws now...
54297          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54298	      | $HEAD --lines 1`
54299        fi
54300      fi
54301
54302
54303  DLL_NAME="$DLL_NAME"
54304  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54305  METHOD="search of VCINSTALLDIR"
54306  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54307    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54308$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54309
54310    # Need to check if the found msvcr is correct architecture
54311    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54312$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54313    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54314    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54315      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54316      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54317      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54318        CORRECT_MSVCR_ARCH="PE32 executable"
54319      else
54320        CORRECT_MSVCR_ARCH="PE32+ executable"
54321      fi
54322    else
54323      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54324        CORRECT_MSVCR_ARCH=386
54325      else
54326        CORRECT_MSVCR_ARCH=x86-64
54327      fi
54328    fi
54329    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54330      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54331$as_echo "ok" >&6; }
54332      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54333
54334  # Only process if variable expands to non-empty
54335
54336  if test "x$MSVC_DLL" != x; then
54337    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54338
54339  # Input might be given as Windows format, start by converting to
54340  # unix format.
54341  path="$MSVC_DLL"
54342  new_path=`$CYGPATH -u "$path"`
54343
54344  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54345  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54346  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54347  # "foo.exe" is OK but "foo" is an error.
54348  #
54349  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54350  # It is also a way to make sure we got the proper file name for the real test later on.
54351  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54352  if test "x$test_shortpath" = x; then
54353    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54354$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54355    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54356  fi
54357
54358  # Call helper function which possibly converts this using DOS-style short mode.
54359  # If so, the updated path is stored in $new_path.
54360
54361  input_path="$new_path"
54362  # Check if we need to convert this using DOS-style short mode. If the path
54363  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54364  # take no chances and rewrite it.
54365  # Note: m4 eats our [], so we need to use [ and ] instead.
54366  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54367  if test "x$has_forbidden_chars" != x; then
54368    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54369    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54370    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54371    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54372      # Going to short mode and back again did indeed matter. Since short mode is
54373      # case insensitive, let's make it lowercase to improve readability.
54374      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54375      # Now convert it back to Unix-style (cygpath)
54376      input_path=`$CYGPATH -u "$shortmode_path"`
54377      new_path="$input_path"
54378    fi
54379  fi
54380
54381  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54382  if test "x$test_cygdrive_prefix" = x; then
54383    # As a simple fix, exclude /usr/bin since it's not a real path.
54384    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54385      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54386      # a path prefixed by /cygdrive for fixpath to work.
54387      new_path="$CYGWIN_ROOT_PATH$input_path"
54388    fi
54389  fi
54390
54391
54392  if test "x$path" != "x$new_path"; then
54393    MSVC_DLL="$new_path"
54394    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54395$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54396  fi
54397
54398    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54399
54400  path="$MSVC_DLL"
54401  has_colon=`$ECHO $path | $GREP ^.:`
54402  new_path="$path"
54403  if test "x$has_colon" = x; then
54404    # Not in mixed or Windows style, start by that.
54405    new_path=`cmd //c echo $path`
54406  fi
54407
54408
54409  input_path="$new_path"
54410  # Check if we need to convert this using DOS-style short mode. If the path
54411  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54412  # take no chances and rewrite it.
54413  # Note: m4 eats our [], so we need to use [ and ] instead.
54414  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54415  if test "x$has_forbidden_chars" != x; then
54416    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54417    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54418  fi
54419
54420
54421  windows_path="$new_path"
54422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54423    unix_path=`$CYGPATH -u "$windows_path"`
54424    new_path="$unix_path"
54425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54427    new_path="$unix_path"
54428  fi
54429
54430  if test "x$path" != "x$new_path"; then
54431    MSVC_DLL="$new_path"
54432    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54433$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54434  fi
54435
54436  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54437  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54438
54439    else
54440      # We're on a unix platform. Hooray! :)
54441      path="$MSVC_DLL"
54442      has_space=`$ECHO "$path" | $GREP " "`
54443      if test "x$has_space" != x; then
54444        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54445$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54446        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54447      fi
54448
54449      # Use eval to expand a potential ~
54450      eval path="$path"
54451      if test ! -f "$path" && test ! -d "$path"; then
54452        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54453      fi
54454
54455      if test -d "$path"; then
54456        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54457      else
54458        dir="`$DIRNAME "$path"`"
54459        base="`$BASENAME "$path"`"
54460        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54461      fi
54462    fi
54463  fi
54464
54465      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54466$as_echo_n "checking for $DLL_NAME... " >&6; }
54467      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54468$as_echo "$MSVC_DLL" >&6; }
54469    else
54470      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54471$as_echo "incorrect, ignoring" >&6; }
54472      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54473$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54474    fi
54475  fi
54476
54477    fi
54478  fi
54479
54480  if test "x$MSVC_DLL" = x; then
54481    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54482$as_echo_n "checking for $DLL_NAME... " >&6; }
54483    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54484$as_echo "no" >&6; }
54485    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54486  fi
54487
54488    MSVCR_DLL="$MSVC_DLL"
54489  fi
54490
54491
54492
54493# Check whether --with-msvcp-dll was given.
54494if test "${with_msvcp_dll+set}" = set; then :
54495  withval=$with_msvcp_dll;
54496fi
54497
54498
54499  if test "x$MSVCP_NAME" != "x"; then
54500    if test "x$with_msvcp_dll" != x; then
54501      # If given explicitly by user, do not probe. If not present, fail directly.
54502
54503  DLL_NAME="$MSVCP_NAME"
54504  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54505  METHOD="--with-msvcp-dll"
54506  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54507    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54508$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54509
54510    # Need to check if the found msvcr is correct architecture
54511    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54512$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54513    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54514    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54515      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54516      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54517      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54518        CORRECT_MSVCR_ARCH="PE32 executable"
54519      else
54520        CORRECT_MSVCR_ARCH="PE32+ executable"
54521      fi
54522    else
54523      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54524        CORRECT_MSVCR_ARCH=386
54525      else
54526        CORRECT_MSVCR_ARCH=x86-64
54527      fi
54528    fi
54529    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54530      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54531$as_echo "ok" >&6; }
54532      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54533
54534  # Only process if variable expands to non-empty
54535
54536  if test "x$MSVC_DLL" != x; then
54537    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54538
54539  # Input might be given as Windows format, start by converting to
54540  # unix format.
54541  path="$MSVC_DLL"
54542  new_path=`$CYGPATH -u "$path"`
54543
54544  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54545  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54546  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54547  # "foo.exe" is OK but "foo" is an error.
54548  #
54549  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54550  # It is also a way to make sure we got the proper file name for the real test later on.
54551  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54552  if test "x$test_shortpath" = x; then
54553    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54554$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54555    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54556  fi
54557
54558  # Call helper function which possibly converts this using DOS-style short mode.
54559  # If so, the updated path is stored in $new_path.
54560
54561  input_path="$new_path"
54562  # Check if we need to convert this using DOS-style short mode. If the path
54563  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54564  # take no chances and rewrite it.
54565  # Note: m4 eats our [], so we need to use [ and ] instead.
54566  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54567  if test "x$has_forbidden_chars" != x; then
54568    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54569    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54570    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54571    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54572      # Going to short mode and back again did indeed matter. Since short mode is
54573      # case insensitive, let's make it lowercase to improve readability.
54574      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54575      # Now convert it back to Unix-style (cygpath)
54576      input_path=`$CYGPATH -u "$shortmode_path"`
54577      new_path="$input_path"
54578    fi
54579  fi
54580
54581  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54582  if test "x$test_cygdrive_prefix" = x; then
54583    # As a simple fix, exclude /usr/bin since it's not a real path.
54584    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54585      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54586      # a path prefixed by /cygdrive for fixpath to work.
54587      new_path="$CYGWIN_ROOT_PATH$input_path"
54588    fi
54589  fi
54590
54591
54592  if test "x$path" != "x$new_path"; then
54593    MSVC_DLL="$new_path"
54594    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54595$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54596  fi
54597
54598    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54599
54600  path="$MSVC_DLL"
54601  has_colon=`$ECHO $path | $GREP ^.:`
54602  new_path="$path"
54603  if test "x$has_colon" = x; then
54604    # Not in mixed or Windows style, start by that.
54605    new_path=`cmd //c echo $path`
54606  fi
54607
54608
54609  input_path="$new_path"
54610  # Check if we need to convert this using DOS-style short mode. If the path
54611  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54612  # take no chances and rewrite it.
54613  # Note: m4 eats our [], so we need to use [ and ] instead.
54614  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54615  if test "x$has_forbidden_chars" != x; then
54616    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54617    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54618  fi
54619
54620
54621  windows_path="$new_path"
54622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54623    unix_path=`$CYGPATH -u "$windows_path"`
54624    new_path="$unix_path"
54625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54627    new_path="$unix_path"
54628  fi
54629
54630  if test "x$path" != "x$new_path"; then
54631    MSVC_DLL="$new_path"
54632    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54633$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54634  fi
54635
54636  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54637  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54638
54639    else
54640      # We're on a unix platform. Hooray! :)
54641      path="$MSVC_DLL"
54642      has_space=`$ECHO "$path" | $GREP " "`
54643      if test "x$has_space" != x; then
54644        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54645$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54646        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54647      fi
54648
54649      # Use eval to expand a potential ~
54650      eval path="$path"
54651      if test ! -f "$path" && test ! -d "$path"; then
54652        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54653      fi
54654
54655      if test -d "$path"; then
54656        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54657      else
54658        dir="`$DIRNAME "$path"`"
54659        base="`$BASENAME "$path"`"
54660        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54661      fi
54662    fi
54663  fi
54664
54665      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54666$as_echo_n "checking for $DLL_NAME... " >&6; }
54667      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54668$as_echo "$MSVC_DLL" >&6; }
54669    else
54670      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54671$as_echo "incorrect, ignoring" >&6; }
54672      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54673$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54674    fi
54675  fi
54676
54677      if test "x$MSVC_DLL" = x; then
54678        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
54679      fi
54680      MSVCP_DLL="$MSVC_DLL"
54681    elif test "x$DEVKIT_MSVCP_DLL" != x; then
54682
54683  DLL_NAME="$MSVCP_NAME"
54684  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
54685  METHOD="devkit"
54686  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54687    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54688$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54689
54690    # Need to check if the found msvcr is correct architecture
54691    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54692$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54693    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54694    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54695      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54696      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54697      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54698        CORRECT_MSVCR_ARCH="PE32 executable"
54699      else
54700        CORRECT_MSVCR_ARCH="PE32+ executable"
54701      fi
54702    else
54703      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54704        CORRECT_MSVCR_ARCH=386
54705      else
54706        CORRECT_MSVCR_ARCH=x86-64
54707      fi
54708    fi
54709    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54710      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54711$as_echo "ok" >&6; }
54712      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54713
54714  # Only process if variable expands to non-empty
54715
54716  if test "x$MSVC_DLL" != x; then
54717    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54718
54719  # Input might be given as Windows format, start by converting to
54720  # unix format.
54721  path="$MSVC_DLL"
54722  new_path=`$CYGPATH -u "$path"`
54723
54724  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54725  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54726  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54727  # "foo.exe" is OK but "foo" is an error.
54728  #
54729  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54730  # It is also a way to make sure we got the proper file name for the real test later on.
54731  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54732  if test "x$test_shortpath" = x; then
54733    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54734$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54735    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54736  fi
54737
54738  # Call helper function which possibly converts this using DOS-style short mode.
54739  # If so, the updated path is stored in $new_path.
54740
54741  input_path="$new_path"
54742  # Check if we need to convert this using DOS-style short mode. If the path
54743  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54744  # take no chances and rewrite it.
54745  # Note: m4 eats our [], so we need to use [ and ] instead.
54746  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54747  if test "x$has_forbidden_chars" != x; then
54748    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54749    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54750    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54751    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54752      # Going to short mode and back again did indeed matter. Since short mode is
54753      # case insensitive, let's make it lowercase to improve readability.
54754      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54755      # Now convert it back to Unix-style (cygpath)
54756      input_path=`$CYGPATH -u "$shortmode_path"`
54757      new_path="$input_path"
54758    fi
54759  fi
54760
54761  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54762  if test "x$test_cygdrive_prefix" = x; then
54763    # As a simple fix, exclude /usr/bin since it's not a real path.
54764    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54765      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54766      # a path prefixed by /cygdrive for fixpath to work.
54767      new_path="$CYGWIN_ROOT_PATH$input_path"
54768    fi
54769  fi
54770
54771
54772  if test "x$path" != "x$new_path"; then
54773    MSVC_DLL="$new_path"
54774    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54775$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54776  fi
54777
54778    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54779
54780  path="$MSVC_DLL"
54781  has_colon=`$ECHO $path | $GREP ^.:`
54782  new_path="$path"
54783  if test "x$has_colon" = x; then
54784    # Not in mixed or Windows style, start by that.
54785    new_path=`cmd //c echo $path`
54786  fi
54787
54788
54789  input_path="$new_path"
54790  # Check if we need to convert this using DOS-style short mode. If the path
54791  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54792  # take no chances and rewrite it.
54793  # Note: m4 eats our [], so we need to use [ and ] instead.
54794  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54795  if test "x$has_forbidden_chars" != x; then
54796    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54797    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54798  fi
54799
54800
54801  windows_path="$new_path"
54802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54803    unix_path=`$CYGPATH -u "$windows_path"`
54804    new_path="$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    new_path="$unix_path"
54808  fi
54809
54810  if test "x$path" != "x$new_path"; then
54811    MSVC_DLL="$new_path"
54812    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54813$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54814  fi
54815
54816  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54817  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54818
54819    else
54820      # We're on a unix platform. Hooray! :)
54821      path="$MSVC_DLL"
54822      has_space=`$ECHO "$path" | $GREP " "`
54823      if test "x$has_space" != x; then
54824        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54825$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54826        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54827      fi
54828
54829      # Use eval to expand a potential ~
54830      eval path="$path"
54831      if test ! -f "$path" && test ! -d "$path"; then
54832        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54833      fi
54834
54835      if test -d "$path"; then
54836        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54837      else
54838        dir="`$DIRNAME "$path"`"
54839        base="`$BASENAME "$path"`"
54840        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54841      fi
54842    fi
54843  fi
54844
54845      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54846$as_echo_n "checking for $DLL_NAME... " >&6; }
54847      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54848$as_echo "$MSVC_DLL" >&6; }
54849    else
54850      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54851$as_echo "incorrect, ignoring" >&6; }
54852      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54853$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54854    fi
54855  fi
54856
54857      if test "x$MSVC_DLL" = x; then
54858        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
54859      fi
54860      MSVCP_DLL="$MSVC_DLL"
54861    else
54862
54863  DLL_NAME="${MSVCP_NAME}"
54864  MSVC_DLL=
54865
54866  if test "x$MSVC_DLL" = x; then
54867    # Probe: Using well-known location from Visual Studio 10.0
54868    if test "x$VCINSTALLDIR" != x; then
54869      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54870
54871  windows_path="$CYGWIN_VC_INSTALL_DIR"
54872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54873    unix_path=`$CYGPATH -u "$windows_path"`
54874    CYGWIN_VC_INSTALL_DIR="$unix_path"
54875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54877    CYGWIN_VC_INSTALL_DIR="$unix_path"
54878  fi
54879
54880      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54881        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54882      else
54883        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54884      fi
54885      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54886
54887  DLL_NAME="$DLL_NAME"
54888  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54889  METHOD="well-known location in VCINSTALLDIR"
54890  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54891    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54892$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54893
54894    # Need to check if the found msvcr is correct architecture
54895    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54896$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54897    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54898    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54899      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54900      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54901      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54902        CORRECT_MSVCR_ARCH="PE32 executable"
54903      else
54904        CORRECT_MSVCR_ARCH="PE32+ executable"
54905      fi
54906    else
54907      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54908        CORRECT_MSVCR_ARCH=386
54909      else
54910        CORRECT_MSVCR_ARCH=x86-64
54911      fi
54912    fi
54913    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54914      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54915$as_echo "ok" >&6; }
54916      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54917
54918  # Only process if variable expands to non-empty
54919
54920  if test "x$MSVC_DLL" != x; then
54921    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54922
54923  # Input might be given as Windows format, start by converting to
54924  # unix format.
54925  path="$MSVC_DLL"
54926  new_path=`$CYGPATH -u "$path"`
54927
54928  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54929  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54930  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54931  # "foo.exe" is OK but "foo" is an error.
54932  #
54933  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54934  # It is also a way to make sure we got the proper file name for the real test later on.
54935  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54936  if test "x$test_shortpath" = x; then
54937    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54938$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54939    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54940  fi
54941
54942  # Call helper function which possibly converts this using DOS-style short mode.
54943  # If so, the updated path is stored in $new_path.
54944
54945  input_path="$new_path"
54946  # Check if we need to convert this using DOS-style short mode. If the path
54947  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54948  # take no chances and rewrite it.
54949  # Note: m4 eats our [], so we need to use [ and ] instead.
54950  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54951  if test "x$has_forbidden_chars" != x; then
54952    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54953    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54954    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54955    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54956      # Going to short mode and back again did indeed matter. Since short mode is
54957      # case insensitive, let's make it lowercase to improve readability.
54958      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54959      # Now convert it back to Unix-style (cygpath)
54960      input_path=`$CYGPATH -u "$shortmode_path"`
54961      new_path="$input_path"
54962    fi
54963  fi
54964
54965  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54966  if test "x$test_cygdrive_prefix" = x; then
54967    # As a simple fix, exclude /usr/bin since it's not a real path.
54968    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54969      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54970      # a path prefixed by /cygdrive for fixpath to work.
54971      new_path="$CYGWIN_ROOT_PATH$input_path"
54972    fi
54973  fi
54974
54975
54976  if test "x$path" != "x$new_path"; then
54977    MSVC_DLL="$new_path"
54978    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54979$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54980  fi
54981
54982    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54983
54984  path="$MSVC_DLL"
54985  has_colon=`$ECHO $path | $GREP ^.:`
54986  new_path="$path"
54987  if test "x$has_colon" = x; then
54988    # Not in mixed or Windows style, start by that.
54989    new_path=`cmd //c echo $path`
54990  fi
54991
54992
54993  input_path="$new_path"
54994  # Check if we need to convert this using DOS-style short mode. If the path
54995  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54996  # take no chances and rewrite it.
54997  # Note: m4 eats our [], so we need to use [ and ] instead.
54998  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54999  if test "x$has_forbidden_chars" != x; then
55000    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55001    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55002  fi
55003
55004
55005  windows_path="$new_path"
55006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55007    unix_path=`$CYGPATH -u "$windows_path"`
55008    new_path="$unix_path"
55009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55010    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55011    new_path="$unix_path"
55012  fi
55013
55014  if test "x$path" != "x$new_path"; then
55015    MSVC_DLL="$new_path"
55016    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55017$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55018  fi
55019
55020  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55021  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55022
55023    else
55024      # We're on a unix platform. Hooray! :)
55025      path="$MSVC_DLL"
55026      has_space=`$ECHO "$path" | $GREP " "`
55027      if test "x$has_space" != x; then
55028        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55029$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55030        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55031      fi
55032
55033      # Use eval to expand a potential ~
55034      eval path="$path"
55035      if test ! -f "$path" && test ! -d "$path"; then
55036        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55037      fi
55038
55039      if test -d "$path"; then
55040        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55041      else
55042        dir="`$DIRNAME "$path"`"
55043        base="`$BASENAME "$path"`"
55044        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55045      fi
55046    fi
55047  fi
55048
55049      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55050$as_echo_n "checking for $DLL_NAME... " >&6; }
55051      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55052$as_echo "$MSVC_DLL" >&6; }
55053    else
55054      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55055$as_echo "incorrect, ignoring" >&6; }
55056      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55057$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55058    fi
55059  fi
55060
55061    fi
55062  fi
55063
55064  if test "x$MSVC_DLL" = x; then
55065    # Probe: Check in the Boot JDK directory.
55066    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55067
55068  DLL_NAME="$DLL_NAME"
55069  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55070  METHOD="well-known location in Boot JDK"
55071  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55072    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55073$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55074
55075    # Need to check if the found msvcr is correct architecture
55076    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55077$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55078    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55079    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55080      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55081      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55082      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55083        CORRECT_MSVCR_ARCH="PE32 executable"
55084      else
55085        CORRECT_MSVCR_ARCH="PE32+ executable"
55086      fi
55087    else
55088      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55089        CORRECT_MSVCR_ARCH=386
55090      else
55091        CORRECT_MSVCR_ARCH=x86-64
55092      fi
55093    fi
55094    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55095      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55096$as_echo "ok" >&6; }
55097      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55098
55099  # Only process if variable expands to non-empty
55100
55101  if test "x$MSVC_DLL" != x; then
55102    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55103
55104  # Input might be given as Windows format, start by converting to
55105  # unix format.
55106  path="$MSVC_DLL"
55107  new_path=`$CYGPATH -u "$path"`
55108
55109  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55110  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55111  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55112  # "foo.exe" is OK but "foo" is an error.
55113  #
55114  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55115  # It is also a way to make sure we got the proper file name for the real test later on.
55116  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55117  if test "x$test_shortpath" = x; then
55118    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55119$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55120    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55121  fi
55122
55123  # Call helper function which possibly converts this using DOS-style short mode.
55124  # If so, the updated path is stored in $new_path.
55125
55126  input_path="$new_path"
55127  # Check if we need to convert this using DOS-style short mode. If the path
55128  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55129  # take no chances and rewrite it.
55130  # Note: m4 eats our [], so we need to use [ and ] instead.
55131  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55132  if test "x$has_forbidden_chars" != x; then
55133    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55134    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55135    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55136    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55137      # Going to short mode and back again did indeed matter. Since short mode is
55138      # case insensitive, let's make it lowercase to improve readability.
55139      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55140      # Now convert it back to Unix-style (cygpath)
55141      input_path=`$CYGPATH -u "$shortmode_path"`
55142      new_path="$input_path"
55143    fi
55144  fi
55145
55146  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55147  if test "x$test_cygdrive_prefix" = x; then
55148    # As a simple fix, exclude /usr/bin since it's not a real path.
55149    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55150      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55151      # a path prefixed by /cygdrive for fixpath to work.
55152      new_path="$CYGWIN_ROOT_PATH$input_path"
55153    fi
55154  fi
55155
55156
55157  if test "x$path" != "x$new_path"; then
55158    MSVC_DLL="$new_path"
55159    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55160$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55161  fi
55162
55163    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55164
55165  path="$MSVC_DLL"
55166  has_colon=`$ECHO $path | $GREP ^.:`
55167  new_path="$path"
55168  if test "x$has_colon" = x; then
55169    # Not in mixed or Windows style, start by that.
55170    new_path=`cmd //c echo $path`
55171  fi
55172
55173
55174  input_path="$new_path"
55175  # Check if we need to convert this using DOS-style short mode. If the path
55176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55177  # take no chances and rewrite it.
55178  # Note: m4 eats our [], so we need to use [ and ] instead.
55179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55180  if test "x$has_forbidden_chars" != x; then
55181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55182    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55183  fi
55184
55185
55186  windows_path="$new_path"
55187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55188    unix_path=`$CYGPATH -u "$windows_path"`
55189    new_path="$unix_path"
55190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55192    new_path="$unix_path"
55193  fi
55194
55195  if test "x$path" != "x$new_path"; then
55196    MSVC_DLL="$new_path"
55197    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55198$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55199  fi
55200
55201  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55202  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55203
55204    else
55205      # We're on a unix platform. Hooray! :)
55206      path="$MSVC_DLL"
55207      has_space=`$ECHO "$path" | $GREP " "`
55208      if test "x$has_space" != x; then
55209        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55210$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55211        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55212      fi
55213
55214      # Use eval to expand a potential ~
55215      eval path="$path"
55216      if test ! -f "$path" && test ! -d "$path"; then
55217        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55218      fi
55219
55220      if test -d "$path"; then
55221        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55222      else
55223        dir="`$DIRNAME "$path"`"
55224        base="`$BASENAME "$path"`"
55225        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55226      fi
55227    fi
55228  fi
55229
55230      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55231$as_echo_n "checking for $DLL_NAME... " >&6; }
55232      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55233$as_echo "$MSVC_DLL" >&6; }
55234    else
55235      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55236$as_echo "incorrect, ignoring" >&6; }
55237      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55238$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55239    fi
55240  fi
55241
55242  fi
55243
55244  if test "x$MSVC_DLL" = x; then
55245    # Probe: Look in the Windows system32 directory
55246    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55247
55248  windows_path="$CYGWIN_SYSTEMROOT"
55249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55250    unix_path=`$CYGPATH -u "$windows_path"`
55251    CYGWIN_SYSTEMROOT="$unix_path"
55252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55253    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55254    CYGWIN_SYSTEMROOT="$unix_path"
55255  fi
55256
55257    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55258
55259  DLL_NAME="$DLL_NAME"
55260  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55261  METHOD="well-known location in SYSTEMROOT"
55262  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55263    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55264$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55265
55266    # Need to check if the found msvcr is correct architecture
55267    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55268$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55269    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55270    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55271      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55272      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55273      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55274        CORRECT_MSVCR_ARCH="PE32 executable"
55275      else
55276        CORRECT_MSVCR_ARCH="PE32+ executable"
55277      fi
55278    else
55279      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55280        CORRECT_MSVCR_ARCH=386
55281      else
55282        CORRECT_MSVCR_ARCH=x86-64
55283      fi
55284    fi
55285    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55286      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55287$as_echo "ok" >&6; }
55288      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55289
55290  # Only process if variable expands to non-empty
55291
55292  if test "x$MSVC_DLL" != x; then
55293    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55294
55295  # Input might be given as Windows format, start by converting to
55296  # unix format.
55297  path="$MSVC_DLL"
55298  new_path=`$CYGPATH -u "$path"`
55299
55300  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55301  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55302  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55303  # "foo.exe" is OK but "foo" is an error.
55304  #
55305  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55306  # It is also a way to make sure we got the proper file name for the real test later on.
55307  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55308  if test "x$test_shortpath" = x; then
55309    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55310$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55311    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55312  fi
55313
55314  # Call helper function which possibly converts this using DOS-style short mode.
55315  # If so, the updated path is stored in $new_path.
55316
55317  input_path="$new_path"
55318  # Check if we need to convert this using DOS-style short mode. If the path
55319  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55320  # take no chances and rewrite it.
55321  # Note: m4 eats our [], so we need to use [ and ] instead.
55322  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55323  if test "x$has_forbidden_chars" != x; then
55324    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55325    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55326    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55327    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55328      # Going to short mode and back again did indeed matter. Since short mode is
55329      # case insensitive, let's make it lowercase to improve readability.
55330      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55331      # Now convert it back to Unix-style (cygpath)
55332      input_path=`$CYGPATH -u "$shortmode_path"`
55333      new_path="$input_path"
55334    fi
55335  fi
55336
55337  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55338  if test "x$test_cygdrive_prefix" = x; then
55339    # As a simple fix, exclude /usr/bin since it's not a real path.
55340    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55341      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55342      # a path prefixed by /cygdrive for fixpath to work.
55343      new_path="$CYGWIN_ROOT_PATH$input_path"
55344    fi
55345  fi
55346
55347
55348  if test "x$path" != "x$new_path"; then
55349    MSVC_DLL="$new_path"
55350    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55351$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55352  fi
55353
55354    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55355
55356  path="$MSVC_DLL"
55357  has_colon=`$ECHO $path | $GREP ^.:`
55358  new_path="$path"
55359  if test "x$has_colon" = x; then
55360    # Not in mixed or Windows style, start by that.
55361    new_path=`cmd //c echo $path`
55362  fi
55363
55364
55365  input_path="$new_path"
55366  # Check if we need to convert this using DOS-style short mode. If the path
55367  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55368  # take no chances and rewrite it.
55369  # Note: m4 eats our [], so we need to use [ and ] instead.
55370  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55371  if test "x$has_forbidden_chars" != x; then
55372    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55373    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55374  fi
55375
55376
55377  windows_path="$new_path"
55378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55379    unix_path=`$CYGPATH -u "$windows_path"`
55380    new_path="$unix_path"
55381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55382    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55383    new_path="$unix_path"
55384  fi
55385
55386  if test "x$path" != "x$new_path"; then
55387    MSVC_DLL="$new_path"
55388    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55389$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55390  fi
55391
55392  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55393  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55394
55395    else
55396      # We're on a unix platform. Hooray! :)
55397      path="$MSVC_DLL"
55398      has_space=`$ECHO "$path" | $GREP " "`
55399      if test "x$has_space" != x; then
55400        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55401$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55402        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55403      fi
55404
55405      # Use eval to expand a potential ~
55406      eval path="$path"
55407      if test ! -f "$path" && test ! -d "$path"; then
55408        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55409      fi
55410
55411      if test -d "$path"; then
55412        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55413      else
55414        dir="`$DIRNAME "$path"`"
55415        base="`$BASENAME "$path"`"
55416        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55417      fi
55418    fi
55419  fi
55420
55421      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55422$as_echo_n "checking for $DLL_NAME... " >&6; }
55423      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55424$as_echo "$MSVC_DLL" >&6; }
55425    else
55426      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55427$as_echo "incorrect, ignoring" >&6; }
55428      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55429$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55430    fi
55431  fi
55432
55433  fi
55434
55435  if test "x$MSVC_DLL" = x; then
55436    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55437    if test "x$VS100COMNTOOLS" != x; then
55438      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55439
55440  windows_path="$CYGWIN_VS_TOOLS_DIR"
55441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55442    unix_path=`$CYGPATH -u "$windows_path"`
55443    CYGWIN_VS_TOOLS_DIR="$unix_path"
55444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55445    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55446    CYGWIN_VS_TOOLS_DIR="$unix_path"
55447  fi
55448
55449      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55450        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55451	    | $GREP -i /x64/ | $HEAD --lines 1`
55452      else
55453        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55454	    | $GREP -i /x86/ | $HEAD --lines 1`
55455      fi
55456
55457  DLL_NAME="$DLL_NAME"
55458  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55459  METHOD="search of VS100COMNTOOLS"
55460  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55461    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55462$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55463
55464    # Need to check if the found msvcr is correct architecture
55465    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55466$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55467    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55468    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55469      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55470      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55471      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55472        CORRECT_MSVCR_ARCH="PE32 executable"
55473      else
55474        CORRECT_MSVCR_ARCH="PE32+ executable"
55475      fi
55476    else
55477      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55478        CORRECT_MSVCR_ARCH=386
55479      else
55480        CORRECT_MSVCR_ARCH=x86-64
55481      fi
55482    fi
55483    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55484      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55485$as_echo "ok" >&6; }
55486      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55487
55488  # Only process if variable expands to non-empty
55489
55490  if test "x$MSVC_DLL" != x; then
55491    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55492
55493  # Input might be given as Windows format, start by converting to
55494  # unix format.
55495  path="$MSVC_DLL"
55496  new_path=`$CYGPATH -u "$path"`
55497
55498  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55499  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55500  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55501  # "foo.exe" is OK but "foo" is an error.
55502  #
55503  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55504  # It is also a way to make sure we got the proper file name for the real test later on.
55505  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55506  if test "x$test_shortpath" = x; then
55507    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55508$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55509    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55510  fi
55511
55512  # Call helper function which possibly converts this using DOS-style short mode.
55513  # If so, the updated path is stored in $new_path.
55514
55515  input_path="$new_path"
55516  # Check if we need to convert this using DOS-style short mode. If the path
55517  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55518  # take no chances and rewrite it.
55519  # Note: m4 eats our [], so we need to use [ and ] instead.
55520  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55521  if test "x$has_forbidden_chars" != x; then
55522    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55523    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55524    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55525    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55526      # Going to short mode and back again did indeed matter. Since short mode is
55527      # case insensitive, let's make it lowercase to improve readability.
55528      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55529      # Now convert it back to Unix-style (cygpath)
55530      input_path=`$CYGPATH -u "$shortmode_path"`
55531      new_path="$input_path"
55532    fi
55533  fi
55534
55535  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55536  if test "x$test_cygdrive_prefix" = x; then
55537    # As a simple fix, exclude /usr/bin since it's not a real path.
55538    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55539      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55540      # a path prefixed by /cygdrive for fixpath to work.
55541      new_path="$CYGWIN_ROOT_PATH$input_path"
55542    fi
55543  fi
55544
55545
55546  if test "x$path" != "x$new_path"; then
55547    MSVC_DLL="$new_path"
55548    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55549$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55550  fi
55551
55552    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55553
55554  path="$MSVC_DLL"
55555  has_colon=`$ECHO $path | $GREP ^.:`
55556  new_path="$path"
55557  if test "x$has_colon" = x; then
55558    # Not in mixed or Windows style, start by that.
55559    new_path=`cmd //c echo $path`
55560  fi
55561
55562
55563  input_path="$new_path"
55564  # Check if we need to convert this using DOS-style short mode. If the path
55565  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55566  # take no chances and rewrite it.
55567  # Note: m4 eats our [], so we need to use [ and ] instead.
55568  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55569  if test "x$has_forbidden_chars" != x; then
55570    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55571    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55572  fi
55573
55574
55575  windows_path="$new_path"
55576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55577    unix_path=`$CYGPATH -u "$windows_path"`
55578    new_path="$unix_path"
55579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55580    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55581    new_path="$unix_path"
55582  fi
55583
55584  if test "x$path" != "x$new_path"; then
55585    MSVC_DLL="$new_path"
55586    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55587$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55588  fi
55589
55590  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55591  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55592
55593    else
55594      # We're on a unix platform. Hooray! :)
55595      path="$MSVC_DLL"
55596      has_space=`$ECHO "$path" | $GREP " "`
55597      if test "x$has_space" != x; then
55598        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55599$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55600        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55601      fi
55602
55603      # Use eval to expand a potential ~
55604      eval path="$path"
55605      if test ! -f "$path" && test ! -d "$path"; then
55606        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55607      fi
55608
55609      if test -d "$path"; then
55610        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55611      else
55612        dir="`$DIRNAME "$path"`"
55613        base="`$BASENAME "$path"`"
55614        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55615      fi
55616    fi
55617  fi
55618
55619      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55620$as_echo_n "checking for $DLL_NAME... " >&6; }
55621      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55622$as_echo "$MSVC_DLL" >&6; }
55623    else
55624      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55625$as_echo "incorrect, ignoring" >&6; }
55626      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55627$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55628    fi
55629  fi
55630
55631    fi
55632  fi
55633
55634  if test "x$MSVC_DLL" = x; then
55635    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55636    # (This was the original behaviour; kept since it might turn something up)
55637    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55638      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55639        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55640	    | $GREP x64 | $HEAD --lines 1`
55641      else
55642        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55643	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55644        if test "x$POSSIBLE_MSVC_DLL" = x; then
55645          # We're grasping at straws now...
55646          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55647	      | $HEAD --lines 1`
55648        fi
55649      fi
55650
55651
55652  DLL_NAME="$DLL_NAME"
55653  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55654  METHOD="search of VCINSTALLDIR"
55655  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55656    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55657$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55658
55659    # Need to check if the found msvcr is correct architecture
55660    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55661$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55662    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55663    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55664      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55665      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55666      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55667        CORRECT_MSVCR_ARCH="PE32 executable"
55668      else
55669        CORRECT_MSVCR_ARCH="PE32+ executable"
55670      fi
55671    else
55672      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55673        CORRECT_MSVCR_ARCH=386
55674      else
55675        CORRECT_MSVCR_ARCH=x86-64
55676      fi
55677    fi
55678    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55679      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55680$as_echo "ok" >&6; }
55681      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55682
55683  # Only process if variable expands to non-empty
55684
55685  if test "x$MSVC_DLL" != x; then
55686    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55687
55688  # Input might be given as Windows format, start by converting to
55689  # unix format.
55690  path="$MSVC_DLL"
55691  new_path=`$CYGPATH -u "$path"`
55692
55693  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55694  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55695  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55696  # "foo.exe" is OK but "foo" is an error.
55697  #
55698  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55699  # It is also a way to make sure we got the proper file name for the real test later on.
55700  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55701  if test "x$test_shortpath" = x; then
55702    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55703$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55704    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55705  fi
55706
55707  # Call helper function which possibly converts this using DOS-style short mode.
55708  # If so, the updated path is stored in $new_path.
55709
55710  input_path="$new_path"
55711  # Check if we need to convert this using DOS-style short mode. If the path
55712  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55713  # take no chances and rewrite it.
55714  # Note: m4 eats our [], so we need to use [ and ] instead.
55715  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55716  if test "x$has_forbidden_chars" != x; then
55717    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55718    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55719    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55720    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55721      # Going to short mode and back again did indeed matter. Since short mode is
55722      # case insensitive, let's make it lowercase to improve readability.
55723      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55724      # Now convert it back to Unix-style (cygpath)
55725      input_path=`$CYGPATH -u "$shortmode_path"`
55726      new_path="$input_path"
55727    fi
55728  fi
55729
55730  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55731  if test "x$test_cygdrive_prefix" = x; then
55732    # As a simple fix, exclude /usr/bin since it's not a real path.
55733    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55734      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55735      # a path prefixed by /cygdrive for fixpath to work.
55736      new_path="$CYGWIN_ROOT_PATH$input_path"
55737    fi
55738  fi
55739
55740
55741  if test "x$path" != "x$new_path"; then
55742    MSVC_DLL="$new_path"
55743    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55744$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55745  fi
55746
55747    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55748
55749  path="$MSVC_DLL"
55750  has_colon=`$ECHO $path | $GREP ^.:`
55751  new_path="$path"
55752  if test "x$has_colon" = x; then
55753    # Not in mixed or Windows style, start by that.
55754    new_path=`cmd //c echo $path`
55755  fi
55756
55757
55758  input_path="$new_path"
55759  # Check if we need to convert this using DOS-style short mode. If the path
55760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55761  # take no chances and rewrite it.
55762  # Note: m4 eats our [], so we need to use [ and ] instead.
55763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55764  if test "x$has_forbidden_chars" != x; then
55765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55766    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55767  fi
55768
55769
55770  windows_path="$new_path"
55771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55772    unix_path=`$CYGPATH -u "$windows_path"`
55773    new_path="$unix_path"
55774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55775    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55776    new_path="$unix_path"
55777  fi
55778
55779  if test "x$path" != "x$new_path"; then
55780    MSVC_DLL="$new_path"
55781    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55782$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55783  fi
55784
55785  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55786  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55787
55788    else
55789      # We're on a unix platform. Hooray! :)
55790      path="$MSVC_DLL"
55791      has_space=`$ECHO "$path" | $GREP " "`
55792      if test "x$has_space" != x; then
55793        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55794$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55795        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55796      fi
55797
55798      # Use eval to expand a potential ~
55799      eval path="$path"
55800      if test ! -f "$path" && test ! -d "$path"; then
55801        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55802      fi
55803
55804      if test -d "$path"; then
55805        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55806      else
55807        dir="`$DIRNAME "$path"`"
55808        base="`$BASENAME "$path"`"
55809        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55810      fi
55811    fi
55812  fi
55813
55814      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55815$as_echo_n "checking for $DLL_NAME... " >&6; }
55816      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55817$as_echo "$MSVC_DLL" >&6; }
55818    else
55819      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55820$as_echo "incorrect, ignoring" >&6; }
55821      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55822$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55823    fi
55824  fi
55825
55826    fi
55827  fi
55828
55829  if test "x$MSVC_DLL" = x; then
55830    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55831$as_echo_n "checking for $DLL_NAME... " >&6; }
55832    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55833$as_echo "no" >&6; }
55834    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55835  fi
55836
55837      MSVCP_DLL="$MSVC_DLL"
55838    fi
55839
55840  fi
55841
55842  fi
55843
55844
55845  if test "x$NEEDS_LIB_X11" = xfalse; then
55846    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
55847      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
55848$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
55849    fi
55850    X_CFLAGS=
55851    X_LIBS=
55852  else
55853
55854    if test "x${with_x}" = xno; then
55855      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
55856    fi
55857
55858    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
55859      # The user has specified a X11 base directory. Use it for includes and
55860      # libraries, unless explicitly overridden.
55861      if test "x$x_includes" = xNONE; then
55862        x_includes="${with_x}/include"
55863      fi
55864      if test "x$x_libraries" = xNONE; then
55865        x_libraries="${with_x}/lib"
55866      fi
55867    else
55868      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
55869      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
55870      # --x-libraries for the sysroot, if that seems to be correct.
55871      if test "x$SYSROOT" != "x"; then
55872        if test "x$x_includes" = xNONE; then
55873          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
55874            x_includes="$SYSROOT/usr/X11R6/include"
55875          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
55876            x_includes="$SYSROOT/usr/include"
55877          fi
55878        fi
55879        if test "x$x_libraries" = xNONE; then
55880          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
55881            x_libraries="$SYSROOT/usr/X11R6/lib"
55882          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55883            x_libraries="$SYSROOT/usr/lib64"
55884          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
55885            x_libraries="$SYSROOT/usr/lib"
55886          fi
55887        fi
55888      fi
55889    fi
55890
55891    # Now let autoconf do it's magic
55892    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
55893$as_echo_n "checking for X... " >&6; }
55894
55895
55896# Check whether --with-x was given.
55897if test "${with_x+set}" = set; then :
55898  withval=$with_x;
55899fi
55900
55901# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
55902if test "x$with_x" = xno; then
55903  # The user explicitly disabled X.
55904  have_x=disabled
55905else
55906  case $x_includes,$x_libraries in #(
55907    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
55908    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
55909  $as_echo_n "(cached) " >&6
55910else
55911  # One or both of the vars are not set, and there is no cached value.
55912ac_x_includes=no ac_x_libraries=no
55913rm -f -r conftest.dir
55914if mkdir conftest.dir; then
55915  cd conftest.dir
55916  cat >Imakefile <<'_ACEOF'
55917incroot:
55918	@echo incroot='${INCROOT}'
55919usrlibdir:
55920	@echo usrlibdir='${USRLIBDIR}'
55921libdir:
55922	@echo libdir='${LIBDIR}'
55923_ACEOF
55924  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
55925    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
55926    for ac_var in incroot usrlibdir libdir; do
55927      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
55928    done
55929    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
55930    for ac_extension in a so sl dylib la dll; do
55931      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
55932	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
55933	ac_im_usrlibdir=$ac_im_libdir; break
55934      fi
55935    done
55936    # Screen out bogus values from the imake configuration.  They are
55937    # bogus both because they are the default anyway, and because
55938    # using them would break gcc on systems where it needs fixed includes.
55939    case $ac_im_incroot in
55940	/usr/include) ac_x_includes= ;;
55941	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
55942    esac
55943    case $ac_im_usrlibdir in
55944	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
55945	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
55946    esac
55947  fi
55948  cd ..
55949  rm -f -r conftest.dir
55950fi
55951
55952# Standard set of common directories for X headers.
55953# Check X11 before X11Rn because it is often a symlink to the current release.
55954ac_x_header_dirs='
55955/usr/X11/include
55956/usr/X11R7/include
55957/usr/X11R6/include
55958/usr/X11R5/include
55959/usr/X11R4/include
55960
55961/usr/include/X11
55962/usr/include/X11R7
55963/usr/include/X11R6
55964/usr/include/X11R5
55965/usr/include/X11R4
55966
55967/usr/local/X11/include
55968/usr/local/X11R7/include
55969/usr/local/X11R6/include
55970/usr/local/X11R5/include
55971/usr/local/X11R4/include
55972
55973/usr/local/include/X11
55974/usr/local/include/X11R7
55975/usr/local/include/X11R6
55976/usr/local/include/X11R5
55977/usr/local/include/X11R4
55978
55979/usr/X386/include
55980/usr/x386/include
55981/usr/XFree86/include/X11
55982
55983/usr/include
55984/usr/local/include
55985/usr/unsupported/include
55986/usr/athena/include
55987/usr/local/x11r5/include
55988/usr/lpp/Xamples/include
55989
55990/usr/openwin/include
55991/usr/openwin/share/include'
55992
55993if test "$ac_x_includes" = no; then
55994  # Guess where to find include files, by looking for Xlib.h.
55995  # First, try using that file with no special directory specified.
55996  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55997/* end confdefs.h.  */
55998#include <X11/Xlib.h>
55999_ACEOF
56000if ac_fn_cxx_try_cpp "$LINENO"; then :
56001  # We can compile using X headers with no special include directory.
56002ac_x_includes=
56003else
56004  for ac_dir in $ac_x_header_dirs; do
56005  if test -r "$ac_dir/X11/Xlib.h"; then
56006    ac_x_includes=$ac_dir
56007    break
56008  fi
56009done
56010fi
56011rm -f conftest.err conftest.i conftest.$ac_ext
56012fi # $ac_x_includes = no
56013
56014if test "$ac_x_libraries" = no; then
56015  # Check for the libraries.
56016  # See if we find them without any special options.
56017  # Don't add to $LIBS permanently.
56018  ac_save_LIBS=$LIBS
56019  LIBS="-lX11 $LIBS"
56020  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56021/* end confdefs.h.  */
56022#include <X11/Xlib.h>
56023int
56024main ()
56025{
56026XrmInitialize ()
56027  ;
56028  return 0;
56029}
56030_ACEOF
56031if ac_fn_cxx_try_link "$LINENO"; then :
56032  LIBS=$ac_save_LIBS
56033# We can link X programs with no special library path.
56034ac_x_libraries=
56035else
56036  LIBS=$ac_save_LIBS
56037for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56038do
56039  # Don't even attempt the hair of trying to link an X program!
56040  for ac_extension in a so sl dylib la dll; do
56041    if test -r "$ac_dir/libX11.$ac_extension"; then
56042      ac_x_libraries=$ac_dir
56043      break 2
56044    fi
56045  done
56046done
56047fi
56048rm -f core conftest.err conftest.$ac_objext \
56049    conftest$ac_exeext conftest.$ac_ext
56050fi # $ac_x_libraries = no
56051
56052case $ac_x_includes,$ac_x_libraries in #(
56053  no,* | *,no | *\'*)
56054    # Didn't find X, or a directory has "'" in its name.
56055    ac_cv_have_x="have_x=no";; #(
56056  *)
56057    # Record where we found X for the cache.
56058    ac_cv_have_x="have_x=yes\
56059	ac_x_includes='$ac_x_includes'\
56060	ac_x_libraries='$ac_x_libraries'"
56061esac
56062fi
56063;; #(
56064    *) have_x=yes;;
56065  esac
56066  eval "$ac_cv_have_x"
56067fi # $with_x != no
56068
56069if test "$have_x" != yes; then
56070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56071$as_echo "$have_x" >&6; }
56072  no_x=yes
56073else
56074  # If each of the values was on the command line, it overrides each guess.
56075  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56076  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56077  # Update the cache value to reflect the command line values.
56078  ac_cv_have_x="have_x=yes\
56079	ac_x_includes='$x_includes'\
56080	ac_x_libraries='$x_libraries'"
56081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56082$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56083fi
56084
56085    if test "$no_x" = yes; then
56086  # Not all programs may use this symbol, but it does not hurt to define it.
56087
56088$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56089
56090  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56091else
56092  if test -n "$x_includes"; then
56093    X_CFLAGS="$X_CFLAGS -I$x_includes"
56094  fi
56095
56096  # It would also be nice to do this for all -L options, not just this one.
56097  if test -n "$x_libraries"; then
56098    X_LIBS="$X_LIBS -L$x_libraries"
56099    # For Solaris; some versions of Sun CC require a space after -R and
56100    # others require no space.  Words are not sufficient . . . .
56101    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56102$as_echo_n "checking whether -R must be followed by a space... " >&6; }
56103    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56104    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56105    ac_cxx_werror_flag=yes
56106    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56107/* end confdefs.h.  */
56108
56109int
56110main ()
56111{
56112
56113  ;
56114  return 0;
56115}
56116_ACEOF
56117if ac_fn_cxx_try_link "$LINENO"; then :
56118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56119$as_echo "no" >&6; }
56120       X_LIBS="$X_LIBS -R$x_libraries"
56121else
56122  LIBS="$ac_xsave_LIBS -R $x_libraries"
56123       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56124/* end confdefs.h.  */
56125
56126int
56127main ()
56128{
56129
56130  ;
56131  return 0;
56132}
56133_ACEOF
56134if ac_fn_cxx_try_link "$LINENO"; then :
56135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56136$as_echo "yes" >&6; }
56137	  X_LIBS="$X_LIBS -R $x_libraries"
56138else
56139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56140$as_echo "neither works" >&6; }
56141fi
56142rm -f core conftest.err conftest.$ac_objext \
56143    conftest$ac_exeext conftest.$ac_ext
56144fi
56145rm -f core conftest.err conftest.$ac_objext \
56146    conftest$ac_exeext conftest.$ac_ext
56147    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56148    LIBS=$ac_xsave_LIBS
56149  fi
56150
56151  # Check for system-dependent libraries X programs must link with.
56152  # Do this before checking for the system-independent R6 libraries
56153  # (-lICE), since we may need -lsocket or whatever for X linking.
56154
56155  if test "$ISC" = yes; then
56156    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56157  else
56158    # Martyn Johnson says this is needed for Ultrix, if the X
56159    # libraries were built with DECnet support.  And Karl Berry says
56160    # the Alpha needs dnet_stub (dnet does not exist).
56161    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56162    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56163/* end confdefs.h.  */
56164
56165/* Override any GCC internal prototype to avoid an error.
56166   Use char because int might match the return type of a GCC
56167   builtin and then its argument prototype would still apply.  */
56168#ifdef __cplusplus
56169extern "C"
56170#endif
56171char XOpenDisplay ();
56172int
56173main ()
56174{
56175return XOpenDisplay ();
56176  ;
56177  return 0;
56178}
56179_ACEOF
56180if ac_fn_cxx_try_link "$LINENO"; then :
56181
56182else
56183  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56184$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56185if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56186  $as_echo_n "(cached) " >&6
56187else
56188  ac_check_lib_save_LIBS=$LIBS
56189LIBS="-ldnet  $LIBS"
56190cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56191/* end confdefs.h.  */
56192
56193/* Override any GCC internal prototype to avoid an error.
56194   Use char because int might match the return type of a GCC
56195   builtin and then its argument prototype would still apply.  */
56196#ifdef __cplusplus
56197extern "C"
56198#endif
56199char dnet_ntoa ();
56200int
56201main ()
56202{
56203return dnet_ntoa ();
56204  ;
56205  return 0;
56206}
56207_ACEOF
56208if ac_fn_cxx_try_link "$LINENO"; then :
56209  ac_cv_lib_dnet_dnet_ntoa=yes
56210else
56211  ac_cv_lib_dnet_dnet_ntoa=no
56212fi
56213rm -f core conftest.err conftest.$ac_objext \
56214    conftest$ac_exeext conftest.$ac_ext
56215LIBS=$ac_check_lib_save_LIBS
56216fi
56217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56218$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56219if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56220  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56221fi
56222
56223    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56224      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56225$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56226if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56227  $as_echo_n "(cached) " >&6
56228else
56229  ac_check_lib_save_LIBS=$LIBS
56230LIBS="-ldnet_stub  $LIBS"
56231cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56232/* end confdefs.h.  */
56233
56234/* Override any GCC internal prototype to avoid an error.
56235   Use char because int might match the return type of a GCC
56236   builtin and then its argument prototype would still apply.  */
56237#ifdef __cplusplus
56238extern "C"
56239#endif
56240char dnet_ntoa ();
56241int
56242main ()
56243{
56244return dnet_ntoa ();
56245  ;
56246  return 0;
56247}
56248_ACEOF
56249if ac_fn_cxx_try_link "$LINENO"; then :
56250  ac_cv_lib_dnet_stub_dnet_ntoa=yes
56251else
56252  ac_cv_lib_dnet_stub_dnet_ntoa=no
56253fi
56254rm -f core conftest.err conftest.$ac_objext \
56255    conftest$ac_exeext conftest.$ac_ext
56256LIBS=$ac_check_lib_save_LIBS
56257fi
56258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56259$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56260if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56261  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56262fi
56263
56264    fi
56265fi
56266rm -f core conftest.err conftest.$ac_objext \
56267    conftest$ac_exeext conftest.$ac_ext
56268    LIBS="$ac_xsave_LIBS"
56269
56270    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56271    # to get the SysV transport functions.
56272    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56273    # needs -lnsl.
56274    # The nsl library prevents programs from opening the X display
56275    # on Irix 5.2, according to T.E. Dickey.
56276    # The functions gethostbyname, getservbyname, and inet_addr are
56277    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56278    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56279if test "x$ac_cv_func_gethostbyname" = xyes; then :
56280
56281fi
56282
56283    if test $ac_cv_func_gethostbyname = no; then
56284      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56285$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56286if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56287  $as_echo_n "(cached) " >&6
56288else
56289  ac_check_lib_save_LIBS=$LIBS
56290LIBS="-lnsl  $LIBS"
56291cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56292/* end confdefs.h.  */
56293
56294/* Override any GCC internal prototype to avoid an error.
56295   Use char because int might match the return type of a GCC
56296   builtin and then its argument prototype would still apply.  */
56297#ifdef __cplusplus
56298extern "C"
56299#endif
56300char gethostbyname ();
56301int
56302main ()
56303{
56304return gethostbyname ();
56305  ;
56306  return 0;
56307}
56308_ACEOF
56309if ac_fn_cxx_try_link "$LINENO"; then :
56310  ac_cv_lib_nsl_gethostbyname=yes
56311else
56312  ac_cv_lib_nsl_gethostbyname=no
56313fi
56314rm -f core conftest.err conftest.$ac_objext \
56315    conftest$ac_exeext conftest.$ac_ext
56316LIBS=$ac_check_lib_save_LIBS
56317fi
56318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56319$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56320if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56321  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56322fi
56323
56324      if test $ac_cv_lib_nsl_gethostbyname = no; then
56325	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56326$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56327if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56328  $as_echo_n "(cached) " >&6
56329else
56330  ac_check_lib_save_LIBS=$LIBS
56331LIBS="-lbsd  $LIBS"
56332cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56333/* end confdefs.h.  */
56334
56335/* Override any GCC internal prototype to avoid an error.
56336   Use char because int might match the return type of a GCC
56337   builtin and then its argument prototype would still apply.  */
56338#ifdef __cplusplus
56339extern "C"
56340#endif
56341char gethostbyname ();
56342int
56343main ()
56344{
56345return gethostbyname ();
56346  ;
56347  return 0;
56348}
56349_ACEOF
56350if ac_fn_cxx_try_link "$LINENO"; then :
56351  ac_cv_lib_bsd_gethostbyname=yes
56352else
56353  ac_cv_lib_bsd_gethostbyname=no
56354fi
56355rm -f core conftest.err conftest.$ac_objext \
56356    conftest$ac_exeext conftest.$ac_ext
56357LIBS=$ac_check_lib_save_LIBS
56358fi
56359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56360$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56361if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56362  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56363fi
56364
56365      fi
56366    fi
56367
56368    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56369    # socket/setsockopt and other routines are undefined under SCO ODT
56370    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56371    # on later versions), says Simon Leinen: it contains gethostby*
56372    # variants that don't use the name server (or something).  -lsocket
56373    # must be given before -lnsl if both are needed.  We assume that
56374    # if connect needs -lnsl, so does gethostbyname.
56375    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56376if test "x$ac_cv_func_connect" = xyes; then :
56377
56378fi
56379
56380    if test $ac_cv_func_connect = no; then
56381      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56382$as_echo_n "checking for connect in -lsocket... " >&6; }
56383if ${ac_cv_lib_socket_connect+:} false; then :
56384  $as_echo_n "(cached) " >&6
56385else
56386  ac_check_lib_save_LIBS=$LIBS
56387LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56388cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56389/* end confdefs.h.  */
56390
56391/* Override any GCC internal prototype to avoid an error.
56392   Use char because int might match the return type of a GCC
56393   builtin and then its argument prototype would still apply.  */
56394#ifdef __cplusplus
56395extern "C"
56396#endif
56397char connect ();
56398int
56399main ()
56400{
56401return connect ();
56402  ;
56403  return 0;
56404}
56405_ACEOF
56406if ac_fn_cxx_try_link "$LINENO"; then :
56407  ac_cv_lib_socket_connect=yes
56408else
56409  ac_cv_lib_socket_connect=no
56410fi
56411rm -f core conftest.err conftest.$ac_objext \
56412    conftest$ac_exeext conftest.$ac_ext
56413LIBS=$ac_check_lib_save_LIBS
56414fi
56415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56416$as_echo "$ac_cv_lib_socket_connect" >&6; }
56417if test "x$ac_cv_lib_socket_connect" = xyes; then :
56418  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56419fi
56420
56421    fi
56422
56423    # Guillermo Gomez says -lposix is necessary on A/UX.
56424    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56425if test "x$ac_cv_func_remove" = xyes; then :
56426
56427fi
56428
56429    if test $ac_cv_func_remove = no; then
56430      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56431$as_echo_n "checking for remove in -lposix... " >&6; }
56432if ${ac_cv_lib_posix_remove+:} false; then :
56433  $as_echo_n "(cached) " >&6
56434else
56435  ac_check_lib_save_LIBS=$LIBS
56436LIBS="-lposix  $LIBS"
56437cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56438/* end confdefs.h.  */
56439
56440/* Override any GCC internal prototype to avoid an error.
56441   Use char because int might match the return type of a GCC
56442   builtin and then its argument prototype would still apply.  */
56443#ifdef __cplusplus
56444extern "C"
56445#endif
56446char remove ();
56447int
56448main ()
56449{
56450return remove ();
56451  ;
56452  return 0;
56453}
56454_ACEOF
56455if ac_fn_cxx_try_link "$LINENO"; then :
56456  ac_cv_lib_posix_remove=yes
56457else
56458  ac_cv_lib_posix_remove=no
56459fi
56460rm -f core conftest.err conftest.$ac_objext \
56461    conftest$ac_exeext conftest.$ac_ext
56462LIBS=$ac_check_lib_save_LIBS
56463fi
56464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56465$as_echo "$ac_cv_lib_posix_remove" >&6; }
56466if test "x$ac_cv_lib_posix_remove" = xyes; then :
56467  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56468fi
56469
56470    fi
56471
56472    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56473    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56474if test "x$ac_cv_func_shmat" = xyes; then :
56475
56476fi
56477
56478    if test $ac_cv_func_shmat = no; then
56479      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56480$as_echo_n "checking for shmat in -lipc... " >&6; }
56481if ${ac_cv_lib_ipc_shmat+:} false; then :
56482  $as_echo_n "(cached) " >&6
56483else
56484  ac_check_lib_save_LIBS=$LIBS
56485LIBS="-lipc  $LIBS"
56486cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56487/* end confdefs.h.  */
56488
56489/* Override any GCC internal prototype to avoid an error.
56490   Use char because int might match the return type of a GCC
56491   builtin and then its argument prototype would still apply.  */
56492#ifdef __cplusplus
56493extern "C"
56494#endif
56495char shmat ();
56496int
56497main ()
56498{
56499return shmat ();
56500  ;
56501  return 0;
56502}
56503_ACEOF
56504if ac_fn_cxx_try_link "$LINENO"; then :
56505  ac_cv_lib_ipc_shmat=yes
56506else
56507  ac_cv_lib_ipc_shmat=no
56508fi
56509rm -f core conftest.err conftest.$ac_objext \
56510    conftest$ac_exeext conftest.$ac_ext
56511LIBS=$ac_check_lib_save_LIBS
56512fi
56513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56514$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56515if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56516  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56517fi
56518
56519    fi
56520  fi
56521
56522  # Check for libraries that X11R6 Xt/Xaw programs need.
56523  ac_save_LDFLAGS=$LDFLAGS
56524  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56525  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56526  # check for ICE first), but we must link in the order -lSM -lICE or
56527  # we get undefined symbols.  So assume we have SM if we have ICE.
56528  # These have to be linked with before -lX11, unlike the other
56529  # libraries we check for below, so use a different variable.
56530  # John Interrante, Karl Berry
56531  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56532$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56533if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56534  $as_echo_n "(cached) " >&6
56535else
56536  ac_check_lib_save_LIBS=$LIBS
56537LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56538cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56539/* end confdefs.h.  */
56540
56541/* Override any GCC internal prototype to avoid an error.
56542   Use char because int might match the return type of a GCC
56543   builtin and then its argument prototype would still apply.  */
56544#ifdef __cplusplus
56545extern "C"
56546#endif
56547char IceConnectionNumber ();
56548int
56549main ()
56550{
56551return IceConnectionNumber ();
56552  ;
56553  return 0;
56554}
56555_ACEOF
56556if ac_fn_cxx_try_link "$LINENO"; then :
56557  ac_cv_lib_ICE_IceConnectionNumber=yes
56558else
56559  ac_cv_lib_ICE_IceConnectionNumber=no
56560fi
56561rm -f core conftest.err conftest.$ac_objext \
56562    conftest$ac_exeext conftest.$ac_ext
56563LIBS=$ac_check_lib_save_LIBS
56564fi
56565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56566$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56567if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56568  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56569fi
56570
56571  LDFLAGS=$ac_save_LDFLAGS
56572
56573fi
56574
56575
56576    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56577    # this doesn't make sense so we remove it.
56578    if test "x$COMPILE_TYPE" = xcross; then
56579      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56580    fi
56581
56582    if test "x$no_x" = xyes; then
56583
56584  # Print a helpful message on how to acquire the necessary build dependency.
56585  # x11 is the help tag: freetype, cups, alsa etc
56586  MISSING_DEPENDENCY=x11
56587
56588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56589    cygwin_help $MISSING_DEPENDENCY
56590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56591    msys_help $MISSING_DEPENDENCY
56592  else
56593    PKGHANDLER_COMMAND=
56594
56595    case $PKGHANDLER in
56596      apt-get)
56597        apt_help     $MISSING_DEPENDENCY ;;
56598      yum)
56599        yum_help     $MISSING_DEPENDENCY ;;
56600      brew)
56601        brew_help    $MISSING_DEPENDENCY ;;
56602      port)
56603        port_help    $MISSING_DEPENDENCY ;;
56604      pkgutil)
56605        pkgutil_help $MISSING_DEPENDENCY ;;
56606      pkgadd)
56607        pkgadd_help  $MISSING_DEPENDENCY ;;
56608    esac
56609
56610    if test "x$PKGHANDLER_COMMAND" != x; then
56611      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56612    fi
56613  fi
56614
56615      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
56616    fi
56617
56618    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
56619      OPENWIN_HOME="/usr/openwin"
56620      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
56621      X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56622          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
56623    fi
56624
56625    ac_ext=c
56626ac_cpp='$CPP $CPPFLAGS'
56627ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56628ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56629ac_compiler_gnu=$ac_cv_c_compiler_gnu
56630
56631    OLD_CFLAGS="$CFLAGS"
56632    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
56633
56634    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
56635    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
56636do :
56637  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56638ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
56639          # include <X11/Xlib.h>
56640          # include <X11/Xutil.h>
56641
56642
56643"
56644if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56645  cat >>confdefs.h <<_ACEOF
56646#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56647_ACEOF
56648 X11_HEADERS_OK=yes
56649else
56650  X11_HEADERS_OK=no; break
56651fi
56652
56653done
56654
56655
56656    if test "x$X11_HEADERS_OK" = xno; then
56657
56658  # Print a helpful message on how to acquire the necessary build dependency.
56659  # x11 is the help tag: freetype, cups, alsa etc
56660  MISSING_DEPENDENCY=x11
56661
56662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56663    cygwin_help $MISSING_DEPENDENCY
56664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56665    msys_help $MISSING_DEPENDENCY
56666  else
56667    PKGHANDLER_COMMAND=
56668
56669    case $PKGHANDLER in
56670      apt-get)
56671        apt_help     $MISSING_DEPENDENCY ;;
56672      yum)
56673        yum_help     $MISSING_DEPENDENCY ;;
56674      brew)
56675        brew_help    $MISSING_DEPENDENCY ;;
56676      port)
56677        port_help    $MISSING_DEPENDENCY ;;
56678      pkgutil)
56679        pkgutil_help $MISSING_DEPENDENCY ;;
56680      pkgadd)
56681        pkgadd_help  $MISSING_DEPENDENCY ;;
56682    esac
56683
56684    if test "x$PKGHANDLER_COMMAND" != x; then
56685      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56686    fi
56687  fi
56688
56689      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
56690    fi
56691
56692    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
56693    # defined in libawt_xawt.
56694    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
56695$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
56696    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56697/* end confdefs.h.  */
56698#include <X11/extensions/Xrender.h>
56699int
56700main ()
56701{
56702XLinearGradient x;
56703  ;
56704  return 0;
56705}
56706_ACEOF
56707if ac_fn_c_try_compile "$LINENO"; then :
56708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56709$as_echo "yes" >&6; }
56710else
56711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56712$as_echo "no" >&6; }
56713         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
56714fi
56715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56716
56717    CFLAGS="$OLD_CFLAGS"
56718    ac_ext=cpp
56719ac_cpp='$CXXCPP $CPPFLAGS'
56720ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56721ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56722ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56723
56724  fi # NEEDS_LIB_X11
56725
56726
56727
56728
56729
56730
56731# Check whether --with-cups was given.
56732if test "${with_cups+set}" = set; then :
56733  withval=$with_cups;
56734fi
56735
56736
56737# Check whether --with-cups-include was given.
56738if test "${with_cups_include+set}" = set; then :
56739  withval=$with_cups_include;
56740fi
56741
56742
56743  if test "x$NEEDS_LIB_CUPS" = xfalse; then
56744    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
56745        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
56746      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
56747$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
56748    fi
56749    CUPS_CFLAGS=
56750  else
56751    CUPS_FOUND=no
56752
56753    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
56754      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
56755    fi
56756
56757    if test "x${with_cups}" != x; then
56758      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56759$as_echo_n "checking for cups headers... " >&6; }
56760      if test -s "${with_cups}/include/cups/cups.h"; then
56761        CUPS_CFLAGS="-I${with_cups}/include"
56762        CUPS_FOUND=yes
56763        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56764$as_echo "$CUPS_FOUND" >&6; }
56765      else
56766        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
56767      fi
56768    fi
56769    if test "x${with_cups_include}" != x; then
56770      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56771$as_echo_n "checking for cups headers... " >&6; }
56772      if test -s "${with_cups_include}/cups/cups.h"; then
56773        CUPS_CFLAGS="-I${with_cups_include}"
56774        CUPS_FOUND=yes
56775        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56776$as_echo "$CUPS_FOUND" >&6; }
56777      else
56778        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
56779      fi
56780    fi
56781    if test "x$CUPS_FOUND" = xno; then
56782      # Are the cups headers installed in the default /usr/include location?
56783      for ac_header in cups/cups.h cups/ppd.h
56784do :
56785  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56786ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
56787if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56788  cat >>confdefs.h <<_ACEOF
56789#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56790_ACEOF
56791
56792          CUPS_FOUND=yes
56793          CUPS_CFLAGS=
56794          DEFAULT_CUPS=yes
56795
56796fi
56797
56798done
56799
56800    fi
56801    if test "x$CUPS_FOUND" = xno; then
56802
56803  # Print a helpful message on how to acquire the necessary build dependency.
56804  # cups is the help tag: freetype, cups, alsa etc
56805  MISSING_DEPENDENCY=cups
56806
56807  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56808    cygwin_help $MISSING_DEPENDENCY
56809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56810    msys_help $MISSING_DEPENDENCY
56811  else
56812    PKGHANDLER_COMMAND=
56813
56814    case $PKGHANDLER in
56815      apt-get)
56816        apt_help     $MISSING_DEPENDENCY ;;
56817      yum)
56818        yum_help     $MISSING_DEPENDENCY ;;
56819      brew)
56820        brew_help    $MISSING_DEPENDENCY ;;
56821      port)
56822        port_help    $MISSING_DEPENDENCY ;;
56823      pkgutil)
56824        pkgutil_help $MISSING_DEPENDENCY ;;
56825      pkgadd)
56826        pkgadd_help  $MISSING_DEPENDENCY ;;
56827    esac
56828
56829    if test "x$PKGHANDLER_COMMAND" != x; then
56830      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56831    fi
56832  fi
56833
56834      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
56835    fi
56836  fi
56837
56838
56839
56840
56841
56842# Check whether --with-freetype was given.
56843if test "${with_freetype+set}" = set; then :
56844  withval=$with_freetype;
56845fi
56846
56847
56848# Check whether --with-freetype-include was given.
56849if test "${with_freetype_include+set}" = set; then :
56850  withval=$with_freetype_include;
56851fi
56852
56853
56854# Check whether --with-freetype-lib was given.
56855if test "${with_freetype_lib+set}" = set; then :
56856  withval=$with_freetype_lib;
56857fi
56858
56859
56860# Check whether --with-freetype-src was given.
56861if test "${with_freetype_src+set}" = set; then :
56862  withval=$with_freetype_src;
56863fi
56864
56865  # Check whether --enable-freetype-bundling was given.
56866if test "${enable_freetype_bundling+set}" = set; then :
56867  enableval=$enable_freetype_bundling;
56868fi
56869
56870
56871  # Need to specify explicitly since it needs to be overridden on some versions of macosx
56872  FREETYPE_BASE_NAME=freetype
56873  FREETYPE_CFLAGS=
56874  FREETYPE_LIBS=
56875  FREETYPE_BUNDLE_LIB_PATH=
56876
56877  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
56878    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
56879        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
56880        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
56881        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
56882      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
56883$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
56884    fi
56885    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
56886      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
56887$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
56888    fi
56889  else
56890    # freetype is needed to build; go get it!
56891
56892    BUNDLE_FREETYPE="$enable_freetype_bundling"
56893
56894    if  test "x$with_freetype_src" != x; then
56895      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56896        # Try to build freetype if --with-freetype-src was given on Windows
56897
56898  FREETYPE_SRC_PATH="$with_freetype_src"
56899  BUILD_FREETYPE=yes
56900
56901  # Check if the freetype sources are acessible..
56902  if ! test -d $FREETYPE_SRC_PATH; then
56903    { $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
56904$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
56905    BUILD_FREETYPE=no
56906  fi
56907  # ..and contain a vc2010 project file
56908  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
56909  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
56910    { $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
56911$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
56912    BUILD_FREETYPE=no
56913  fi
56914  # Now check if configure found a version of 'msbuild.exe'
56915  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
56916    { $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
56917$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;}
56918    BUILD_FREETYPE=no
56919  fi
56920
56921  # Ready to go..
56922  if test "x$BUILD_FREETYPE" = xyes; then
56923    # msbuild requires trailing slashes for output directories
56924    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
56925    freetype_lib_path_unix="$freetype_lib_path"
56926    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
56927
56928  unix_path="$vcxproj_path"
56929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56930    windows_path=`$CYGPATH -m "$unix_path"`
56931    vcxproj_path="$windows_path"
56932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56933    windows_path=`cmd //c echo $unix_path`
56934    vcxproj_path="$windows_path"
56935  fi
56936
56937
56938  unix_path="$freetype_lib_path"
56939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56940    windows_path=`$CYGPATH -m "$unix_path"`
56941    freetype_lib_path="$windows_path"
56942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56943    windows_path=`cmd //c echo $unix_path`
56944    freetype_lib_path="$windows_path"
56945  fi
56946
56947
56948  unix_path="$freetype_obj_path"
56949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56950    windows_path=`$CYGPATH -m "$unix_path"`
56951    freetype_obj_path="$windows_path"
56952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56953    windows_path=`cmd //c echo $unix_path`
56954    freetype_obj_path="$windows_path"
56955  fi
56956
56957    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56958      freetype_platform=x64
56959    else
56960      freetype_platform=win32
56961    fi
56962
56963    # The original freetype project file is for VS 2010 (i.e. 'v100'),
56964    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
56965    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
56966    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
56967    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
56968$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
56969
56970    # First we try to build the freetype.dll
56971    $ECHO -e "@echo off\n"\
56972        "$MSBUILD $vcxproj_path "\
56973        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
56974        "/p:Configuration=\"Release Multithreaded\" "\
56975        "/p:Platform=$freetype_platform "\
56976        "/p:ConfigurationType=DynamicLibrary "\
56977        "/p:TargetName=freetype "\
56978        "/p:OutDir=\"$freetype_lib_path\" "\
56979        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
56980    cmd /c freetype.bat
56981
56982    if test -s "$freetype_lib_path_unix/freetype.dll"; then
56983      # If that succeeds we also build freetype.lib
56984      $ECHO -e "@echo off\n"\
56985          "$MSBUILD $vcxproj_path "\
56986          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
56987          "/p:Configuration=\"Release Multithreaded\" "\
56988          "/p:Platform=$freetype_platform "\
56989          "/p:ConfigurationType=StaticLibrary "\
56990          "/p:TargetName=freetype "\
56991          "/p:OutDir=\"$freetype_lib_path\" "\
56992          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
56993      cmd /c freetype.bat
56994
56995      if test -s "$freetype_lib_path_unix/freetype.lib"; then
56996        # Once we build both, lib and dll, set freetype lib and include path appropriately
56997        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
56998        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
56999        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
57000$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
57001      else
57002        BUILD_FREETYPE=no
57003      fi
57004    else
57005      BUILD_FREETYPE=no
57006    fi
57007  fi
57008
57009        if test "x$BUILD_FREETYPE" = xyes; then
57010          # Okay, we built it. Check that it works.
57011
57012  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57013  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57014  METHOD="--with-freetype-src"
57015
57016  # Let's start with an optimistic view of the world :-)
57017  FOUND_FREETYPE=yes
57018
57019  # First look for the canonical freetype main include file ft2build.h.
57020  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57021    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57022    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57023    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57024      # Fail.
57025      FOUND_FREETYPE=no
57026    fi
57027  fi
57028
57029  if test "x$FOUND_FREETYPE" = xyes; then
57030    # Include file found, let's continue the sanity check.
57031    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57032$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57033
57034    # Reset to default value
57035    FREETYPE_BASE_NAME=freetype
57036    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57037    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57038      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57039          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57040        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57041        # for the .6 version explicitly.
57042        FREETYPE_BASE_NAME=freetype.6
57043        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57044        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57045$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57046      else
57047        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57048$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57049        FOUND_FREETYPE=no
57050      fi
57051    else
57052      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57053        # On Windows, we will need both .lib and .dll file.
57054        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57055          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57056$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57057          FOUND_FREETYPE=no
57058        fi
57059      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57060          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57061        # Found lib in isa dir, use that instead.
57062        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57063        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57064$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57065      fi
57066    fi
57067  fi
57068
57069  if test "x$FOUND_FREETYPE" = xyes; then
57070
57071  # Only process if variable expands to non-empty
57072
57073  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57074    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57075
57076  # Input might be given as Windows format, start by converting to
57077  # unix format.
57078  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57079  new_path=`$CYGPATH -u "$path"`
57080
57081  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57082  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57083  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57084  # "foo.exe" is OK but "foo" is an error.
57085  #
57086  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57087  # It is also a way to make sure we got the proper file name for the real test later on.
57088  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57089  if test "x$test_shortpath" = x; then
57090    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57091$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57092    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57093  fi
57094
57095  # Call helper function which possibly converts this using DOS-style short mode.
57096  # If so, the updated path is stored in $new_path.
57097
57098  input_path="$new_path"
57099  # Check if we need to convert this using DOS-style short mode. If the path
57100  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57101  # take no chances and rewrite it.
57102  # Note: m4 eats our [], so we need to use [ and ] instead.
57103  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57104  if test "x$has_forbidden_chars" != x; then
57105    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57106    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57107    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57108    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57109      # Going to short mode and back again did indeed matter. Since short mode is
57110      # case insensitive, let's make it lowercase to improve readability.
57111      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57112      # Now convert it back to Unix-style (cygpath)
57113      input_path=`$CYGPATH -u "$shortmode_path"`
57114      new_path="$input_path"
57115    fi
57116  fi
57117
57118  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57119  if test "x$test_cygdrive_prefix" = x; then
57120    # As a simple fix, exclude /usr/bin since it's not a real path.
57121    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57122      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57123      # a path prefixed by /cygdrive for fixpath to work.
57124      new_path="$CYGWIN_ROOT_PATH$input_path"
57125    fi
57126  fi
57127
57128
57129  if test "x$path" != "x$new_path"; then
57130    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57131    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57132$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57133  fi
57134
57135    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57136
57137  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57138  has_colon=`$ECHO $path | $GREP ^.:`
57139  new_path="$path"
57140  if test "x$has_colon" = x; then
57141    # Not in mixed or Windows style, start by that.
57142    new_path=`cmd //c echo $path`
57143  fi
57144
57145
57146  input_path="$new_path"
57147  # Check if we need to convert this using DOS-style short mode. If the path
57148  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57149  # take no chances and rewrite it.
57150  # Note: m4 eats our [], so we need to use [ and ] instead.
57151  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57152  if test "x$has_forbidden_chars" != x; then
57153    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57154    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57155  fi
57156
57157
57158  windows_path="$new_path"
57159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57160    unix_path=`$CYGPATH -u "$windows_path"`
57161    new_path="$unix_path"
57162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57164    new_path="$unix_path"
57165  fi
57166
57167  if test "x$path" != "x$new_path"; then
57168    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57169    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57170$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57171  fi
57172
57173  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57174  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57175
57176    else
57177      # We're on a unix platform. Hooray! :)
57178      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57179      has_space=`$ECHO "$path" | $GREP " "`
57180      if test "x$has_space" != x; then
57181        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57182$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57183        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57184      fi
57185
57186      # Use eval to expand a potential ~
57187      eval path="$path"
57188      if test ! -f "$path" && test ! -d "$path"; then
57189        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57190      fi
57191
57192      if test -d "$path"; then
57193        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57194      else
57195        dir="`$DIRNAME "$path"`"
57196        base="`$BASENAME "$path"`"
57197        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57198      fi
57199    fi
57200  fi
57201
57202
57203  # Only process if variable expands to non-empty
57204
57205  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57206    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57207
57208  # Input might be given as Windows format, start by converting to
57209  # unix format.
57210  path="$POTENTIAL_FREETYPE_LIB_PATH"
57211  new_path=`$CYGPATH -u "$path"`
57212
57213  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57214  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57215  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57216  # "foo.exe" is OK but "foo" is an error.
57217  #
57218  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57219  # It is also a way to make sure we got the proper file name for the real test later on.
57220  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57221  if test "x$test_shortpath" = x; then
57222    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57223$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57224    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57225  fi
57226
57227  # Call helper function which possibly converts this using DOS-style short mode.
57228  # If so, the updated path is stored in $new_path.
57229
57230  input_path="$new_path"
57231  # Check if we need to convert this using DOS-style short mode. If the path
57232  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57233  # take no chances and rewrite it.
57234  # Note: m4 eats our [], so we need to use [ and ] instead.
57235  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57236  if test "x$has_forbidden_chars" != x; then
57237    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57238    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57239    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57240    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57241      # Going to short mode and back again did indeed matter. Since short mode is
57242      # case insensitive, let's make it lowercase to improve readability.
57243      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57244      # Now convert it back to Unix-style (cygpath)
57245      input_path=`$CYGPATH -u "$shortmode_path"`
57246      new_path="$input_path"
57247    fi
57248  fi
57249
57250  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57251  if test "x$test_cygdrive_prefix" = x; then
57252    # As a simple fix, exclude /usr/bin since it's not a real path.
57253    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57254      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57255      # a path prefixed by /cygdrive for fixpath to work.
57256      new_path="$CYGWIN_ROOT_PATH$input_path"
57257    fi
57258  fi
57259
57260
57261  if test "x$path" != "x$new_path"; then
57262    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57263    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57264$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57265  fi
57266
57267    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57268
57269  path="$POTENTIAL_FREETYPE_LIB_PATH"
57270  has_colon=`$ECHO $path | $GREP ^.:`
57271  new_path="$path"
57272  if test "x$has_colon" = x; then
57273    # Not in mixed or Windows style, start by that.
57274    new_path=`cmd //c echo $path`
57275  fi
57276
57277
57278  input_path="$new_path"
57279  # Check if we need to convert this using DOS-style short mode. If the path
57280  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57281  # take no chances and rewrite it.
57282  # Note: m4 eats our [], so we need to use [ and ] instead.
57283  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57284  if test "x$has_forbidden_chars" != x; then
57285    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57286    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57287  fi
57288
57289
57290  windows_path="$new_path"
57291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57292    unix_path=`$CYGPATH -u "$windows_path"`
57293    new_path="$unix_path"
57294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57295    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57296    new_path="$unix_path"
57297  fi
57298
57299  if test "x$path" != "x$new_path"; then
57300    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57301    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57302$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57303  fi
57304
57305  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57306  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57307
57308    else
57309      # We're on a unix platform. Hooray! :)
57310      path="$POTENTIAL_FREETYPE_LIB_PATH"
57311      has_space=`$ECHO "$path" | $GREP " "`
57312      if test "x$has_space" != x; then
57313        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57314$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57315        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57316      fi
57317
57318      # Use eval to expand a potential ~
57319      eval path="$path"
57320      if test ! -f "$path" && test ! -d "$path"; then
57321        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57322      fi
57323
57324      if test -d "$path"; then
57325        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57326      else
57327        dir="`$DIRNAME "$path"`"
57328        base="`$BASENAME "$path"`"
57329        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57330      fi
57331    fi
57332  fi
57333
57334
57335    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57336    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57337$as_echo_n "checking for freetype includes... " >&6; }
57338    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57339$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57340    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57341    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57342$as_echo_n "checking for freetype libraries... " >&6; }
57343    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57344$as_echo "$FREETYPE_LIB_PATH" >&6; }
57345  fi
57346
57347          if test "x$FOUND_FREETYPE" != xyes; then
57348            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57349          fi
57350        else
57351          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57352$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57353          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57354        fi
57355      else
57356        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57357$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57358      fi
57359    fi
57360
57361    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57362      # User has specified settings
57363
57364      if test "x$BUNDLE_FREETYPE" = x; then
57365        # If not specified, default is to bundle freetype
57366        BUNDLE_FREETYPE=yes
57367      fi
57368
57369      if test "x$with_freetype" != x; then
57370        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57371        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57372      fi
57373
57374      # Allow --with-freetype-lib and --with-freetype-include to override
57375      if test "x$with_freetype_include" != x; then
57376        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57377      fi
57378      if test "x$with_freetype_lib" != x; then
57379        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57380      fi
57381
57382      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57383        # Okay, we got it. Check that it works.
57384
57385  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57386  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57387  METHOD="--with-freetype"
57388
57389  # Let's start with an optimistic view of the world :-)
57390  FOUND_FREETYPE=yes
57391
57392  # First look for the canonical freetype main include file ft2build.h.
57393  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57394    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57395    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57396    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57397      # Fail.
57398      FOUND_FREETYPE=no
57399    fi
57400  fi
57401
57402  if test "x$FOUND_FREETYPE" = xyes; then
57403    # Include file found, let's continue the sanity check.
57404    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57405$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57406
57407    # Reset to default value
57408    FREETYPE_BASE_NAME=freetype
57409    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57410    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57411      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57412          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57413        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57414        # for the .6 version explicitly.
57415        FREETYPE_BASE_NAME=freetype.6
57416        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57417        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57418$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57419      else
57420        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57421$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57422        FOUND_FREETYPE=no
57423      fi
57424    else
57425      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57426        # On Windows, we will need both .lib and .dll file.
57427        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57428          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57429$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57430          FOUND_FREETYPE=no
57431        fi
57432      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57433          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57434        # Found lib in isa dir, use that instead.
57435        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57436        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57437$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57438      fi
57439    fi
57440  fi
57441
57442  if test "x$FOUND_FREETYPE" = xyes; then
57443
57444  # Only process if variable expands to non-empty
57445
57446  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57447    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57448
57449  # Input might be given as Windows format, start by converting to
57450  # unix format.
57451  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57452  new_path=`$CYGPATH -u "$path"`
57453
57454  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57455  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57456  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57457  # "foo.exe" is OK but "foo" is an error.
57458  #
57459  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57460  # It is also a way to make sure we got the proper file name for the real test later on.
57461  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57462  if test "x$test_shortpath" = x; then
57463    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57464$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57465    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57466  fi
57467
57468  # Call helper function which possibly converts this using DOS-style short mode.
57469  # If so, the updated path is stored in $new_path.
57470
57471  input_path="$new_path"
57472  # Check if we need to convert this using DOS-style short mode. If the path
57473  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57474  # take no chances and rewrite it.
57475  # Note: m4 eats our [], so we need to use [ and ] instead.
57476  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57477  if test "x$has_forbidden_chars" != x; then
57478    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57479    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57480    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57481    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57482      # Going to short mode and back again did indeed matter. Since short mode is
57483      # case insensitive, let's make it lowercase to improve readability.
57484      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57485      # Now convert it back to Unix-style (cygpath)
57486      input_path=`$CYGPATH -u "$shortmode_path"`
57487      new_path="$input_path"
57488    fi
57489  fi
57490
57491  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57492  if test "x$test_cygdrive_prefix" = x; then
57493    # As a simple fix, exclude /usr/bin since it's not a real path.
57494    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57495      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57496      # a path prefixed by /cygdrive for fixpath to work.
57497      new_path="$CYGWIN_ROOT_PATH$input_path"
57498    fi
57499  fi
57500
57501
57502  if test "x$path" != "x$new_path"; then
57503    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57504    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57505$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57506  fi
57507
57508    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57509
57510  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57511  has_colon=`$ECHO $path | $GREP ^.:`
57512  new_path="$path"
57513  if test "x$has_colon" = x; then
57514    # Not in mixed or Windows style, start by that.
57515    new_path=`cmd //c echo $path`
57516  fi
57517
57518
57519  input_path="$new_path"
57520  # Check if we need to convert this using DOS-style short mode. If the path
57521  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57522  # take no chances and rewrite it.
57523  # Note: m4 eats our [], so we need to use [ and ] instead.
57524  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57525  if test "x$has_forbidden_chars" != x; then
57526    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57527    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57528  fi
57529
57530
57531  windows_path="$new_path"
57532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57533    unix_path=`$CYGPATH -u "$windows_path"`
57534    new_path="$unix_path"
57535  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57536    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57537    new_path="$unix_path"
57538  fi
57539
57540  if test "x$path" != "x$new_path"; then
57541    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57542    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57543$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57544  fi
57545
57546  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57547  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57548
57549    else
57550      # We're on a unix platform. Hooray! :)
57551      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57552      has_space=`$ECHO "$path" | $GREP " "`
57553      if test "x$has_space" != x; then
57554        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57555$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57556        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57557      fi
57558
57559      # Use eval to expand a potential ~
57560      eval path="$path"
57561      if test ! -f "$path" && test ! -d "$path"; then
57562        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57563      fi
57564
57565      if test -d "$path"; then
57566        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57567      else
57568        dir="`$DIRNAME "$path"`"
57569        base="`$BASENAME "$path"`"
57570        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57571      fi
57572    fi
57573  fi
57574
57575
57576  # Only process if variable expands to non-empty
57577
57578  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57579    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57580
57581  # Input might be given as Windows format, start by converting to
57582  # unix format.
57583  path="$POTENTIAL_FREETYPE_LIB_PATH"
57584  new_path=`$CYGPATH -u "$path"`
57585
57586  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57587  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57588  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57589  # "foo.exe" is OK but "foo" is an error.
57590  #
57591  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57592  # It is also a way to make sure we got the proper file name for the real test later on.
57593  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57594  if test "x$test_shortpath" = x; then
57595    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57596$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57597    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57598  fi
57599
57600  # Call helper function which possibly converts this using DOS-style short mode.
57601  # If so, the updated path is stored in $new_path.
57602
57603  input_path="$new_path"
57604  # Check if we need to convert this using DOS-style short mode. If the path
57605  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57606  # take no chances and rewrite it.
57607  # Note: m4 eats our [], so we need to use [ and ] instead.
57608  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57609  if test "x$has_forbidden_chars" != x; then
57610    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57611    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57612    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57613    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57614      # Going to short mode and back again did indeed matter. Since short mode is
57615      # case insensitive, let's make it lowercase to improve readability.
57616      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57617      # Now convert it back to Unix-style (cygpath)
57618      input_path=`$CYGPATH -u "$shortmode_path"`
57619      new_path="$input_path"
57620    fi
57621  fi
57622
57623  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57624  if test "x$test_cygdrive_prefix" = x; then
57625    # As a simple fix, exclude /usr/bin since it's not a real path.
57626    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57627      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57628      # a path prefixed by /cygdrive for fixpath to work.
57629      new_path="$CYGWIN_ROOT_PATH$input_path"
57630    fi
57631  fi
57632
57633
57634  if test "x$path" != "x$new_path"; then
57635    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57636    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57637$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57638  fi
57639
57640    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57641
57642  path="$POTENTIAL_FREETYPE_LIB_PATH"
57643  has_colon=`$ECHO $path | $GREP ^.:`
57644  new_path="$path"
57645  if test "x$has_colon" = x; then
57646    # Not in mixed or Windows style, start by that.
57647    new_path=`cmd //c echo $path`
57648  fi
57649
57650
57651  input_path="$new_path"
57652  # Check if we need to convert this using DOS-style short mode. If the path
57653  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57654  # take no chances and rewrite it.
57655  # Note: m4 eats our [], so we need to use [ and ] instead.
57656  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57657  if test "x$has_forbidden_chars" != x; then
57658    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57659    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57660  fi
57661
57662
57663  windows_path="$new_path"
57664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57665    unix_path=`$CYGPATH -u "$windows_path"`
57666    new_path="$unix_path"
57667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57668    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57669    new_path="$unix_path"
57670  fi
57671
57672  if test "x$path" != "x$new_path"; then
57673    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57674    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57675$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57676  fi
57677
57678  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57679  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57680
57681    else
57682      # We're on a unix platform. Hooray! :)
57683      path="$POTENTIAL_FREETYPE_LIB_PATH"
57684      has_space=`$ECHO "$path" | $GREP " "`
57685      if test "x$has_space" != x; then
57686        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57687$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57688        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57689      fi
57690
57691      # Use eval to expand a potential ~
57692      eval path="$path"
57693      if test ! -f "$path" && test ! -d "$path"; then
57694        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57695      fi
57696
57697      if test -d "$path"; then
57698        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57699      else
57700        dir="`$DIRNAME "$path"`"
57701        base="`$BASENAME "$path"`"
57702        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57703      fi
57704    fi
57705  fi
57706
57707
57708    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57709    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57710$as_echo_n "checking for freetype includes... " >&6; }
57711    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57712$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57713    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57714    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57715$as_echo_n "checking for freetype libraries... " >&6; }
57716    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57717$as_echo "$FREETYPE_LIB_PATH" >&6; }
57718  fi
57719
57720        if test "x$FOUND_FREETYPE" != xyes; then
57721          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
57722        fi
57723      else
57724        # User specified only one of lib or include. This is an error.
57725        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
57726          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
57727$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
57728          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57729        else
57730          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
57731$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
57732          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57733        fi
57734      fi
57735    else
57736      # User did not specify settings, but we need freetype. Try to locate it.
57737
57738      if test "x$BUNDLE_FREETYPE" = x; then
57739        # If not specified, default is to bundle freetype only on windows
57740        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57741          BUNDLE_FREETYPE=yes
57742        else
57743          BUNDLE_FREETYPE=no
57744        fi
57745      fi
57746
57747      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
57748      if test "x$SYSROOT" = x; then
57749        if test "x$FOUND_FREETYPE" != xyes; then
57750          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
57751          if test "x$PKG_CONFIG" != x; then
57752
57753pkg_failed=no
57754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
57755$as_echo_n "checking for FREETYPE... " >&6; }
57756
57757if test -n "$FREETYPE_CFLAGS"; then
57758    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
57759 elif test -n "$PKG_CONFIG"; then
57760    if test -n "$PKG_CONFIG" && \
57761    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57762  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57763  ac_status=$?
57764  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57765  test $ac_status = 0; }; then
57766  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
57767else
57768  pkg_failed=yes
57769fi
57770 else
57771    pkg_failed=untried
57772fi
57773if test -n "$FREETYPE_LIBS"; then
57774    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
57775 elif test -n "$PKG_CONFIG"; then
57776    if test -n "$PKG_CONFIG" && \
57777    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57778  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57779  ac_status=$?
57780  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57781  test $ac_status = 0; }; then
57782  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
57783else
57784  pkg_failed=yes
57785fi
57786 else
57787    pkg_failed=untried
57788fi
57789
57790
57791
57792if test $pkg_failed = yes; then
57793
57794if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57795        _pkg_short_errors_supported=yes
57796else
57797        _pkg_short_errors_supported=no
57798fi
57799        if test $_pkg_short_errors_supported = yes; then
57800	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
57801        else
57802	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
57803        fi
57804	# Put the nasty error message in config.log where it belongs
57805	echo "$FREETYPE_PKG_ERRORS" >&5
57806
57807	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57808$as_echo "no" >&6; }
57809                FOUND_FREETYPE=no
57810elif test $pkg_failed = untried; then
57811	FOUND_FREETYPE=no
57812else
57813	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
57814	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
57815        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57816$as_echo "yes" >&6; }
57817	FOUND_FREETYPE=yes
57818fi
57819            if test "x$FOUND_FREETYPE" = xyes; then
57820              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
57821              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
57822              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
57823              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
57824                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
57825              fi
57826              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
57827              if test "x$BUNDLE_FREETYPE" = xyes; then
57828                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
57829$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
57830                FOUND_FREETYPE=no
57831              else
57832                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
57833$as_echo_n "checking for freetype... " >&6; }
57834                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
57835$as_echo "yes (using pkg-config)" >&6; }
57836              fi
57837            fi
57838          fi
57839        fi
57840      fi
57841
57842      if test "x$FOUND_FREETYPE" != xyes; then
57843        # Check in well-known locations
57844        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57845          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
57846
57847  windows_path="$FREETYPE_BASE_DIR"
57848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57849    unix_path=`$CYGPATH -u "$windows_path"`
57850    FREETYPE_BASE_DIR="$unix_path"
57851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57852    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57853    FREETYPE_BASE_DIR="$unix_path"
57854  fi
57855
57856
57857  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57858  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57859  METHOD="well-known location"
57860
57861  # Let's start with an optimistic view of the world :-)
57862  FOUND_FREETYPE=yes
57863
57864  # First look for the canonical freetype main include file ft2build.h.
57865  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57866    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57867    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57868    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57869      # Fail.
57870      FOUND_FREETYPE=no
57871    fi
57872  fi
57873
57874  if test "x$FOUND_FREETYPE" = xyes; then
57875    # Include file found, let's continue the sanity check.
57876    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57877$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57878
57879    # Reset to default value
57880    FREETYPE_BASE_NAME=freetype
57881    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57882    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57883      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57884          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57885        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57886        # for the .6 version explicitly.
57887        FREETYPE_BASE_NAME=freetype.6
57888        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57889        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57890$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57891      else
57892        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57893$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57894        FOUND_FREETYPE=no
57895      fi
57896    else
57897      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57898        # On Windows, we will need both .lib and .dll file.
57899        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57900          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57901$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57902          FOUND_FREETYPE=no
57903        fi
57904      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57905          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57906        # Found lib in isa dir, use that instead.
57907        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57908        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57909$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57910      fi
57911    fi
57912  fi
57913
57914  if test "x$FOUND_FREETYPE" = xyes; then
57915
57916  # Only process if variable expands to non-empty
57917
57918  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57919    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57920
57921  # Input might be given as Windows format, start by converting to
57922  # unix format.
57923  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57924  new_path=`$CYGPATH -u "$path"`
57925
57926  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57927  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57928  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57929  # "foo.exe" is OK but "foo" is an error.
57930  #
57931  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57932  # It is also a way to make sure we got the proper file name for the real test later on.
57933  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57934  if test "x$test_shortpath" = x; then
57935    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57936$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57937    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57938  fi
57939
57940  # Call helper function which possibly converts this using DOS-style short mode.
57941  # If so, the updated path is stored in $new_path.
57942
57943  input_path="$new_path"
57944  # Check if we need to convert this using DOS-style short mode. If the path
57945  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57946  # take no chances and rewrite it.
57947  # Note: m4 eats our [], so we need to use [ and ] instead.
57948  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57949  if test "x$has_forbidden_chars" != x; then
57950    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57951    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57952    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57953    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57954      # Going to short mode and back again did indeed matter. Since short mode is
57955      # case insensitive, let's make it lowercase to improve readability.
57956      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57957      # Now convert it back to Unix-style (cygpath)
57958      input_path=`$CYGPATH -u "$shortmode_path"`
57959      new_path="$input_path"
57960    fi
57961  fi
57962
57963  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57964  if test "x$test_cygdrive_prefix" = x; then
57965    # As a simple fix, exclude /usr/bin since it's not a real path.
57966    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57967      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57968      # a path prefixed by /cygdrive for fixpath to work.
57969      new_path="$CYGWIN_ROOT_PATH$input_path"
57970    fi
57971  fi
57972
57973
57974  if test "x$path" != "x$new_path"; then
57975    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57976    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57977$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57978  fi
57979
57980    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57981
57982  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57983  has_colon=`$ECHO $path | $GREP ^.:`
57984  new_path="$path"
57985  if test "x$has_colon" = x; then
57986    # Not in mixed or Windows style, start by that.
57987    new_path=`cmd //c echo $path`
57988  fi
57989
57990
57991  input_path="$new_path"
57992  # Check if we need to convert this using DOS-style short mode. If the path
57993  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57994  # take no chances and rewrite it.
57995  # Note: m4 eats our [], so we need to use [ and ] instead.
57996  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57997  if test "x$has_forbidden_chars" != x; then
57998    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57999    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58000  fi
58001
58002
58003  windows_path="$new_path"
58004  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58005    unix_path=`$CYGPATH -u "$windows_path"`
58006    new_path="$unix_path"
58007  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58008    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58009    new_path="$unix_path"
58010  fi
58011
58012  if test "x$path" != "x$new_path"; then
58013    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58014    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58015$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58016  fi
58017
58018  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58019  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58020
58021    else
58022      # We're on a unix platform. Hooray! :)
58023      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58024      has_space=`$ECHO "$path" | $GREP " "`
58025      if test "x$has_space" != x; then
58026        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58027$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58028        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58029      fi
58030
58031      # Use eval to expand a potential ~
58032      eval path="$path"
58033      if test ! -f "$path" && test ! -d "$path"; then
58034        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58035      fi
58036
58037      if test -d "$path"; then
58038        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58039      else
58040        dir="`$DIRNAME "$path"`"
58041        base="`$BASENAME "$path"`"
58042        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58043      fi
58044    fi
58045  fi
58046
58047
58048  # Only process if variable expands to non-empty
58049
58050  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58051    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58052
58053  # Input might be given as Windows format, start by converting to
58054  # unix format.
58055  path="$POTENTIAL_FREETYPE_LIB_PATH"
58056  new_path=`$CYGPATH -u "$path"`
58057
58058  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58059  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58060  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58061  # "foo.exe" is OK but "foo" is an error.
58062  #
58063  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58064  # It is also a way to make sure we got the proper file name for the real test later on.
58065  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58066  if test "x$test_shortpath" = x; then
58067    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58068$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58069    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58070  fi
58071
58072  # Call helper function which possibly converts this using DOS-style short mode.
58073  # If so, the updated path is stored in $new_path.
58074
58075  input_path="$new_path"
58076  # Check if we need to convert this using DOS-style short mode. If the path
58077  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58078  # take no chances and rewrite it.
58079  # Note: m4 eats our [], so we need to use [ and ] instead.
58080  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58081  if test "x$has_forbidden_chars" != x; then
58082    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58083    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58084    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58085    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58086      # Going to short mode and back again did indeed matter. Since short mode is
58087      # case insensitive, let's make it lowercase to improve readability.
58088      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58089      # Now convert it back to Unix-style (cygpath)
58090      input_path=`$CYGPATH -u "$shortmode_path"`
58091      new_path="$input_path"
58092    fi
58093  fi
58094
58095  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58096  if test "x$test_cygdrive_prefix" = x; then
58097    # As a simple fix, exclude /usr/bin since it's not a real path.
58098    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58099      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58100      # a path prefixed by /cygdrive for fixpath to work.
58101      new_path="$CYGWIN_ROOT_PATH$input_path"
58102    fi
58103  fi
58104
58105
58106  if test "x$path" != "x$new_path"; then
58107    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58108    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58109$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58110  fi
58111
58112    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58113
58114  path="$POTENTIAL_FREETYPE_LIB_PATH"
58115  has_colon=`$ECHO $path | $GREP ^.:`
58116  new_path="$path"
58117  if test "x$has_colon" = x; then
58118    # Not in mixed or Windows style, start by that.
58119    new_path=`cmd //c echo $path`
58120  fi
58121
58122
58123  input_path="$new_path"
58124  # Check if we need to convert this using DOS-style short mode. If the path
58125  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58126  # take no chances and rewrite it.
58127  # Note: m4 eats our [], so we need to use [ and ] instead.
58128  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58129  if test "x$has_forbidden_chars" != x; then
58130    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58131    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58132  fi
58133
58134
58135  windows_path="$new_path"
58136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58137    unix_path=`$CYGPATH -u "$windows_path"`
58138    new_path="$unix_path"
58139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58141    new_path="$unix_path"
58142  fi
58143
58144  if test "x$path" != "x$new_path"; then
58145    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58146    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58147$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58148  fi
58149
58150  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58151  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58152
58153    else
58154      # We're on a unix platform. Hooray! :)
58155      path="$POTENTIAL_FREETYPE_LIB_PATH"
58156      has_space=`$ECHO "$path" | $GREP " "`
58157      if test "x$has_space" != x; then
58158        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58159$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58160        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58161      fi
58162
58163      # Use eval to expand a potential ~
58164      eval path="$path"
58165      if test ! -f "$path" && test ! -d "$path"; then
58166        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58167      fi
58168
58169      if test -d "$path"; then
58170        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58171      else
58172        dir="`$DIRNAME "$path"`"
58173        base="`$BASENAME "$path"`"
58174        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58175      fi
58176    fi
58177  fi
58178
58179
58180    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58181    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58182$as_echo_n "checking for freetype includes... " >&6; }
58183    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58184$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58185    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58186    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58187$as_echo_n "checking for freetype libraries... " >&6; }
58188    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58189$as_echo "$FREETYPE_LIB_PATH" >&6; }
58190  fi
58191
58192          if test "x$FOUND_FREETYPE" != xyes; then
58193            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58194
58195  windows_path="$FREETYPE_BASE_DIR"
58196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58197    unix_path=`$CYGPATH -u "$windows_path"`
58198    FREETYPE_BASE_DIR="$unix_path"
58199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58201    FREETYPE_BASE_DIR="$unix_path"
58202  fi
58203
58204
58205  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58206  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58207  METHOD="well-known location"
58208
58209  # Let's start with an optimistic view of the world :-)
58210  FOUND_FREETYPE=yes
58211
58212  # First look for the canonical freetype main include file ft2build.h.
58213  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58214    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58215    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58216    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58217      # Fail.
58218      FOUND_FREETYPE=no
58219    fi
58220  fi
58221
58222  if test "x$FOUND_FREETYPE" = xyes; then
58223    # Include file found, let's continue the sanity check.
58224    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58225$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58226
58227    # Reset to default value
58228    FREETYPE_BASE_NAME=freetype
58229    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58230    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58231      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58232          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58233        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58234        # for the .6 version explicitly.
58235        FREETYPE_BASE_NAME=freetype.6
58236        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58237        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58238$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58239      else
58240        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58241$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58242        FOUND_FREETYPE=no
58243      fi
58244    else
58245      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58246        # On Windows, we will need both .lib and .dll file.
58247        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58248          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58249$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58250          FOUND_FREETYPE=no
58251        fi
58252      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58253          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58254        # Found lib in isa dir, use that instead.
58255        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58256        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58257$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58258      fi
58259    fi
58260  fi
58261
58262  if test "x$FOUND_FREETYPE" = xyes; then
58263
58264  # Only process if variable expands to non-empty
58265
58266  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58267    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58268
58269  # Input might be given as Windows format, start by converting to
58270  # unix format.
58271  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58272  new_path=`$CYGPATH -u "$path"`
58273
58274  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58275  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58276  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58277  # "foo.exe" is OK but "foo" is an error.
58278  #
58279  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58280  # It is also a way to make sure we got the proper file name for the real test later on.
58281  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58282  if test "x$test_shortpath" = x; then
58283    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58284$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58285    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58286  fi
58287
58288  # Call helper function which possibly converts this using DOS-style short mode.
58289  # If so, the updated path is stored in $new_path.
58290
58291  input_path="$new_path"
58292  # Check if we need to convert this using DOS-style short mode. If the path
58293  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58294  # take no chances and rewrite it.
58295  # Note: m4 eats our [], so we need to use [ and ] instead.
58296  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58297  if test "x$has_forbidden_chars" != x; then
58298    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58299    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58300    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58301    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58302      # Going to short mode and back again did indeed matter. Since short mode is
58303      # case insensitive, let's make it lowercase to improve readability.
58304      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58305      # Now convert it back to Unix-style (cygpath)
58306      input_path=`$CYGPATH -u "$shortmode_path"`
58307      new_path="$input_path"
58308    fi
58309  fi
58310
58311  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58312  if test "x$test_cygdrive_prefix" = x; then
58313    # As a simple fix, exclude /usr/bin since it's not a real path.
58314    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58315      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58316      # a path prefixed by /cygdrive for fixpath to work.
58317      new_path="$CYGWIN_ROOT_PATH$input_path"
58318    fi
58319  fi
58320
58321
58322  if test "x$path" != "x$new_path"; then
58323    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58324    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58325$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58326  fi
58327
58328    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58329
58330  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58331  has_colon=`$ECHO $path | $GREP ^.:`
58332  new_path="$path"
58333  if test "x$has_colon" = x; then
58334    # Not in mixed or Windows style, start by that.
58335    new_path=`cmd //c echo $path`
58336  fi
58337
58338
58339  input_path="$new_path"
58340  # Check if we need to convert this using DOS-style short mode. If the path
58341  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58342  # take no chances and rewrite it.
58343  # Note: m4 eats our [], so we need to use [ and ] instead.
58344  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58345  if test "x$has_forbidden_chars" != x; then
58346    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58347    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58348  fi
58349
58350
58351  windows_path="$new_path"
58352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58353    unix_path=`$CYGPATH -u "$windows_path"`
58354    new_path="$unix_path"
58355  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58356    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58357    new_path="$unix_path"
58358  fi
58359
58360  if test "x$path" != "x$new_path"; then
58361    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58362    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58363$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58364  fi
58365
58366  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58367  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58368
58369    else
58370      # We're on a unix platform. Hooray! :)
58371      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58372      has_space=`$ECHO "$path" | $GREP " "`
58373      if test "x$has_space" != x; then
58374        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58375$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58376        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58377      fi
58378
58379      # Use eval to expand a potential ~
58380      eval path="$path"
58381      if test ! -f "$path" && test ! -d "$path"; then
58382        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58383      fi
58384
58385      if test -d "$path"; then
58386        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58387      else
58388        dir="`$DIRNAME "$path"`"
58389        base="`$BASENAME "$path"`"
58390        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58391      fi
58392    fi
58393  fi
58394
58395
58396  # Only process if variable expands to non-empty
58397
58398  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58399    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58400
58401  # Input might be given as Windows format, start by converting to
58402  # unix format.
58403  path="$POTENTIAL_FREETYPE_LIB_PATH"
58404  new_path=`$CYGPATH -u "$path"`
58405
58406  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58407  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58408  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58409  # "foo.exe" is OK but "foo" is an error.
58410  #
58411  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58412  # It is also a way to make sure we got the proper file name for the real test later on.
58413  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58414  if test "x$test_shortpath" = x; then
58415    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58416$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58417    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58418  fi
58419
58420  # Call helper function which possibly converts this using DOS-style short mode.
58421  # If so, the updated path is stored in $new_path.
58422
58423  input_path="$new_path"
58424  # Check if we need to convert this using DOS-style short mode. If the path
58425  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58426  # take no chances and rewrite it.
58427  # Note: m4 eats our [], so we need to use [ and ] instead.
58428  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58429  if test "x$has_forbidden_chars" != x; then
58430    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58431    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58432    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58433    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58434      # Going to short mode and back again did indeed matter. Since short mode is
58435      # case insensitive, let's make it lowercase to improve readability.
58436      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58437      # Now convert it back to Unix-style (cygpath)
58438      input_path=`$CYGPATH -u "$shortmode_path"`
58439      new_path="$input_path"
58440    fi
58441  fi
58442
58443  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58444  if test "x$test_cygdrive_prefix" = x; then
58445    # As a simple fix, exclude /usr/bin since it's not a real path.
58446    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58447      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58448      # a path prefixed by /cygdrive for fixpath to work.
58449      new_path="$CYGWIN_ROOT_PATH$input_path"
58450    fi
58451  fi
58452
58453
58454  if test "x$path" != "x$new_path"; then
58455    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58456    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58457$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58458  fi
58459
58460    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58461
58462  path="$POTENTIAL_FREETYPE_LIB_PATH"
58463  has_colon=`$ECHO $path | $GREP ^.:`
58464  new_path="$path"
58465  if test "x$has_colon" = x; then
58466    # Not in mixed or Windows style, start by that.
58467    new_path=`cmd //c echo $path`
58468  fi
58469
58470
58471  input_path="$new_path"
58472  # Check if we need to convert this using DOS-style short mode. If the path
58473  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58474  # take no chances and rewrite it.
58475  # Note: m4 eats our [], so we need to use [ and ] instead.
58476  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58477  if test "x$has_forbidden_chars" != x; then
58478    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58479    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58480  fi
58481
58482
58483  windows_path="$new_path"
58484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58485    unix_path=`$CYGPATH -u "$windows_path"`
58486    new_path="$unix_path"
58487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58488    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58489    new_path="$unix_path"
58490  fi
58491
58492  if test "x$path" != "x$new_path"; then
58493    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58494    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58495$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58496  fi
58497
58498  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58499  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58500
58501    else
58502      # We're on a unix platform. Hooray! :)
58503      path="$POTENTIAL_FREETYPE_LIB_PATH"
58504      has_space=`$ECHO "$path" | $GREP " "`
58505      if test "x$has_space" != x; then
58506        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58507$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58508        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58509      fi
58510
58511      # Use eval to expand a potential ~
58512      eval path="$path"
58513      if test ! -f "$path" && test ! -d "$path"; then
58514        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58515      fi
58516
58517      if test -d "$path"; then
58518        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58519      else
58520        dir="`$DIRNAME "$path"`"
58521        base="`$BASENAME "$path"`"
58522        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58523      fi
58524    fi
58525  fi
58526
58527
58528    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58529    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58530$as_echo_n "checking for freetype includes... " >&6; }
58531    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58532$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58533    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58534    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58535$as_echo_n "checking for freetype libraries... " >&6; }
58536    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58537$as_echo "$FREETYPE_LIB_PATH" >&6; }
58538  fi
58539
58540          fi
58541          if test "x$FOUND_FREETYPE" != xyes; then
58542            FREETYPE_BASE_DIR="$HOME/freetype"
58543
58544  windows_path="$FREETYPE_BASE_DIR"
58545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58546    unix_path=`$CYGPATH -u "$windows_path"`
58547    FREETYPE_BASE_DIR="$unix_path"
58548  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58549    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58550    FREETYPE_BASE_DIR="$unix_path"
58551  fi
58552
58553            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58554
58555  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58556  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58557  METHOD="well-known location"
58558
58559  # Let's start with an optimistic view of the world :-)
58560  FOUND_FREETYPE=yes
58561
58562  # First look for the canonical freetype main include file ft2build.h.
58563  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58564    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58565    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58566    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58567      # Fail.
58568      FOUND_FREETYPE=no
58569    fi
58570  fi
58571
58572  if test "x$FOUND_FREETYPE" = xyes; then
58573    # Include file found, let's continue the sanity check.
58574    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58575$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58576
58577    # Reset to default value
58578    FREETYPE_BASE_NAME=freetype
58579    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58580    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58581      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58582          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58583        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58584        # for the .6 version explicitly.
58585        FREETYPE_BASE_NAME=freetype.6
58586        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58587        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58588$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58589      else
58590        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58591$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58592        FOUND_FREETYPE=no
58593      fi
58594    else
58595      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58596        # On Windows, we will need both .lib and .dll file.
58597        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58598          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58599$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58600          FOUND_FREETYPE=no
58601        fi
58602      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58603          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58604        # Found lib in isa dir, use that instead.
58605        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58606        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58607$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58608      fi
58609    fi
58610  fi
58611
58612  if test "x$FOUND_FREETYPE" = xyes; then
58613
58614  # Only process if variable expands to non-empty
58615
58616  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58617    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58618
58619  # Input might be given as Windows format, start by converting to
58620  # unix format.
58621  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58622  new_path=`$CYGPATH -u "$path"`
58623
58624  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58625  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58626  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58627  # "foo.exe" is OK but "foo" is an error.
58628  #
58629  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58630  # It is also a way to make sure we got the proper file name for the real test later on.
58631  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58632  if test "x$test_shortpath" = x; then
58633    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58634$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58635    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58636  fi
58637
58638  # Call helper function which possibly converts this using DOS-style short mode.
58639  # If so, the updated path is stored in $new_path.
58640
58641  input_path="$new_path"
58642  # Check if we need to convert this using DOS-style short mode. If the path
58643  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58644  # take no chances and rewrite it.
58645  # Note: m4 eats our [], so we need to use [ and ] instead.
58646  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58647  if test "x$has_forbidden_chars" != x; then
58648    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58649    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58650    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58651    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58652      # Going to short mode and back again did indeed matter. Since short mode is
58653      # case insensitive, let's make it lowercase to improve readability.
58654      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58655      # Now convert it back to Unix-style (cygpath)
58656      input_path=`$CYGPATH -u "$shortmode_path"`
58657      new_path="$input_path"
58658    fi
58659  fi
58660
58661  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58662  if test "x$test_cygdrive_prefix" = x; then
58663    # As a simple fix, exclude /usr/bin since it's not a real path.
58664    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58665      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58666      # a path prefixed by /cygdrive for fixpath to work.
58667      new_path="$CYGWIN_ROOT_PATH$input_path"
58668    fi
58669  fi
58670
58671
58672  if test "x$path" != "x$new_path"; then
58673    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58674    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58675$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58676  fi
58677
58678    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58679
58680  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58681  has_colon=`$ECHO $path | $GREP ^.:`
58682  new_path="$path"
58683  if test "x$has_colon" = x; then
58684    # Not in mixed or Windows style, start by that.
58685    new_path=`cmd //c echo $path`
58686  fi
58687
58688
58689  input_path="$new_path"
58690  # Check if we need to convert this using DOS-style short mode. If the path
58691  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58692  # take no chances and rewrite it.
58693  # Note: m4 eats our [], so we need to use [ and ] instead.
58694  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58695  if test "x$has_forbidden_chars" != x; then
58696    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58697    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58698  fi
58699
58700
58701  windows_path="$new_path"
58702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58703    unix_path=`$CYGPATH -u "$windows_path"`
58704    new_path="$unix_path"
58705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58706    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58707    new_path="$unix_path"
58708  fi
58709
58710  if test "x$path" != "x$new_path"; then
58711    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58712    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58713$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58714  fi
58715
58716  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58717  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58718
58719    else
58720      # We're on a unix platform. Hooray! :)
58721      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58722      has_space=`$ECHO "$path" | $GREP " "`
58723      if test "x$has_space" != x; then
58724        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58725$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58726        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58727      fi
58728
58729      # Use eval to expand a potential ~
58730      eval path="$path"
58731      if test ! -f "$path" && test ! -d "$path"; then
58732        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58733      fi
58734
58735      if test -d "$path"; then
58736        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58737      else
58738        dir="`$DIRNAME "$path"`"
58739        base="`$BASENAME "$path"`"
58740        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58741      fi
58742    fi
58743  fi
58744
58745
58746  # Only process if variable expands to non-empty
58747
58748  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58749    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58750
58751  # Input might be given as Windows format, start by converting to
58752  # unix format.
58753  path="$POTENTIAL_FREETYPE_LIB_PATH"
58754  new_path=`$CYGPATH -u "$path"`
58755
58756  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58757  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58758  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58759  # "foo.exe" is OK but "foo" is an error.
58760  #
58761  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58762  # It is also a way to make sure we got the proper file name for the real test later on.
58763  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58764  if test "x$test_shortpath" = x; then
58765    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58766$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58767    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58768  fi
58769
58770  # Call helper function which possibly converts this using DOS-style short mode.
58771  # If so, the updated path is stored in $new_path.
58772
58773  input_path="$new_path"
58774  # Check if we need to convert this using DOS-style short mode. If the path
58775  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58776  # take no chances and rewrite it.
58777  # Note: m4 eats our [], so we need to use [ and ] instead.
58778  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58779  if test "x$has_forbidden_chars" != x; then
58780    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58781    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58782    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58783    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58784      # Going to short mode and back again did indeed matter. Since short mode is
58785      # case insensitive, let's make it lowercase to improve readability.
58786      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58787      # Now convert it back to Unix-style (cygpath)
58788      input_path=`$CYGPATH -u "$shortmode_path"`
58789      new_path="$input_path"
58790    fi
58791  fi
58792
58793  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58794  if test "x$test_cygdrive_prefix" = x; then
58795    # As a simple fix, exclude /usr/bin since it's not a real path.
58796    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58797      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58798      # a path prefixed by /cygdrive for fixpath to work.
58799      new_path="$CYGWIN_ROOT_PATH$input_path"
58800    fi
58801  fi
58802
58803
58804  if test "x$path" != "x$new_path"; then
58805    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58806    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58807$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58808  fi
58809
58810    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58811
58812  path="$POTENTIAL_FREETYPE_LIB_PATH"
58813  has_colon=`$ECHO $path | $GREP ^.:`
58814  new_path="$path"
58815  if test "x$has_colon" = x; then
58816    # Not in mixed or Windows style, start by that.
58817    new_path=`cmd //c echo $path`
58818  fi
58819
58820
58821  input_path="$new_path"
58822  # Check if we need to convert this using DOS-style short mode. If the path
58823  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58824  # take no chances and rewrite it.
58825  # Note: m4 eats our [], so we need to use [ and ] instead.
58826  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58827  if test "x$has_forbidden_chars" != x; then
58828    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58829    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58830  fi
58831
58832
58833  windows_path="$new_path"
58834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58835    unix_path=`$CYGPATH -u "$windows_path"`
58836    new_path="$unix_path"
58837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58839    new_path="$unix_path"
58840  fi
58841
58842  if test "x$path" != "x$new_path"; then
58843    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58844    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58845$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58846  fi
58847
58848  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58849  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58850
58851    else
58852      # We're on a unix platform. Hooray! :)
58853      path="$POTENTIAL_FREETYPE_LIB_PATH"
58854      has_space=`$ECHO "$path" | $GREP " "`
58855      if test "x$has_space" != x; then
58856        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58857$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58858        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58859      fi
58860
58861      # Use eval to expand a potential ~
58862      eval path="$path"
58863      if test ! -f "$path" && test ! -d "$path"; then
58864        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58865      fi
58866
58867      if test -d "$path"; then
58868        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58869      else
58870        dir="`$DIRNAME "$path"`"
58871        base="`$BASENAME "$path"`"
58872        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58873      fi
58874    fi
58875  fi
58876
58877
58878    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58879    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58880$as_echo_n "checking for freetype includes... " >&6; }
58881    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58882$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58883    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58884    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58885$as_echo_n "checking for freetype libraries... " >&6; }
58886    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58887$as_echo "$FREETYPE_LIB_PATH" >&6; }
58888  fi
58889
58890            else
58891
58892  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58893  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
58894  METHOD="well-known location"
58895
58896  # Let's start with an optimistic view of the world :-)
58897  FOUND_FREETYPE=yes
58898
58899  # First look for the canonical freetype main include file ft2build.h.
58900  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58901    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58902    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58903    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58904      # Fail.
58905      FOUND_FREETYPE=no
58906    fi
58907  fi
58908
58909  if test "x$FOUND_FREETYPE" = xyes; then
58910    # Include file found, let's continue the sanity check.
58911    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58912$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58913
58914    # Reset to default value
58915    FREETYPE_BASE_NAME=freetype
58916    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58917    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58918      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58919          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58920        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58921        # for the .6 version explicitly.
58922        FREETYPE_BASE_NAME=freetype.6
58923        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58924        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58925$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58926      else
58927        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58928$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58929        FOUND_FREETYPE=no
58930      fi
58931    else
58932      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58933        # On Windows, we will need both .lib and .dll file.
58934        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58935          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58936$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58937          FOUND_FREETYPE=no
58938        fi
58939      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58940          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58941        # Found lib in isa dir, use that instead.
58942        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58943        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58944$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58945      fi
58946    fi
58947  fi
58948
58949  if test "x$FOUND_FREETYPE" = xyes; then
58950
58951  # Only process if variable expands to non-empty
58952
58953  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58954    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58955
58956  # Input might be given as Windows format, start by converting to
58957  # unix format.
58958  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58959  new_path=`$CYGPATH -u "$path"`
58960
58961  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58962  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58963  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58964  # "foo.exe" is OK but "foo" is an error.
58965  #
58966  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58967  # It is also a way to make sure we got the proper file name for the real test later on.
58968  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58969  if test "x$test_shortpath" = x; then
58970    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58971$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58972    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58973  fi
58974
58975  # Call helper function which possibly converts this using DOS-style short mode.
58976  # If so, the updated path is stored in $new_path.
58977
58978  input_path="$new_path"
58979  # Check if we need to convert this using DOS-style short mode. If the path
58980  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58981  # take no chances and rewrite it.
58982  # Note: m4 eats our [], so we need to use [ and ] instead.
58983  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58984  if test "x$has_forbidden_chars" != x; then
58985    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58986    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58987    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58988    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58989      # Going to short mode and back again did indeed matter. Since short mode is
58990      # case insensitive, let's make it lowercase to improve readability.
58991      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58992      # Now convert it back to Unix-style (cygpath)
58993      input_path=`$CYGPATH -u "$shortmode_path"`
58994      new_path="$input_path"
58995    fi
58996  fi
58997
58998  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58999  if test "x$test_cygdrive_prefix" = x; then
59000    # As a simple fix, exclude /usr/bin since it's not a real path.
59001    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59002      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59003      # a path prefixed by /cygdrive for fixpath to work.
59004      new_path="$CYGWIN_ROOT_PATH$input_path"
59005    fi
59006  fi
59007
59008
59009  if test "x$path" != "x$new_path"; then
59010    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59011    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59012$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59013  fi
59014
59015    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59016
59017  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59018  has_colon=`$ECHO $path | $GREP ^.:`
59019  new_path="$path"
59020  if test "x$has_colon" = x; then
59021    # Not in mixed or Windows style, start by that.
59022    new_path=`cmd //c echo $path`
59023  fi
59024
59025
59026  input_path="$new_path"
59027  # Check if we need to convert this using DOS-style short mode. If the path
59028  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59029  # take no chances and rewrite it.
59030  # Note: m4 eats our [], so we need to use [ and ] instead.
59031  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59032  if test "x$has_forbidden_chars" != x; then
59033    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59034    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59035  fi
59036
59037
59038  windows_path="$new_path"
59039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59040    unix_path=`$CYGPATH -u "$windows_path"`
59041    new_path="$unix_path"
59042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59043    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59044    new_path="$unix_path"
59045  fi
59046
59047  if test "x$path" != "x$new_path"; then
59048    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59049    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59050$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59051  fi
59052
59053  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59054  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59055
59056    else
59057      # We're on a unix platform. Hooray! :)
59058      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59059      has_space=`$ECHO "$path" | $GREP " "`
59060      if test "x$has_space" != x; then
59061        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59062$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59063        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59064      fi
59065
59066      # Use eval to expand a potential ~
59067      eval path="$path"
59068      if test ! -f "$path" && test ! -d "$path"; then
59069        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59070      fi
59071
59072      if test -d "$path"; then
59073        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59074      else
59075        dir="`$DIRNAME "$path"`"
59076        base="`$BASENAME "$path"`"
59077        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59078      fi
59079    fi
59080  fi
59081
59082
59083  # Only process if variable expands to non-empty
59084
59085  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59086    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59087
59088  # Input might be given as Windows format, start by converting to
59089  # unix format.
59090  path="$POTENTIAL_FREETYPE_LIB_PATH"
59091  new_path=`$CYGPATH -u "$path"`
59092
59093  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59094  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59095  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59096  # "foo.exe" is OK but "foo" is an error.
59097  #
59098  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59099  # It is also a way to make sure we got the proper file name for the real test later on.
59100  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59101  if test "x$test_shortpath" = x; then
59102    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59103$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59104    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59105  fi
59106
59107  # Call helper function which possibly converts this using DOS-style short mode.
59108  # If so, the updated path is stored in $new_path.
59109
59110  input_path="$new_path"
59111  # Check if we need to convert this using DOS-style short mode. If the path
59112  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59113  # take no chances and rewrite it.
59114  # Note: m4 eats our [], so we need to use [ and ] instead.
59115  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59116  if test "x$has_forbidden_chars" != x; then
59117    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59118    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59119    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59120    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59121      # Going to short mode and back again did indeed matter. Since short mode is
59122      # case insensitive, let's make it lowercase to improve readability.
59123      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59124      # Now convert it back to Unix-style (cygpath)
59125      input_path=`$CYGPATH -u "$shortmode_path"`
59126      new_path="$input_path"
59127    fi
59128  fi
59129
59130  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59131  if test "x$test_cygdrive_prefix" = x; then
59132    # As a simple fix, exclude /usr/bin since it's not a real path.
59133    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59134      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59135      # a path prefixed by /cygdrive for fixpath to work.
59136      new_path="$CYGWIN_ROOT_PATH$input_path"
59137    fi
59138  fi
59139
59140
59141  if test "x$path" != "x$new_path"; then
59142    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59143    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59144$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59145  fi
59146
59147    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59148
59149  path="$POTENTIAL_FREETYPE_LIB_PATH"
59150  has_colon=`$ECHO $path | $GREP ^.:`
59151  new_path="$path"
59152  if test "x$has_colon" = x; then
59153    # Not in mixed or Windows style, start by that.
59154    new_path=`cmd //c echo $path`
59155  fi
59156
59157
59158  input_path="$new_path"
59159  # Check if we need to convert this using DOS-style short mode. If the path
59160  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59161  # take no chances and rewrite it.
59162  # Note: m4 eats our [], so we need to use [ and ] instead.
59163  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59164  if test "x$has_forbidden_chars" != x; then
59165    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59166    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59167  fi
59168
59169
59170  windows_path="$new_path"
59171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59172    unix_path=`$CYGPATH -u "$windows_path"`
59173    new_path="$unix_path"
59174  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59175    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59176    new_path="$unix_path"
59177  fi
59178
59179  if test "x$path" != "x$new_path"; then
59180    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59181    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59182$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59183  fi
59184
59185  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59186  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59187
59188    else
59189      # We're on a unix platform. Hooray! :)
59190      path="$POTENTIAL_FREETYPE_LIB_PATH"
59191      has_space=`$ECHO "$path" | $GREP " "`
59192      if test "x$has_space" != x; then
59193        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59194$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59195        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59196      fi
59197
59198      # Use eval to expand a potential ~
59199      eval path="$path"
59200      if test ! -f "$path" && test ! -d "$path"; then
59201        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59202      fi
59203
59204      if test -d "$path"; then
59205        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59206      else
59207        dir="`$DIRNAME "$path"`"
59208        base="`$BASENAME "$path"`"
59209        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59210      fi
59211    fi
59212  fi
59213
59214
59215    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59216    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59217$as_echo_n "checking for freetype includes... " >&6; }
59218    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59219$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59220    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59221    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59222$as_echo_n "checking for freetype libraries... " >&6; }
59223    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59224$as_echo "$FREETYPE_LIB_PATH" >&6; }
59225  fi
59226
59227            fi
59228            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59229                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59230              # Source is available, as a last resort try to build freetype in default location
59231
59232  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59233  BUILD_FREETYPE=yes
59234
59235  # Check if the freetype sources are acessible..
59236  if ! test -d $FREETYPE_SRC_PATH; then
59237    { $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
59238$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59239    BUILD_FREETYPE=no
59240  fi
59241  # ..and contain a vc2010 project file
59242  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59243  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59244    { $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
59245$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59246    BUILD_FREETYPE=no
59247  fi
59248  # Now check if configure found a version of 'msbuild.exe'
59249  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59250    { $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
59251$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;}
59252    BUILD_FREETYPE=no
59253  fi
59254
59255  # Ready to go..
59256  if test "x$BUILD_FREETYPE" = xyes; then
59257    # msbuild requires trailing slashes for output directories
59258    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59259    freetype_lib_path_unix="$freetype_lib_path"
59260    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59261
59262  unix_path="$vcxproj_path"
59263  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59264    windows_path=`$CYGPATH -m "$unix_path"`
59265    vcxproj_path="$windows_path"
59266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59267    windows_path=`cmd //c echo $unix_path`
59268    vcxproj_path="$windows_path"
59269  fi
59270
59271
59272  unix_path="$freetype_lib_path"
59273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59274    windows_path=`$CYGPATH -m "$unix_path"`
59275    freetype_lib_path="$windows_path"
59276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59277    windows_path=`cmd //c echo $unix_path`
59278    freetype_lib_path="$windows_path"
59279  fi
59280
59281
59282  unix_path="$freetype_obj_path"
59283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59284    windows_path=`$CYGPATH -m "$unix_path"`
59285    freetype_obj_path="$windows_path"
59286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59287    windows_path=`cmd //c echo $unix_path`
59288    freetype_obj_path="$windows_path"
59289  fi
59290
59291    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59292      freetype_platform=x64
59293    else
59294      freetype_platform=win32
59295    fi
59296
59297    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59298    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59299    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59300    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59301    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59302$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59303
59304    # First we try to build the freetype.dll
59305    $ECHO -e "@echo off\n"\
59306        "$MSBUILD $vcxproj_path "\
59307        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59308        "/p:Configuration=\"Release Multithreaded\" "\
59309        "/p:Platform=$freetype_platform "\
59310        "/p:ConfigurationType=DynamicLibrary "\
59311        "/p:TargetName=freetype "\
59312        "/p:OutDir=\"$freetype_lib_path\" "\
59313        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59314    cmd /c freetype.bat
59315
59316    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59317      # If that succeeds we also build freetype.lib
59318      $ECHO -e "@echo off\n"\
59319          "$MSBUILD $vcxproj_path "\
59320          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59321          "/p:Configuration=\"Release Multithreaded\" "\
59322          "/p:Platform=$freetype_platform "\
59323          "/p:ConfigurationType=StaticLibrary "\
59324          "/p:TargetName=freetype "\
59325          "/p:OutDir=\"$freetype_lib_path\" "\
59326          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59327      cmd /c freetype.bat
59328
59329      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59330        # Once we build both, lib and dll, set freetype lib and include path appropriately
59331        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59332        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59333        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59334$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59335      else
59336        BUILD_FREETYPE=no
59337      fi
59338    else
59339      BUILD_FREETYPE=no
59340    fi
59341  fi
59342
59343              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59344
59345  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59346  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59347  METHOD="well-known location"
59348
59349  # Let's start with an optimistic view of the world :-)
59350  FOUND_FREETYPE=yes
59351
59352  # First look for the canonical freetype main include file ft2build.h.
59353  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59354    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59355    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59356    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59357      # Fail.
59358      FOUND_FREETYPE=no
59359    fi
59360  fi
59361
59362  if test "x$FOUND_FREETYPE" = xyes; then
59363    # Include file found, let's continue the sanity check.
59364    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59365$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59366
59367    # Reset to default value
59368    FREETYPE_BASE_NAME=freetype
59369    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59370    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59371      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59372          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59373        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59374        # for the .6 version explicitly.
59375        FREETYPE_BASE_NAME=freetype.6
59376        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59377        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59378$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59379      else
59380        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59381$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59382        FOUND_FREETYPE=no
59383      fi
59384    else
59385      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59386        # On Windows, we will need both .lib and .dll file.
59387        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59388          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59389$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59390          FOUND_FREETYPE=no
59391        fi
59392      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59393          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59394        # Found lib in isa dir, use that instead.
59395        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59396        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59397$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59398      fi
59399    fi
59400  fi
59401
59402  if test "x$FOUND_FREETYPE" = xyes; then
59403
59404  # Only process if variable expands to non-empty
59405
59406  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59407    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59408
59409  # Input might be given as Windows format, start by converting to
59410  # unix format.
59411  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59412  new_path=`$CYGPATH -u "$path"`
59413
59414  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59415  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59416  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59417  # "foo.exe" is OK but "foo" is an error.
59418  #
59419  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59420  # It is also a way to make sure we got the proper file name for the real test later on.
59421  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59422  if test "x$test_shortpath" = x; then
59423    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59424$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59425    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59426  fi
59427
59428  # Call helper function which possibly converts this using DOS-style short mode.
59429  # If so, the updated path is stored in $new_path.
59430
59431  input_path="$new_path"
59432  # Check if we need to convert this using DOS-style short mode. If the path
59433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59434  # take no chances and rewrite it.
59435  # Note: m4 eats our [], so we need to use [ and ] instead.
59436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59437  if test "x$has_forbidden_chars" != x; then
59438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59439    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59440    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59441    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59442      # Going to short mode and back again did indeed matter. Since short mode is
59443      # case insensitive, let's make it lowercase to improve readability.
59444      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59445      # Now convert it back to Unix-style (cygpath)
59446      input_path=`$CYGPATH -u "$shortmode_path"`
59447      new_path="$input_path"
59448    fi
59449  fi
59450
59451  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59452  if test "x$test_cygdrive_prefix" = x; then
59453    # As a simple fix, exclude /usr/bin since it's not a real path.
59454    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59455      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59456      # a path prefixed by /cygdrive for fixpath to work.
59457      new_path="$CYGWIN_ROOT_PATH$input_path"
59458    fi
59459  fi
59460
59461
59462  if test "x$path" != "x$new_path"; then
59463    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59464    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59465$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59466  fi
59467
59468    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59469
59470  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59471  has_colon=`$ECHO $path | $GREP ^.:`
59472  new_path="$path"
59473  if test "x$has_colon" = x; then
59474    # Not in mixed or Windows style, start by that.
59475    new_path=`cmd //c echo $path`
59476  fi
59477
59478
59479  input_path="$new_path"
59480  # Check if we need to convert this using DOS-style short mode. If the path
59481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59482  # take no chances and rewrite it.
59483  # Note: m4 eats our [], so we need to use [ and ] instead.
59484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59485  if test "x$has_forbidden_chars" != x; then
59486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59487    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59488  fi
59489
59490
59491  windows_path="$new_path"
59492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59493    unix_path=`$CYGPATH -u "$windows_path"`
59494    new_path="$unix_path"
59495  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59496    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59497    new_path="$unix_path"
59498  fi
59499
59500  if test "x$path" != "x$new_path"; then
59501    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59502    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59503$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59504  fi
59505
59506  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59507  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59508
59509    else
59510      # We're on a unix platform. Hooray! :)
59511      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59512      has_space=`$ECHO "$path" | $GREP " "`
59513      if test "x$has_space" != x; then
59514        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59515$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59516        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59517      fi
59518
59519      # Use eval to expand a potential ~
59520      eval path="$path"
59521      if test ! -f "$path" && test ! -d "$path"; then
59522        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59523      fi
59524
59525      if test -d "$path"; then
59526        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59527      else
59528        dir="`$DIRNAME "$path"`"
59529        base="`$BASENAME "$path"`"
59530        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59531      fi
59532    fi
59533  fi
59534
59535
59536  # Only process if variable expands to non-empty
59537
59538  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59539    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59540
59541  # Input might be given as Windows format, start by converting to
59542  # unix format.
59543  path="$POTENTIAL_FREETYPE_LIB_PATH"
59544  new_path=`$CYGPATH -u "$path"`
59545
59546  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59547  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59548  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59549  # "foo.exe" is OK but "foo" is an error.
59550  #
59551  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59552  # It is also a way to make sure we got the proper file name for the real test later on.
59553  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59554  if test "x$test_shortpath" = x; then
59555    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59556$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59557    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59558  fi
59559
59560  # Call helper function which possibly converts this using DOS-style short mode.
59561  # If so, the updated path is stored in $new_path.
59562
59563  input_path="$new_path"
59564  # Check if we need to convert this using DOS-style short mode. If the path
59565  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59566  # take no chances and rewrite it.
59567  # Note: m4 eats our [], so we need to use [ and ] instead.
59568  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59569  if test "x$has_forbidden_chars" != x; then
59570    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59571    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59572    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59573    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59574      # Going to short mode and back again did indeed matter. Since short mode is
59575      # case insensitive, let's make it lowercase to improve readability.
59576      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59577      # Now convert it back to Unix-style (cygpath)
59578      input_path=`$CYGPATH -u "$shortmode_path"`
59579      new_path="$input_path"
59580    fi
59581  fi
59582
59583  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59584  if test "x$test_cygdrive_prefix" = x; then
59585    # As a simple fix, exclude /usr/bin since it's not a real path.
59586    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59587      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59588      # a path prefixed by /cygdrive for fixpath to work.
59589      new_path="$CYGWIN_ROOT_PATH$input_path"
59590    fi
59591  fi
59592
59593
59594  if test "x$path" != "x$new_path"; then
59595    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59596    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59597$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59598  fi
59599
59600    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59601
59602  path="$POTENTIAL_FREETYPE_LIB_PATH"
59603  has_colon=`$ECHO $path | $GREP ^.:`
59604  new_path="$path"
59605  if test "x$has_colon" = x; then
59606    # Not in mixed or Windows style, start by that.
59607    new_path=`cmd //c echo $path`
59608  fi
59609
59610
59611  input_path="$new_path"
59612  # Check if we need to convert this using DOS-style short mode. If the path
59613  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59614  # take no chances and rewrite it.
59615  # Note: m4 eats our [], so we need to use [ and ] instead.
59616  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59617  if test "x$has_forbidden_chars" != x; then
59618    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59619    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59620  fi
59621
59622
59623  windows_path="$new_path"
59624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59625    unix_path=`$CYGPATH -u "$windows_path"`
59626    new_path="$unix_path"
59627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59629    new_path="$unix_path"
59630  fi
59631
59632  if test "x$path" != "x$new_path"; then
59633    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59634    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59635$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59636  fi
59637
59638  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59639  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59640
59641    else
59642      # We're on a unix platform. Hooray! :)
59643      path="$POTENTIAL_FREETYPE_LIB_PATH"
59644      has_space=`$ECHO "$path" | $GREP " "`
59645      if test "x$has_space" != x; then
59646        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59647$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59648        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59649      fi
59650
59651      # Use eval to expand a potential ~
59652      eval path="$path"
59653      if test ! -f "$path" && test ! -d "$path"; then
59654        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59655      fi
59656
59657      if test -d "$path"; then
59658        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59659      else
59660        dir="`$DIRNAME "$path"`"
59661        base="`$BASENAME "$path"`"
59662        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59663      fi
59664    fi
59665  fi
59666
59667
59668    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59669    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59670$as_echo_n "checking for freetype includes... " >&6; }
59671    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59672$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59673    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59674    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59675$as_echo_n "checking for freetype libraries... " >&6; }
59676    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59677$as_echo "$FREETYPE_LIB_PATH" >&6; }
59678  fi
59679
59680              else
59681
59682  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59683  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59684  METHOD="well-known location"
59685
59686  # Let's start with an optimistic view of the world :-)
59687  FOUND_FREETYPE=yes
59688
59689  # First look for the canonical freetype main include file ft2build.h.
59690  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59691    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59692    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59693    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59694      # Fail.
59695      FOUND_FREETYPE=no
59696    fi
59697  fi
59698
59699  if test "x$FOUND_FREETYPE" = xyes; then
59700    # Include file found, let's continue the sanity check.
59701    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59702$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59703
59704    # Reset to default value
59705    FREETYPE_BASE_NAME=freetype
59706    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59707    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59708      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59709          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59710        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59711        # for the .6 version explicitly.
59712        FREETYPE_BASE_NAME=freetype.6
59713        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59714        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59715$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59716      else
59717        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59718$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59719        FOUND_FREETYPE=no
59720      fi
59721    else
59722      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59723        # On Windows, we will need both .lib and .dll file.
59724        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59725          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59726$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59727          FOUND_FREETYPE=no
59728        fi
59729      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59730          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59731        # Found lib in isa dir, use that instead.
59732        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59733        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59734$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59735      fi
59736    fi
59737  fi
59738
59739  if test "x$FOUND_FREETYPE" = xyes; then
59740
59741  # Only process if variable expands to non-empty
59742
59743  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59744    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59745
59746  # Input might be given as Windows format, start by converting to
59747  # unix format.
59748  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59749  new_path=`$CYGPATH -u "$path"`
59750
59751  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59752  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59753  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59754  # "foo.exe" is OK but "foo" is an error.
59755  #
59756  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59757  # It is also a way to make sure we got the proper file name for the real test later on.
59758  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59759  if test "x$test_shortpath" = x; then
59760    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59761$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59762    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59763  fi
59764
59765  # Call helper function which possibly converts this using DOS-style short mode.
59766  # If so, the updated path is stored in $new_path.
59767
59768  input_path="$new_path"
59769  # Check if we need to convert this using DOS-style short mode. If the path
59770  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59771  # take no chances and rewrite it.
59772  # Note: m4 eats our [], so we need to use [ and ] instead.
59773  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59774  if test "x$has_forbidden_chars" != x; then
59775    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59776    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59777    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59778    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59779      # Going to short mode and back again did indeed matter. Since short mode is
59780      # case insensitive, let's make it lowercase to improve readability.
59781      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59782      # Now convert it back to Unix-style (cygpath)
59783      input_path=`$CYGPATH -u "$shortmode_path"`
59784      new_path="$input_path"
59785    fi
59786  fi
59787
59788  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59789  if test "x$test_cygdrive_prefix" = x; then
59790    # As a simple fix, exclude /usr/bin since it's not a real path.
59791    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59792      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59793      # a path prefixed by /cygdrive for fixpath to work.
59794      new_path="$CYGWIN_ROOT_PATH$input_path"
59795    fi
59796  fi
59797
59798
59799  if test "x$path" != "x$new_path"; then
59800    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59801    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59802$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59803  fi
59804
59805    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59806
59807  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59808  has_colon=`$ECHO $path | $GREP ^.:`
59809  new_path="$path"
59810  if test "x$has_colon" = x; then
59811    # Not in mixed or Windows style, start by that.
59812    new_path=`cmd //c echo $path`
59813  fi
59814
59815
59816  input_path="$new_path"
59817  # Check if we need to convert this using DOS-style short mode. If the path
59818  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59819  # take no chances and rewrite it.
59820  # Note: m4 eats our [], so we need to use [ and ] instead.
59821  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59822  if test "x$has_forbidden_chars" != x; then
59823    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59824    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59825  fi
59826
59827
59828  windows_path="$new_path"
59829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59830    unix_path=`$CYGPATH -u "$windows_path"`
59831    new_path="$unix_path"
59832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59833    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59834    new_path="$unix_path"
59835  fi
59836
59837  if test "x$path" != "x$new_path"; then
59838    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59839    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59840$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59841  fi
59842
59843  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59844  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59845
59846    else
59847      # We're on a unix platform. Hooray! :)
59848      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59849      has_space=`$ECHO "$path" | $GREP " "`
59850      if test "x$has_space" != x; then
59851        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59852$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59853        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59854      fi
59855
59856      # Use eval to expand a potential ~
59857      eval path="$path"
59858      if test ! -f "$path" && test ! -d "$path"; then
59859        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59860      fi
59861
59862      if test -d "$path"; then
59863        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59864      else
59865        dir="`$DIRNAME "$path"`"
59866        base="`$BASENAME "$path"`"
59867        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59868      fi
59869    fi
59870  fi
59871
59872
59873  # Only process if variable expands to non-empty
59874
59875  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59876    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59877
59878  # Input might be given as Windows format, start by converting to
59879  # unix format.
59880  path="$POTENTIAL_FREETYPE_LIB_PATH"
59881  new_path=`$CYGPATH -u "$path"`
59882
59883  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59884  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59885  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59886  # "foo.exe" is OK but "foo" is an error.
59887  #
59888  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59889  # It is also a way to make sure we got the proper file name for the real test later on.
59890  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59891  if test "x$test_shortpath" = x; then
59892    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59893$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59894    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59895  fi
59896
59897  # Call helper function which possibly converts this using DOS-style short mode.
59898  # If so, the updated path is stored in $new_path.
59899
59900  input_path="$new_path"
59901  # Check if we need to convert this using DOS-style short mode. If the path
59902  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59903  # take no chances and rewrite it.
59904  # Note: m4 eats our [], so we need to use [ and ] instead.
59905  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59906  if test "x$has_forbidden_chars" != x; then
59907    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59908    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59909    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59910    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59911      # Going to short mode and back again did indeed matter. Since short mode is
59912      # case insensitive, let's make it lowercase to improve readability.
59913      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59914      # Now convert it back to Unix-style (cygpath)
59915      input_path=`$CYGPATH -u "$shortmode_path"`
59916      new_path="$input_path"
59917    fi
59918  fi
59919
59920  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59921  if test "x$test_cygdrive_prefix" = x; then
59922    # As a simple fix, exclude /usr/bin since it's not a real path.
59923    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59924      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59925      # a path prefixed by /cygdrive for fixpath to work.
59926      new_path="$CYGWIN_ROOT_PATH$input_path"
59927    fi
59928  fi
59929
59930
59931  if test "x$path" != "x$new_path"; then
59932    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59933    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59934$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59935  fi
59936
59937    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59938
59939  path="$POTENTIAL_FREETYPE_LIB_PATH"
59940  has_colon=`$ECHO $path | $GREP ^.:`
59941  new_path="$path"
59942  if test "x$has_colon" = x; then
59943    # Not in mixed or Windows style, start by that.
59944    new_path=`cmd //c echo $path`
59945  fi
59946
59947
59948  input_path="$new_path"
59949  # Check if we need to convert this using DOS-style short mode. If the path
59950  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59951  # take no chances and rewrite it.
59952  # Note: m4 eats our [], so we need to use [ and ] instead.
59953  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59954  if test "x$has_forbidden_chars" != x; then
59955    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59956    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59957  fi
59958
59959
59960  windows_path="$new_path"
59961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59962    unix_path=`$CYGPATH -u "$windows_path"`
59963    new_path="$unix_path"
59964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59965    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59966    new_path="$unix_path"
59967  fi
59968
59969  if test "x$path" != "x$new_path"; then
59970    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59971    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59972$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59973  fi
59974
59975  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59976  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59977
59978    else
59979      # We're on a unix platform. Hooray! :)
59980      path="$POTENTIAL_FREETYPE_LIB_PATH"
59981      has_space=`$ECHO "$path" | $GREP " "`
59982      if test "x$has_space" != x; then
59983        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59984$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59985        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59986      fi
59987
59988      # Use eval to expand a potential ~
59989      eval path="$path"
59990      if test ! -f "$path" && test ! -d "$path"; then
59991        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59992      fi
59993
59994      if test -d "$path"; then
59995        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59996      else
59997        dir="`$DIRNAME "$path"`"
59998        base="`$BASENAME "$path"`"
59999        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60000      fi
60001    fi
60002  fi
60003
60004
60005    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60006    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60007$as_echo_n "checking for freetype includes... " >&6; }
60008    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60009$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60010    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60011    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60012$as_echo_n "checking for freetype libraries... " >&6; }
60013    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60014$as_echo "$FREETYPE_LIB_PATH" >&6; }
60015  fi
60016
60017              fi
60018            fi
60019          fi
60020        else
60021          FREETYPE_BASE_DIR="$SYSROOT/usr"
60022
60023  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60024  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60025  METHOD="well-known location"
60026
60027  # Let's start with an optimistic view of the world :-)
60028  FOUND_FREETYPE=yes
60029
60030  # First look for the canonical freetype main include file ft2build.h.
60031  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60032    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60033    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60034    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60035      # Fail.
60036      FOUND_FREETYPE=no
60037    fi
60038  fi
60039
60040  if test "x$FOUND_FREETYPE" = xyes; then
60041    # Include file found, let's continue the sanity check.
60042    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60043$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60044
60045    # Reset to default value
60046    FREETYPE_BASE_NAME=freetype
60047    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60048    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60049      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60050          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60051        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60052        # for the .6 version explicitly.
60053        FREETYPE_BASE_NAME=freetype.6
60054        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60055        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60056$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60057      else
60058        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60059$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60060        FOUND_FREETYPE=no
60061      fi
60062    else
60063      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60064        # On Windows, we will need both .lib and .dll file.
60065        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60066          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60067$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60068          FOUND_FREETYPE=no
60069        fi
60070      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60071          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60072        # Found lib in isa dir, use that instead.
60073        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60074        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60075$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60076      fi
60077    fi
60078  fi
60079
60080  if test "x$FOUND_FREETYPE" = xyes; then
60081
60082  # Only process if variable expands to non-empty
60083
60084  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60085    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60086
60087  # Input might be given as Windows format, start by converting to
60088  # unix format.
60089  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60090  new_path=`$CYGPATH -u "$path"`
60091
60092  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60093  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60094  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60095  # "foo.exe" is OK but "foo" is an error.
60096  #
60097  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60098  # It is also a way to make sure we got the proper file name for the real test later on.
60099  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60100  if test "x$test_shortpath" = x; then
60101    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60102$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60103    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60104  fi
60105
60106  # Call helper function which possibly converts this using DOS-style short mode.
60107  # If so, the updated path is stored in $new_path.
60108
60109  input_path="$new_path"
60110  # Check if we need to convert this using DOS-style short mode. If the path
60111  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60112  # take no chances and rewrite it.
60113  # Note: m4 eats our [], so we need to use [ and ] instead.
60114  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60115  if test "x$has_forbidden_chars" != x; then
60116    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60117    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60118    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60119    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60120      # Going to short mode and back again did indeed matter. Since short mode is
60121      # case insensitive, let's make it lowercase to improve readability.
60122      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60123      # Now convert it back to Unix-style (cygpath)
60124      input_path=`$CYGPATH -u "$shortmode_path"`
60125      new_path="$input_path"
60126    fi
60127  fi
60128
60129  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60130  if test "x$test_cygdrive_prefix" = x; then
60131    # As a simple fix, exclude /usr/bin since it's not a real path.
60132    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60133      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60134      # a path prefixed by /cygdrive for fixpath to work.
60135      new_path="$CYGWIN_ROOT_PATH$input_path"
60136    fi
60137  fi
60138
60139
60140  if test "x$path" != "x$new_path"; then
60141    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60142    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60143$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60144  fi
60145
60146    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60147
60148  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60149  has_colon=`$ECHO $path | $GREP ^.:`
60150  new_path="$path"
60151  if test "x$has_colon" = x; then
60152    # Not in mixed or Windows style, start by that.
60153    new_path=`cmd //c echo $path`
60154  fi
60155
60156
60157  input_path="$new_path"
60158  # Check if we need to convert this using DOS-style short mode. If the path
60159  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60160  # take no chances and rewrite it.
60161  # Note: m4 eats our [], so we need to use [ and ] instead.
60162  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60163  if test "x$has_forbidden_chars" != x; then
60164    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60165    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60166  fi
60167
60168
60169  windows_path="$new_path"
60170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60171    unix_path=`$CYGPATH -u "$windows_path"`
60172    new_path="$unix_path"
60173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60174    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60175    new_path="$unix_path"
60176  fi
60177
60178  if test "x$path" != "x$new_path"; then
60179    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60180    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60181$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60182  fi
60183
60184  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60185  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60186
60187    else
60188      # We're on a unix platform. Hooray! :)
60189      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60190      has_space=`$ECHO "$path" | $GREP " "`
60191      if test "x$has_space" != x; then
60192        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60193$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60194        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60195      fi
60196
60197      # Use eval to expand a potential ~
60198      eval path="$path"
60199      if test ! -f "$path" && test ! -d "$path"; then
60200        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60201      fi
60202
60203      if test -d "$path"; then
60204        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60205      else
60206        dir="`$DIRNAME "$path"`"
60207        base="`$BASENAME "$path"`"
60208        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60209      fi
60210    fi
60211  fi
60212
60213
60214  # Only process if variable expands to non-empty
60215
60216  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60217    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60218
60219  # Input might be given as Windows format, start by converting to
60220  # unix format.
60221  path="$POTENTIAL_FREETYPE_LIB_PATH"
60222  new_path=`$CYGPATH -u "$path"`
60223
60224  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60225  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60226  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60227  # "foo.exe" is OK but "foo" is an error.
60228  #
60229  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60230  # It is also a way to make sure we got the proper file name for the real test later on.
60231  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60232  if test "x$test_shortpath" = x; then
60233    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60234$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60235    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60236  fi
60237
60238  # Call helper function which possibly converts this using DOS-style short mode.
60239  # If so, the updated path is stored in $new_path.
60240
60241  input_path="$new_path"
60242  # Check if we need to convert this using DOS-style short mode. If the path
60243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60244  # take no chances and rewrite it.
60245  # Note: m4 eats our [], so we need to use [ and ] instead.
60246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60247  if test "x$has_forbidden_chars" != x; then
60248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60249    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60250    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60251    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60252      # Going to short mode and back again did indeed matter. Since short mode is
60253      # case insensitive, let's make it lowercase to improve readability.
60254      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60255      # Now convert it back to Unix-style (cygpath)
60256      input_path=`$CYGPATH -u "$shortmode_path"`
60257      new_path="$input_path"
60258    fi
60259  fi
60260
60261  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60262  if test "x$test_cygdrive_prefix" = x; then
60263    # As a simple fix, exclude /usr/bin since it's not a real path.
60264    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60265      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60266      # a path prefixed by /cygdrive for fixpath to work.
60267      new_path="$CYGWIN_ROOT_PATH$input_path"
60268    fi
60269  fi
60270
60271
60272  if test "x$path" != "x$new_path"; then
60273    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60274    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60275$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60276  fi
60277
60278    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60279
60280  path="$POTENTIAL_FREETYPE_LIB_PATH"
60281  has_colon=`$ECHO $path | $GREP ^.:`
60282  new_path="$path"
60283  if test "x$has_colon" = x; then
60284    # Not in mixed or Windows style, start by that.
60285    new_path=`cmd //c echo $path`
60286  fi
60287
60288
60289  input_path="$new_path"
60290  # Check if we need to convert this using DOS-style short mode. If the path
60291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60292  # take no chances and rewrite it.
60293  # Note: m4 eats our [], so we need to use [ and ] instead.
60294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60295  if test "x$has_forbidden_chars" != x; then
60296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60297    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60298  fi
60299
60300
60301  windows_path="$new_path"
60302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60303    unix_path=`$CYGPATH -u "$windows_path"`
60304    new_path="$unix_path"
60305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60306    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60307    new_path="$unix_path"
60308  fi
60309
60310  if test "x$path" != "x$new_path"; then
60311    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60312    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60313$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60314  fi
60315
60316  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60317  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60318
60319    else
60320      # We're on a unix platform. Hooray! :)
60321      path="$POTENTIAL_FREETYPE_LIB_PATH"
60322      has_space=`$ECHO "$path" | $GREP " "`
60323      if test "x$has_space" != x; then
60324        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60325$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60326        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60327      fi
60328
60329      # Use eval to expand a potential ~
60330      eval path="$path"
60331      if test ! -f "$path" && test ! -d "$path"; then
60332        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60333      fi
60334
60335      if test -d "$path"; then
60336        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60337      else
60338        dir="`$DIRNAME "$path"`"
60339        base="`$BASENAME "$path"`"
60340        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60341      fi
60342    fi
60343  fi
60344
60345
60346    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60347    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60348$as_echo_n "checking for freetype includes... " >&6; }
60349    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60350$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60351    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60352    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60353$as_echo_n "checking for freetype libraries... " >&6; }
60354    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60355$as_echo "$FREETYPE_LIB_PATH" >&6; }
60356  fi
60357
60358
60359          if test "x$FOUND_FREETYPE" != xyes; then
60360            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60361
60362  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60363  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60364  METHOD="well-known location"
60365
60366  # Let's start with an optimistic view of the world :-)
60367  FOUND_FREETYPE=yes
60368
60369  # First look for the canonical freetype main include file ft2build.h.
60370  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60371    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60372    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60373    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60374      # Fail.
60375      FOUND_FREETYPE=no
60376    fi
60377  fi
60378
60379  if test "x$FOUND_FREETYPE" = xyes; then
60380    # Include file found, let's continue the sanity check.
60381    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60382$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60383
60384    # Reset to default value
60385    FREETYPE_BASE_NAME=freetype
60386    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60387    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60388      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60389          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60390        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60391        # for the .6 version explicitly.
60392        FREETYPE_BASE_NAME=freetype.6
60393        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60394        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60395$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60396      else
60397        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60398$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60399        FOUND_FREETYPE=no
60400      fi
60401    else
60402      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60403        # On Windows, we will need both .lib and .dll file.
60404        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60405          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60406$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60407          FOUND_FREETYPE=no
60408        fi
60409      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60410          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60411        # Found lib in isa dir, use that instead.
60412        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60413        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60414$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60415      fi
60416    fi
60417  fi
60418
60419  if test "x$FOUND_FREETYPE" = xyes; then
60420
60421  # Only process if variable expands to non-empty
60422
60423  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60424    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60425
60426  # Input might be given as Windows format, start by converting to
60427  # unix format.
60428  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60429  new_path=`$CYGPATH -u "$path"`
60430
60431  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60432  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60433  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60434  # "foo.exe" is OK but "foo" is an error.
60435  #
60436  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60437  # It is also a way to make sure we got the proper file name for the real test later on.
60438  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60439  if test "x$test_shortpath" = x; then
60440    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60441$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60442    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60443  fi
60444
60445  # Call helper function which possibly converts this using DOS-style short mode.
60446  # If so, the updated path is stored in $new_path.
60447
60448  input_path="$new_path"
60449  # Check if we need to convert this using DOS-style short mode. If the path
60450  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60451  # take no chances and rewrite it.
60452  # Note: m4 eats our [], so we need to use [ and ] instead.
60453  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60454  if test "x$has_forbidden_chars" != x; then
60455    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60456    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60457    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60458    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60459      # Going to short mode and back again did indeed matter. Since short mode is
60460      # case insensitive, let's make it lowercase to improve readability.
60461      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60462      # Now convert it back to Unix-style (cygpath)
60463      input_path=`$CYGPATH -u "$shortmode_path"`
60464      new_path="$input_path"
60465    fi
60466  fi
60467
60468  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60469  if test "x$test_cygdrive_prefix" = x; then
60470    # As a simple fix, exclude /usr/bin since it's not a real path.
60471    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60472      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60473      # a path prefixed by /cygdrive for fixpath to work.
60474      new_path="$CYGWIN_ROOT_PATH$input_path"
60475    fi
60476  fi
60477
60478
60479  if test "x$path" != "x$new_path"; then
60480    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60481    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60482$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60483  fi
60484
60485    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60486
60487  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60488  has_colon=`$ECHO $path | $GREP ^.:`
60489  new_path="$path"
60490  if test "x$has_colon" = x; then
60491    # Not in mixed or Windows style, start by that.
60492    new_path=`cmd //c echo $path`
60493  fi
60494
60495
60496  input_path="$new_path"
60497  # Check if we need to convert this using DOS-style short mode. If the path
60498  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60499  # take no chances and rewrite it.
60500  # Note: m4 eats our [], so we need to use [ and ] instead.
60501  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60502  if test "x$has_forbidden_chars" != x; then
60503    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60504    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60505  fi
60506
60507
60508  windows_path="$new_path"
60509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60510    unix_path=`$CYGPATH -u "$windows_path"`
60511    new_path="$unix_path"
60512  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60513    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60514    new_path="$unix_path"
60515  fi
60516
60517  if test "x$path" != "x$new_path"; then
60518    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60519    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60520$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60521  fi
60522
60523  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60524  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60525
60526    else
60527      # We're on a unix platform. Hooray! :)
60528      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60529      has_space=`$ECHO "$path" | $GREP " "`
60530      if test "x$has_space" != x; then
60531        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60532$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60533        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60534      fi
60535
60536      # Use eval to expand a potential ~
60537      eval path="$path"
60538      if test ! -f "$path" && test ! -d "$path"; then
60539        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60540      fi
60541
60542      if test -d "$path"; then
60543        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60544      else
60545        dir="`$DIRNAME "$path"`"
60546        base="`$BASENAME "$path"`"
60547        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60548      fi
60549    fi
60550  fi
60551
60552
60553  # Only process if variable expands to non-empty
60554
60555  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60556    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60557
60558  # Input might be given as Windows format, start by converting to
60559  # unix format.
60560  path="$POTENTIAL_FREETYPE_LIB_PATH"
60561  new_path=`$CYGPATH -u "$path"`
60562
60563  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60564  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60565  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60566  # "foo.exe" is OK but "foo" is an error.
60567  #
60568  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60569  # It is also a way to make sure we got the proper file name for the real test later on.
60570  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60571  if test "x$test_shortpath" = x; then
60572    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60573$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60574    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60575  fi
60576
60577  # Call helper function which possibly converts this using DOS-style short mode.
60578  # If so, the updated path is stored in $new_path.
60579
60580  input_path="$new_path"
60581  # Check if we need to convert this using DOS-style short mode. If the path
60582  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60583  # take no chances and rewrite it.
60584  # Note: m4 eats our [], so we need to use [ and ] instead.
60585  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60586  if test "x$has_forbidden_chars" != x; then
60587    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60588    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60589    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60590    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60591      # Going to short mode and back again did indeed matter. Since short mode is
60592      # case insensitive, let's make it lowercase to improve readability.
60593      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60594      # Now convert it back to Unix-style (cygpath)
60595      input_path=`$CYGPATH -u "$shortmode_path"`
60596      new_path="$input_path"
60597    fi
60598  fi
60599
60600  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60601  if test "x$test_cygdrive_prefix" = x; then
60602    # As a simple fix, exclude /usr/bin since it's not a real path.
60603    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60604      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60605      # a path prefixed by /cygdrive for fixpath to work.
60606      new_path="$CYGWIN_ROOT_PATH$input_path"
60607    fi
60608  fi
60609
60610
60611  if test "x$path" != "x$new_path"; then
60612    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60613    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60614$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60615  fi
60616
60617    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60618
60619  path="$POTENTIAL_FREETYPE_LIB_PATH"
60620  has_colon=`$ECHO $path | $GREP ^.:`
60621  new_path="$path"
60622  if test "x$has_colon" = x; then
60623    # Not in mixed or Windows style, start by that.
60624    new_path=`cmd //c echo $path`
60625  fi
60626
60627
60628  input_path="$new_path"
60629  # Check if we need to convert this using DOS-style short mode. If the path
60630  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60631  # take no chances and rewrite it.
60632  # Note: m4 eats our [], so we need to use [ and ] instead.
60633  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60634  if test "x$has_forbidden_chars" != x; then
60635    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60636    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60637  fi
60638
60639
60640  windows_path="$new_path"
60641  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60642    unix_path=`$CYGPATH -u "$windows_path"`
60643    new_path="$unix_path"
60644  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60645    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60646    new_path="$unix_path"
60647  fi
60648
60649  if test "x$path" != "x$new_path"; then
60650    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60651    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60652$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60653  fi
60654
60655  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60656  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60657
60658    else
60659      # We're on a unix platform. Hooray! :)
60660      path="$POTENTIAL_FREETYPE_LIB_PATH"
60661      has_space=`$ECHO "$path" | $GREP " "`
60662      if test "x$has_space" != x; then
60663        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60664$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60665        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60666      fi
60667
60668      # Use eval to expand a potential ~
60669      eval path="$path"
60670      if test ! -f "$path" && test ! -d "$path"; then
60671        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60672      fi
60673
60674      if test -d "$path"; then
60675        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60676      else
60677        dir="`$DIRNAME "$path"`"
60678        base="`$BASENAME "$path"`"
60679        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60680      fi
60681    fi
60682  fi
60683
60684
60685    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60686    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60687$as_echo_n "checking for freetype includes... " >&6; }
60688    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60689$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60690    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60691    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60692$as_echo_n "checking for freetype libraries... " >&6; }
60693    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60694$as_echo "$FREETYPE_LIB_PATH" >&6; }
60695  fi
60696
60697          fi
60698          if test "x$FOUND_FREETYPE" != xyes; then
60699            FREETYPE_BASE_DIR="$SYSROOT/usr/local"
60700
60701  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60702  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60703  METHOD="well-known location"
60704
60705  # Let's start with an optimistic view of the world :-)
60706  FOUND_FREETYPE=yes
60707
60708  # First look for the canonical freetype main include file ft2build.h.
60709  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60710    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60711    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60712    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60713      # Fail.
60714      FOUND_FREETYPE=no
60715    fi
60716  fi
60717
60718  if test "x$FOUND_FREETYPE" = xyes; then
60719    # Include file found, let's continue the sanity check.
60720    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60721$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60722
60723    # Reset to default value
60724    FREETYPE_BASE_NAME=freetype
60725    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60726    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60727      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60728          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60729        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60730        # for the .6 version explicitly.
60731        FREETYPE_BASE_NAME=freetype.6
60732        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60733        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60734$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60735      else
60736        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60737$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60738        FOUND_FREETYPE=no
60739      fi
60740    else
60741      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60742        # On Windows, we will need both .lib and .dll file.
60743        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60744          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60745$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60746          FOUND_FREETYPE=no
60747        fi
60748      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60749          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60750        # Found lib in isa dir, use that instead.
60751        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60752        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60753$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60754      fi
60755    fi
60756  fi
60757
60758  if test "x$FOUND_FREETYPE" = xyes; then
60759
60760  # Only process if variable expands to non-empty
60761
60762  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60763    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60764
60765  # Input might be given as Windows format, start by converting to
60766  # unix format.
60767  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60768  new_path=`$CYGPATH -u "$path"`
60769
60770  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60771  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60772  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60773  # "foo.exe" is OK but "foo" is an error.
60774  #
60775  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60776  # It is also a way to make sure we got the proper file name for the real test later on.
60777  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60778  if test "x$test_shortpath" = x; then
60779    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60780$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60781    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60782  fi
60783
60784  # Call helper function which possibly converts this using DOS-style short mode.
60785  # If so, the updated path is stored in $new_path.
60786
60787  input_path="$new_path"
60788  # Check if we need to convert this using DOS-style short mode. If the path
60789  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60790  # take no chances and rewrite it.
60791  # Note: m4 eats our [], so we need to use [ and ] instead.
60792  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60793  if test "x$has_forbidden_chars" != x; then
60794    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60795    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60796    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60797    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60798      # Going to short mode and back again did indeed matter. Since short mode is
60799      # case insensitive, let's make it lowercase to improve readability.
60800      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60801      # Now convert it back to Unix-style (cygpath)
60802      input_path=`$CYGPATH -u "$shortmode_path"`
60803      new_path="$input_path"
60804    fi
60805  fi
60806
60807  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60808  if test "x$test_cygdrive_prefix" = x; then
60809    # As a simple fix, exclude /usr/bin since it's not a real path.
60810    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60811      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60812      # a path prefixed by /cygdrive for fixpath to work.
60813      new_path="$CYGWIN_ROOT_PATH$input_path"
60814    fi
60815  fi
60816
60817
60818  if test "x$path" != "x$new_path"; then
60819    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60820    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60821$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60822  fi
60823
60824    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60825
60826  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60827  has_colon=`$ECHO $path | $GREP ^.:`
60828  new_path="$path"
60829  if test "x$has_colon" = x; then
60830    # Not in mixed or Windows style, start by that.
60831    new_path=`cmd //c echo $path`
60832  fi
60833
60834
60835  input_path="$new_path"
60836  # Check if we need to convert this using DOS-style short mode. If the path
60837  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60838  # take no chances and rewrite it.
60839  # Note: m4 eats our [], so we need to use [ and ] instead.
60840  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60841  if test "x$has_forbidden_chars" != x; then
60842    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60843    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60844  fi
60845
60846
60847  windows_path="$new_path"
60848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60849    unix_path=`$CYGPATH -u "$windows_path"`
60850    new_path="$unix_path"
60851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60852    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60853    new_path="$unix_path"
60854  fi
60855
60856  if test "x$path" != "x$new_path"; then
60857    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60858    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60859$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60860  fi
60861
60862  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60863  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60864
60865    else
60866      # We're on a unix platform. Hooray! :)
60867      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60868      has_space=`$ECHO "$path" | $GREP " "`
60869      if test "x$has_space" != x; then
60870        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60871$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60872        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60873      fi
60874
60875      # Use eval to expand a potential ~
60876      eval path="$path"
60877      if test ! -f "$path" && test ! -d "$path"; then
60878        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60879      fi
60880
60881      if test -d "$path"; then
60882        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60883      else
60884        dir="`$DIRNAME "$path"`"
60885        base="`$BASENAME "$path"`"
60886        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60887      fi
60888    fi
60889  fi
60890
60891
60892  # Only process if variable expands to non-empty
60893
60894  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60895    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60896
60897  # Input might be given as Windows format, start by converting to
60898  # unix format.
60899  path="$POTENTIAL_FREETYPE_LIB_PATH"
60900  new_path=`$CYGPATH -u "$path"`
60901
60902  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60903  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60904  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60905  # "foo.exe" is OK but "foo" is an error.
60906  #
60907  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60908  # It is also a way to make sure we got the proper file name for the real test later on.
60909  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60910  if test "x$test_shortpath" = x; then
60911    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60912$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60913    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60914  fi
60915
60916  # Call helper function which possibly converts this using DOS-style short mode.
60917  # If so, the updated path is stored in $new_path.
60918
60919  input_path="$new_path"
60920  # Check if we need to convert this using DOS-style short mode. If the path
60921  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60922  # take no chances and rewrite it.
60923  # Note: m4 eats our [], so we need to use [ and ] instead.
60924  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60925  if test "x$has_forbidden_chars" != x; then
60926    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60927    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60928    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60929    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60930      # Going to short mode and back again did indeed matter. Since short mode is
60931      # case insensitive, let's make it lowercase to improve readability.
60932      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60933      # Now convert it back to Unix-style (cygpath)
60934      input_path=`$CYGPATH -u "$shortmode_path"`
60935      new_path="$input_path"
60936    fi
60937  fi
60938
60939  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60940  if test "x$test_cygdrive_prefix" = x; then
60941    # As a simple fix, exclude /usr/bin since it's not a real path.
60942    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60943      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60944      # a path prefixed by /cygdrive for fixpath to work.
60945      new_path="$CYGWIN_ROOT_PATH$input_path"
60946    fi
60947  fi
60948
60949
60950  if test "x$path" != "x$new_path"; then
60951    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60952    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60953$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60954  fi
60955
60956    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60957
60958  path="$POTENTIAL_FREETYPE_LIB_PATH"
60959  has_colon=`$ECHO $path | $GREP ^.:`
60960  new_path="$path"
60961  if test "x$has_colon" = x; then
60962    # Not in mixed or Windows style, start by that.
60963    new_path=`cmd //c echo $path`
60964  fi
60965
60966
60967  input_path="$new_path"
60968  # Check if we need to convert this using DOS-style short mode. If the path
60969  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60970  # take no chances and rewrite it.
60971  # Note: m4 eats our [], so we need to use [ and ] instead.
60972  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60973  if test "x$has_forbidden_chars" != x; then
60974    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60975    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60976  fi
60977
60978
60979  windows_path="$new_path"
60980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60981    unix_path=`$CYGPATH -u "$windows_path"`
60982    new_path="$unix_path"
60983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60985    new_path="$unix_path"
60986  fi
60987
60988  if test "x$path" != "x$new_path"; then
60989    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60990    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60991$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60992  fi
60993
60994  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60995  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60996
60997    else
60998      # We're on a unix platform. Hooray! :)
60999      path="$POTENTIAL_FREETYPE_LIB_PATH"
61000      has_space=`$ECHO "$path" | $GREP " "`
61001      if test "x$has_space" != x; then
61002        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61003$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61004        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61005      fi
61006
61007      # Use eval to expand a potential ~
61008      eval path="$path"
61009      if test ! -f "$path" && test ! -d "$path"; then
61010        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61011      fi
61012
61013      if test -d "$path"; then
61014        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61015      else
61016        dir="`$DIRNAME "$path"`"
61017        base="`$BASENAME "$path"`"
61018        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61019      fi
61020    fi
61021  fi
61022
61023
61024    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61025    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61026$as_echo_n "checking for freetype includes... " >&6; }
61027    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61028$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61029    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61030    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61031$as_echo_n "checking for freetype libraries... " >&6; }
61032    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61033$as_echo "$FREETYPE_LIB_PATH" >&6; }
61034  fi
61035
61036          fi
61037
61038          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
61039            if test "x$FOUND_FREETYPE" != xyes; then
61040              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
61041              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
61042
61043  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61044  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61045  METHOD="well-known location"
61046
61047  # Let's start with an optimistic view of the world :-)
61048  FOUND_FREETYPE=yes
61049
61050  # First look for the canonical freetype main include file ft2build.h.
61051  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61052    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61053    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61054    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61055      # Fail.
61056      FOUND_FREETYPE=no
61057    fi
61058  fi
61059
61060  if test "x$FOUND_FREETYPE" = xyes; then
61061    # Include file found, let's continue the sanity check.
61062    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61063$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61064
61065    # Reset to default value
61066    FREETYPE_BASE_NAME=freetype
61067    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61068    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61069      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61070          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61071        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61072        # for the .6 version explicitly.
61073        FREETYPE_BASE_NAME=freetype.6
61074        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61075        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61076$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61077      else
61078        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61079$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61080        FOUND_FREETYPE=no
61081      fi
61082    else
61083      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61084        # On Windows, we will need both .lib and .dll file.
61085        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61086          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61087$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61088          FOUND_FREETYPE=no
61089        fi
61090      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61091          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61092        # Found lib in isa dir, use that instead.
61093        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61094        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61095$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61096      fi
61097    fi
61098  fi
61099
61100  if test "x$FOUND_FREETYPE" = xyes; then
61101
61102  # Only process if variable expands to non-empty
61103
61104  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61105    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61106
61107  # Input might be given as Windows format, start by converting to
61108  # unix format.
61109  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61110  new_path=`$CYGPATH -u "$path"`
61111
61112  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61113  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61114  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61115  # "foo.exe" is OK but "foo" is an error.
61116  #
61117  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61118  # It is also a way to make sure we got the proper file name for the real test later on.
61119  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61120  if test "x$test_shortpath" = x; then
61121    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61122$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61123    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61124  fi
61125
61126  # Call helper function which possibly converts this using DOS-style short mode.
61127  # If so, the updated path is stored in $new_path.
61128
61129  input_path="$new_path"
61130  # Check if we need to convert this using DOS-style short mode. If the path
61131  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61132  # take no chances and rewrite it.
61133  # Note: m4 eats our [], so we need to use [ and ] instead.
61134  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61135  if test "x$has_forbidden_chars" != x; then
61136    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61137    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61138    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61139    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61140      # Going to short mode and back again did indeed matter. Since short mode is
61141      # case insensitive, let's make it lowercase to improve readability.
61142      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61143      # Now convert it back to Unix-style (cygpath)
61144      input_path=`$CYGPATH -u "$shortmode_path"`
61145      new_path="$input_path"
61146    fi
61147  fi
61148
61149  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61150  if test "x$test_cygdrive_prefix" = x; then
61151    # As a simple fix, exclude /usr/bin since it's not a real path.
61152    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61153      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61154      # a path prefixed by /cygdrive for fixpath to work.
61155      new_path="$CYGWIN_ROOT_PATH$input_path"
61156    fi
61157  fi
61158
61159
61160  if test "x$path" != "x$new_path"; then
61161    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61162    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61163$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61164  fi
61165
61166    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61167
61168  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61169  has_colon=`$ECHO $path | $GREP ^.:`
61170  new_path="$path"
61171  if test "x$has_colon" = x; then
61172    # Not in mixed or Windows style, start by that.
61173    new_path=`cmd //c echo $path`
61174  fi
61175
61176
61177  input_path="$new_path"
61178  # Check if we need to convert this using DOS-style short mode. If the path
61179  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61180  # take no chances and rewrite it.
61181  # Note: m4 eats our [], so we need to use [ and ] instead.
61182  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61183  if test "x$has_forbidden_chars" != x; then
61184    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61185    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61186  fi
61187
61188
61189  windows_path="$new_path"
61190  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61191    unix_path=`$CYGPATH -u "$windows_path"`
61192    new_path="$unix_path"
61193  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61194    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61195    new_path="$unix_path"
61196  fi
61197
61198  if test "x$path" != "x$new_path"; then
61199    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61200    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61201$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61202  fi
61203
61204  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61205  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61206
61207    else
61208      # We're on a unix platform. Hooray! :)
61209      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61210      has_space=`$ECHO "$path" | $GREP " "`
61211      if test "x$has_space" != x; then
61212        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61213$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61214        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61215      fi
61216
61217      # Use eval to expand a potential ~
61218      eval path="$path"
61219      if test ! -f "$path" && test ! -d "$path"; then
61220        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61221      fi
61222
61223      if test -d "$path"; then
61224        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61225      else
61226        dir="`$DIRNAME "$path"`"
61227        base="`$BASENAME "$path"`"
61228        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61229      fi
61230    fi
61231  fi
61232
61233
61234  # Only process if variable expands to non-empty
61235
61236  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61237    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61238
61239  # Input might be given as Windows format, start by converting to
61240  # unix format.
61241  path="$POTENTIAL_FREETYPE_LIB_PATH"
61242  new_path=`$CYGPATH -u "$path"`
61243
61244  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61245  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61246  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61247  # "foo.exe" is OK but "foo" is an error.
61248  #
61249  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61250  # It is also a way to make sure we got the proper file name for the real test later on.
61251  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61252  if test "x$test_shortpath" = x; then
61253    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61254$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61255    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61256  fi
61257
61258  # Call helper function which possibly converts this using DOS-style short mode.
61259  # If so, the updated path is stored in $new_path.
61260
61261  input_path="$new_path"
61262  # Check if we need to convert this using DOS-style short mode. If the path
61263  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61264  # take no chances and rewrite it.
61265  # Note: m4 eats our [], so we need to use [ and ] instead.
61266  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61267  if test "x$has_forbidden_chars" != x; then
61268    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61269    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61270    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61271    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61272      # Going to short mode and back again did indeed matter. Since short mode is
61273      # case insensitive, let's make it lowercase to improve readability.
61274      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61275      # Now convert it back to Unix-style (cygpath)
61276      input_path=`$CYGPATH -u "$shortmode_path"`
61277      new_path="$input_path"
61278    fi
61279  fi
61280
61281  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61282  if test "x$test_cygdrive_prefix" = x; then
61283    # As a simple fix, exclude /usr/bin since it's not a real path.
61284    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61285      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61286      # a path prefixed by /cygdrive for fixpath to work.
61287      new_path="$CYGWIN_ROOT_PATH$input_path"
61288    fi
61289  fi
61290
61291
61292  if test "x$path" != "x$new_path"; then
61293    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61294    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61295$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61296  fi
61297
61298    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61299
61300  path="$POTENTIAL_FREETYPE_LIB_PATH"
61301  has_colon=`$ECHO $path | $GREP ^.:`
61302  new_path="$path"
61303  if test "x$has_colon" = x; then
61304    # Not in mixed or Windows style, start by that.
61305    new_path=`cmd //c echo $path`
61306  fi
61307
61308
61309  input_path="$new_path"
61310  # Check if we need to convert this using DOS-style short mode. If the path
61311  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61312  # take no chances and rewrite it.
61313  # Note: m4 eats our [], so we need to use [ and ] instead.
61314  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61315  if test "x$has_forbidden_chars" != x; then
61316    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61317    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61318  fi
61319
61320
61321  windows_path="$new_path"
61322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61323    unix_path=`$CYGPATH -u "$windows_path"`
61324    new_path="$unix_path"
61325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61326    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61327    new_path="$unix_path"
61328  fi
61329
61330  if test "x$path" != "x$new_path"; then
61331    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61332    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61333$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61334  fi
61335
61336  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61337  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61338
61339    else
61340      # We're on a unix platform. Hooray! :)
61341      path="$POTENTIAL_FREETYPE_LIB_PATH"
61342      has_space=`$ECHO "$path" | $GREP " "`
61343      if test "x$has_space" != x; then
61344        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61345$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61346        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61347      fi
61348
61349      # Use eval to expand a potential ~
61350      eval path="$path"
61351      if test ! -f "$path" && test ! -d "$path"; then
61352        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61353      fi
61354
61355      if test -d "$path"; then
61356        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61357      else
61358        dir="`$DIRNAME "$path"`"
61359        base="`$BASENAME "$path"`"
61360        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61361      fi
61362    fi
61363  fi
61364
61365
61366    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61367    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61368$as_echo_n "checking for freetype includes... " >&6; }
61369    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61370$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61371    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61372    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61373$as_echo_n "checking for freetype libraries... " >&6; }
61374    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61375$as_echo "$FREETYPE_LIB_PATH" >&6; }
61376  fi
61377
61378            fi
61379          fi
61380
61381          if test "x$FOUND_FREETYPE" != xyes; then
61382            FREETYPE_BASE_DIR="$SYSROOT/usr"
61383            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61384
61385  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61386  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61387  METHOD="well-known location"
61388
61389  # Let's start with an optimistic view of the world :-)
61390  FOUND_FREETYPE=yes
61391
61392  # First look for the canonical freetype main include file ft2build.h.
61393  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61394    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61395    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61396    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61397      # Fail.
61398      FOUND_FREETYPE=no
61399    fi
61400  fi
61401
61402  if test "x$FOUND_FREETYPE" = xyes; then
61403    # Include file found, let's continue the sanity check.
61404    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61405$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61406
61407    # Reset to default value
61408    FREETYPE_BASE_NAME=freetype
61409    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61410    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61411      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61412          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61413        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61414        # for the .6 version explicitly.
61415        FREETYPE_BASE_NAME=freetype.6
61416        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61417        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61418$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61419      else
61420        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61421$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61422        FOUND_FREETYPE=no
61423      fi
61424    else
61425      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61426        # On Windows, we will need both .lib and .dll file.
61427        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61428          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61429$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61430          FOUND_FREETYPE=no
61431        fi
61432      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61433          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61434        # Found lib in isa dir, use that instead.
61435        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61436        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61437$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61438      fi
61439    fi
61440  fi
61441
61442  if test "x$FOUND_FREETYPE" = xyes; then
61443
61444  # Only process if variable expands to non-empty
61445
61446  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61447    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61448
61449  # Input might be given as Windows format, start by converting to
61450  # unix format.
61451  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61452  new_path=`$CYGPATH -u "$path"`
61453
61454  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61455  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61456  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61457  # "foo.exe" is OK but "foo" is an error.
61458  #
61459  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61460  # It is also a way to make sure we got the proper file name for the real test later on.
61461  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61462  if test "x$test_shortpath" = x; then
61463    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61464$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61465    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61466  fi
61467
61468  # Call helper function which possibly converts this using DOS-style short mode.
61469  # If so, the updated path is stored in $new_path.
61470
61471  input_path="$new_path"
61472  # Check if we need to convert this using DOS-style short mode. If the path
61473  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61474  # take no chances and rewrite it.
61475  # Note: m4 eats our [], so we need to use [ and ] instead.
61476  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61477  if test "x$has_forbidden_chars" != x; then
61478    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61479    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61480    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61481    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61482      # Going to short mode and back again did indeed matter. Since short mode is
61483      # case insensitive, let's make it lowercase to improve readability.
61484      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61485      # Now convert it back to Unix-style (cygpath)
61486      input_path=`$CYGPATH -u "$shortmode_path"`
61487      new_path="$input_path"
61488    fi
61489  fi
61490
61491  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61492  if test "x$test_cygdrive_prefix" = x; then
61493    # As a simple fix, exclude /usr/bin since it's not a real path.
61494    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61495      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61496      # a path prefixed by /cygdrive for fixpath to work.
61497      new_path="$CYGWIN_ROOT_PATH$input_path"
61498    fi
61499  fi
61500
61501
61502  if test "x$path" != "x$new_path"; then
61503    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61504    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61505$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61506  fi
61507
61508    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61509
61510  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61511  has_colon=`$ECHO $path | $GREP ^.:`
61512  new_path="$path"
61513  if test "x$has_colon" = x; then
61514    # Not in mixed or Windows style, start by that.
61515    new_path=`cmd //c echo $path`
61516  fi
61517
61518
61519  input_path="$new_path"
61520  # Check if we need to convert this using DOS-style short mode. If the path
61521  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61522  # take no chances and rewrite it.
61523  # Note: m4 eats our [], so we need to use [ and ] instead.
61524  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61525  if test "x$has_forbidden_chars" != x; then
61526    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61527    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61528  fi
61529
61530
61531  windows_path="$new_path"
61532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61533    unix_path=`$CYGPATH -u "$windows_path"`
61534    new_path="$unix_path"
61535  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61536    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61537    new_path="$unix_path"
61538  fi
61539
61540  if test "x$path" != "x$new_path"; then
61541    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61542    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61543$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61544  fi
61545
61546  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61547  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61548
61549    else
61550      # We're on a unix platform. Hooray! :)
61551      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61552      has_space=`$ECHO "$path" | $GREP " "`
61553      if test "x$has_space" != x; then
61554        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61555$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61556        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61557      fi
61558
61559      # Use eval to expand a potential ~
61560      eval path="$path"
61561      if test ! -f "$path" && test ! -d "$path"; then
61562        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61563      fi
61564
61565      if test -d "$path"; then
61566        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61567      else
61568        dir="`$DIRNAME "$path"`"
61569        base="`$BASENAME "$path"`"
61570        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61571      fi
61572    fi
61573  fi
61574
61575
61576  # Only process if variable expands to non-empty
61577
61578  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61579    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61580
61581  # Input might be given as Windows format, start by converting to
61582  # unix format.
61583  path="$POTENTIAL_FREETYPE_LIB_PATH"
61584  new_path=`$CYGPATH -u "$path"`
61585
61586  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61587  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61588  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61589  # "foo.exe" is OK but "foo" is an error.
61590  #
61591  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61592  # It is also a way to make sure we got the proper file name for the real test later on.
61593  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61594  if test "x$test_shortpath" = x; then
61595    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61596$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61597    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61598  fi
61599
61600  # Call helper function which possibly converts this using DOS-style short mode.
61601  # If so, the updated path is stored in $new_path.
61602
61603  input_path="$new_path"
61604  # Check if we need to convert this using DOS-style short mode. If the path
61605  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61606  # take no chances and rewrite it.
61607  # Note: m4 eats our [], so we need to use [ and ] instead.
61608  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61609  if test "x$has_forbidden_chars" != x; then
61610    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61611    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61612    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61613    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61614      # Going to short mode and back again did indeed matter. Since short mode is
61615      # case insensitive, let's make it lowercase to improve readability.
61616      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61617      # Now convert it back to Unix-style (cygpath)
61618      input_path=`$CYGPATH -u "$shortmode_path"`
61619      new_path="$input_path"
61620    fi
61621  fi
61622
61623  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61624  if test "x$test_cygdrive_prefix" = x; then
61625    # As a simple fix, exclude /usr/bin since it's not a real path.
61626    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61627      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61628      # a path prefixed by /cygdrive for fixpath to work.
61629      new_path="$CYGWIN_ROOT_PATH$input_path"
61630    fi
61631  fi
61632
61633
61634  if test "x$path" != "x$new_path"; then
61635    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61636    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61637$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61638  fi
61639
61640    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61641
61642  path="$POTENTIAL_FREETYPE_LIB_PATH"
61643  has_colon=`$ECHO $path | $GREP ^.:`
61644  new_path="$path"
61645  if test "x$has_colon" = x; then
61646    # Not in mixed or Windows style, start by that.
61647    new_path=`cmd //c echo $path`
61648  fi
61649
61650
61651  input_path="$new_path"
61652  # Check if we need to convert this using DOS-style short mode. If the path
61653  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61654  # take no chances and rewrite it.
61655  # Note: m4 eats our [], so we need to use [ and ] instead.
61656  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61657  if test "x$has_forbidden_chars" != x; then
61658    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61659    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61660  fi
61661
61662
61663  windows_path="$new_path"
61664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61665    unix_path=`$CYGPATH -u "$windows_path"`
61666    new_path="$unix_path"
61667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61668    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61669    new_path="$unix_path"
61670  fi
61671
61672  if test "x$path" != "x$new_path"; then
61673    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61674    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61675$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61676  fi
61677
61678  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61679  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61680
61681    else
61682      # We're on a unix platform. Hooray! :)
61683      path="$POTENTIAL_FREETYPE_LIB_PATH"
61684      has_space=`$ECHO "$path" | $GREP " "`
61685      if test "x$has_space" != x; then
61686        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61687$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61688        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61689      fi
61690
61691      # Use eval to expand a potential ~
61692      eval path="$path"
61693      if test ! -f "$path" && test ! -d "$path"; then
61694        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61695      fi
61696
61697      if test -d "$path"; then
61698        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61699      else
61700        dir="`$DIRNAME "$path"`"
61701        base="`$BASENAME "$path"`"
61702        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61703      fi
61704    fi
61705  fi
61706
61707
61708    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61709    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61710$as_echo_n "checking for freetype includes... " >&6; }
61711    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61712$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61713    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61714    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61715$as_echo_n "checking for freetype libraries... " >&6; }
61716    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61717$as_echo "$FREETYPE_LIB_PATH" >&6; }
61718  fi
61719
61720            else
61721
61722  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61723  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
61724  METHOD="well-known location"
61725
61726  # Let's start with an optimistic view of the world :-)
61727  FOUND_FREETYPE=yes
61728
61729  # First look for the canonical freetype main include file ft2build.h.
61730  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61731    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61732    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61733    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61734      # Fail.
61735      FOUND_FREETYPE=no
61736    fi
61737  fi
61738
61739  if test "x$FOUND_FREETYPE" = xyes; then
61740    # Include file found, let's continue the sanity check.
61741    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61742$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61743
61744    # Reset to default value
61745    FREETYPE_BASE_NAME=freetype
61746    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61747    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61748      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61749          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61750        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61751        # for the .6 version explicitly.
61752        FREETYPE_BASE_NAME=freetype.6
61753        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61754        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61755$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61756      else
61757        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61758$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61759        FOUND_FREETYPE=no
61760      fi
61761    else
61762      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61763        # On Windows, we will need both .lib and .dll file.
61764        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61765          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61766$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61767          FOUND_FREETYPE=no
61768        fi
61769      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61770          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61771        # Found lib in isa dir, use that instead.
61772        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61773        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61774$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61775      fi
61776    fi
61777  fi
61778
61779  if test "x$FOUND_FREETYPE" = xyes; then
61780
61781  # Only process if variable expands to non-empty
61782
61783  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61784    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61785
61786  # Input might be given as Windows format, start by converting to
61787  # unix format.
61788  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61789  new_path=`$CYGPATH -u "$path"`
61790
61791  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61792  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61793  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61794  # "foo.exe" is OK but "foo" is an error.
61795  #
61796  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61797  # It is also a way to make sure we got the proper file name for the real test later on.
61798  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61799  if test "x$test_shortpath" = x; then
61800    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61801$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61802    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61803  fi
61804
61805  # Call helper function which possibly converts this using DOS-style short mode.
61806  # If so, the updated path is stored in $new_path.
61807
61808  input_path="$new_path"
61809  # Check if we need to convert this using DOS-style short mode. If the path
61810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61811  # take no chances and rewrite it.
61812  # Note: m4 eats our [], so we need to use [ and ] instead.
61813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61814  if test "x$has_forbidden_chars" != x; then
61815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61816    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61817    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61818    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61819      # Going to short mode and back again did indeed matter. Since short mode is
61820      # case insensitive, let's make it lowercase to improve readability.
61821      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61822      # Now convert it back to Unix-style (cygpath)
61823      input_path=`$CYGPATH -u "$shortmode_path"`
61824      new_path="$input_path"
61825    fi
61826  fi
61827
61828  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61829  if test "x$test_cygdrive_prefix" = x; then
61830    # As a simple fix, exclude /usr/bin since it's not a real path.
61831    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61832      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61833      # a path prefixed by /cygdrive for fixpath to work.
61834      new_path="$CYGWIN_ROOT_PATH$input_path"
61835    fi
61836  fi
61837
61838
61839  if test "x$path" != "x$new_path"; then
61840    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61841    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61842$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61843  fi
61844
61845    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61846
61847  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61848  has_colon=`$ECHO $path | $GREP ^.:`
61849  new_path="$path"
61850  if test "x$has_colon" = x; then
61851    # Not in mixed or Windows style, start by that.
61852    new_path=`cmd //c echo $path`
61853  fi
61854
61855
61856  input_path="$new_path"
61857  # Check if we need to convert this using DOS-style short mode. If the path
61858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61859  # take no chances and rewrite it.
61860  # Note: m4 eats our [], so we need to use [ and ] instead.
61861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61862  if test "x$has_forbidden_chars" != x; then
61863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61864    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61865  fi
61866
61867
61868  windows_path="$new_path"
61869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61870    unix_path=`$CYGPATH -u "$windows_path"`
61871    new_path="$unix_path"
61872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61874    new_path="$unix_path"
61875  fi
61876
61877  if test "x$path" != "x$new_path"; then
61878    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61879    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61880$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61881  fi
61882
61883  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61884  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61885
61886    else
61887      # We're on a unix platform. Hooray! :)
61888      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61889      has_space=`$ECHO "$path" | $GREP " "`
61890      if test "x$has_space" != x; then
61891        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61892$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61893        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61894      fi
61895
61896      # Use eval to expand a potential ~
61897      eval path="$path"
61898      if test ! -f "$path" && test ! -d "$path"; then
61899        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61900      fi
61901
61902      if test -d "$path"; then
61903        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61904      else
61905        dir="`$DIRNAME "$path"`"
61906        base="`$BASENAME "$path"`"
61907        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61908      fi
61909    fi
61910  fi
61911
61912
61913  # Only process if variable expands to non-empty
61914
61915  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61916    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61917
61918  # Input might be given as Windows format, start by converting to
61919  # unix format.
61920  path="$POTENTIAL_FREETYPE_LIB_PATH"
61921  new_path=`$CYGPATH -u "$path"`
61922
61923  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61924  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61925  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61926  # "foo.exe" is OK but "foo" is an error.
61927  #
61928  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61929  # It is also a way to make sure we got the proper file name for the real test later on.
61930  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61931  if test "x$test_shortpath" = x; then
61932    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61933$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61934    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61935  fi
61936
61937  # Call helper function which possibly converts this using DOS-style short mode.
61938  # If so, the updated path is stored in $new_path.
61939
61940  input_path="$new_path"
61941  # Check if we need to convert this using DOS-style short mode. If the path
61942  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61943  # take no chances and rewrite it.
61944  # Note: m4 eats our [], so we need to use [ and ] instead.
61945  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61946  if test "x$has_forbidden_chars" != x; then
61947    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61948    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61949    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61950    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61951      # Going to short mode and back again did indeed matter. Since short mode is
61952      # case insensitive, let's make it lowercase to improve readability.
61953      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61954      # Now convert it back to Unix-style (cygpath)
61955      input_path=`$CYGPATH -u "$shortmode_path"`
61956      new_path="$input_path"
61957    fi
61958  fi
61959
61960  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61961  if test "x$test_cygdrive_prefix" = x; then
61962    # As a simple fix, exclude /usr/bin since it's not a real path.
61963    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61964      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61965      # a path prefixed by /cygdrive for fixpath to work.
61966      new_path="$CYGWIN_ROOT_PATH$input_path"
61967    fi
61968  fi
61969
61970
61971  if test "x$path" != "x$new_path"; then
61972    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61973    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61974$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61975  fi
61976
61977    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61978
61979  path="$POTENTIAL_FREETYPE_LIB_PATH"
61980  has_colon=`$ECHO $path | $GREP ^.:`
61981  new_path="$path"
61982  if test "x$has_colon" = x; then
61983    # Not in mixed or Windows style, start by that.
61984    new_path=`cmd //c echo $path`
61985  fi
61986
61987
61988  input_path="$new_path"
61989  # Check if we need to convert this using DOS-style short mode. If the path
61990  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61991  # take no chances and rewrite it.
61992  # Note: m4 eats our [], so we need to use [ and ] instead.
61993  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61994  if test "x$has_forbidden_chars" != x; then
61995    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61996    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61997  fi
61998
61999
62000  windows_path="$new_path"
62001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62002    unix_path=`$CYGPATH -u "$windows_path"`
62003    new_path="$unix_path"
62004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62005    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62006    new_path="$unix_path"
62007  fi
62008
62009  if test "x$path" != "x$new_path"; then
62010    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62011    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62012$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62013  fi
62014
62015  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62016  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62017
62018    else
62019      # We're on a unix platform. Hooray! :)
62020      path="$POTENTIAL_FREETYPE_LIB_PATH"
62021      has_space=`$ECHO "$path" | $GREP " "`
62022      if test "x$has_space" != x; then
62023        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62024$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62025        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62026      fi
62027
62028      # Use eval to expand a potential ~
62029      eval path="$path"
62030      if test ! -f "$path" && test ! -d "$path"; then
62031        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62032      fi
62033
62034      if test -d "$path"; then
62035        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62036      else
62037        dir="`$DIRNAME "$path"`"
62038        base="`$BASENAME "$path"`"
62039        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62040      fi
62041    fi
62042  fi
62043
62044
62045    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62046    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62047$as_echo_n "checking for freetype includes... " >&6; }
62048    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62049$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62050    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62051    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62052$as_echo_n "checking for freetype libraries... " >&6; }
62053    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62054$as_echo "$FREETYPE_LIB_PATH" >&6; }
62055  fi
62056
62057              if test "x$FOUND_FREETYPE" != xyes; then
62058
62059  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62060  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
62061  METHOD="well-known location"
62062
62063  # Let's start with an optimistic view of the world :-)
62064  FOUND_FREETYPE=yes
62065
62066  # First look for the canonical freetype main include file ft2build.h.
62067  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62068    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62069    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62070    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62071      # Fail.
62072      FOUND_FREETYPE=no
62073    fi
62074  fi
62075
62076  if test "x$FOUND_FREETYPE" = xyes; then
62077    # Include file found, let's continue the sanity check.
62078    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62079$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62080
62081    # Reset to default value
62082    FREETYPE_BASE_NAME=freetype
62083    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62084    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62085      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62086          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62087        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62088        # for the .6 version explicitly.
62089        FREETYPE_BASE_NAME=freetype.6
62090        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62091        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62092$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62093      else
62094        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62095$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62096        FOUND_FREETYPE=no
62097      fi
62098    else
62099      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62100        # On Windows, we will need both .lib and .dll file.
62101        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62102          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62103$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62104          FOUND_FREETYPE=no
62105        fi
62106      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62107          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62108        # Found lib in isa dir, use that instead.
62109        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62110        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62111$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62112      fi
62113    fi
62114  fi
62115
62116  if test "x$FOUND_FREETYPE" = xyes; then
62117
62118  # Only process if variable expands to non-empty
62119
62120  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62121    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62122
62123  # Input might be given as Windows format, start by converting to
62124  # unix format.
62125  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62126  new_path=`$CYGPATH -u "$path"`
62127
62128  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62129  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62130  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62131  # "foo.exe" is OK but "foo" is an error.
62132  #
62133  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62134  # It is also a way to make sure we got the proper file name for the real test later on.
62135  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62136  if test "x$test_shortpath" = x; then
62137    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62138$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62139    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62140  fi
62141
62142  # Call helper function which possibly converts this using DOS-style short mode.
62143  # If so, the updated path is stored in $new_path.
62144
62145  input_path="$new_path"
62146  # Check if we need to convert this using DOS-style short mode. If the path
62147  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62148  # take no chances and rewrite it.
62149  # Note: m4 eats our [], so we need to use [ and ] instead.
62150  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62151  if test "x$has_forbidden_chars" != x; then
62152    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62153    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62154    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62155    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62156      # Going to short mode and back again did indeed matter. Since short mode is
62157      # case insensitive, let's make it lowercase to improve readability.
62158      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62159      # Now convert it back to Unix-style (cygpath)
62160      input_path=`$CYGPATH -u "$shortmode_path"`
62161      new_path="$input_path"
62162    fi
62163  fi
62164
62165  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62166  if test "x$test_cygdrive_prefix" = x; then
62167    # As a simple fix, exclude /usr/bin since it's not a real path.
62168    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62169      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62170      # a path prefixed by /cygdrive for fixpath to work.
62171      new_path="$CYGWIN_ROOT_PATH$input_path"
62172    fi
62173  fi
62174
62175
62176  if test "x$path" != "x$new_path"; then
62177    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62178    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62179$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62180  fi
62181
62182    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62183
62184  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62185  has_colon=`$ECHO $path | $GREP ^.:`
62186  new_path="$path"
62187  if test "x$has_colon" = x; then
62188    # Not in mixed or Windows style, start by that.
62189    new_path=`cmd //c echo $path`
62190  fi
62191
62192
62193  input_path="$new_path"
62194  # Check if we need to convert this using DOS-style short mode. If the path
62195  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62196  # take no chances and rewrite it.
62197  # Note: m4 eats our [], so we need to use [ and ] instead.
62198  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62199  if test "x$has_forbidden_chars" != x; then
62200    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62201    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62202  fi
62203
62204
62205  windows_path="$new_path"
62206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62207    unix_path=`$CYGPATH -u "$windows_path"`
62208    new_path="$unix_path"
62209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62210    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62211    new_path="$unix_path"
62212  fi
62213
62214  if test "x$path" != "x$new_path"; then
62215    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62216    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62217$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62218  fi
62219
62220  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62221  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62222
62223    else
62224      # We're on a unix platform. Hooray! :)
62225      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62226      has_space=`$ECHO "$path" | $GREP " "`
62227      if test "x$has_space" != x; then
62228        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62229$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62230        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62231      fi
62232
62233      # Use eval to expand a potential ~
62234      eval path="$path"
62235      if test ! -f "$path" && test ! -d "$path"; then
62236        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62237      fi
62238
62239      if test -d "$path"; then
62240        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62241      else
62242        dir="`$DIRNAME "$path"`"
62243        base="`$BASENAME "$path"`"
62244        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62245      fi
62246    fi
62247  fi
62248
62249
62250  # Only process if variable expands to non-empty
62251
62252  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62253    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62254
62255  # Input might be given as Windows format, start by converting to
62256  # unix format.
62257  path="$POTENTIAL_FREETYPE_LIB_PATH"
62258  new_path=`$CYGPATH -u "$path"`
62259
62260  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62261  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62262  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62263  # "foo.exe" is OK but "foo" is an error.
62264  #
62265  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62266  # It is also a way to make sure we got the proper file name for the real test later on.
62267  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62268  if test "x$test_shortpath" = x; then
62269    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62270$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62271    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62272  fi
62273
62274  # Call helper function which possibly converts this using DOS-style short mode.
62275  # If so, the updated path is stored in $new_path.
62276
62277  input_path="$new_path"
62278  # Check if we need to convert this using DOS-style short mode. If the path
62279  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62280  # take no chances and rewrite it.
62281  # Note: m4 eats our [], so we need to use [ and ] instead.
62282  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62283  if test "x$has_forbidden_chars" != x; then
62284    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62285    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62286    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62287    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62288      # Going to short mode and back again did indeed matter. Since short mode is
62289      # case insensitive, let's make it lowercase to improve readability.
62290      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62291      # Now convert it back to Unix-style (cygpath)
62292      input_path=`$CYGPATH -u "$shortmode_path"`
62293      new_path="$input_path"
62294    fi
62295  fi
62296
62297  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62298  if test "x$test_cygdrive_prefix" = x; then
62299    # As a simple fix, exclude /usr/bin since it's not a real path.
62300    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62301      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62302      # a path prefixed by /cygdrive for fixpath to work.
62303      new_path="$CYGWIN_ROOT_PATH$input_path"
62304    fi
62305  fi
62306
62307
62308  if test "x$path" != "x$new_path"; then
62309    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62310    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62311$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62312  fi
62313
62314    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62315
62316  path="$POTENTIAL_FREETYPE_LIB_PATH"
62317  has_colon=`$ECHO $path | $GREP ^.:`
62318  new_path="$path"
62319  if test "x$has_colon" = x; then
62320    # Not in mixed or Windows style, start by that.
62321    new_path=`cmd //c echo $path`
62322  fi
62323
62324
62325  input_path="$new_path"
62326  # Check if we need to convert this using DOS-style short mode. If the path
62327  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62328  # take no chances and rewrite it.
62329  # Note: m4 eats our [], so we need to use [ and ] instead.
62330  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62331  if test "x$has_forbidden_chars" != x; then
62332    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62333    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62334  fi
62335
62336
62337  windows_path="$new_path"
62338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62339    unix_path=`$CYGPATH -u "$windows_path"`
62340    new_path="$unix_path"
62341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62342    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62343    new_path="$unix_path"
62344  fi
62345
62346  if test "x$path" != "x$new_path"; then
62347    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62348    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62349$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62350  fi
62351
62352  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62353  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62354
62355    else
62356      # We're on a unix platform. Hooray! :)
62357      path="$POTENTIAL_FREETYPE_LIB_PATH"
62358      has_space=`$ECHO "$path" | $GREP " "`
62359      if test "x$has_space" != x; then
62360        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62361$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62362        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62363      fi
62364
62365      # Use eval to expand a potential ~
62366      eval path="$path"
62367      if test ! -f "$path" && test ! -d "$path"; then
62368        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62369      fi
62370
62371      if test -d "$path"; then
62372        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62373      else
62374        dir="`$DIRNAME "$path"`"
62375        base="`$BASENAME "$path"`"
62376        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62377      fi
62378    fi
62379  fi
62380
62381
62382    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62383    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62384$as_echo_n "checking for freetype includes... " >&6; }
62385    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62386$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62387    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62388    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62389$as_echo_n "checking for freetype libraries... " >&6; }
62390    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62391$as_echo "$FREETYPE_LIB_PATH" >&6; }
62392  fi
62393
62394              fi
62395            fi
62396          fi
62397        fi
62398      fi # end check in well-known locations
62399
62400      if test "x$FOUND_FREETYPE" != xyes; then
62401
62402  # Print a helpful message on how to acquire the necessary build dependency.
62403  # freetype is the help tag: freetype, cups, alsa etc
62404  MISSING_DEPENDENCY=freetype
62405
62406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62407    cygwin_help $MISSING_DEPENDENCY
62408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62409    msys_help $MISSING_DEPENDENCY
62410  else
62411    PKGHANDLER_COMMAND=
62412
62413    case $PKGHANDLER in
62414      apt-get)
62415        apt_help     $MISSING_DEPENDENCY ;;
62416      yum)
62417        yum_help     $MISSING_DEPENDENCY ;;
62418      brew)
62419        brew_help    $MISSING_DEPENDENCY ;;
62420      port)
62421        port_help    $MISSING_DEPENDENCY ;;
62422      pkgutil)
62423        pkgutil_help $MISSING_DEPENDENCY ;;
62424      pkgadd)
62425        pkgadd_help  $MISSING_DEPENDENCY ;;
62426    esac
62427
62428    if test "x$PKGHANDLER_COMMAND" != x; then
62429      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62430    fi
62431  fi
62432
62433        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62434      fi
62435    fi # end user specified settings
62436
62437    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62438    if test "x$FREETYPE_CFLAGS" = x; then
62439
62440  # Only process if variable expands to non-empty
62441
62442  if test "x$FREETYPE_INCLUDE_PATH" != x; then
62443    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62444
62445  # Input might be given as Windows format, start by converting to
62446  # unix format.
62447  path="$FREETYPE_INCLUDE_PATH"
62448  new_path=`$CYGPATH -u "$path"`
62449
62450  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62451  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62452  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62453  # "foo.exe" is OK but "foo" is an error.
62454  #
62455  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62456  # It is also a way to make sure we got the proper file name for the real test later on.
62457  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62458  if test "x$test_shortpath" = x; then
62459    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62460$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62461    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62462  fi
62463
62464  # Call helper function which possibly converts this using DOS-style short mode.
62465  # If so, the updated path is stored in $new_path.
62466
62467  input_path="$new_path"
62468  # Check if we need to convert this using DOS-style short mode. If the path
62469  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62470  # take no chances and rewrite it.
62471  # Note: m4 eats our [], so we need to use [ and ] instead.
62472  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62473  if test "x$has_forbidden_chars" != x; then
62474    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62475    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62476    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62477    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62478      # Going to short mode and back again did indeed matter. Since short mode is
62479      # case insensitive, let's make it lowercase to improve readability.
62480      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62481      # Now convert it back to Unix-style (cygpath)
62482      input_path=`$CYGPATH -u "$shortmode_path"`
62483      new_path="$input_path"
62484    fi
62485  fi
62486
62487  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62488  if test "x$test_cygdrive_prefix" = x; then
62489    # As a simple fix, exclude /usr/bin since it's not a real path.
62490    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62491      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62492      # a path prefixed by /cygdrive for fixpath to work.
62493      new_path="$CYGWIN_ROOT_PATH$input_path"
62494    fi
62495  fi
62496
62497
62498  if test "x$path" != "x$new_path"; then
62499    FREETYPE_INCLUDE_PATH="$new_path"
62500    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62501$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62502  fi
62503
62504    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62505
62506  path="$FREETYPE_INCLUDE_PATH"
62507  has_colon=`$ECHO $path | $GREP ^.:`
62508  new_path="$path"
62509  if test "x$has_colon" = x; then
62510    # Not in mixed or Windows style, start by that.
62511    new_path=`cmd //c echo $path`
62512  fi
62513
62514
62515  input_path="$new_path"
62516  # Check if we need to convert this using DOS-style short mode. If the path
62517  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62518  # take no chances and rewrite it.
62519  # Note: m4 eats our [], so we need to use [ and ] instead.
62520  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62521  if test "x$has_forbidden_chars" != x; then
62522    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62523    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62524  fi
62525
62526
62527  windows_path="$new_path"
62528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62529    unix_path=`$CYGPATH -u "$windows_path"`
62530    new_path="$unix_path"
62531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62532    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62533    new_path="$unix_path"
62534  fi
62535
62536  if test "x$path" != "x$new_path"; then
62537    FREETYPE_INCLUDE_PATH="$new_path"
62538    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62539$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62540  fi
62541
62542  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62543  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62544
62545    else
62546      # We're on a unix platform. Hooray! :)
62547      path="$FREETYPE_INCLUDE_PATH"
62548      has_space=`$ECHO "$path" | $GREP " "`
62549      if test "x$has_space" != x; then
62550        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62551$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62552        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62553      fi
62554
62555      # Use eval to expand a potential ~
62556      eval path="$path"
62557      if test ! -f "$path" && test ! -d "$path"; then
62558        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62559      fi
62560
62561      if test -d "$path"; then
62562        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62563      else
62564        dir="`$DIRNAME "$path"`"
62565        base="`$BASENAME "$path"`"
62566        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62567      fi
62568    fi
62569  fi
62570
62571      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62572        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62573      else
62574        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62575      fi
62576    fi
62577
62578    if test "x$FREETYPE_LIBS" = x; then
62579
62580  # Only process if variable expands to non-empty
62581
62582  if test "x$FREETYPE_LIB_PATH" != x; then
62583    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62584
62585  # Input might be given as Windows format, start by converting to
62586  # unix format.
62587  path="$FREETYPE_LIB_PATH"
62588  new_path=`$CYGPATH -u "$path"`
62589
62590  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62591  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62592  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62593  # "foo.exe" is OK but "foo" is an error.
62594  #
62595  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62596  # It is also a way to make sure we got the proper file name for the real test later on.
62597  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62598  if test "x$test_shortpath" = x; then
62599    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62600$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62601    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
62602  fi
62603
62604  # Call helper function which possibly converts this using DOS-style short mode.
62605  # If so, the updated path is stored in $new_path.
62606
62607  input_path="$new_path"
62608  # Check if we need to convert this using DOS-style short mode. If the path
62609  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62610  # take no chances and rewrite it.
62611  # Note: m4 eats our [], so we need to use [ and ] instead.
62612  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62613  if test "x$has_forbidden_chars" != x; then
62614    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62615    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62616    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62617    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62618      # Going to short mode and back again did indeed matter. Since short mode is
62619      # case insensitive, let's make it lowercase to improve readability.
62620      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62621      # Now convert it back to Unix-style (cygpath)
62622      input_path=`$CYGPATH -u "$shortmode_path"`
62623      new_path="$input_path"
62624    fi
62625  fi
62626
62627  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62628  if test "x$test_cygdrive_prefix" = x; then
62629    # As a simple fix, exclude /usr/bin since it's not a real path.
62630    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62631      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62632      # a path prefixed by /cygdrive for fixpath to work.
62633      new_path="$CYGWIN_ROOT_PATH$input_path"
62634    fi
62635  fi
62636
62637
62638  if test "x$path" != "x$new_path"; then
62639    FREETYPE_LIB_PATH="$new_path"
62640    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62641$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62642  fi
62643
62644    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62645
62646  path="$FREETYPE_LIB_PATH"
62647  has_colon=`$ECHO $path | $GREP ^.:`
62648  new_path="$path"
62649  if test "x$has_colon" = x; then
62650    # Not in mixed or Windows style, start by that.
62651    new_path=`cmd //c echo $path`
62652  fi
62653
62654
62655  input_path="$new_path"
62656  # Check if we need to convert this using DOS-style short mode. If the path
62657  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62658  # take no chances and rewrite it.
62659  # Note: m4 eats our [], so we need to use [ and ] instead.
62660  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62661  if test "x$has_forbidden_chars" != x; then
62662    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62663    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62664  fi
62665
62666
62667  windows_path="$new_path"
62668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62669    unix_path=`$CYGPATH -u "$windows_path"`
62670    new_path="$unix_path"
62671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62672    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62673    new_path="$unix_path"
62674  fi
62675
62676  if test "x$path" != "x$new_path"; then
62677    FREETYPE_LIB_PATH="$new_path"
62678    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62679$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62680  fi
62681
62682  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62683  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62684
62685    else
62686      # We're on a unix platform. Hooray! :)
62687      path="$FREETYPE_LIB_PATH"
62688      has_space=`$ECHO "$path" | $GREP " "`
62689      if test "x$has_space" != x; then
62690        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62691$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62692        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62693      fi
62694
62695      # Use eval to expand a potential ~
62696      eval path="$path"
62697      if test ! -f "$path" && test ! -d "$path"; then
62698        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62699      fi
62700
62701      if test -d "$path"; then
62702        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62703      else
62704        dir="`$DIRNAME "$path"`"
62705        base="`$BASENAME "$path"`"
62706        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62707      fi
62708    fi
62709  fi
62710
62711      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62712        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
62713      else
62714        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
62715      fi
62716    fi
62717
62718    # Try to compile it
62719    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
62720$as_echo_n "checking if we can compile and link with freetype... " >&6; }
62721    ac_ext=cpp
62722ac_cpp='$CXXCPP $CPPFLAGS'
62723ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62724ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62725ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62726
62727    PREV_CXXCFLAGS="$CXXFLAGS"
62728    PREV_LIBS="$LIBS"
62729    PREV_CXX="$CXX"
62730    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
62731    LIBS="$LIBS $FREETYPE_LIBS"
62732    CXX="$FIXPATH $CXX"
62733    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62734/* end confdefs.h.  */
62735
62736          #include<ft2build.h>
62737          #include FT_FREETYPE_H
62738          int main () {
62739            FT_Init_FreeType(NULL);
62740            return 0;
62741          }
62742
62743_ACEOF
62744if ac_fn_cxx_try_link "$LINENO"; then :
62745
62746          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62747$as_echo "yes" >&6; }
62748
62749else
62750
62751          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62752$as_echo "no" >&6; }
62753          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
62754$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
62755          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
62756$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
62757
62758
62759  # Print a helpful message on how to acquire the necessary build dependency.
62760  # freetype is the help tag: freetype, cups, alsa etc
62761  MISSING_DEPENDENCY=freetype
62762
62763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62764    cygwin_help $MISSING_DEPENDENCY
62765  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62766    msys_help $MISSING_DEPENDENCY
62767  else
62768    PKGHANDLER_COMMAND=
62769
62770    case $PKGHANDLER in
62771      apt-get)
62772        apt_help     $MISSING_DEPENDENCY ;;
62773      yum)
62774        yum_help     $MISSING_DEPENDENCY ;;
62775      brew)
62776        brew_help    $MISSING_DEPENDENCY ;;
62777      port)
62778        port_help    $MISSING_DEPENDENCY ;;
62779      pkgutil)
62780        pkgutil_help $MISSING_DEPENDENCY ;;
62781      pkgadd)
62782        pkgadd_help  $MISSING_DEPENDENCY ;;
62783    esac
62784
62785    if test "x$PKGHANDLER_COMMAND" != x; then
62786      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62787    fi
62788  fi
62789
62790
62791          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
62792
62793
62794fi
62795rm -f core conftest.err conftest.$ac_objext \
62796    conftest$ac_exeext conftest.$ac_ext
62797    CXXCFLAGS="$PREV_CXXFLAGS"
62798    LIBS="$PREV_LIBS"
62799    CXX="$PREV_CXX"
62800    ac_ext=cpp
62801ac_cpp='$CXXCPP $CPPFLAGS'
62802ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62803ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62804ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62805
62806
62807    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
62808$as_echo_n "checking if we should bundle freetype... " >&6; }
62809    if test "x$BUNDLE_FREETYPE" = xyes; then
62810      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
62811    fi
62812    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
62813$as_echo "$BUNDLE_FREETYPE" >&6; }
62814
62815  fi # end freetype needed
62816
62817
62818
62819
62820
62821
62822
62823# Check whether --with-alsa was given.
62824if test "${with_alsa+set}" = set; then :
62825  withval=$with_alsa;
62826fi
62827
62828
62829# Check whether --with-alsa-include was given.
62830if test "${with_alsa_include+set}" = set; then :
62831  withval=$with_alsa_include;
62832fi
62833
62834
62835# Check whether --with-alsa-lib was given.
62836if test "${with_alsa_lib+set}" = set; then :
62837  withval=$with_alsa_lib;
62838fi
62839
62840
62841  if test "x$NEEDS_LIB_ALSA" = xfalse; then
62842    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
62843        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
62844        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
62845      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
62846$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
62847    fi
62848    ALSA_CFLAGS=
62849    ALSA_LIBS=
62850  else
62851    ALSA_FOUND=no
62852
62853    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
62854      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
62855    fi
62856
62857    if test "x${with_alsa}" != x; then
62858      ALSA_LIBS="-L${with_alsa}/lib -lasound"
62859      ALSA_CFLAGS="-I${with_alsa}/include"
62860      ALSA_FOUND=yes
62861    fi
62862    if test "x${with_alsa_include}" != x; then
62863      ALSA_CFLAGS="-I${with_alsa_include}"
62864      ALSA_FOUND=yes
62865    fi
62866    if test "x${with_alsa_lib}" != x; then
62867      ALSA_LIBS="-L${with_alsa_lib} -lasound"
62868      ALSA_FOUND=yes
62869    fi
62870    # Do not try pkg-config if we have a sysroot set.
62871    if test "x$SYSROOT" = x; then
62872      if test "x$ALSA_FOUND" = xno; then
62873
62874pkg_failed=no
62875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
62876$as_echo_n "checking for ALSA... " >&6; }
62877
62878if test -n "$ALSA_CFLAGS"; then
62879    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
62880 elif test -n "$PKG_CONFIG"; then
62881    if test -n "$PKG_CONFIG" && \
62882    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62883  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62884  ac_status=$?
62885  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62886  test $ac_status = 0; }; then
62887  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
62888else
62889  pkg_failed=yes
62890fi
62891 else
62892    pkg_failed=untried
62893fi
62894if test -n "$ALSA_LIBS"; then
62895    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
62896 elif test -n "$PKG_CONFIG"; then
62897    if test -n "$PKG_CONFIG" && \
62898    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62899  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62900  ac_status=$?
62901  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62902  test $ac_status = 0; }; then
62903  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
62904else
62905  pkg_failed=yes
62906fi
62907 else
62908    pkg_failed=untried
62909fi
62910
62911
62912
62913if test $pkg_failed = yes; then
62914
62915if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62916        _pkg_short_errors_supported=yes
62917else
62918        _pkg_short_errors_supported=no
62919fi
62920        if test $_pkg_short_errors_supported = yes; then
62921	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
62922        else
62923	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
62924        fi
62925	# Put the nasty error message in config.log where it belongs
62926	echo "$ALSA_PKG_ERRORS" >&5
62927
62928	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62929$as_echo "no" >&6; }
62930                ALSA_FOUND=no
62931elif test $pkg_failed = untried; then
62932	ALSA_FOUND=no
62933else
62934	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
62935	ALSA_LIBS=$pkg_cv_ALSA_LIBS
62936        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62937$as_echo "yes" >&6; }
62938	ALSA_FOUND=yes
62939fi
62940      fi
62941    fi
62942    if test "x$ALSA_FOUND" = xno; then
62943      for ac_header in alsa/asoundlib.h
62944do :
62945  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
62946if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
62947  cat >>confdefs.h <<_ACEOF
62948#define HAVE_ALSA_ASOUNDLIB_H 1
62949_ACEOF
62950
62951            ALSA_FOUND=yes
62952            ALSA_CFLAGS=-Iignoreme
62953            ALSA_LIBS=-lasound
62954            DEFAULT_ALSA=yes
62955
62956else
62957  ALSA_FOUND=no
62958
62959fi
62960
62961done
62962
62963    fi
62964    if test "x$ALSA_FOUND" = xno; then
62965
62966  # Print a helpful message on how to acquire the necessary build dependency.
62967  # alsa is the help tag: freetype, cups, alsa etc
62968  MISSING_DEPENDENCY=alsa
62969
62970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62971    cygwin_help $MISSING_DEPENDENCY
62972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62973    msys_help $MISSING_DEPENDENCY
62974  else
62975    PKGHANDLER_COMMAND=
62976
62977    case $PKGHANDLER in
62978      apt-get)
62979        apt_help     $MISSING_DEPENDENCY ;;
62980      yum)
62981        yum_help     $MISSING_DEPENDENCY ;;
62982      brew)
62983        brew_help    $MISSING_DEPENDENCY ;;
62984      port)
62985        port_help    $MISSING_DEPENDENCY ;;
62986      pkgutil)
62987        pkgutil_help $MISSING_DEPENDENCY ;;
62988      pkgadd)
62989        pkgadd_help  $MISSING_DEPENDENCY ;;
62990    esac
62991
62992    if test "x$PKGHANDLER_COMMAND" != x; then
62993      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62994    fi
62995  fi
62996
62997      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
62998    fi
62999  fi
63000
63001
63002
63003
63004
63005
63006# Check whether --with-libffi was given.
63007if test "${with_libffi+set}" = set; then :
63008  withval=$with_libffi;
63009fi
63010
63011
63012# Check whether --with-libffi-include was given.
63013if test "${with_libffi_include+set}" = set; then :
63014  withval=$with_libffi_include;
63015fi
63016
63017
63018# Check whether --with-libffi-lib was given.
63019if test "${with_libffi_lib+set}" = set; then :
63020  withval=$with_libffi_lib;
63021fi
63022
63023  # Check whether --enable-libffi-bundling was given.
63024if test "${enable_libffi_bundling+set}" = set; then :
63025  enableval=$enable_libffi_bundling;
63026fi
63027
63028
63029  if test "x$NEEDS_LIB_FFI" = xfalse; then
63030    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
63031        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
63032        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
63033      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
63034$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
63035    fi
63036    LIBFFI_CFLAGS=
63037    LIBFFI_LIBS=
63038  else
63039    LIBFFI_FOUND=no
63040
63041    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
63042      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
63043    fi
63044
63045    if test "x${with_libffi}" != x; then
63046      LIBFFI_LIB_PATH="${with_libffi}/lib"
63047      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
63048      LIBFFI_CFLAGS="-I${with_libffi}/include"
63049      LIBFFI_FOUND=yes
63050    fi
63051    if test "x${with_libffi_include}" != x; then
63052      LIBFFI_CFLAGS="-I${with_libffi_include}"
63053      LIBFFI_FOUND=yes
63054    fi
63055    if test "x${with_libffi_lib}" != x; then
63056      LIBFFI_LIB_PATH="${with_libffi_lib}"
63057      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
63058      LIBFFI_FOUND=yes
63059    fi
63060    # Do not try pkg-config if we have a sysroot set.
63061    if test "x$SYSROOT" = x; then
63062      if test "x$LIBFFI_FOUND" = xno; then
63063        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
63064
63065pkg_failed=no
63066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
63067$as_echo_n "checking for LIBFFI... " >&6; }
63068
63069if test -n "$LIBFFI_CFLAGS"; then
63070    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
63071 elif test -n "$PKG_CONFIG"; then
63072    if test -n "$PKG_CONFIG" && \
63073    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63074  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63075  ac_status=$?
63076  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63077  test $ac_status = 0; }; then
63078  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
63079else
63080  pkg_failed=yes
63081fi
63082 else
63083    pkg_failed=untried
63084fi
63085if test -n "$LIBFFI_LIBS"; then
63086    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
63087 elif test -n "$PKG_CONFIG"; then
63088    if test -n "$PKG_CONFIG" && \
63089    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63090  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63091  ac_status=$?
63092  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63093  test $ac_status = 0; }; then
63094  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
63095else
63096  pkg_failed=yes
63097fi
63098 else
63099    pkg_failed=untried
63100fi
63101
63102
63103
63104if test $pkg_failed = yes; then
63105
63106if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63107        _pkg_short_errors_supported=yes
63108else
63109        _pkg_short_errors_supported=no
63110fi
63111        if test $_pkg_short_errors_supported = yes; then
63112	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
63113        else
63114	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
63115        fi
63116	# Put the nasty error message in config.log where it belongs
63117	echo "$LIBFFI_PKG_ERRORS" >&5
63118
63119	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63120$as_echo "no" >&6; }
63121                LIBFFI_FOUND=no
63122elif test $pkg_failed = untried; then
63123	LIBFFI_FOUND=no
63124else
63125	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
63126	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
63127        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63128$as_echo "yes" >&6; }
63129	LIBFFI_FOUND=yes
63130fi
63131      fi
63132    fi
63133    if test "x$LIBFFI_FOUND" = xno; then
63134      for ac_header in ffi.h
63135do :
63136  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
63137if test "x$ac_cv_header_ffi_h" = xyes; then :
63138  cat >>confdefs.h <<_ACEOF
63139#define HAVE_FFI_H 1
63140_ACEOF
63141
63142            LIBFFI_FOUND=yes
63143            LIBFFI_CFLAGS=
63144            LIBFFI_LIBS=-lffi
63145
63146else
63147  LIBFFI_FOUND=no
63148
63149fi
63150
63151done
63152
63153    fi
63154    if test "x$LIBFFI_FOUND" = xno; then
63155
63156  # Print a helpful message on how to acquire the necessary build dependency.
63157  # ffi is the help tag: freetype, cups, alsa etc
63158  MISSING_DEPENDENCY=ffi
63159
63160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63161    cygwin_help $MISSING_DEPENDENCY
63162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63163    msys_help $MISSING_DEPENDENCY
63164  else
63165    PKGHANDLER_COMMAND=
63166
63167    case $PKGHANDLER in
63168      apt-get)
63169        apt_help     $MISSING_DEPENDENCY ;;
63170      yum)
63171        yum_help     $MISSING_DEPENDENCY ;;
63172      brew)
63173        brew_help    $MISSING_DEPENDENCY ;;
63174      port)
63175        port_help    $MISSING_DEPENDENCY ;;
63176      pkgutil)
63177        pkgutil_help $MISSING_DEPENDENCY ;;
63178      pkgadd)
63179        pkgadd_help  $MISSING_DEPENDENCY ;;
63180    esac
63181
63182    if test "x$PKGHANDLER_COMMAND" != x; then
63183      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63184    fi
63185  fi
63186
63187      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
63188    fi
63189
63190    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
63191$as_echo_n "checking if libffi works... " >&6; }
63192    ac_ext=c
63193ac_cpp='$CPP $CPPFLAGS'
63194ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63195ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63196ac_compiler_gnu=$ac_cv_c_compiler_gnu
63197
63198    OLD_CFLAGS="$CFLAGS"
63199    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
63200    OLD_LIBS="$LIBS"
63201    LIBS="$LIBS $LIBFFI_LIBS"
63202    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63203/* end confdefs.h.  */
63204#include <ffi.h>
63205int
63206main ()
63207{
63208
63209          ffi_call(NULL, NULL, NULL, NULL);
63210          return 0;
63211
63212  ;
63213  return 0;
63214}
63215_ACEOF
63216if ac_fn_c_try_link "$LINENO"; then :
63217  LIBFFI_WORKS=yes
63218else
63219  LIBFFI_WORKS=no
63220
63221fi
63222rm -f core conftest.err conftest.$ac_objext \
63223    conftest$ac_exeext conftest.$ac_ext
63224    CFLAGS="$OLD_CFLAGS"
63225    LIBS="$OLD_LIBS"
63226    ac_ext=cpp
63227ac_cpp='$CXXCPP $CPPFLAGS'
63228ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63229ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63230ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63231
63232    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
63233$as_echo "$LIBFFI_WORKS" >&6; }
63234
63235    if test "x$LIBFFI_WORKS" = xno; then
63236
63237  # Print a helpful message on how to acquire the necessary build dependency.
63238  # ffi is the help tag: freetype, cups, alsa etc
63239  MISSING_DEPENDENCY=ffi
63240
63241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63242    cygwin_help $MISSING_DEPENDENCY
63243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63244    msys_help $MISSING_DEPENDENCY
63245  else
63246    PKGHANDLER_COMMAND=
63247
63248    case $PKGHANDLER in
63249      apt-get)
63250        apt_help     $MISSING_DEPENDENCY ;;
63251      yum)
63252        yum_help     $MISSING_DEPENDENCY ;;
63253      brew)
63254        brew_help    $MISSING_DEPENDENCY ;;
63255      port)
63256        port_help    $MISSING_DEPENDENCY ;;
63257      pkgutil)
63258        pkgutil_help $MISSING_DEPENDENCY ;;
63259      pkgadd)
63260        pkgadd_help  $MISSING_DEPENDENCY ;;
63261    esac
63262
63263    if test "x$PKGHANDLER_COMMAND" != x; then
63264      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63265    fi
63266  fi
63267
63268      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
63269    fi
63270
63271    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi should be bundled" >&5
63272$as_echo_n "checking if libffi should be bundled... " >&6; }
63273    if test "x$enable_libffi_bundling" = "x"; then
63274      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63275$as_echo "no" >&6; }
63276      ENABLE_LIBFFI_BUNDLING=false
63277    elif  test "x$enable_libffi_bundling" = "xno"; then
63278      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63279$as_echo "no, forced" >&6; }
63280      ENABLE_LIBFFI_BUNDLING=false
63281    elif  test "x$enable_libffi_bundling" = "xyes"; then
63282      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63283$as_echo "yes, forced" >&6; }
63284      ENABLE_LIBFFI_BUNDLING=true
63285    else
63286      as_fn_error $? "Invalid value for --enable-libffi-bundling" "$LINENO" 5
63287    fi
63288
63289    # Find the libffi.so.X to bundle
63290    if test "x${ENABLE_LIBFFI_BUNDLING}" = "xtrue"; then
63291      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libffi lib file location" >&5
63292$as_echo_n "checking for libffi lib file location... " >&6; }
63293      if test "x${LIBFFI_LIB_PATH}" != x; then
63294        if test -e ${LIBFFI_LIB_PATH}/libffi.so.?; then
63295          LIBFFI_LIB_FILE="${LIBFFI_LIB_PATH}/libffi.so.?"
63296        else
63297          as_fn_error $? "Could not locate libffi.so.? for bundling in ${LIBFFI_LIB_PATH}" "$LINENO" 5
63298        fi
63299      else
63300        # If we don't have an explicit path, look in a few obvious places
63301        if test "x${OPENJDK_TARGET_CPU}" = "xx86"; then
63302          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
63303            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
63304          elif test -e ${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.? ; then
63305            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.?"
63306          else
63307            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63308          fi
63309        elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64"; then
63310          if test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
63311            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
63312          elif test -e ${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.? ; then
63313            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.?"
63314          else
63315            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63316          fi
63317        else
63318          # Fallback on the default /usr/lib dir
63319          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
63320            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
63321          else
63322            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63323          fi
63324        fi
63325      fi
63326      # Make sure the wildcard is evaluated
63327      LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
63328      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBFFI_LIB_FILE}" >&5
63329$as_echo "${LIBFFI_LIB_FILE}" >&6; }
63330    fi
63331  fi
63332
63333
63334
63335
63336
63337
63338
63339  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
63340    # Extract the first word of "llvm-config", so it can be a program name with args.
63341set dummy llvm-config; ac_word=$2
63342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63343$as_echo_n "checking for $ac_word... " >&6; }
63344if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
63345  $as_echo_n "(cached) " >&6
63346else
63347  if test -n "$LLVM_CONFIG"; then
63348  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
63349else
63350as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63351for as_dir in $PATH
63352do
63353  IFS=$as_save_IFS
63354  test -z "$as_dir" && as_dir=.
63355    for ac_exec_ext in '' $ac_executable_extensions; do
63356  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63357    ac_cv_prog_LLVM_CONFIG="llvm-config"
63358    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63359    break 2
63360  fi
63361done
63362  done
63363IFS=$as_save_IFS
63364
63365fi
63366fi
63367LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
63368if test -n "$LLVM_CONFIG"; then
63369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
63370$as_echo "$LLVM_CONFIG" >&6; }
63371else
63372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63373$as_echo "no" >&6; }
63374fi
63375
63376
63377
63378    if test "x$LLVM_CONFIG" != xllvm-config; then
63379      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
63380    fi
63381
63382    llvm_components="jit mcjit engine nativecodegen native"
63383    unset LLVM_CFLAGS
63384    for flag in $("$LLVM_CONFIG" --cxxflags); do
63385      if echo "${flag}" | grep -q '^-[ID]'; then
63386        if test "${flag}" != "-D_DEBUG" ; then
63387          if test "${LLVM_CFLAGS}" != "" ; then
63388            LLVM_CFLAGS="${LLVM_CFLAGS} "
63389          fi
63390          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63391        fi
63392      fi
63393    done
63394    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
63395    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63396
63397    unset LLVM_LDFLAGS
63398    for flag in $("${LLVM_CONFIG}" --ldflags); do
63399      if echo "${flag}" | grep -q '^-L'; then
63400        if test "${LLVM_LDFLAGS}" != ""; then
63401          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63402        fi
63403        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63404      fi
63405    done
63406
63407    unset LLVM_LIBS
63408    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63409      if echo "${flag}" | grep -q '^-l'; then
63410        if test "${LLVM_LIBS}" != ""; then
63411          LLVM_LIBS="${LLVM_LIBS} "
63412        fi
63413        LLVM_LIBS="${LLVM_LIBS}${flag}"
63414      fi
63415    done
63416
63417    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63418    # always properly detect -ltinfo
63419    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63420
63421
63422
63423
63424  fi
63425
63426
63427
63428# Check whether --with-libjpeg was given.
63429if test "${with_libjpeg+set}" = set; then :
63430  withval=$with_libjpeg;
63431fi
63432
63433
63434  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63435$as_echo_n "checking for which libjpeg to use... " >&6; }
63436  # default is bundled
63437  DEFAULT_LIBJPEG=bundled
63438  # if user didn't specify, use DEFAULT_LIBJPEG
63439  if test "x${with_libjpeg}" = "x"; then
63440    with_libjpeg=${DEFAULT_LIBJPEG}
63441  fi
63442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63443$as_echo "${with_libjpeg}" >&6; }
63444
63445  if test "x${with_libjpeg}" = "xbundled"; then
63446    USE_EXTERNAL_LIBJPEG=false
63447  elif test "x${with_libjpeg}" = "xsystem"; then
63448    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63449if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63450
63451else
63452   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63453fi
63454
63455
63456    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63457$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63458if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63459  $as_echo_n "(cached) " >&6
63460else
63461  ac_check_lib_save_LIBS=$LIBS
63462LIBS="-ljpeg  $LIBS"
63463cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63464/* end confdefs.h.  */
63465
63466/* Override any GCC internal prototype to avoid an error.
63467   Use char because int might match the return type of a GCC
63468   builtin and then its argument prototype would still apply.  */
63469#ifdef __cplusplus
63470extern "C"
63471#endif
63472char jpeg_CreateDecompress ();
63473int
63474main ()
63475{
63476return jpeg_CreateDecompress ();
63477  ;
63478  return 0;
63479}
63480_ACEOF
63481if ac_fn_cxx_try_link "$LINENO"; then :
63482  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63483else
63484  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63485fi
63486rm -f core conftest.err conftest.$ac_objext \
63487    conftest$ac_exeext conftest.$ac_ext
63488LIBS=$ac_check_lib_save_LIBS
63489fi
63490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63491$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63492if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63493  cat >>confdefs.h <<_ACEOF
63494#define HAVE_LIBJPEG 1
63495_ACEOF
63496
63497  LIBS="-ljpeg $LIBS"
63498
63499else
63500   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63501fi
63502
63503
63504    USE_EXTERNAL_LIBJPEG=true
63505  else
63506    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63507  fi
63508
63509
63510
63511
63512
63513# Check whether --with-giflib was given.
63514if test "${with_giflib+set}" = set; then :
63515  withval=$with_giflib;
63516fi
63517
63518
63519  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63520$as_echo_n "checking for which giflib to use... " >&6; }
63521  # default is bundled
63522  DEFAULT_GIFLIB=bundled
63523  # if user didn't specify, use DEFAULT_GIFLIB
63524  if test "x${with_giflib}" = "x"; then
63525    with_giflib=${DEFAULT_GIFLIB}
63526  fi
63527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63528$as_echo "${with_giflib}" >&6; }
63529
63530  if test "x${with_giflib}" = "xbundled"; then
63531    USE_EXTERNAL_LIBGIF=false
63532  elif test "x${with_giflib}" = "xsystem"; then
63533    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63534if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63535
63536else
63537   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63538fi
63539
63540
63541    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63542$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63543if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63544  $as_echo_n "(cached) " >&6
63545else
63546  ac_check_lib_save_LIBS=$LIBS
63547LIBS="-lgif  $LIBS"
63548cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63549/* end confdefs.h.  */
63550
63551/* Override any GCC internal prototype to avoid an error.
63552   Use char because int might match the return type of a GCC
63553   builtin and then its argument prototype would still apply.  */
63554#ifdef __cplusplus
63555extern "C"
63556#endif
63557char DGifGetCode ();
63558int
63559main ()
63560{
63561return DGifGetCode ();
63562  ;
63563  return 0;
63564}
63565_ACEOF
63566if ac_fn_cxx_try_link "$LINENO"; then :
63567  ac_cv_lib_gif_DGifGetCode=yes
63568else
63569  ac_cv_lib_gif_DGifGetCode=no
63570fi
63571rm -f core conftest.err conftest.$ac_objext \
63572    conftest$ac_exeext conftest.$ac_ext
63573LIBS=$ac_check_lib_save_LIBS
63574fi
63575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63576$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63577if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63578  cat >>confdefs.h <<_ACEOF
63579#define HAVE_LIBGIF 1
63580_ACEOF
63581
63582  LIBS="-lgif $LIBS"
63583
63584else
63585   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63586fi
63587
63588
63589    USE_EXTERNAL_LIBGIF=true
63590  else
63591    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63592  fi
63593
63594
63595
63596
63597
63598# Check whether --with-libpng was given.
63599if test "${with_libpng+set}" = set; then :
63600  withval=$with_libpng;
63601fi
63602
63603
63604  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63605$as_echo_n "checking for which libpng to use... " >&6; }
63606
63607  # default is bundled
63608  DEFAULT_LIBPNG=bundled
63609  # if user didn't specify, use DEFAULT_LIBPNG
63610  if test "x${with_libpng}" = "x"; then
63611    with_libpng=${DEFAULT_LIBPNG}
63612  fi
63613
63614  if test "x${with_libpng}" = "xbundled"; then
63615    USE_EXTERNAL_LIBPNG=false
63616    PNG_CFLAGS=""
63617    PNG_LIBS=""
63618    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63619$as_echo "bundled" >&6; }
63620  elif test "x${with_libpng}" = "xsystem"; then
63621
63622pkg_failed=no
63623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63624$as_echo_n "checking for PNG... " >&6; }
63625
63626if test -n "$PNG_CFLAGS"; then
63627    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63628 elif test -n "$PKG_CONFIG"; then
63629    if test -n "$PKG_CONFIG" && \
63630    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63631  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63632  ac_status=$?
63633  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63634  test $ac_status = 0; }; then
63635  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63636else
63637  pkg_failed=yes
63638fi
63639 else
63640    pkg_failed=untried
63641fi
63642if test -n "$PNG_LIBS"; then
63643    pkg_cv_PNG_LIBS="$PNG_LIBS"
63644 elif test -n "$PKG_CONFIG"; then
63645    if test -n "$PKG_CONFIG" && \
63646    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63647  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63648  ac_status=$?
63649  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63650  test $ac_status = 0; }; then
63651  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63652else
63653  pkg_failed=yes
63654fi
63655 else
63656    pkg_failed=untried
63657fi
63658
63659
63660
63661if test $pkg_failed = yes; then
63662
63663if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63664        _pkg_short_errors_supported=yes
63665else
63666        _pkg_short_errors_supported=no
63667fi
63668        if test $_pkg_short_errors_supported = yes; then
63669	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63670        else
63671	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63672        fi
63673	# Put the nasty error message in config.log where it belongs
63674	echo "$PNG_PKG_ERRORS" >&5
63675
63676	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63677$as_echo "no" >&6; }
63678                LIBPNG_FOUND=no
63679elif test $pkg_failed = untried; then
63680	LIBPNG_FOUND=no
63681else
63682	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63683	PNG_LIBS=$pkg_cv_PNG_LIBS
63684        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63685$as_echo "yes" >&6; }
63686	LIBPNG_FOUND=yes
63687fi
63688    if test "x${LIBPNG_FOUND}" = "xyes"; then
63689      # PKG_CHECK_MODULES will set PNG_CFLAGS and PNG_LIBS
63690      USE_EXTERNAL_LIBPNG=true
63691      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63692$as_echo "system" >&6; }
63693    else
63694      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63695$as_echo "system not found" >&6; }
63696      as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63697    fi
63698  else
63699    as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63700  fi
63701
63702
63703
63704
63705
63706
63707
63708# Check whether --with-zlib was given.
63709if test "${with_zlib+set}" = set; then :
63710  withval=$with_zlib;
63711fi
63712
63713
63714  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63715$as_echo_n "checking for compress in -lz... " >&6; }
63716if ${ac_cv_lib_z_compress+:} false; then :
63717  $as_echo_n "(cached) " >&6
63718else
63719  ac_check_lib_save_LIBS=$LIBS
63720LIBS="-lz  $LIBS"
63721cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63722/* end confdefs.h.  */
63723
63724/* Override any GCC internal prototype to avoid an error.
63725   Use char because int might match the return type of a GCC
63726   builtin and then its argument prototype would still apply.  */
63727#ifdef __cplusplus
63728extern "C"
63729#endif
63730char compress ();
63731int
63732main ()
63733{
63734return compress ();
63735  ;
63736  return 0;
63737}
63738_ACEOF
63739if ac_fn_cxx_try_link "$LINENO"; then :
63740  ac_cv_lib_z_compress=yes
63741else
63742  ac_cv_lib_z_compress=no
63743fi
63744rm -f core conftest.err conftest.$ac_objext \
63745    conftest$ac_exeext conftest.$ac_ext
63746LIBS=$ac_check_lib_save_LIBS
63747fi
63748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63749$as_echo "$ac_cv_lib_z_compress" >&6; }
63750if test "x$ac_cv_lib_z_compress" = xyes; then :
63751   ZLIB_FOUND=yes
63752else
63753   ZLIB_FOUND=no
63754fi
63755
63756
63757  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63758$as_echo_n "checking for which zlib to use... " >&6; }
63759
63760  DEFAULT_ZLIB=system
63761  if test "x$OPENJDK_TARGET_OS" = xwindows; then
63762    # On windows default is bundled...on others default is system
63763    DEFAULT_ZLIB=bundled
63764  fi
63765
63766  if test "x${ZLIB_FOUND}" != "xyes"; then
63767    # If we don't find any system...set default to bundled
63768    DEFAULT_ZLIB=bundled
63769  fi
63770
63771  # If user didn't specify, use DEFAULT_ZLIB
63772  if test "x${with_zlib}" = "x"; then
63773    with_zlib=${DEFAULT_ZLIB}
63774  fi
63775
63776  if test "x${with_zlib}" = "xbundled"; then
63777    USE_EXTERNAL_LIBZ=false
63778    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63779$as_echo "bundled" >&6; }
63780  elif test "x${with_zlib}" = "xsystem"; then
63781    if test "x${ZLIB_FOUND}" = "xyes"; then
63782      USE_EXTERNAL_LIBZ=true
63783      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63784$as_echo "system" >&6; }
63785    else
63786      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63787$as_echo "system not found" >&6; }
63788      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
63789    fi
63790  else
63791    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
63792  fi
63793
63794
63795
63796
63797
63798# Check whether --with-lcms was given.
63799if test "${with_lcms+set}" = set; then :
63800  withval=$with_lcms;
63801fi
63802
63803
63804  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
63805$as_echo_n "checking for which lcms to use... " >&6; }
63806
63807  DEFAULT_LCMS=bundled
63808  # If user didn't specify, use DEFAULT_LCMS
63809  if test "x${with_lcms}" = "x"; then
63810    with_lcms=${DEFAULT_LCMS}
63811  fi
63812
63813  if test "x${with_lcms}" = "xbundled"; then
63814    USE_EXTERNAL_LCMS=false
63815    LCMS_CFLAGS=""
63816    LCMS_LIBS=""
63817    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63818$as_echo "bundled" >&6; }
63819  elif test "x${with_lcms}" = "xsystem"; then
63820    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63821$as_echo "system" >&6; }
63822
63823pkg_failed=no
63824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
63825$as_echo_n "checking for LCMS... " >&6; }
63826
63827if test -n "$LCMS_CFLAGS"; then
63828    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
63829 elif test -n "$PKG_CONFIG"; then
63830    if test -n "$PKG_CONFIG" && \
63831    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63832  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63833  ac_status=$?
63834  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63835  test $ac_status = 0; }; then
63836  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
63837else
63838  pkg_failed=yes
63839fi
63840 else
63841    pkg_failed=untried
63842fi
63843if test -n "$LCMS_LIBS"; then
63844    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
63845 elif test -n "$PKG_CONFIG"; then
63846    if test -n "$PKG_CONFIG" && \
63847    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63848  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63849  ac_status=$?
63850  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63851  test $ac_status = 0; }; then
63852  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
63853else
63854  pkg_failed=yes
63855fi
63856 else
63857    pkg_failed=untried
63858fi
63859
63860
63861
63862if test $pkg_failed = yes; then
63863
63864if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63865        _pkg_short_errors_supported=yes
63866else
63867        _pkg_short_errors_supported=no
63868fi
63869        if test $_pkg_short_errors_supported = yes; then
63870	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
63871        else
63872	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
63873        fi
63874	# Put the nasty error message in config.log where it belongs
63875	echo "$LCMS_PKG_ERRORS" >&5
63876
63877	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63878$as_echo "no" >&6; }
63879                LCMS_FOUND=no
63880elif test $pkg_failed = untried; then
63881	LCMS_FOUND=no
63882else
63883	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
63884	LCMS_LIBS=$pkg_cv_LCMS_LIBS
63885        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63886$as_echo "yes" >&6; }
63887	LCMS_FOUND=yes
63888fi
63889    if test "x${LCMS_FOUND}" = "xyes"; then
63890      # PKG_CHECK_MODULES will set LCMS_CFLAGS and LCMS_LIBS
63891      USE_EXTERNAL_LCMS=true
63892    else
63893      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
63894    fi
63895  else
63896    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
63897  fi
63898
63899
63900
63901
63902
63903
63904
63905
63906
63907
63908
63909
63910
63911  # Setup libm (the maths library)
63912  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
63913    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
63914$as_echo_n "checking for cos in -lm... " >&6; }
63915if ${ac_cv_lib_m_cos+:} false; then :
63916  $as_echo_n "(cached) " >&6
63917else
63918  ac_check_lib_save_LIBS=$LIBS
63919LIBS="-lm  $LIBS"
63920cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63921/* end confdefs.h.  */
63922
63923/* Override any GCC internal prototype to avoid an error.
63924   Use char because int might match the return type of a GCC
63925   builtin and then its argument prototype would still apply.  */
63926#ifdef __cplusplus
63927extern "C"
63928#endif
63929char cos ();
63930int
63931main ()
63932{
63933return cos ();
63934  ;
63935  return 0;
63936}
63937_ACEOF
63938if ac_fn_cxx_try_link "$LINENO"; then :
63939  ac_cv_lib_m_cos=yes
63940else
63941  ac_cv_lib_m_cos=no
63942fi
63943rm -f core conftest.err conftest.$ac_objext \
63944    conftest$ac_exeext conftest.$ac_ext
63945LIBS=$ac_check_lib_save_LIBS
63946fi
63947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
63948$as_echo "$ac_cv_lib_m_cos" >&6; }
63949if test "x$ac_cv_lib_m_cos" = xyes; then :
63950  cat >>confdefs.h <<_ACEOF
63951#define HAVE_LIBM 1
63952_ACEOF
63953
63954  LIBS="-lm $LIBS"
63955
63956else
63957
63958        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
63959$as_echo "$as_me: Maths library was not found" >&6;}
63960
63961fi
63962
63963    LIBM="-lm"
63964  else
63965    LIBM=""
63966  fi
63967
63968
63969  # Setup libdl (for dynamic library loading)
63970  save_LIBS="$LIBS"
63971  LIBS=""
63972  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
63973$as_echo_n "checking for dlopen in -ldl... " >&6; }
63974if ${ac_cv_lib_dl_dlopen+:} false; then :
63975  $as_echo_n "(cached) " >&6
63976else
63977  ac_check_lib_save_LIBS=$LIBS
63978LIBS="-ldl  $LIBS"
63979cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63980/* end confdefs.h.  */
63981
63982/* Override any GCC internal prototype to avoid an error.
63983   Use char because int might match the return type of a GCC
63984   builtin and then its argument prototype would still apply.  */
63985#ifdef __cplusplus
63986extern "C"
63987#endif
63988char dlopen ();
63989int
63990main ()
63991{
63992return dlopen ();
63993  ;
63994  return 0;
63995}
63996_ACEOF
63997if ac_fn_cxx_try_link "$LINENO"; then :
63998  ac_cv_lib_dl_dlopen=yes
63999else
64000  ac_cv_lib_dl_dlopen=no
64001fi
64002rm -f core conftest.err conftest.$ac_objext \
64003    conftest$ac_exeext conftest.$ac_ext
64004LIBS=$ac_check_lib_save_LIBS
64005fi
64006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
64007$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
64008if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
64009  cat >>confdefs.h <<_ACEOF
64010#define HAVE_LIBDL 1
64011_ACEOF
64012
64013  LIBS="-ldl $LIBS"
64014
64015fi
64016
64017  LIBDL="$LIBS"
64018
64019  LIBS="$save_LIBS"
64020
64021  # Deprecated libraries, keep the flags for backwards compatibility
64022  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
64023
64024
64025# Check whether --with-dxsdk was given.
64026if test "${with_dxsdk+set}" = set; then :
64027  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
64028$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
64029fi
64030
64031
64032
64033
64034# Check whether --with-dxsdk-lib was given.
64035if test "${with_dxsdk_lib+set}" = set; then :
64036  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
64037$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
64038fi
64039
64040
64041
64042
64043# Check whether --with-dxsdk-include was given.
64044if test "${with_dxsdk_include+set}" = set; then :
64045  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
64046$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
64047fi
64048
64049
64050  fi
64051
64052  # Control if libzip can use mmap. Available for purposes of overriding.
64053  LIBZIP_CAN_USE_MMAP=true
64054
64055
64056
64057  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
64058    # Find the root of the Solaris Studio installation from the compiler path
64059    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
64060    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
64061    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
64062$as_echo_n "checking for libstlport.so.1... " >&6; }
64063    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
64064      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
64065      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
64066    fi
64067    if test -f "$STLPORT_LIB"; then
64068      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
64069$as_echo "yes, $STLPORT_LIB" >&6; }
64070
64071  # Only process if variable expands to non-empty
64072
64073  if test "x$STLPORT_LIB" != x; then
64074    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64075
64076  # Input might be given as Windows format, start by converting to
64077  # unix format.
64078  path="$STLPORT_LIB"
64079  new_path=`$CYGPATH -u "$path"`
64080
64081  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64082  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64083  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64084  # "foo.exe" is OK but "foo" is an error.
64085  #
64086  # This test is therefore slightly more accurate than "test -f" to check for file precense.
64087  # It is also a way to make sure we got the proper file name for the real test later on.
64088  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64089  if test "x$test_shortpath" = x; then
64090    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64091$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64092    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
64093  fi
64094
64095  # Call helper function which possibly converts this using DOS-style short mode.
64096  # If so, the updated path is stored in $new_path.
64097
64098  input_path="$new_path"
64099  # Check if we need to convert this using DOS-style short mode. If the path
64100  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64101  # take no chances and rewrite it.
64102  # Note: m4 eats our [], so we need to use [ and ] instead.
64103  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64104  if test "x$has_forbidden_chars" != x; then
64105    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64106    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64107    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64108    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64109      # Going to short mode and back again did indeed matter. Since short mode is
64110      # case insensitive, let's make it lowercase to improve readability.
64111      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64112      # Now convert it back to Unix-style (cygpath)
64113      input_path=`$CYGPATH -u "$shortmode_path"`
64114      new_path="$input_path"
64115    fi
64116  fi
64117
64118  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64119  if test "x$test_cygdrive_prefix" = x; then
64120    # As a simple fix, exclude /usr/bin since it's not a real path.
64121    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64122      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64123      # a path prefixed by /cygdrive for fixpath to work.
64124      new_path="$CYGWIN_ROOT_PATH$input_path"
64125    fi
64126  fi
64127
64128
64129  if test "x$path" != "x$new_path"; then
64130    STLPORT_LIB="$new_path"
64131    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64132$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64133  fi
64134
64135    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64136
64137  path="$STLPORT_LIB"
64138  has_colon=`$ECHO $path | $GREP ^.:`
64139  new_path="$path"
64140  if test "x$has_colon" = x; then
64141    # Not in mixed or Windows style, start by that.
64142    new_path=`cmd //c echo $path`
64143  fi
64144
64145
64146  input_path="$new_path"
64147  # Check if we need to convert this using DOS-style short mode. If the path
64148  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64149  # take no chances and rewrite it.
64150  # Note: m4 eats our [], so we need to use [ and ] instead.
64151  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64152  if test "x$has_forbidden_chars" != x; then
64153    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64154    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64155  fi
64156
64157
64158  windows_path="$new_path"
64159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64160    unix_path=`$CYGPATH -u "$windows_path"`
64161    new_path="$unix_path"
64162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64164    new_path="$unix_path"
64165  fi
64166
64167  if test "x$path" != "x$new_path"; then
64168    STLPORT_LIB="$new_path"
64169    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64170$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64171  fi
64172
64173  # Save the first 10 bytes of this path to the storage, so fixpath can work.
64174  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64175
64176    else
64177      # We're on a unix platform. Hooray! :)
64178      path="$STLPORT_LIB"
64179      has_space=`$ECHO "$path" | $GREP " "`
64180      if test "x$has_space" != x; then
64181        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64182$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64183        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64184      fi
64185
64186      # Use eval to expand a potential ~
64187      eval path="$path"
64188      if test ! -f "$path" && test ! -d "$path"; then
64189        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
64190      fi
64191
64192      if test -d "$path"; then
64193        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
64194      else
64195        dir="`$DIRNAME "$path"`"
64196        base="`$BASENAME "$path"`"
64197        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
64198      fi
64199    fi
64200  fi
64201
64202    else
64203      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
64204$as_echo "no, not found at $STLPORT_LIB" >&6; }
64205      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
64206    fi
64207
64208  fi
64209
64210
64211
64212# Check whether --with-libelf was given.
64213if test "${with_libelf+set}" = set; then :
64214  withval=$with_libelf;
64215fi
64216
64217
64218# Check whether --with-libelf-include was given.
64219if test "${with_libelf_include+set}" = set; then :
64220  withval=$with_libelf_include;
64221fi
64222
64223
64224# Check whether --with-libelf-lib was given.
64225if test "${with_libelf_lib+set}" = set; then :
64226  withval=$with_libelf_lib;
64227fi
64228
64229
64230  if test "x$ENABLE_AOT" = xfalse; then
64231    if (test "x${with_libelf}" != x && test "x${with_libelf}" != xno) || \
64232        (test "x${with_libelf_include}" != x && test "x${with_libelf_include}" != xno) || \
64233        (test "x${with_libelf_lib}" != x && test "x${with_libelf_lib}" != xno); then
64234      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libelf is not used, so --with-libelf[-*] is ignored" >&5
64235$as_echo "$as_me: WARNING: libelf is not used, so --with-libelf[-*] is ignored" >&2;}
64236    fi
64237    LIBELF_CFLAGS=
64238    LIBELF_LIBS=
64239  else
64240    LIBELF_FOUND=no
64241
64242    if test "x${with_libelf}" = xno || test "x${with_libelf_include}" = xno || test "x${with_libelf_lib}" = xno; then
64243      ENABLE_AOT="false"
64244      if test "x${enable_aot}" = xyes; then
64245        as_fn_error $? "libelf is explicitly disabled, cannot build AOT. Enable libelf or remove --enable-aot to disable AOT." "$LINENO" 5
64246      fi
64247    else
64248      if test "x${with_libelf}" != x; then
64249        ELF_LIBS="-L${with_libelf}/lib -lelf"
64250        ELF_CFLAGS="-I${with_libelf}/include"
64251        LIBELF_FOUND=yes
64252      fi
64253      if test "x${with_libelf_include}" != x; then
64254        ELF_CFLAGS="-I${with_libelf_include}"
64255        LIBELF_FOUND=yes
64256      fi
64257      if test "x${with_libelf_lib}" != x; then
64258        ELF_LIBS="-L${with_libelf_lib} -lelf"
64259        LIBELF_FOUND=yes
64260      fi
64261      # Do not try pkg-config if we have a sysroot set.
64262      if test "x$SYSROOT" = x; then
64263        if test "x$LIBELF_FOUND" = xno; then
64264          # Figure out ELF_CFLAGS and ELF_LIBS
64265
64266pkg_failed=no
64267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF" >&5
64268$as_echo_n "checking for ELF... " >&6; }
64269
64270if test -n "$ELF_CFLAGS"; then
64271    pkg_cv_ELF_CFLAGS="$ELF_CFLAGS"
64272 elif test -n "$PKG_CONFIG"; then
64273    if test -n "$PKG_CONFIG" && \
64274    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
64275  ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
64276  ac_status=$?
64277  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64278  test $ac_status = 0; }; then
64279  pkg_cv_ELF_CFLAGS=`$PKG_CONFIG --cflags "libelf" 2>/dev/null`
64280else
64281  pkg_failed=yes
64282fi
64283 else
64284    pkg_failed=untried
64285fi
64286if test -n "$ELF_LIBS"; then
64287    pkg_cv_ELF_LIBS="$ELF_LIBS"
64288 elif test -n "$PKG_CONFIG"; then
64289    if test -n "$PKG_CONFIG" && \
64290    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
64291  ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
64292  ac_status=$?
64293  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64294  test $ac_status = 0; }; then
64295  pkg_cv_ELF_LIBS=`$PKG_CONFIG --libs "libelf" 2>/dev/null`
64296else
64297  pkg_failed=yes
64298fi
64299 else
64300    pkg_failed=untried
64301fi
64302
64303
64304
64305if test $pkg_failed = yes; then
64306
64307if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64308        _pkg_short_errors_supported=yes
64309else
64310        _pkg_short_errors_supported=no
64311fi
64312        if test $_pkg_short_errors_supported = yes; then
64313	        ELF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libelf" 2>&1`
64314        else
64315	        ELF_PKG_ERRORS=`$PKG_CONFIG --print-errors "libelf" 2>&1`
64316        fi
64317	# Put the nasty error message in config.log where it belongs
64318	echo "$ELF_PKG_ERRORS" >&5
64319
64320	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64321$as_echo "no" >&6; }
64322                LIBELF_FOUND=no
64323elif test $pkg_failed = untried; then
64324	LIBELF_FOUND=no
64325else
64326	ELF_CFLAGS=$pkg_cv_ELF_CFLAGS
64327	ELF_LIBS=$pkg_cv_ELF_LIBS
64328        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64329$as_echo "yes" >&6; }
64330	LIBELF_FOUND=yes
64331fi
64332        fi
64333      fi
64334      if test "x$LIBELF_FOUND" = xno; then
64335        for ac_header in libelf.h
64336do :
64337  ac_fn_cxx_check_header_mongrel "$LINENO" "libelf.h" "ac_cv_header_libelf_h" "$ac_includes_default"
64338if test "x$ac_cv_header_libelf_h" = xyes; then :
64339  cat >>confdefs.h <<_ACEOF
64340#define HAVE_LIBELF_H 1
64341_ACEOF
64342
64343              LIBELF_FOUND=yes
64344              ELF_CFLAGS=
64345              ELF_LIBS=-lelf
64346
64347else
64348  LIBELF_FOUND=no
64349
64350fi
64351
64352done
64353
64354      fi
64355      if test "x$LIBELF_FOUND" = xno; then
64356        ENABLE_AOT="false"
64357
64358  # Print a helpful message on how to acquire the necessary build dependency.
64359  # elf is the help tag: freetype, cups, alsa etc
64360  MISSING_DEPENDENCY=elf
64361
64362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64363    cygwin_help $MISSING_DEPENDENCY
64364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64365    msys_help $MISSING_DEPENDENCY
64366  else
64367    PKGHANDLER_COMMAND=
64368
64369    case $PKGHANDLER in
64370      apt-get)
64371        apt_help     $MISSING_DEPENDENCY ;;
64372      yum)
64373        yum_help     $MISSING_DEPENDENCY ;;
64374      brew)
64375        brew_help    $MISSING_DEPENDENCY ;;
64376      port)
64377        port_help    $MISSING_DEPENDENCY ;;
64378      pkgutil)
64379        pkgutil_help $MISSING_DEPENDENCY ;;
64380      pkgadd)
64381        pkgadd_help  $MISSING_DEPENDENCY ;;
64382    esac
64383
64384    if test "x$PKGHANDLER_COMMAND" != x; then
64385      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64386    fi
64387  fi
64388
64389        if test "x${enable_aot}" = xyes; then
64390          as_fn_error $? "libelf not found, cannot build AOT. Remove --enable-aot to disable AOT or: $HELP_MSG" "$LINENO" 5
64391        else
64392          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libelf not found, cannot build AOT. $HELP_MSG" >&5
64393$as_echo "$as_me: WARNING: libelf not found, cannot build AOT. $HELP_MSG" >&2;}
64394        fi
64395      else
64396        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libelf works" >&5
64397$as_echo_n "checking if libelf works... " >&6; }
64398        ac_ext=c
64399ac_cpp='$CPP $CPPFLAGS'
64400ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64401ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64402ac_compiler_gnu=$ac_cv_c_compiler_gnu
64403
64404        OLD_CFLAGS="$CFLAGS"
64405        CFLAGS="$CFLAGS $ELF_CFLAGS"
64406        OLD_LIBS="$LIBS"
64407        LIBS="$LIBS $ELF_LIBS"
64408        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64409/* end confdefs.h.  */
64410#include <libelf.h>
64411int
64412main ()
64413{
64414
64415              elf_version(0);
64416              return 0;
64417
64418  ;
64419  return 0;
64420}
64421_ACEOF
64422if ac_fn_c_try_link "$LINENO"; then :
64423  LIBELF_WORKS=yes
64424else
64425  LIBELF_WORKS=no
64426
64427fi
64428rm -f core conftest.err conftest.$ac_objext \
64429    conftest$ac_exeext conftest.$ac_ext
64430        CFLAGS="$OLD_CFLAGS"
64431        LIBS="$OLD_LIBS"
64432        ac_ext=cpp
64433ac_cpp='$CXXCPP $CPPFLAGS'
64434ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64435ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64436ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
64437
64438        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBELF_WORKS" >&5
64439$as_echo "$LIBELF_WORKS" >&6; }
64440
64441        if test "x$LIBELF_WORKS" = xno; then
64442          ENABLE_AOT="false"
64443
64444  # Print a helpful message on how to acquire the necessary build dependency.
64445  # elf is the help tag: freetype, cups, alsa etc
64446  MISSING_DEPENDENCY=elf
64447
64448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64449    cygwin_help $MISSING_DEPENDENCY
64450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64451    msys_help $MISSING_DEPENDENCY
64452  else
64453    PKGHANDLER_COMMAND=
64454
64455    case $PKGHANDLER in
64456      apt-get)
64457        apt_help     $MISSING_DEPENDENCY ;;
64458      yum)
64459        yum_help     $MISSING_DEPENDENCY ;;
64460      brew)
64461        brew_help    $MISSING_DEPENDENCY ;;
64462      port)
64463        port_help    $MISSING_DEPENDENCY ;;
64464      pkgutil)
64465        pkgutil_help $MISSING_DEPENDENCY ;;
64466      pkgadd)
64467        pkgadd_help  $MISSING_DEPENDENCY ;;
64468    esac
64469
64470    if test "x$PKGHANDLER_COMMAND" != x; then
64471      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64472    fi
64473  fi
64474
64475          if test "x$enable_aot" = "xyes"; then
64476            as_fn_error $? "Found libelf but could not link and compile with it. Remove --enable-aot to disable AOT or: $HELP_MSG" "$LINENO" 5
64477          else
64478            { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found libelf but could not link and compile with it. $HELP_MSG" >&5
64479$as_echo "$as_me: WARNING: Found libelf but could not link and compile with it. $HELP_MSG" >&2;}
64480          fi
64481        fi
64482      fi
64483    fi
64484  fi
64485
64486
64487
64488
64489
64490
64491
64492
64493
64494
64495
64496
64497
64498
64499
64500
64501
64502
64503# Hotspot setup depends on lib checks (AOT needs libelf).
64504
64505
64506  # The user can in some cases supply additional jvm features. For the custom
64507  # variant, this defines the entire variant.
64508
64509# Check whether --with-jvm-features was given.
64510if test "${with_jvm_features+set}" = set; then :
64511  withval=$with_jvm_features;
64512fi
64513
64514  if test "x$with_jvm_features" != x; then
64515    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
64516$as_echo_n "checking additional JVM features... " >&6; }
64517    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
64518    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
64519$as_echo "$JVM_FEATURES" >&6; }
64520  fi
64521
64522  # Override hotspot cpu definitions for ARM platforms
64523  if test "x$OPENJDK_TARGET_CPU" = xarm; then
64524    HOTSPOT_TARGET_CPU=arm_32
64525    HOTSPOT_TARGET_CPU_DEFINE="ARM32"
64526    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
64527    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
64528  elif test "x$OPENJDK_TARGET_CPU" = xaarch64 && test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
64529    HOTSPOT_TARGET_CPU=arm_64
64530    HOTSPOT_TARGET_CPU_ARCH=arm
64531    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
64532    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
64533  fi
64534
64535  # Verify that dependencies are met for explicitly set features.
64536  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
64537    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
64538  fi
64539
64540  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
64541    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
64542  fi
64543
64544  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
64545    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
64546  fi
64547
64548  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
64549    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
64550  fi
64551
64552  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
64553    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
64554  fi
64555
64556  # Turn on additional features based on other parts of configure
64557  if test "x$INCLUDE_DTRACE" = "xtrue"; then
64558    JVM_FEATURES="$JVM_FEATURES dtrace"
64559  else
64560    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
64561      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
64562    fi
64563  fi
64564
64565  if test "x$STATIC_BUILD" = "xtrue"; then
64566    JVM_FEATURES="$JVM_FEATURES static-build"
64567  else
64568    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
64569      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
64570    fi
64571  fi
64572
64573  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64574    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
64575      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
64576    fi
64577  fi
64578
64579  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64580    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
64581      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
64582    fi
64583  fi
64584
64585  # Only enable jvmci on x86_64, sparcv9 and aarch64.
64586  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
64587     test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
64588     test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
64589    JVM_FEATURES_jvmci="jvmci"
64590  else
64591    JVM_FEATURES_jvmci=""
64592  fi
64593
64594  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jdk.internal.vm.compiler should be built" >&5
64595$as_echo_n "checking if jdk.internal.vm.compiler should be built... " >&6; }
64596  if   [[ " $JVM_FEATURES " =~ " graal " ]]  ; then
64597    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64598$as_echo "yes, forced" >&6; }
64599    if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
64600      as_fn_error $? "Specified JVM feature 'graal' requires feature 'jvmci'" "$LINENO" 5
64601    fi
64602    INCLUDE_GRAAL="true"
64603  else
64604    # By default enable graal build where AOT is available
64605    if test "x$ENABLE_AOT" = "xtrue"; then
64606      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64607$as_echo "yes" >&6; }
64608      JVM_FEATURES_graal="graal"
64609      INCLUDE_GRAAL="true"
64610    else
64611      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64612$as_echo "no" >&6; }
64613      JVM_FEATURES_graal=""
64614      INCLUDE_GRAAL="false"
64615    fi
64616  fi
64617
64618
64619
64620  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
64621$as_echo_n "checking if aot should be enabled... " >&6; }
64622  if test "x$ENABLE_AOT" = "xtrue"; then
64623    if test "x$enable_aot" = "xyes"; then
64624      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64625$as_echo "yes, forced" >&6; }
64626    else
64627      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64628$as_echo "yes" >&6; }
64629    fi
64630    JVM_FEATURES_aot="aot"
64631  else
64632    if test "x$enable_aot" = "xno"; then
64633      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64634$as_echo "no, forced" >&6; }
64635    else
64636      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64637$as_echo "no" >&6; }
64638    fi
64639    JVM_FEATURES_aot=""
64640  fi
64641
64642  if test "x$OPENJDK_TARGET_CPU" = xarm ; then
64643    # Default to use link time optimizations on minimal on arm
64644    JVM_FEATURES_link_time_opt="link-time-opt"
64645  else
64646    JVM_FEATURES_link_time_opt=""
64647  fi
64648
64649  # All variants but minimal (and custom) get these features
64650  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
64651
64652  # Enable features depending on variant.
64653  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
64654  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
64655  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
64656  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES $JVM_FEATURES_link_time_opt"
64657  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
64658  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
64659  JVM_FEATURES_custom="$JVM_FEATURES"
64660
64661
64662
64663
64664
64665
64666
64667
64668
64669  # Used for verification of Makefiles by check-jvm-feature
64670
64671
64672  # We don't support --with-jvm-interpreter anymore, use zero instead.
64673
64674
64675# Check whether --with-jvm-interpreter was given.
64676if test "${with_jvm_interpreter+set}" = set; then :
64677  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
64678$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
64679fi
64680
64681
64682
64683
64684###############################################################################
64685#
64686# We need to do some final tweaking, when everything else is done.
64687#
64688###############################################################################
64689
64690
64691  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
64692$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
64693
64694  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
64695    ENABLE_INTREE_EC=true
64696    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64697$as_echo "yes" >&6; }
64698  else
64699    ENABLE_INTREE_EC=false
64700    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64701$as_echo "no" >&6; }
64702  fi
64703
64704
64705
64706
64707  # Check whether --enable-jtreg-failure-handler was given.
64708if test "${enable_jtreg_failure_handler+set}" = set; then :
64709  enableval=$enable_jtreg_failure_handler;
64710fi
64711
64712
64713  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
64714$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
64715
64716  if test "x$enable_jtreg_failure_handler" = "xyes"; then
64717    if test "x$JT_HOME" = "x"; then
64718      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
64719    else
64720      BUILD_FAILURE_HANDLER=true
64721      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64722$as_echo "yes, forced" >&6; }
64723    fi
64724  elif test "x$enable_jtreg_failure_handler" = "xno"; then
64725    BUILD_FAILURE_HANDLER=false
64726    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64727$as_echo "no, forced" >&6; }
64728  elif test "x$enable_jtreg_failure_handler" = "xauto" \
64729      || test "x$enable_jtreg_failure_handler" = "x"; then
64730    if test "x$JT_HOME" = "x"; then
64731      BUILD_FAILURE_HANDLER=false
64732      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
64733$as_echo "no, missing jtreg" >&6; }
64734    else
64735      BUILD_FAILURE_HANDLER=true
64736      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
64737$as_echo "yes, jtreg present" >&6; }
64738    fi
64739  else
64740    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
64741  fi
64742
64743
64744
64745
64746  # Check whether --enable-generate-classlist was given.
64747if test "${enable_generate_classlist+set}" = set; then :
64748  enableval=$enable_generate_classlist;
64749fi
64750
64751
64752  # Check if it's likely that it's possible to generate the classlist. Depending
64753  # on exact jvm configuration it could be possible anyway.
64754  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
64755    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
64756  else
64757    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
64758  fi
64759
64760  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
64761$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
64762  if test "x$enable_generate_classlist" = "xyes"; then
64763    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64764$as_echo "yes, forced" >&6; }
64765    ENABLE_GENERATE_CLASSLIST="true"
64766    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
64767      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
64768$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
64769    fi
64770  elif test "x$enable_generate_classlist" = "xno"; then
64771    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64772$as_echo "no, forced" >&6; }
64773    ENABLE_GENERATE_CLASSLIST="false"
64774  elif test "x$enable_generate_classlist" = "x"; then
64775    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
64776      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64777$as_echo "yes" >&6; }
64778      ENABLE_GENERATE_CLASSLIST="true"
64779    else
64780      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64781$as_echo "no" >&6; }
64782      ENABLE_GENERATE_CLASSLIST="false"
64783    fi
64784  else
64785    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
64786  fi
64787
64788
64789
64790
64791###############################################################################
64792#
64793# Configure parts of the build that only affect the build performance,
64794# not the result.
64795#
64796###############################################################################
64797
64798
64799  # How many cores do we have on this build system?
64800
64801# Check whether --with-num-cores was given.
64802if test "${with_num_cores+set}" = set; then :
64803  withval=$with_num_cores;
64804fi
64805
64806  if test "x$with_num_cores" = x; then
64807    # The number of cores were not specified, try to probe them.
64808
64809  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
64810$as_echo_n "checking for number of cores... " >&6; }
64811  NUM_CORES=1
64812  FOUND_CORES=no
64813
64814  if test -f /proc/cpuinfo; then
64815    # Looks like a Linux (or cygwin) system
64816    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
64817    FOUND_CORES=yes
64818  elif test -x /usr/sbin/psrinfo; then
64819    # Looks like a Solaris system
64820    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
64821    FOUND_CORES=yes
64822  elif test -x /usr/sbin/sysctl; then
64823    # Looks like a MacOSX system
64824    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
64825    FOUND_CORES=yes
64826  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
64827    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
64828    FOUND_CORES=yes
64829  elif test -n "$NUMBER_OF_PROCESSORS"; then
64830    # On windows, look in the env
64831    NUM_CORES=$NUMBER_OF_PROCESSORS
64832    FOUND_CORES=yes
64833  fi
64834
64835  if test "x$FOUND_CORES" = xyes; then
64836    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
64837$as_echo "$NUM_CORES" >&6; }
64838  else
64839    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
64840$as_echo "could not detect number of cores, defaulting to 1" >&6; }
64841    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
64842$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
64843  fi
64844
64845  else
64846    NUM_CORES=$with_num_cores
64847  fi
64848
64849
64850
64851  # How much memory do we have on this build system?
64852
64853# Check whether --with-memory-size was given.
64854if test "${with_memory_size+set}" = set; then :
64855  withval=$with_memory_size;
64856fi
64857
64858  if test "x$with_memory_size" = x; then
64859    # The memory size was not specified, try to probe it.
64860
64861  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
64862$as_echo_n "checking for memory size... " >&6; }
64863  # Default to 1024 MB
64864  MEMORY_SIZE=1024
64865  FOUND_MEM=no
64866
64867  if test -f /proc/meminfo; then
64868    # Looks like a Linux (or cygwin) system
64869    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
64870    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
64871    FOUND_MEM=yes
64872  elif test -x /usr/sbin/prtconf; then
64873    # Looks like a Solaris or AIX system
64874    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
64875    FOUND_MEM=yes
64876  elif test -x /usr/sbin/sysctl; then
64877    # Looks like a MacOSX system
64878    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
64879    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64880    FOUND_MEM=yes
64881  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
64882    # Windows, but without cygwin
64883    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
64884    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64885    FOUND_MEM=yes
64886  fi
64887
64888  if test "x$FOUND_MEM" = xyes; then
64889    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
64890$as_echo "$MEMORY_SIZE MB" >&6; }
64891  else
64892    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
64893$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
64894    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
64895$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
64896  fi
64897
64898  else
64899    MEMORY_SIZE=$with_memory_size
64900  fi
64901
64902
64903
64904  # Provide a decent default number of parallel jobs for make depending on
64905  # number of cores, amount of memory and machine architecture.
64906
64907# Check whether --with-jobs was given.
64908if test "${with_jobs+set}" = set; then :
64909  withval=$with_jobs;
64910fi
64911
64912  if test "x$with_jobs" = x; then
64913    # Number of jobs was not specified, calculate.
64914    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
64915$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
64916    # Approximate memory in GB.
64917    memory_gb=`expr $MEMORY_SIZE / 1024`
64918    # Pick the lowest of memory in gb and number of cores.
64919    if test "$memory_gb" -lt "$NUM_CORES"; then
64920      JOBS="$memory_gb"
64921    else
64922      JOBS="$NUM_CORES"
64923    fi
64924    if test "$JOBS" -eq "0"; then
64925      JOBS=1
64926    fi
64927    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
64928$as_echo "$JOBS" >&6; }
64929  else
64930    JOBS=$with_jobs
64931  fi
64932
64933
64934
64935  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
64936
64937# Check whether --with-test-jobs was given.
64938if test "${with_test_jobs+set}" = set; then :
64939  withval=$with_test_jobs;
64940fi
64941
64942  if test "x$with_test_jobs" = x; then
64943      TEST_JOBS=0
64944  else
64945      TEST_JOBS=$with_test_jobs
64946  fi
64947
64948
64949
64950# Setup arguments for the boot jdk (after cores and memory have been setup)
64951
64952  ##############################################################################
64953  #
64954  # Specify jvm options for anything that is run with the Boot JDK.
64955  # Not all JVM:s accept the same arguments on the command line.
64956  #
64957
64958# Check whether --with-boot-jdk-jvmargs was given.
64959if test "${with_boot_jdk_jvmargs+set}" = set; then :
64960  withval=$with_boot_jdk_jvmargs;
64961fi
64962
64963
64964  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
64965$as_echo_n "checking flags for boot jdk java command ... " >&6; }
64966
64967  # Disable special log output when a debug build is used as Boot JDK...
64968
64969  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
64970  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
64971  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
64972  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64973  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64974  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64975    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
64976    JVM_ARG_OK=true
64977  else
64978    $ECHO "Arg failed:" >&5
64979    $ECHO "$OUTPUT" >&5
64980    JVM_ARG_OK=false
64981  fi
64982
64983
64984  # Force en-US environment
64985
64986  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
64987  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
64988  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
64989  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64990  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64991  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64992    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
64993    JVM_ARG_OK=true
64994  else
64995    $ECHO "Arg failed:" >&5
64996    $ECHO "$OUTPUT" >&5
64997    JVM_ARG_OK=false
64998  fi
64999
65000
65001  # Apply user provided options.
65002
65003  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
65004  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
65005  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
65006  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65007  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65008  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65009    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
65010    JVM_ARG_OK=true
65011  else
65012    $ECHO "Arg failed:" >&5
65013    $ECHO "$OUTPUT" >&5
65014    JVM_ARG_OK=false
65015  fi
65016
65017
65018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
65019$as_echo "$boot_jdk_jvmargs" >&6; }
65020
65021  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
65022  JAVA_FLAGS=$boot_jdk_jvmargs
65023
65024
65025
65026  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
65027$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
65028
65029  # Starting amount of heap memory.
65030
65031  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
65032  $ECHO "Command: $JAVA -Xms64M -version" >&5
65033  OUTPUT=`$JAVA -Xms64M -version 2>&1`
65034  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65035  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65036  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65037    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
65038    JVM_ARG_OK=true
65039  else
65040    $ECHO "Arg failed:" >&5
65041    $ECHO "$OUTPUT" >&5
65042    JVM_ARG_OK=false
65043  fi
65044
65045  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
65046
65047  # Maximum amount of heap memory and stack size.
65048  JVM_HEAP_LIMIT_32="1024"
65049  # Running a 64 bit JVM allows for and requires a bigger heap
65050  JVM_HEAP_LIMIT_64="1600"
65051  STACK_SIZE_32=768
65052  STACK_SIZE_64=1536
65053  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
65054  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
65055    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
65056  fi
65057  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
65058    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
65059  fi
65060  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
65061    JVM_HEAP_LIMIT_32=512
65062    JVM_HEAP_LIMIT_64=512
65063  fi
65064
65065  if test "x$BOOT_JDK_BITS" = "x32"; then
65066    STACK_SIZE=$STACK_SIZE_32
65067    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
65068  else
65069    STACK_SIZE=$STACK_SIZE_64
65070    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
65071  fi
65072
65073  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
65074  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
65075  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
65076  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65077  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65078  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65079    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
65080    JVM_ARG_OK=true
65081  else
65082    $ECHO "Arg failed:" >&5
65083    $ECHO "$OUTPUT" >&5
65084    JVM_ARG_OK=false
65085  fi
65086
65087
65088  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
65089  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
65090  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
65091  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65092  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65093  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65094    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
65095    JVM_ARG_OK=true
65096  else
65097    $ECHO "Arg failed:" >&5
65098    $ECHO "$OUTPUT" >&5
65099    JVM_ARG_OK=false
65100  fi
65101
65102
65103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
65104$as_echo "$boot_jdk_jvmargs_big" >&6; }
65105
65106  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
65107
65108
65109  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
65110    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
65111    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
65112  else
65113    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
65114    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
65115  fi
65116  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
65117  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
65118  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
65119$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
65120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
65121$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
65122
65123
65124  # By default, the main javac compilations use big
65125  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
65126
65127
65128  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
65129$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
65130
65131  # Use serial gc for small short lived tools if possible
65132
65133  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
65134  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
65135  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
65136  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65137  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65138  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65139    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
65140    JVM_ARG_OK=true
65141  else
65142    $ECHO "Arg failed:" >&5
65143    $ECHO "$OUTPUT" >&5
65144    JVM_ARG_OK=false
65145  fi
65146
65147
65148  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
65149  $ECHO "Command: $JAVA -Xms32M -version" >&5
65150  OUTPUT=`$JAVA -Xms32M -version 2>&1`
65151  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65152  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65153  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65154    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
65155    JVM_ARG_OK=true
65156  else
65157    $ECHO "Arg failed:" >&5
65158    $ECHO "$OUTPUT" >&5
65159    JVM_ARG_OK=false
65160  fi
65161
65162
65163  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
65164  $ECHO "Command: $JAVA -Xmx512M -version" >&5
65165  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
65166  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65167  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65168  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65169    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
65170    JVM_ARG_OK=true
65171  else
65172    $ECHO "Arg failed:" >&5
65173    $ECHO "$OUTPUT" >&5
65174    JVM_ARG_OK=false
65175  fi
65176
65177
65178  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
65179  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
65180  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
65181  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65182  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65183  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65184    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
65185    JVM_ARG_OK=true
65186  else
65187    $ECHO "Arg failed:" >&5
65188    $ECHO "$OUTPUT" >&5
65189    JVM_ARG_OK=false
65190  fi
65191
65192
65193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
65194$as_echo "$boot_jdk_jvmargs_small" >&6; }
65195
65196  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
65197
65198
65199  JAVA_TOOL_FLAGS_SMALL=""
65200  for f in $JAVA_FLAGS_SMALL; do
65201    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
65202  done
65203
65204
65205
65206# Setup smart javac (after cores and memory have been setup)
65207
65208
65209# Check whether --with-sjavac-server-java was given.
65210if test "${with_sjavac_server_java+set}" = set; then :
65211  withval=$with_sjavac_server_java;
65212fi
65213
65214
65215  if test "x$with_sjavac_server_java" != x; then
65216    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
65217    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
65218    if test "x$FOUND_VERSION" = x; then
65219      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
65220    fi
65221  else
65222    SJAVAC_SERVER_JAVA="$JAVA"
65223  fi
65224
65225
65226  if test "$MEMORY_SIZE" -gt "3000"; then
65227
65228  $ECHO "Check if jvm arg is ok: -d64" >&5
65229  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
65230  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
65231  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65232  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65233  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65234    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
65235    JVM_ARG_OK=true
65236  else
65237    $ECHO "Arg failed:" >&5
65238    $ECHO "$OUTPUT" >&5
65239    JVM_ARG_OK=false
65240  fi
65241
65242    if test "$JVM_ARG_OK" = true; then
65243      JVM_64BIT=true
65244      JVM_ARG_OK=false
65245    fi
65246  fi
65247
65248  MX_VALUE=`expr $MEMORY_SIZE / 2`
65249  if test "$JVM_64BIT" = true; then
65250    # Set ms lower than mx since more than one instance of the server might
65251    # get launched at the same time before they figure out which instance won.
65252    MS_VALUE=512
65253    if test "$MX_VALUE" -gt "2048"; then
65254      MX_VALUE=2048
65255    fi
65256  else
65257    MS_VALUE=256
65258    if test "$MX_VALUE" -gt "1500"; then
65259      MX_VALUE=1500
65260    fi
65261  fi
65262  if test "$MX_VALUE" -lt "512"; then
65263    MX_VALUE=512
65264  fi
65265
65266  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
65267  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
65268  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
65269  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65270  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65271  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65272    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
65273    JVM_ARG_OK=true
65274  else
65275    $ECHO "Arg failed:" >&5
65276    $ECHO "$OUTPUT" >&5
65277    JVM_ARG_OK=false
65278  fi
65279
65280
65281
65282  # Check whether --enable-sjavac was given.
65283if test "${enable_sjavac+set}" = set; then :
65284  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
65285else
65286  ENABLE_SJAVAC="no"
65287fi
65288
65289  if test "x$JVM_ARG_OK" = "xfalse"; then
65290    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
65291$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
65292    ENABLE_SJAVAC="no"
65293  fi
65294  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
65295$as_echo_n "checking whether to use sjavac... " >&6; }
65296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
65297$as_echo "$ENABLE_SJAVAC" >&6; }
65298
65299
65300  # Check whether --enable-javac-server was given.
65301if test "${enable_javac_server+set}" = set; then :
65302  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
65303else
65304  ENABLE_JAVAC_SERVER="yes"
65305fi
65306
65307  if test "x$JVM_ARG_OK" = "xfalse"; then
65308    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
65309$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
65310    ENABLE_JAVAC_SERVER="no"
65311  fi
65312  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
65313$as_echo_n "checking whether to use javac server... " >&6; }
65314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
65315$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
65316
65317
65318  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
65319    # When using a server javac, the small client instances do not need much
65320    # resources.
65321    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
65322  fi
65323
65324
65325# Setup use of icecc if requested
65326
65327  # Check whether --enable-icecc was given.
65328if test "${enable_icecc+set}" = set; then :
65329  enableval=$enable_icecc;
65330fi
65331
65332
65333  if test "x${enable_icecc}" = "xyes"; then
65334
65335
65336
65337  # Publish this variable in the help.
65338
65339
65340  if [ -z "${ICECC_CMD+x}" ]; then
65341    # The variable is not set by user, try to locate tool using the code snippet
65342    for ac_prog in icecc
65343do
65344  # Extract the first word of "$ac_prog", so it can be a program name with args.
65345set dummy $ac_prog; ac_word=$2
65346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65347$as_echo_n "checking for $ac_word... " >&6; }
65348if ${ac_cv_path_ICECC_CMD+:} false; then :
65349  $as_echo_n "(cached) " >&6
65350else
65351  case $ICECC_CMD in
65352  [\\/]* | ?:[\\/]*)
65353  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65354  ;;
65355  *)
65356  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65357for as_dir in $PATH
65358do
65359  IFS=$as_save_IFS
65360  test -z "$as_dir" && as_dir=.
65361    for ac_exec_ext in '' $ac_executable_extensions; do
65362  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65363    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65364    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65365    break 2
65366  fi
65367done
65368  done
65369IFS=$as_save_IFS
65370
65371  ;;
65372esac
65373fi
65374ICECC_CMD=$ac_cv_path_ICECC_CMD
65375if test -n "$ICECC_CMD"; then
65376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65377$as_echo "$ICECC_CMD" >&6; }
65378else
65379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65380$as_echo "no" >&6; }
65381fi
65382
65383
65384  test -n "$ICECC_CMD" && break
65385done
65386
65387  else
65388    # The variable is set, but is it from the command line or the environment?
65389
65390    # Try to remove the string !ICECC_CMD! from our list.
65391    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
65392    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65393      # If it failed, the variable was not from the command line. Ignore it,
65394      # but warn the user (except for BASH, which is always set by the calling BASH).
65395      if test "xICECC_CMD" != xBASH; then
65396        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
65397$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
65398      fi
65399      # Try to locate tool using the code snippet
65400      for ac_prog in icecc
65401do
65402  # Extract the first word of "$ac_prog", so it can be a program name with args.
65403set dummy $ac_prog; ac_word=$2
65404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65405$as_echo_n "checking for $ac_word... " >&6; }
65406if ${ac_cv_path_ICECC_CMD+:} false; then :
65407  $as_echo_n "(cached) " >&6
65408else
65409  case $ICECC_CMD in
65410  [\\/]* | ?:[\\/]*)
65411  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65412  ;;
65413  *)
65414  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65415for as_dir in $PATH
65416do
65417  IFS=$as_save_IFS
65418  test -z "$as_dir" && as_dir=.
65419    for ac_exec_ext in '' $ac_executable_extensions; do
65420  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65421    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65422    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65423    break 2
65424  fi
65425done
65426  done
65427IFS=$as_save_IFS
65428
65429  ;;
65430esac
65431fi
65432ICECC_CMD=$ac_cv_path_ICECC_CMD
65433if test -n "$ICECC_CMD"; then
65434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65435$as_echo "$ICECC_CMD" >&6; }
65436else
65437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65438$as_echo "no" >&6; }
65439fi
65440
65441
65442  test -n "$ICECC_CMD" && break
65443done
65444
65445    else
65446      # If it succeeded, then it was overridden by the user. We will use it
65447      # for the tool.
65448
65449      # First remove it from the list of overridden variables, so we can test
65450      # for unknown variables in the end.
65451      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65452
65453      # Check if we try to supply an empty value
65454      if test "x$ICECC_CMD" = x; then
65455        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
65456$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
65457        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65458$as_echo_n "checking for ICECC_CMD... " >&6; }
65459        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65460$as_echo "disabled" >&6; }
65461      else
65462        # Check if the provided tool contains a complete path.
65463        tool_specified="$ICECC_CMD"
65464        tool_basename="${tool_specified##*/}"
65465        if test "x$tool_basename" = "x$tool_specified"; then
65466          # A command without a complete path is provided, search $PATH.
65467          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
65468$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
65469          # Extract the first word of "$tool_basename", so it can be a program name with args.
65470set dummy $tool_basename; ac_word=$2
65471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65472$as_echo_n "checking for $ac_word... " >&6; }
65473if ${ac_cv_path_ICECC_CMD+:} false; then :
65474  $as_echo_n "(cached) " >&6
65475else
65476  case $ICECC_CMD in
65477  [\\/]* | ?:[\\/]*)
65478  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65479  ;;
65480  *)
65481  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65482for as_dir in $PATH
65483do
65484  IFS=$as_save_IFS
65485  test -z "$as_dir" && as_dir=.
65486    for ac_exec_ext in '' $ac_executable_extensions; do
65487  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65488    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65490    break 2
65491  fi
65492done
65493  done
65494IFS=$as_save_IFS
65495
65496  ;;
65497esac
65498fi
65499ICECC_CMD=$ac_cv_path_ICECC_CMD
65500if test -n "$ICECC_CMD"; then
65501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65502$as_echo "$ICECC_CMD" >&6; }
65503else
65504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65505$as_echo "no" >&6; }
65506fi
65507
65508
65509          if test "x$ICECC_CMD" = x; then
65510            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65511          fi
65512        else
65513          # Otherwise we believe it is a complete path. Use it as it is.
65514          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
65515$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
65516          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65517$as_echo_n "checking for ICECC_CMD... " >&6; }
65518          if test ! -x "$tool_specified"; then
65519            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65520$as_echo "not found" >&6; }
65521            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
65522          fi
65523          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65524$as_echo "$tool_specified" >&6; }
65525        fi
65526      fi
65527    fi
65528
65529  fi
65530
65531
65532
65533  if test "x$ICECC_CMD" = x; then
65534    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
65535  fi
65536
65537
65538    old_path="$PATH"
65539
65540    # Look for icecc-create-env in some known places
65541    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
65542
65543
65544
65545  # Publish this variable in the help.
65546
65547
65548  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
65549    # The variable is not set by user, try to locate tool using the code snippet
65550    for ac_prog in icecc-create-env
65551do
65552  # Extract the first word of "$ac_prog", so it can be a program name with args.
65553set dummy $ac_prog; ac_word=$2
65554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65555$as_echo_n "checking for $ac_word... " >&6; }
65556if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65557  $as_echo_n "(cached) " >&6
65558else
65559  case $ICECC_CREATE_ENV in
65560  [\\/]* | ?:[\\/]*)
65561  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65562  ;;
65563  *)
65564  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65565for as_dir in $PATH
65566do
65567  IFS=$as_save_IFS
65568  test -z "$as_dir" && as_dir=.
65569    for ac_exec_ext in '' $ac_executable_extensions; do
65570  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65571    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65573    break 2
65574  fi
65575done
65576  done
65577IFS=$as_save_IFS
65578
65579  ;;
65580esac
65581fi
65582ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65583if test -n "$ICECC_CREATE_ENV"; then
65584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65585$as_echo "$ICECC_CREATE_ENV" >&6; }
65586else
65587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65588$as_echo "no" >&6; }
65589fi
65590
65591
65592  test -n "$ICECC_CREATE_ENV" && break
65593done
65594
65595  else
65596    # The variable is set, but is it from the command line or the environment?
65597
65598    # Try to remove the string !ICECC_CREATE_ENV! from our list.
65599    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
65600    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65601      # If it failed, the variable was not from the command line. Ignore it,
65602      # but warn the user (except for BASH, which is always set by the calling BASH).
65603      if test "xICECC_CREATE_ENV" != xBASH; then
65604        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
65605$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
65606      fi
65607      # Try to locate tool using the code snippet
65608      for ac_prog in icecc-create-env
65609do
65610  # Extract the first word of "$ac_prog", so it can be a program name with args.
65611set dummy $ac_prog; ac_word=$2
65612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65613$as_echo_n "checking for $ac_word... " >&6; }
65614if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65615  $as_echo_n "(cached) " >&6
65616else
65617  case $ICECC_CREATE_ENV in
65618  [\\/]* | ?:[\\/]*)
65619  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65620  ;;
65621  *)
65622  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65623for as_dir in $PATH
65624do
65625  IFS=$as_save_IFS
65626  test -z "$as_dir" && as_dir=.
65627    for ac_exec_ext in '' $ac_executable_extensions; do
65628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65629    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65631    break 2
65632  fi
65633done
65634  done
65635IFS=$as_save_IFS
65636
65637  ;;
65638esac
65639fi
65640ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65641if test -n "$ICECC_CREATE_ENV"; then
65642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65643$as_echo "$ICECC_CREATE_ENV" >&6; }
65644else
65645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65646$as_echo "no" >&6; }
65647fi
65648
65649
65650  test -n "$ICECC_CREATE_ENV" && break
65651done
65652
65653    else
65654      # If it succeeded, then it was overridden by the user. We will use it
65655      # for the tool.
65656
65657      # First remove it from the list of overridden variables, so we can test
65658      # for unknown variables in the end.
65659      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65660
65661      # Check if we try to supply an empty value
65662      if test "x$ICECC_CREATE_ENV" = x; then
65663        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
65664$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
65665        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65666$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65667        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65668$as_echo "disabled" >&6; }
65669      else
65670        # Check if the provided tool contains a complete path.
65671        tool_specified="$ICECC_CREATE_ENV"
65672        tool_basename="${tool_specified##*/}"
65673        if test "x$tool_basename" = "x$tool_specified"; then
65674          # A command without a complete path is provided, search $PATH.
65675          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
65676$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
65677          # Extract the first word of "$tool_basename", so it can be a program name with args.
65678set dummy $tool_basename; ac_word=$2
65679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65680$as_echo_n "checking for $ac_word... " >&6; }
65681if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65682  $as_echo_n "(cached) " >&6
65683else
65684  case $ICECC_CREATE_ENV in
65685  [\\/]* | ?:[\\/]*)
65686  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65687  ;;
65688  *)
65689  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65690for as_dir in $PATH
65691do
65692  IFS=$as_save_IFS
65693  test -z "$as_dir" && as_dir=.
65694    for ac_exec_ext in '' $ac_executable_extensions; do
65695  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65696    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65698    break 2
65699  fi
65700done
65701  done
65702IFS=$as_save_IFS
65703
65704  ;;
65705esac
65706fi
65707ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65708if test -n "$ICECC_CREATE_ENV"; then
65709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65710$as_echo "$ICECC_CREATE_ENV" >&6; }
65711else
65712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65713$as_echo "no" >&6; }
65714fi
65715
65716
65717          if test "x$ICECC_CREATE_ENV" = x; then
65718            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65719          fi
65720        else
65721          # Otherwise we believe it is a complete path. Use it as it is.
65722          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
65723$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
65724          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65725$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65726          if test ! -x "$tool_specified"; then
65727            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65728$as_echo "not found" >&6; }
65729            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
65730          fi
65731          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65732$as_echo "$tool_specified" >&6; }
65733        fi
65734      fi
65735    fi
65736
65737  fi
65738
65739
65740
65741  if test "x$ICECC_CREATE_ENV" = x; then
65742    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
65743  fi
65744
65745
65746    # Use icecc-create-env to create a minimal compilation environment that can
65747    # be sent to the other hosts in the icecream cluster.
65748    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
65749    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
65750    # Older versions of icecc does not have the --gcc parameter
65751    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
65752      icecc_gcc_arg="--gcc"
65753    fi
65754    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
65755
65756  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65757      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
65758          ${icecc_create_env_log} 2>&1 )
65759  if test "$?" != "0"; then
65760    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65761$as_echo "$as_me: icecc-create-env output:" >&6;}
65762    cat \
65763          ${icecc_create_env_log}
65764    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65765  fi
65766
65767    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
65768      # For clang, the icecc compilerwrapper is needed. It usually resides next
65769      # to icecc-create-env.
65770
65771
65772
65773  # Publish this variable in the help.
65774
65775
65776  if [ -z "${ICECC_WRAPPER+x}" ]; then
65777    # The variable is not set by user, try to locate tool using the code snippet
65778    for ac_prog in compilerwrapper
65779do
65780  # Extract the first word of "$ac_prog", so it can be a program name with args.
65781set dummy $ac_prog; ac_word=$2
65782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65783$as_echo_n "checking for $ac_word... " >&6; }
65784if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65785  $as_echo_n "(cached) " >&6
65786else
65787  case $ICECC_WRAPPER in
65788  [\\/]* | ?:[\\/]*)
65789  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65790  ;;
65791  *)
65792  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65793for as_dir in $PATH
65794do
65795  IFS=$as_save_IFS
65796  test -z "$as_dir" && as_dir=.
65797    for ac_exec_ext in '' $ac_executable_extensions; do
65798  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65799    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65800    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65801    break 2
65802  fi
65803done
65804  done
65805IFS=$as_save_IFS
65806
65807  ;;
65808esac
65809fi
65810ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65811if test -n "$ICECC_WRAPPER"; then
65812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65813$as_echo "$ICECC_WRAPPER" >&6; }
65814else
65815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65816$as_echo "no" >&6; }
65817fi
65818
65819
65820  test -n "$ICECC_WRAPPER" && break
65821done
65822
65823  else
65824    # The variable is set, but is it from the command line or the environment?
65825
65826    # Try to remove the string !ICECC_WRAPPER! from our list.
65827    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
65828    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65829      # If it failed, the variable was not from the command line. Ignore it,
65830      # but warn the user (except for BASH, which is always set by the calling BASH).
65831      if test "xICECC_WRAPPER" != xBASH; then
65832        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
65833$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
65834      fi
65835      # Try to locate tool using the code snippet
65836      for ac_prog in compilerwrapper
65837do
65838  # Extract the first word of "$ac_prog", so it can be a program name with args.
65839set dummy $ac_prog; ac_word=$2
65840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65841$as_echo_n "checking for $ac_word... " >&6; }
65842if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65843  $as_echo_n "(cached) " >&6
65844else
65845  case $ICECC_WRAPPER in
65846  [\\/]* | ?:[\\/]*)
65847  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65848  ;;
65849  *)
65850  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65851for as_dir in $PATH
65852do
65853  IFS=$as_save_IFS
65854  test -z "$as_dir" && as_dir=.
65855    for ac_exec_ext in '' $ac_executable_extensions; do
65856  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65857    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65859    break 2
65860  fi
65861done
65862  done
65863IFS=$as_save_IFS
65864
65865  ;;
65866esac
65867fi
65868ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65869if test -n "$ICECC_WRAPPER"; then
65870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65871$as_echo "$ICECC_WRAPPER" >&6; }
65872else
65873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65874$as_echo "no" >&6; }
65875fi
65876
65877
65878  test -n "$ICECC_WRAPPER" && break
65879done
65880
65881    else
65882      # If it succeeded, then it was overridden by the user. We will use it
65883      # for the tool.
65884
65885      # First remove it from the list of overridden variables, so we can test
65886      # for unknown variables in the end.
65887      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65888
65889      # Check if we try to supply an empty value
65890      if test "x$ICECC_WRAPPER" = x; then
65891        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
65892$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
65893        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65894$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65895        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65896$as_echo "disabled" >&6; }
65897      else
65898        # Check if the provided tool contains a complete path.
65899        tool_specified="$ICECC_WRAPPER"
65900        tool_basename="${tool_specified##*/}"
65901        if test "x$tool_basename" = "x$tool_specified"; then
65902          # A command without a complete path is provided, search $PATH.
65903          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
65904$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
65905          # Extract the first word of "$tool_basename", so it can be a program name with args.
65906set dummy $tool_basename; ac_word=$2
65907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65908$as_echo_n "checking for $ac_word... " >&6; }
65909if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65910  $as_echo_n "(cached) " >&6
65911else
65912  case $ICECC_WRAPPER in
65913  [\\/]* | ?:[\\/]*)
65914  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65915  ;;
65916  *)
65917  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65918for as_dir in $PATH
65919do
65920  IFS=$as_save_IFS
65921  test -z "$as_dir" && as_dir=.
65922    for ac_exec_ext in '' $ac_executable_extensions; do
65923  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65924    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65925    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65926    break 2
65927  fi
65928done
65929  done
65930IFS=$as_save_IFS
65931
65932  ;;
65933esac
65934fi
65935ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65936if test -n "$ICECC_WRAPPER"; then
65937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65938$as_echo "$ICECC_WRAPPER" >&6; }
65939else
65940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65941$as_echo "no" >&6; }
65942fi
65943
65944
65945          if test "x$ICECC_WRAPPER" = x; then
65946            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65947          fi
65948        else
65949          # Otherwise we believe it is a complete path. Use it as it is.
65950          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
65951$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
65952          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65953$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65954          if test ! -x "$tool_specified"; then
65955            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65956$as_echo "not found" >&6; }
65957            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
65958          fi
65959          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65960$as_echo "$tool_specified" >&6; }
65961        fi
65962      fi
65963    fi
65964
65965  fi
65966
65967
65968
65969  if test "x$ICECC_WRAPPER" = x; then
65970    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
65971  fi
65972
65973
65974
65975  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65976      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
65977  if test "$?" != "0"; then
65978    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65979$as_echo "$as_me: icecc-create-env output:" >&6;}
65980    cat ${icecc_create_env_log}
65981    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65982  fi
65983
65984    else
65985      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
65986    fi
65987    PATH="$old_path"
65988    # The bundle with the compiler gets a name based on checksums. Parse log file
65989    # to find it.
65990    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
65991    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65992    if test ! -f ${ICECC_ENV_BUNDLE}; then
65993      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65994    fi
65995    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
65996$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
65997    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65998$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65999    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
66000
66001    if test "x${COMPILE_TYPE}" = "xcross"; then
66002      # If cross compiling, create a separate env package for the build compiler
66003      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
66004      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
66005      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
66006
66007  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66008      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
66009            ${icecc_create_env_log_build} 2>&1 )
66010  if test "$?" != "0"; then
66011    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66012$as_echo "$as_me: icecc-create-env output:" >&6;}
66013    cat \
66014            ${icecc_create_env_log_build}
66015    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66016  fi
66017
66018      elif test "x${BUILD_CC##*/}" = "xclang"; then
66019
66020  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66021      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
66022  if test "$?" != "0"; then
66023    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66024$as_echo "$as_me: icecc-create-env output:" >&6;}
66025    cat ${icecc_create_env_log_build}
66026    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66027  fi
66028
66029      else
66030        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
66031      fi
66032      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
66033      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
66034      if test ! -f ${ICECC_ENV_BUNDLE}; then
66035        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
66036      fi
66037      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
66038$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
66039      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
66040$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
66041      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
66042          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
66043    else
66044      BUILD_ICECC="${ICECC}"
66045    fi
66046
66047
66048  fi
66049
66050
66051# Can the C/C++ compiler use precompiled headers?
66052
66053
66054  ###############################################################################
66055  #
66056  # Can the C/C++ compiler use precompiled headers?
66057  #
66058  # Check whether --enable-precompiled-headers was given.
66059if test "${enable_precompiled_headers+set}" = set; then :
66060  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
66061else
66062  ENABLE_PRECOMPH=yes
66063fi
66064
66065
66066  USE_PRECOMPILED_HEADER=true
66067  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
66068$as_echo_n "checking If precompiled header is enabled... " >&6; }
66069  if test "x$ENABLE_PRECOMPH" = xno; then
66070    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
66071$as_echo "no, forced" >&6; }
66072    USE_PRECOMPILED_HEADER=false
66073  elif test "x$ICECC" != "x"; then
66074    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
66075$as_echo "no, does not work effectively with icecc" >&6; }
66076    USE_PRECOMPILED_HEADER=false
66077  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
66078    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
66079$as_echo "no, does not work with Solaris Studio" >&6; }
66080    USE_PRECOMPILED_HEADER=false
66081  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
66082    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
66083$as_echo "no, does not work with xlc" >&6; }
66084    USE_PRECOMPILED_HEADER=false
66085  else
66086    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66087$as_echo "yes" >&6; }
66088  fi
66089
66090  if test "x$ENABLE_PRECOMPH" = xyes; then
66091    # Check that the compiler actually supports precomp headers.
66092    if test "x$TOOLCHAIN_TYPE" = xgcc; then
66093      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
66094$as_echo_n "checking that precompiled headers work... " >&6; }
66095      echo "int alfa();" > conftest.h
66096      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
66097      if test ! -f conftest.hpp.gch; then
66098        USE_PRECOMPILED_HEADER=false
66099        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66100$as_echo "no" >&6; }
66101      else
66102        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66103$as_echo "yes" >&6; }
66104      fi
66105      $RM conftest.h conftest.hpp.gch
66106    fi
66107  fi
66108
66109
66110
66111
66112# Setup use of ccache, if available
66113
66114  # Check whether --enable-ccache was given.
66115if test "${enable_ccache+set}" = set; then :
66116  enableval=$enable_ccache;
66117fi
66118
66119
66120  CCACHE_STATUS=
66121  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
66122$as_echo_n "checking is ccache enabled... " >&6; }
66123  if test "x$enable_ccache" = xyes; then
66124    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
66125      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66126$as_echo "yes" >&6; }
66127      OLD_PATH="$PATH"
66128      if test "x$TOOLCHAIN_PATH" != x; then
66129        PATH=$TOOLCHAIN_PATH:$PATH
66130      fi
66131
66132
66133
66134  # Publish this variable in the help.
66135
66136
66137  if [ -z "${CCACHE+x}" ]; then
66138    # The variable is not set by user, try to locate tool using the code snippet
66139    for ac_prog in ccache
66140do
66141  # Extract the first word of "$ac_prog", so it can be a program name with args.
66142set dummy $ac_prog; ac_word=$2
66143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66144$as_echo_n "checking for $ac_word... " >&6; }
66145if ${ac_cv_path_CCACHE+:} false; then :
66146  $as_echo_n "(cached) " >&6
66147else
66148  case $CCACHE in
66149  [\\/]* | ?:[\\/]*)
66150  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66151  ;;
66152  *)
66153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66154for as_dir in $PATH
66155do
66156  IFS=$as_save_IFS
66157  test -z "$as_dir" && as_dir=.
66158    for ac_exec_ext in '' $ac_executable_extensions; do
66159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66160    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66162    break 2
66163  fi
66164done
66165  done
66166IFS=$as_save_IFS
66167
66168  ;;
66169esac
66170fi
66171CCACHE=$ac_cv_path_CCACHE
66172if test -n "$CCACHE"; then
66173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66174$as_echo "$CCACHE" >&6; }
66175else
66176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66177$as_echo "no" >&6; }
66178fi
66179
66180
66181  test -n "$CCACHE" && break
66182done
66183
66184  else
66185    # The variable is set, but is it from the command line or the environment?
66186
66187    # Try to remove the string !CCACHE! from our list.
66188    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
66189    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66190      # If it failed, the variable was not from the command line. Ignore it,
66191      # but warn the user (except for BASH, which is always set by the calling BASH).
66192      if test "xCCACHE" != xBASH; then
66193        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
66194$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
66195      fi
66196      # Try to locate tool using the code snippet
66197      for ac_prog in ccache
66198do
66199  # Extract the first word of "$ac_prog", so it can be a program name with args.
66200set dummy $ac_prog; ac_word=$2
66201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66202$as_echo_n "checking for $ac_word... " >&6; }
66203if ${ac_cv_path_CCACHE+:} false; then :
66204  $as_echo_n "(cached) " >&6
66205else
66206  case $CCACHE in
66207  [\\/]* | ?:[\\/]*)
66208  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66209  ;;
66210  *)
66211  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66212for as_dir in $PATH
66213do
66214  IFS=$as_save_IFS
66215  test -z "$as_dir" && as_dir=.
66216    for ac_exec_ext in '' $ac_executable_extensions; do
66217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66218    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66220    break 2
66221  fi
66222done
66223  done
66224IFS=$as_save_IFS
66225
66226  ;;
66227esac
66228fi
66229CCACHE=$ac_cv_path_CCACHE
66230if test -n "$CCACHE"; then
66231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66232$as_echo "$CCACHE" >&6; }
66233else
66234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66235$as_echo "no" >&6; }
66236fi
66237
66238
66239  test -n "$CCACHE" && break
66240done
66241
66242    else
66243      # If it succeeded, then it was overridden by the user. We will use it
66244      # for the tool.
66245
66246      # First remove it from the list of overridden variables, so we can test
66247      # for unknown variables in the end.
66248      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66249
66250      # Check if we try to supply an empty value
66251      if test "x$CCACHE" = x; then
66252        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
66253$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
66254        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66255$as_echo_n "checking for CCACHE... " >&6; }
66256        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66257$as_echo "disabled" >&6; }
66258      else
66259        # Check if the provided tool contains a complete path.
66260        tool_specified="$CCACHE"
66261        tool_basename="${tool_specified##*/}"
66262        if test "x$tool_basename" = "x$tool_specified"; then
66263          # A command without a complete path is provided, search $PATH.
66264          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
66265$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
66266          # Extract the first word of "$tool_basename", so it can be a program name with args.
66267set dummy $tool_basename; ac_word=$2
66268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66269$as_echo_n "checking for $ac_word... " >&6; }
66270if ${ac_cv_path_CCACHE+:} false; then :
66271  $as_echo_n "(cached) " >&6
66272else
66273  case $CCACHE in
66274  [\\/]* | ?:[\\/]*)
66275  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66276  ;;
66277  *)
66278  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66279for as_dir in $PATH
66280do
66281  IFS=$as_save_IFS
66282  test -z "$as_dir" && as_dir=.
66283    for ac_exec_ext in '' $ac_executable_extensions; do
66284  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66285    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66286    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66287    break 2
66288  fi
66289done
66290  done
66291IFS=$as_save_IFS
66292
66293  ;;
66294esac
66295fi
66296CCACHE=$ac_cv_path_CCACHE
66297if test -n "$CCACHE"; then
66298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66299$as_echo "$CCACHE" >&6; }
66300else
66301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66302$as_echo "no" >&6; }
66303fi
66304
66305
66306          if test "x$CCACHE" = x; then
66307            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66308          fi
66309        else
66310          # Otherwise we believe it is a complete path. Use it as it is.
66311          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
66312$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
66313          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66314$as_echo_n "checking for CCACHE... " >&6; }
66315          if test ! -x "$tool_specified"; then
66316            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66317$as_echo "not found" >&6; }
66318            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
66319          fi
66320          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66321$as_echo "$tool_specified" >&6; }
66322        fi
66323      fi
66324    fi
66325
66326  fi
66327
66328
66329
66330  if test "x$CCACHE" = x; then
66331    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
66332  fi
66333
66334
66335      PATH="$OLD_PATH"
66336      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
66337      CCACHE_STATUS="Active ($CCACHE_VERSION)"
66338    else
66339      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66340$as_echo "no" >&6; }
66341      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
66342$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
66343    fi
66344  elif test "x$enable_ccache" = xno; then
66345    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
66346$as_echo "no, explicitly disabled" >&6; }
66347    CCACHE_STATUS="Disabled"
66348  elif test "x$enable_ccache" = x; then
66349    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66350$as_echo "no" >&6; }
66351  else
66352    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
66353$as_echo "unknown" >&6; }
66354    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
66355  fi
66356
66357
66358
66359# Check whether --with-ccache-dir was given.
66360if test "${with_ccache_dir+set}" = set; then :
66361  withval=$with_ccache_dir;
66362fi
66363
66364
66365  if test "x$with_ccache_dir" != x; then
66366    # When using a non home ccache directory, assume the use is to share ccache files
66367    # with other users. Thus change the umask.
66368    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
66369    if test "x$CCACHE" = x; then
66370      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
66371$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
66372    fi
66373  fi
66374
66375  if test "x$CCACHE" != x; then
66376
66377  if test "x$CCACHE" != x; then
66378    if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
66379      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
66380          $GREP -e '^1\.' -e '^2\.' -e '^3\.0\.' -e '^3\.1\.'`
66381      if test "x$HAS_BAD_CCACHE" != "x"; then
66382        as_fn_error $? "On macosx, ccache 3.2 or later is required, found $CCACHE_VERSION" "$LINENO" 5
66383      fi
66384    fi
66385    if test "x$USE_PRECOMPILED_HEADER" = "xtrue"; then
66386      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
66387          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
66388      if test "x$HAS_BAD_CCACHE" != "x"; then
66389        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
66390      fi
66391      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
66392$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
66393      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
66394      PUSHED_FLAGS="$CXXFLAGS"
66395      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
66396      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66397/* end confdefs.h.  */
66398
66399int
66400main ()
66401{
66402
66403  ;
66404  return 0;
66405}
66406_ACEOF
66407if ac_fn_cxx_try_compile "$LINENO"; then :
66408  CC_KNOWS_CCACHE_TRICK=yes
66409else
66410  CC_KNOWS_CCACHE_TRICK=no
66411fi
66412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
66413      CXXFLAGS="$PUSHED_FLAGS"
66414      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
66415        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66416$as_echo "yes" >&6; }
66417        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
66418
66419        CCACHE_SLOPPINESS=pch_defines,time_macros
66420      else
66421        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66422$as_echo "no" >&6; }
66423        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
66424      fi
66425    fi
66426
66427    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
66428        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
66429
66430    if test "x$SET_CCACHE_DIR" != x; then
66431      mkdir -p $CCACHE_DIR > /dev/null 2>&1
66432      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
66433    fi
66434  fi
66435
66436  fi
66437
66438
66439###############################################################################
66440#
66441# And now the finish...
66442#
66443###############################################################################
66444
66445# Check for some common pitfalls
66446
66447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
66448    file_to_test="$SRC_ROOT/LICENSE"
66449    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
66450      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
66451    fi
66452  fi
66453
66454
66455  # Did user specify any unknown variables?
66456
66457  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
66458    # Replace the separating ! with spaces before presenting for end user.
66459    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
66460    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
66461$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
66462  fi
66463
66464
66465  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
66466$as_echo_n "checking if build directory is on local disk... " >&6; }
66467
66468  # df -l lists only local disks; if the given directory is not found then
66469  # a non-zero exit code is given
66470  if test "x$DF" = x; then
66471    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
66472      # msys does not have df; use Windows "net use" instead.
66473      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
66474      if test "x$IS_NETWORK_DISK" = x; then
66475        OUTPUT_DIR_IS_LOCAL="yes"
66476      else
66477        OUTPUT_DIR_IS_LOCAL="no"
66478      fi
66479    else
66480      # No df here, say it's local
66481      OUTPUT_DIR_IS_LOCAL="yes"
66482    fi
66483  else
66484    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
66485      OUTPUT_DIR_IS_LOCAL="yes"
66486    else
66487      OUTPUT_DIR_IS_LOCAL="no"
66488    fi
66489  fi
66490
66491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
66492$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
66493
66494
66495
66496  # Check if the user has any old-style ALT_ variables set.
66497  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
66498
66499  # Before generating output files, test if they exist. If they do, this is a reconfigure.
66500  # Since we can't properly handle the dependencies for this, warn the user about the situation
66501  if test -e $OUTPUT_ROOT/spec.gmk; then
66502    IS_RECONFIGURE=yes
66503  else
66504    IS_RECONFIGURE=no
66505  fi
66506
66507
66508# At the end, call the custom hook. (Dummy macro if no custom sources available)
66509
66510
66511# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
66512
66513  # Keep feature lists sorted and free of duplicates
66514  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
66515  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
66516  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
66517  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
66518  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
66519  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
66520  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
66521
66522  # Validate features
66523  for variant in $JVM_VARIANTS; do
66524    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
66525$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
66526    features_var_name=JVM_FEATURES_$variant
66527    JVM_FEATURES_TO_TEST=${!features_var_name}
66528    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
66529$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
66530    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
66531    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
66532    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
66533    if test "x$INVALID_FEATURES" != x; then
66534      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
66535    fi
66536  done
66537
66538
66539# We're messing a bit with internal autoconf variables to put the config.status
66540# in the output directory instead of the current directory.
66541CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
66542
66543# Create the actual output files. Now the main work of configure is done.
66544cat >confcache <<\_ACEOF
66545# This file is a shell script that caches the results of configure
66546# tests run on this system so they can be shared between configure
66547# scripts and configure runs, see configure's option --config-cache.
66548# It is not useful on other systems.  If it contains results you don't
66549# want to keep, you may remove or edit it.
66550#
66551# config.status only pays attention to the cache file if you give it
66552# the --recheck option to rerun configure.
66553#
66554# `ac_cv_env_foo' variables (set or unset) will be overridden when
66555# loading this file, other *unset* `ac_cv_foo' will be assigned the
66556# following values.
66557
66558_ACEOF
66559
66560# The following way of writing the cache mishandles newlines in values,
66561# but we know of no workaround that is simple, portable, and efficient.
66562# So, we kill variables containing newlines.
66563# Ultrix sh set writes to stderr and can't be redirected directly,
66564# and sets the high bit in the cache file unless we assign to the vars.
66565(
66566  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
66567    eval ac_val=\$$ac_var
66568    case $ac_val in #(
66569    *${as_nl}*)
66570      case $ac_var in #(
66571      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
66572$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
66573      esac
66574      case $ac_var in #(
66575      _ | IFS | as_nl) ;; #(
66576      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
66577      *) { eval $ac_var=; unset $ac_var;} ;;
66578      esac ;;
66579    esac
66580  done
66581
66582  (set) 2>&1 |
66583    case $as_nl`(ac_space=' '; set) 2>&1` in #(
66584    *${as_nl}ac_space=\ *)
66585      # `set' does not quote correctly, so add quotes: double-quote
66586      # substitution turns \\\\ into \\, and sed turns \\ into \.
66587      sed -n \
66588	"s/'/'\\\\''/g;
66589	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
66590      ;; #(
66591    *)
66592      # `set' quotes correctly as required by POSIX, so do not add quotes.
66593      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
66594      ;;
66595    esac |
66596    sort
66597) |
66598  sed '
66599     /^ac_cv_env_/b end
66600     t clear
66601     :clear
66602     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
66603     t end
66604     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
66605     :end' >>confcache
66606if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
66607  if test -w "$cache_file"; then
66608    if test "x$cache_file" != "x/dev/null"; then
66609      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
66610$as_echo "$as_me: updating cache $cache_file" >&6;}
66611      if test ! -f "$cache_file" || test -h "$cache_file"; then
66612	cat confcache >"$cache_file"
66613      else
66614        case $cache_file in #(
66615        */* | ?:*)
66616	  mv -f confcache "$cache_file"$$ &&
66617	  mv -f "$cache_file"$$ "$cache_file" ;; #(
66618        *)
66619	  mv -f confcache "$cache_file" ;;
66620	esac
66621      fi
66622    fi
66623  else
66624    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
66625$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
66626  fi
66627fi
66628rm -f confcache
66629
66630test "x$prefix" = xNONE && prefix=$ac_default_prefix
66631# Let make expand exec_prefix.
66632test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
66633
66634# Transform confdefs.h into DEFS.
66635# Protect against shell expansion while executing Makefile rules.
66636# Protect against Makefile macro expansion.
66637#
66638# If the first sed substitution is executed (which looks for macros that
66639# take arguments), then branch to the quote section.  Otherwise,
66640# look for a macro that doesn't take arguments.
66641ac_script='
66642:mline
66643/\\$/{
66644 N
66645 s,\\\n,,
66646 b mline
66647}
66648t clear
66649:clear
66650s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
66651t quote
66652s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
66653t quote
66654b any
66655:quote
66656s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
66657s/\[/\\&/g
66658s/\]/\\&/g
66659s/\$/$$/g
66660H
66661:any
66662${
66663	g
66664	s/^\n//
66665	s/\n/ /g
66666	p
66667}
66668'
66669DEFS=`sed -n "$ac_script" confdefs.h`
66670
66671
66672ac_libobjs=
66673ac_ltlibobjs=
66674U=
66675for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
66676  # 1. Remove the extension, and $U if already installed.
66677  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
66678  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
66679  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
66680  #    will be set to the directory where LIBOBJS objects are built.
66681  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
66682  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
66683done
66684LIBOBJS=$ac_libobjs
66685
66686LTLIBOBJS=$ac_ltlibobjs
66687
66688
66689
66690: "${CONFIG_STATUS=./config.status}"
66691ac_write_fail=0
66692ac_clean_files_save=$ac_clean_files
66693ac_clean_files="$ac_clean_files $CONFIG_STATUS"
66694{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
66695$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
66696as_write_fail=0
66697cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
66698#! $SHELL
66699# Generated by $as_me.
66700# Run this file to recreate the current configuration.
66701# Compiler output produced by configure, useful for debugging
66702# configure, is in config.log if it exists.
66703
66704debug=false
66705ac_cs_recheck=false
66706ac_cs_silent=false
66707
66708SHELL=\${CONFIG_SHELL-$SHELL}
66709export SHELL
66710_ASEOF
66711cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
66712## -------------------- ##
66713## M4sh Initialization. ##
66714## -------------------- ##
66715
66716# Be more Bourne compatible
66717DUALCASE=1; export DUALCASE # for MKS sh
66718if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
66719  emulate sh
66720  NULLCMD=:
66721  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
66722  # is contrary to our usage.  Disable this feature.
66723  alias -g '${1+"$@"}'='"$@"'
66724  setopt NO_GLOB_SUBST
66725else
66726  case `(set -o) 2>/dev/null` in #(
66727  *posix*) :
66728    set -o posix ;; #(
66729  *) :
66730     ;;
66731esac
66732fi
66733
66734
66735as_nl='
66736'
66737export as_nl
66738# Printing a long string crashes Solaris 7 /usr/bin/printf.
66739as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
66740as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
66741as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
66742# Prefer a ksh shell builtin over an external printf program on Solaris,
66743# but without wasting forks for bash or zsh.
66744if test -z "$BASH_VERSION$ZSH_VERSION" \
66745    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
66746  as_echo='print -r --'
66747  as_echo_n='print -rn --'
66748elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
66749  as_echo='printf %s\n'
66750  as_echo_n='printf %s'
66751else
66752  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
66753    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
66754    as_echo_n='/usr/ucb/echo -n'
66755  else
66756    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
66757    as_echo_n_body='eval
66758      arg=$1;
66759      case $arg in #(
66760      *"$as_nl"*)
66761	expr "X$arg" : "X\\(.*\\)$as_nl";
66762	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66763      esac;
66764      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66765    '
66766    export as_echo_n_body
66767    as_echo_n='sh -c $as_echo_n_body as_echo'
66768  fi
66769  export as_echo_body
66770  as_echo='sh -c $as_echo_body as_echo'
66771fi
66772
66773# The user is always right.
66774if test "${PATH_SEPARATOR+set}" != set; then
66775  PATH_SEPARATOR=:
66776  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
66777    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
66778      PATH_SEPARATOR=';'
66779  }
66780fi
66781
66782
66783# IFS
66784# We need space, tab and new line, in precisely that order.  Quoting is
66785# there to prevent editors from complaining about space-tab.
66786# (If _AS_PATH_WALK were called with IFS unset, it would disable word
66787# splitting by setting IFS to empty value.)
66788IFS=" ""	$as_nl"
66789
66790# Find who we are.  Look in the path if we contain no directory separator.
66791as_myself=
66792case $0 in #((
66793  *[\\/]* ) as_myself=$0 ;;
66794  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66795for as_dir in $PATH
66796do
66797  IFS=$as_save_IFS
66798  test -z "$as_dir" && as_dir=.
66799    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
66800  done
66801IFS=$as_save_IFS
66802
66803     ;;
66804esac
66805# We did not find ourselves, most probably we were run as `sh COMMAND'
66806# in which case we are not to be found in the path.
66807if test "x$as_myself" = x; then
66808  as_myself=$0
66809fi
66810if test ! -f "$as_myself"; then
66811  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
66812  exit 1
66813fi
66814
66815# Unset variables that we do not need and which cause bugs (e.g. in
66816# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
66817# suppresses any "Segmentation fault" message there.  '((' could
66818# trigger a bug in pdksh 5.2.14.
66819for as_var in BASH_ENV ENV MAIL MAILPATH
66820do eval test x\${$as_var+set} = xset \
66821  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
66822done
66823PS1='$ '
66824PS2='> '
66825PS4='+ '
66826
66827# NLS nuisances.
66828LC_ALL=C
66829export LC_ALL
66830LANGUAGE=C
66831export LANGUAGE
66832
66833# CDPATH.
66834(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
66835
66836
66837# as_fn_error STATUS ERROR [LINENO LOG_FD]
66838# ----------------------------------------
66839# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
66840# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
66841# script with STATUS, using 1 if that was 0.
66842as_fn_error ()
66843{
66844  as_status=$1; test $as_status -eq 0 && as_status=1
66845  if test "$4"; then
66846    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
66847    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
66848  fi
66849  $as_echo "$as_me: error: $2" >&2
66850  as_fn_exit $as_status
66851} # as_fn_error
66852
66853
66854# as_fn_set_status STATUS
66855# -----------------------
66856# Set $? to STATUS, without forking.
66857as_fn_set_status ()
66858{
66859  return $1
66860} # as_fn_set_status
66861
66862# as_fn_exit STATUS
66863# -----------------
66864# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
66865as_fn_exit ()
66866{
66867  set +e
66868  as_fn_set_status $1
66869  exit $1
66870} # as_fn_exit
66871
66872# as_fn_unset VAR
66873# ---------------
66874# Portably unset VAR.
66875as_fn_unset ()
66876{
66877  { eval $1=; unset $1;}
66878}
66879as_unset=as_fn_unset
66880# as_fn_append VAR VALUE
66881# ----------------------
66882# Append the text in VALUE to the end of the definition contained in VAR. Take
66883# advantage of any shell optimizations that allow amortized linear growth over
66884# repeated appends, instead of the typical quadratic growth present in naive
66885# implementations.
66886if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
66887  eval 'as_fn_append ()
66888  {
66889    eval $1+=\$2
66890  }'
66891else
66892  as_fn_append ()
66893  {
66894    eval $1=\$$1\$2
66895  }
66896fi # as_fn_append
66897
66898# as_fn_arith ARG...
66899# ------------------
66900# Perform arithmetic evaluation on the ARGs, and store the result in the
66901# global $as_val. Take advantage of shells that can avoid forks. The arguments
66902# must be portable across $(()) and expr.
66903if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
66904  eval 'as_fn_arith ()
66905  {
66906    as_val=$(( $* ))
66907  }'
66908else
66909  as_fn_arith ()
66910  {
66911    as_val=`expr "$@" || test $? -eq 1`
66912  }
66913fi # as_fn_arith
66914
66915
66916if expr a : '\(a\)' >/dev/null 2>&1 &&
66917   test "X`expr 00001 : '.*\(...\)'`" = X001; then
66918  as_expr=expr
66919else
66920  as_expr=false
66921fi
66922
66923if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
66924  as_basename=basename
66925else
66926  as_basename=false
66927fi
66928
66929if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
66930  as_dirname=dirname
66931else
66932  as_dirname=false
66933fi
66934
66935as_me=`$as_basename -- "$0" ||
66936$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66937	 X"$0" : 'X\(//\)$' \| \
66938	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
66939$as_echo X/"$0" |
66940    sed '/^.*\/\([^/][^/]*\)\/*$/{
66941	    s//\1/
66942	    q
66943	  }
66944	  /^X\/\(\/\/\)$/{
66945	    s//\1/
66946	    q
66947	  }
66948	  /^X\/\(\/\).*/{
66949	    s//\1/
66950	    q
66951	  }
66952	  s/.*/./; q'`
66953
66954# Avoid depending upon Character Ranges.
66955as_cr_letters='abcdefghijklmnopqrstuvwxyz'
66956as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
66957as_cr_Letters=$as_cr_letters$as_cr_LETTERS
66958as_cr_digits='0123456789'
66959as_cr_alnum=$as_cr_Letters$as_cr_digits
66960
66961ECHO_C= ECHO_N= ECHO_T=
66962case `echo -n x` in #(((((
66963-n*)
66964  case `echo 'xy\c'` in
66965  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
66966  xy)  ECHO_C='\c';;
66967  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
66968       ECHO_T='	';;
66969  esac;;
66970*)
66971  ECHO_N='-n';;
66972esac
66973
66974rm -f conf$$ conf$$.exe conf$$.file
66975if test -d conf$$.dir; then
66976  rm -f conf$$.dir/conf$$.file
66977else
66978  rm -f conf$$.dir
66979  mkdir conf$$.dir 2>/dev/null
66980fi
66981if (echo >conf$$.file) 2>/dev/null; then
66982  if ln -s conf$$.file conf$$ 2>/dev/null; then
66983    as_ln_s='ln -s'
66984    # ... but there are two gotchas:
66985    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
66986    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
66987    # In both cases, we have to default to `cp -pR'.
66988    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
66989      as_ln_s='cp -pR'
66990  elif ln conf$$.file conf$$ 2>/dev/null; then
66991    as_ln_s=ln
66992  else
66993    as_ln_s='cp -pR'
66994  fi
66995else
66996  as_ln_s='cp -pR'
66997fi
66998rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
66999rmdir conf$$.dir 2>/dev/null
67000
67001
67002# as_fn_mkdir_p
67003# -------------
67004# Create "$as_dir" as a directory, including parents if necessary.
67005as_fn_mkdir_p ()
67006{
67007
67008  case $as_dir in #(
67009  -*) as_dir=./$as_dir;;
67010  esac
67011  test -d "$as_dir" || eval $as_mkdir_p || {
67012    as_dirs=
67013    while :; do
67014      case $as_dir in #(
67015      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
67016      *) as_qdir=$as_dir;;
67017      esac
67018      as_dirs="'$as_qdir' $as_dirs"
67019      as_dir=`$as_dirname -- "$as_dir" ||
67020$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67021	 X"$as_dir" : 'X\(//\)[^/]' \| \
67022	 X"$as_dir" : 'X\(//\)$' \| \
67023	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
67024$as_echo X"$as_dir" |
67025    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67026	    s//\1/
67027	    q
67028	  }
67029	  /^X\(\/\/\)[^/].*/{
67030	    s//\1/
67031	    q
67032	  }
67033	  /^X\(\/\/\)$/{
67034	    s//\1/
67035	    q
67036	  }
67037	  /^X\(\/\).*/{
67038	    s//\1/
67039	    q
67040	  }
67041	  s/.*/./; q'`
67042      test -d "$as_dir" && break
67043    done
67044    test -z "$as_dirs" || eval "mkdir $as_dirs"
67045  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
67046
67047
67048} # as_fn_mkdir_p
67049if mkdir -p . 2>/dev/null; then
67050  as_mkdir_p='mkdir -p "$as_dir"'
67051else
67052  test -d ./-p && rmdir ./-p
67053  as_mkdir_p=false
67054fi
67055
67056
67057# as_fn_executable_p FILE
67058# -----------------------
67059# Test if FILE is an executable regular file.
67060as_fn_executable_p ()
67061{
67062  test -f "$1" && test -x "$1"
67063} # as_fn_executable_p
67064as_test_x='test -x'
67065as_executable_p=as_fn_executable_p
67066
67067# Sed expression to map a string onto a valid CPP name.
67068as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
67069
67070# Sed expression to map a string onto a valid variable name.
67071as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
67072
67073
67074exec 6>&1
67075## ----------------------------------- ##
67076## Main body of $CONFIG_STATUS script. ##
67077## ----------------------------------- ##
67078_ASEOF
67079test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
67080
67081cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67082# Save the log message, to keep $0 and so on meaningful, and to
67083# report actual input values of CONFIG_FILES etc. instead of their
67084# values after options handling.
67085ac_log="
67086This file was extended by OpenJDK $as_me jdk9, which was
67087generated by GNU Autoconf 2.69.  Invocation command line was
67088
67089  CONFIG_FILES    = $CONFIG_FILES
67090  CONFIG_HEADERS  = $CONFIG_HEADERS
67091  CONFIG_LINKS    = $CONFIG_LINKS
67092  CONFIG_COMMANDS = $CONFIG_COMMANDS
67093  $ $0 $@
67094
67095on `(hostname || uname -n) 2>/dev/null | sed 1q`
67096"
67097
67098_ACEOF
67099
67100case $ac_config_files in *"
67101"*) set x $ac_config_files; shift; ac_config_files=$*;;
67102esac
67103
67104
67105
67106cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67107# Files that config.status was made for.
67108config_files="$ac_config_files"
67109
67110_ACEOF
67111
67112cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67113ac_cs_usage="\
67114\`$as_me' instantiates files and other configuration actions
67115from templates according to the current configuration.  Unless the files
67116and actions are specified as TAGs, all are instantiated by default.
67117
67118Usage: $0 [OPTION]... [TAG]...
67119
67120  -h, --help       print this help, then exit
67121  -V, --version    print version number and configuration settings, then exit
67122      --config     print configuration, then exit
67123  -q, --quiet, --silent
67124                   do not print progress messages
67125  -d, --debug      don't remove temporary files
67126      --recheck    update $as_me by reconfiguring in the same conditions
67127      --file=FILE[:TEMPLATE]
67128                   instantiate the configuration file FILE
67129
67130Configuration files:
67131$config_files
67132
67133Report bugs to <build-dev@openjdk.java.net>.
67134OpenJDK home page: <http://openjdk.java.net>."
67135
67136_ACEOF
67137cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67138ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
67139ac_cs_version="\\
67140OpenJDK config.status jdk9
67141configured by $0, generated by GNU Autoconf 2.69,
67142  with options \\"\$ac_cs_config\\"
67143
67144Copyright (C) 2012 Free Software Foundation, Inc.
67145This config.status script is free software; the Free Software Foundation
67146gives unlimited permission to copy, distribute and modify it."
67147
67148ac_pwd='$ac_pwd'
67149srcdir='$srcdir'
67150AWK='$AWK'
67151test -n "\$AWK" || AWK=awk
67152_ACEOF
67153
67154cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67155# The default lists apply if the user does not specify any file.
67156ac_need_defaults=:
67157while test $# != 0
67158do
67159  case $1 in
67160  --*=?*)
67161    ac_option=`expr "X$1" : 'X\([^=]*\)='`
67162    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
67163    ac_shift=:
67164    ;;
67165  --*=)
67166    ac_option=`expr "X$1" : 'X\([^=]*\)='`
67167    ac_optarg=
67168    ac_shift=:
67169    ;;
67170  *)
67171    ac_option=$1
67172    ac_optarg=$2
67173    ac_shift=shift
67174    ;;
67175  esac
67176
67177  case $ac_option in
67178  # Handling of the options.
67179  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
67180    ac_cs_recheck=: ;;
67181  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
67182    $as_echo "$ac_cs_version"; exit ;;
67183  --config | --confi | --conf | --con | --co | --c )
67184    $as_echo "$ac_cs_config"; exit ;;
67185  --debug | --debu | --deb | --de | --d | -d )
67186    debug=: ;;
67187  --file | --fil | --fi | --f )
67188    $ac_shift
67189    case $ac_optarg in
67190    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
67191    '') as_fn_error $? "missing file argument" ;;
67192    esac
67193    as_fn_append CONFIG_FILES " '$ac_optarg'"
67194    ac_need_defaults=false;;
67195  --he | --h |  --help | --hel | -h )
67196    $as_echo "$ac_cs_usage"; exit ;;
67197  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
67198  | -silent | --silent | --silen | --sile | --sil | --si | --s)
67199    ac_cs_silent=: ;;
67200
67201  # This is an error.
67202  -*) as_fn_error $? "unrecognized option: \`$1'
67203Try \`$0 --help' for more information." ;;
67204
67205  *) as_fn_append ac_config_targets " $1"
67206     ac_need_defaults=false ;;
67207
67208  esac
67209  shift
67210done
67211
67212ac_configure_extra_args=
67213
67214if $ac_cs_silent; then
67215  exec 6>/dev/null
67216  ac_configure_extra_args="$ac_configure_extra_args --silent"
67217fi
67218
67219_ACEOF
67220cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67221if \$ac_cs_recheck; then
67222  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
67223  shift
67224  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
67225  CONFIG_SHELL='$SHELL'
67226  export CONFIG_SHELL
67227  exec "\$@"
67228fi
67229
67230_ACEOF
67231cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67232exec 5>>config.log
67233{
67234  echo
67235  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
67236## Running $as_me. ##
67237_ASBOX
67238  $as_echo "$ac_log"
67239} >&5
67240
67241_ACEOF
67242cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67243_ACEOF
67244
67245cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67246
67247# Handling of arguments.
67248for ac_config_target in $ac_config_targets
67249do
67250  case $ac_config_target in
67251    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
67252    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
67253    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
67254    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
67255    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
67256
67257  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
67258  esac
67259done
67260
67261
67262# If the user did not use the arguments to specify the items to instantiate,
67263# then the envvar interface is used.  Set only those that are not.
67264# We use the long form for the default assignment because of an extremely
67265# bizarre bug on SunOS 4.1.3.
67266if $ac_need_defaults; then
67267  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
67268fi
67269
67270# Have a temporary directory for convenience.  Make it in the build tree
67271# simply because there is no reason against having it here, and in addition,
67272# creating and moving files from /tmp can sometimes cause problems.
67273# Hook for its removal unless debugging.
67274# Note that there is a small window in which the directory will not be cleaned:
67275# after its creation but before its name has been assigned to `$tmp'.
67276$debug ||
67277{
67278  tmp= ac_tmp=
67279  trap 'exit_status=$?
67280  : "${ac_tmp:=$tmp}"
67281  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
67282' 0
67283  trap 'as_fn_exit 1' 1 2 13 15
67284}
67285# Create a (secure) tmp directory for tmp files.
67286
67287{
67288  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
67289  test -d "$tmp"
67290}  ||
67291{
67292  tmp=./conf$$-$RANDOM
67293  (umask 077 && mkdir "$tmp")
67294} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
67295ac_tmp=$tmp
67296
67297# Set up the scripts for CONFIG_FILES section.
67298# No need to generate them if there are no CONFIG_FILES.
67299# This happens for instance with `./config.status config.h'.
67300if test -n "$CONFIG_FILES"; then
67301
67302
67303ac_cr=`echo X | tr X '\015'`
67304# On cygwin, bash can eat \r inside `` if the user requested igncr.
67305# But we know of no other shell where ac_cr would be empty at this
67306# point, so we can use a bashism as a fallback.
67307if test "x$ac_cr" = x; then
67308  eval ac_cr=\$\'\\r\'
67309fi
67310ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
67311if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
67312  ac_cs_awk_cr='\\r'
67313else
67314  ac_cs_awk_cr=$ac_cr
67315fi
67316
67317echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
67318_ACEOF
67319
67320
67321{
67322  echo "cat >conf$$subs.awk <<_ACEOF" &&
67323  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
67324  echo "_ACEOF"
67325} >conf$$subs.sh ||
67326  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67327ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
67328ac_delim='%!_!# '
67329for ac_last_try in false false false false false :; do
67330  . ./conf$$subs.sh ||
67331    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67332
67333  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
67334  if test $ac_delim_n = $ac_delim_num; then
67335    break
67336  elif $ac_last_try; then
67337    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67338  else
67339    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
67340  fi
67341done
67342rm -f conf$$subs.sh
67343
67344cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67345cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
67346_ACEOF
67347sed -n '
67348h
67349s/^/S["/; s/!.*/"]=/
67350p
67351g
67352s/^[^!]*!//
67353:repl
67354t repl
67355s/'"$ac_delim"'$//
67356t delim
67357:nl
67358h
67359s/\(.\{148\}\)..*/\1/
67360t more1
67361s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
67362p
67363n
67364b repl
67365:more1
67366s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67367p
67368g
67369s/.\{148\}//
67370t nl
67371:delim
67372h
67373s/\(.\{148\}\)..*/\1/
67374t more2
67375s/["\\]/\\&/g; s/^/"/; s/$/"/
67376p
67377b
67378:more2
67379s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67380p
67381g
67382s/.\{148\}//
67383t delim
67384' <conf$$subs.awk | sed '
67385/^[^""]/{
67386  N
67387  s/\n//
67388}
67389' >>$CONFIG_STATUS || ac_write_fail=1
67390rm -f conf$$subs.awk
67391cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67392_ACAWK
67393cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
67394  for (key in S) S_is_set[key] = 1
67395  FS = ""
67396
67397}
67398{
67399  line = $ 0
67400  nfields = split(line, field, "@")
67401  substed = 0
67402  len = length(field[1])
67403  for (i = 2; i < nfields; i++) {
67404    key = field[i]
67405    keylen = length(key)
67406    if (S_is_set[key]) {
67407      value = S[key]
67408      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
67409      len += length(value) + length(field[++i])
67410      substed = 1
67411    } else
67412      len += 1 + keylen
67413  }
67414
67415  print line
67416}
67417
67418_ACAWK
67419_ACEOF
67420cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67421if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
67422  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
67423else
67424  cat
67425fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
67426  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
67427_ACEOF
67428
67429# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
67430# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
67431# trailing colons and then remove the whole line if VPATH becomes empty
67432# (actually we leave an empty line to preserve line numbers).
67433if test "x$srcdir" = x.; then
67434  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
67435h
67436s///
67437s/^/:/
67438s/[	 ]*$/:/
67439s/:\$(srcdir):/:/g
67440s/:\${srcdir}:/:/g
67441s/:@srcdir@:/:/g
67442s/^:*//
67443s/:*$//
67444x
67445s/\(=[	 ]*\).*/\1/
67446G
67447s/\n//
67448s/^[^=]*=[	 ]*$//
67449}'
67450fi
67451
67452cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67453fi # test -n "$CONFIG_FILES"
67454
67455
67456eval set X "  :F $CONFIG_FILES      "
67457shift
67458for ac_tag
67459do
67460  case $ac_tag in
67461  :[FHLC]) ac_mode=$ac_tag; continue;;
67462  esac
67463  case $ac_mode$ac_tag in
67464  :[FHL]*:*);;
67465  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
67466  :[FH]-) ac_tag=-:-;;
67467  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
67468  esac
67469  ac_save_IFS=$IFS
67470  IFS=:
67471  set x $ac_tag
67472  IFS=$ac_save_IFS
67473  shift
67474  ac_file=$1
67475  shift
67476
67477  case $ac_mode in
67478  :L) ac_source=$1;;
67479  :[FH])
67480    ac_file_inputs=
67481    for ac_f
67482    do
67483      case $ac_f in
67484      -) ac_f="$ac_tmp/stdin";;
67485      *) # Look for the file first in the build tree, then in the source tree
67486	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
67487	 # because $ac_f cannot contain `:'.
67488	 test -f "$ac_f" ||
67489	   case $ac_f in
67490	   [\\/$]*) false;;
67491	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
67492	   esac ||
67493	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
67494      esac
67495      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
67496      as_fn_append ac_file_inputs " '$ac_f'"
67497    done
67498
67499    # Let's still pretend it is `configure' which instantiates (i.e., don't
67500    # use $as_me), people would be surprised to read:
67501    #    /* config.h.  Generated by config.status.  */
67502    configure_input='Generated from '`
67503	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
67504	`' by configure.'
67505    if test x"$ac_file" != x-; then
67506      configure_input="$ac_file.  $configure_input"
67507      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
67508$as_echo "$as_me: creating $ac_file" >&6;}
67509    fi
67510    # Neutralize special characters interpreted by sed in replacement strings.
67511    case $configure_input in #(
67512    *\&* | *\|* | *\\* )
67513       ac_sed_conf_input=`$as_echo "$configure_input" |
67514       sed 's/[\\\\&|]/\\\\&/g'`;; #(
67515    *) ac_sed_conf_input=$configure_input;;
67516    esac
67517
67518    case $ac_tag in
67519    *:-:* | *:-) cat >"$ac_tmp/stdin" \
67520      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
67521    esac
67522    ;;
67523  esac
67524
67525  ac_dir=`$as_dirname -- "$ac_file" ||
67526$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67527	 X"$ac_file" : 'X\(//\)[^/]' \| \
67528	 X"$ac_file" : 'X\(//\)$' \| \
67529	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
67530$as_echo X"$ac_file" |
67531    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67532	    s//\1/
67533	    q
67534	  }
67535	  /^X\(\/\/\)[^/].*/{
67536	    s//\1/
67537	    q
67538	  }
67539	  /^X\(\/\/\)$/{
67540	    s//\1/
67541	    q
67542	  }
67543	  /^X\(\/\).*/{
67544	    s//\1/
67545	    q
67546	  }
67547	  s/.*/./; q'`
67548  as_dir="$ac_dir"; as_fn_mkdir_p
67549  ac_builddir=.
67550
67551case "$ac_dir" in
67552.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
67553*)
67554  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
67555  # A ".." for each directory in $ac_dir_suffix.
67556  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
67557  case $ac_top_builddir_sub in
67558  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
67559  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
67560  esac ;;
67561esac
67562ac_abs_top_builddir=$ac_pwd
67563ac_abs_builddir=$ac_pwd$ac_dir_suffix
67564# for backward compatibility:
67565ac_top_builddir=$ac_top_build_prefix
67566
67567case $srcdir in
67568  .)  # We are building in place.
67569    ac_srcdir=.
67570    ac_top_srcdir=$ac_top_builddir_sub
67571    ac_abs_top_srcdir=$ac_pwd ;;
67572  [\\/]* | ?:[\\/]* )  # Absolute name.
67573    ac_srcdir=$srcdir$ac_dir_suffix;
67574    ac_top_srcdir=$srcdir
67575    ac_abs_top_srcdir=$srcdir ;;
67576  *) # Relative name.
67577    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
67578    ac_top_srcdir=$ac_top_build_prefix$srcdir
67579    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
67580esac
67581ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
67582
67583
67584  case $ac_mode in
67585  :F)
67586  #
67587  # CONFIG_FILE
67588  #
67589
67590_ACEOF
67591
67592cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67593# If the template does not know about datarootdir, expand it.
67594# FIXME: This hack should be removed a few years after 2.60.
67595ac_datarootdir_hack=; ac_datarootdir_seen=
67596ac_sed_dataroot='
67597/datarootdir/ {
67598  p
67599  q
67600}
67601/@datadir@/p
67602/@docdir@/p
67603/@infodir@/p
67604/@localedir@/p
67605/@mandir@/p'
67606case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
67607*datarootdir*) ac_datarootdir_seen=yes;;
67608*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
67609  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
67610$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
67611_ACEOF
67612cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67613  ac_datarootdir_hack='
67614  s&@datadir@&$datadir&g
67615  s&@docdir@&$docdir&g
67616  s&@infodir@&$infodir&g
67617  s&@localedir@&$localedir&g
67618  s&@mandir@&$mandir&g
67619  s&\\\${datarootdir}&$datarootdir&g' ;;
67620esac
67621_ACEOF
67622
67623# Neutralize VPATH when `$srcdir' = `.'.
67624# Shell code in configure.ac might set extrasub.
67625# FIXME: do we really want to maintain this feature?
67626cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67627ac_sed_extra="$ac_vpsub
67628$extrasub
67629_ACEOF
67630cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67631:t
67632/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
67633s|@configure_input@|$ac_sed_conf_input|;t t
67634s&@top_builddir@&$ac_top_builddir_sub&;t t
67635s&@top_build_prefix@&$ac_top_build_prefix&;t t
67636s&@srcdir@&$ac_srcdir&;t t
67637s&@abs_srcdir@&$ac_abs_srcdir&;t t
67638s&@top_srcdir@&$ac_top_srcdir&;t t
67639s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
67640s&@builddir@&$ac_builddir&;t t
67641s&@abs_builddir@&$ac_abs_builddir&;t t
67642s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
67643$ac_datarootdir_hack
67644"
67645eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
67646  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67647
67648test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
67649  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
67650  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
67651      "$ac_tmp/out"`; test -z "$ac_out"; } &&
67652  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67653which seems to be undefined.  Please make sure it is defined" >&5
67654$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67655which seems to be undefined.  Please make sure it is defined" >&2;}
67656
67657  rm -f "$ac_tmp/stdin"
67658  case $ac_file in
67659  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
67660  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
67661  esac \
67662  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67663 ;;
67664
67665
67666
67667  esac
67668
67669done # for ac_tag
67670
67671
67672as_fn_exit 0
67673_ACEOF
67674ac_clean_files=$ac_clean_files_save
67675
67676test $ac_write_fail = 0 ||
67677  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
67678
67679
67680# configure is writing to config.log, and then calls config.status.
67681# config.status does its own redirection, appending to config.log.
67682# Unfortunately, on DOS this fails, as config.log is still kept open
67683# by configure, so config.status won't be able to write to it; its
67684# output is simply discarded.  So we exec the FD to /dev/null,
67685# effectively closing config.log, so it can be properly (re)opened and
67686# appended to by config.status.  When coming back to configure, we
67687# need to make the FD available again.
67688if test "$no_create" != yes; then
67689  ac_cs_success=:
67690  ac_config_status_args=
67691  test "$silent" = yes &&
67692    ac_config_status_args="$ac_config_status_args --quiet"
67693  exec 5>/dev/null
67694  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
67695  exec 5>>config.log
67696  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
67697  # would make configure fail if this is the last instruction.
67698  $ac_cs_success || as_fn_exit 1
67699fi
67700if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
67701  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
67702$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
67703fi
67704
67705
67706# After AC_OUTPUT, we need to do final work
67707
67708
67709  # Try to move config.log (generated by autoconf) to the configure-support directory.
67710  if test -e ./config.log; then
67711    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
67712  fi
67713
67714  # Rotate our log file (configure.log)
67715  if test -e "$OUTPUT_ROOT/configure.log.old"; then
67716    $RM -f "$OUTPUT_ROOT/configure.log.old"
67717  fi
67718  if test -e "$OUTPUT_ROOT/configure.log"; then
67719    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
67720  fi
67721
67722  # Move configure.log from current directory to the build output root
67723  if test -e ./configure.log; then
67724    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
67725  fi
67726
67727  # Make the compare script executable
67728  $CHMOD +x $OUTPUT_ROOT/compare.sh
67729
67730
67731# Finally output some useful information to the user
67732
67733  # Finally output some useful information to the user
67734
67735  printf "\n"
67736  printf "====================================================\n"
67737  if test "x$no_create" != "xyes"; then
67738    if test "x$IS_RECONFIGURE" != "xyes"; then
67739      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
67740    else
67741      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
67742    fi
67743  else
67744    if test "x$IS_RECONFIGURE" != "xyes"; then
67745      printf "A configuration has been successfully checked but not created\n"
67746    else
67747      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
67748    fi
67749  fi
67750  if test "x$CONFIGURE_COMMAND_LINE" != x; then
67751    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
67752  else
67753    printf "using default settings.\n"
67754  fi
67755
67756  printf "\n"
67757  printf "Configuration summary:\n"
67758  printf "* Debug level:    $DEBUG_LEVEL\n"
67759  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
67760  printf "* JDK variant:    $JDK_VARIANT\n"
67761  printf "* JVM variants:   $JVM_VARIANTS\n"
67762  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
67763  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
67764
67765  printf "\n"
67766  printf "Tools summary:\n"
67767  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
67768    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
67769  fi
67770  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
67771  if test "x$TOOLCHAIN_VERSION" != "x"; then
67772    print_version=" $TOOLCHAIN_VERSION"
67773  fi
67774  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
67775  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
67776  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
67777
67778  printf "\n"
67779  printf "Build performance summary:\n"
67780  printf "* Cores to use:   $JOBS\n"
67781  printf "* Memory limit:   $MEMORY_SIZE MB\n"
67782  if test "x$CCACHE_STATUS" != "x"; then
67783    printf "* ccache status:  $CCACHE_STATUS\n"
67784  fi
67785  printf "\n"
67786
67787  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
67788    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
67789    printf "will result in longer build times.\n"
67790    printf "\n"
67791  fi
67792
67793  if test "x$FOUND_ALT_VARIABLES" != "x"; then
67794    printf "WARNING: You have old-style ALT_ environment variables set.\n"
67795    printf "These are not respected, and will be ignored. It is recommended\n"
67796    printf "that you clean your environment. The following variables are set:\n"
67797    printf "$FOUND_ALT_VARIABLES\n"
67798    printf "\n"
67799  fi
67800
67801  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
67802    printf "WARNING: Your build output directory is not on a local disk.\n"
67803    printf "This will severely degrade build performance!\n"
67804    printf "It is recommended that you create an output directory on a local disk,\n"
67805    printf "and run the configure script again from that directory.\n"
67806    printf "\n"
67807  fi
67808
67809  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
67810    printf "WARNING: The result of this configuration has overridden an older\n"
67811    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
67812    printf "proper build. Failure to do so might result in strange build problems.\n"
67813    printf "\n"
67814  fi
67815
67816  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
67817    printf "WARNING: The result of this configuration was not saved.\n"
67818    printf "You should run without '--no-create | -n' to create the configuration.\n"
67819    printf "\n"
67820  fi
67821
67822
67823
67824  # Locate config.log.
67825  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
67826    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
67827  elif test -e "./config.log"; then
67828    CONFIG_LOG_PATH="."
67829  fi
67830
67831  if test -e "$CONFIG_LOG_PATH/config.log"; then
67832    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
67833    if test $? -eq 0; then
67834      printf "The following warnings were produced. Repeated here for convenience:\n"
67835      # We must quote sed expression (using []) to stop m4 from eating the [].
67836      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
67837      printf "\n"
67838    fi
67839  fi
67840
67841